OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 fwrite(decoded, sizeof(int16_t), declen, outp); | 575 fwrite(decoded, sizeof(int16_t), declen, outp); |
576 } | 576 } |
577 | 577 |
578 fprintf(stderr, " \rframe = %d", framecnt); | 578 fprintf(stderr, " \rframe = %d", framecnt); |
579 framecnt++; | 579 framecnt++; |
580 | 580 |
581 #ifdef _DEBUG | 581 #ifdef _DEBUG |
582 | 582 |
583 totalsmpls += declen; | 583 totalsmpls += declen; |
584 totalbits += 8 * stream_len; | 584 totalbits += 8 * stream_len; |
585 kbps = ((double)FS) / ((double)cur_framesmpls) * 8.0 * stream_len / | 585 kbps = ((double)FS) / ((double)cur_framesmpls) * 8.0 * stream_len / 1000.0; |
586 1000.0; // kbits/s | |
587 fy = fopen("bit_rate.dat", "a"); | 586 fy = fopen("bit_rate.dat", "a"); |
588 fprintf(fy, "Frame %i = %0.14f\n", framecnt, kbps); | 587 fprintf(fy, "Frame %i = %0.14f\n", framecnt, kbps); |
589 fclose(fy); | 588 fclose(fy); |
590 | 589 |
591 #endif /* _DEBUG */ | 590 #endif /* _DEBUG */ |
592 } | 591 } |
593 | 592 |
594 #ifdef _DEBUG | 593 #ifdef _DEBUG |
595 printf("\n\ntotal bits = %d bits", totalbits); | 594 printf("\n\ntotal bits = %d bits", totalbits); |
596 printf("\nmeasured average bitrate = %0.3f kbits/s", | 595 printf("\nmeasured average bitrate = %0.3f kbits/s", |
(...skipping 13 matching lines...) Expand all Loading... |
610 fclose(outp); | 609 fclose(outp); |
611 | 610 |
612 WebRtcIsac_Free(ISAC_main_inst); | 611 WebRtcIsac_Free(ISAC_main_inst); |
613 WebRtcIsacfix_Free(ISACFIX_main_inst); | 612 WebRtcIsacfix_Free(ISACFIX_main_inst); |
614 | 613 |
615 // fclose(histfile); | 614 // fclose(histfile); |
616 // fclose(ratefile); | 615 // fclose(ratefile); |
617 | 616 |
618 return 0; | 617 return 0; |
619 } | 618 } |
OLD | NEW |