OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 27 matching lines...) Expand all Loading... |
38 using namespace std; | 38 using namespace std; |
39 | 39 |
40 int main(int argc, char* argv[]) { | 40 int main(int argc, char* argv[]) { |
41 char inname[100], outname[100], bottleneck_file[100], vadfile[100]; | 41 char inname[100], outname[100], bottleneck_file[100], vadfile[100]; |
42 FILE* inp, *outp, * f_bn = NULL, * vadp = NULL, *bandwidthp; | 42 FILE* inp, *outp, * f_bn = NULL, * vadp = NULL, *bandwidthp; |
43 int framecnt, endfile; | 43 int framecnt, endfile; |
44 | 44 |
45 int i, errtype, VADusage = 0, packetLossPercent = 0; | 45 int i, errtype, VADusage = 0, packetLossPercent = 0; |
46 int16_t CodingMode; | 46 int16_t CodingMode; |
47 int32_t bottleneck = 0; | 47 int32_t bottleneck = 0; |
48 int16_t framesize = 30; /* ms */ | 48 int framesize = 30; /* ms */ |
49 int cur_framesmpls, err; | 49 int cur_framesmpls, err; |
50 | 50 |
51 /* Runtime statistics */ | 51 /* Runtime statistics */ |
52 double starttime, runtime, length_file; | 52 double starttime, runtime, length_file; |
53 | 53 |
54 int16_t stream_len = 0; | 54 int16_t stream_len = 0; |
55 int16_t declen = 0, declenTC = 0; | 55 int declen = 0, declenTC = 0; |
56 bool lostFrame = false; | 56 bool lostFrame = false; |
57 | 57 |
58 int16_t shortdata[SWBFRAMESAMPLES_10ms]; | 58 int16_t shortdata[SWBFRAMESAMPLES_10ms]; |
59 int16_t vaddata[SWBFRAMESAMPLES_10ms * 3]; | 59 int16_t vaddata[SWBFRAMESAMPLES_10ms * 3]; |
60 int16_t decoded[MAX_FRAMESAMPLES << 1]; | 60 int16_t decoded[MAX_FRAMESAMPLES << 1]; |
61 int16_t decodedTC[MAX_FRAMESAMPLES << 1]; | 61 int16_t decodedTC[MAX_FRAMESAMPLES << 1]; |
62 uint16_t streamdata[500]; | 62 uint16_t streamdata[500]; |
63 int16_t speechType[1]; | 63 int16_t speechType[1]; |
64 int16_t rateBPS = 0; | 64 int16_t rateBPS = 0; |
65 int16_t fixedFL = 0; | 65 int16_t fixedFL = 0; |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 fprintf(stderr, " transcoding rate %.0f kbps", | 933 fprintf(stderr, " transcoding rate %.0f kbps", |
934 (double)numTransCodingBytes * 8.0 * (sampFreqKHz) / totalsmpls); | 934 (double)numTransCodingBytes * 8.0 * (sampFreqKHz) / totalsmpls); |
935 } | 935 } |
936 | 936 |
937 fclose(inp); | 937 fclose(inp); |
938 fclose(outp); | 938 fclose(outp); |
939 WebRtcIsac_Free(ISAC_main_inst); | 939 WebRtcIsac_Free(ISAC_main_inst); |
940 | 940 |
941 exit(0); | 941 exit(0); |
942 } | 942 } |
OLD | NEW |