Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: webrtc/modules/audio_coding/codecs/g722/test/testG722.cc

Issue 1174813003: Prepare to convert various types to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Review comments + resync Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 printf("framelength : Framelength in samples.\n\n"); 76 printf("framelength : Framelength in samples.\n\n");
77 printf("infile : Normal speech input file\n\n"); 77 printf("infile : Normal speech input file\n\n");
78 printf("outbitfile : Bitstream output file\n\n"); 78 printf("outbitfile : Bitstream output file\n\n");
79 printf("outspeechfile: Speech output file\n\n"); 79 printf("outspeechfile: Speech output file\n\n");
80 exit(0); 80 exit(0);
81 81
82 } 82 }
83 83
84 /* Get frame length */ 84 /* Get frame length */
85 framelength = atoi(argv[1]); 85 framelength = atoi(argv[1]);
86 if (framelength < 0) {
87 printf(" G.722: Invalid framelength %d.\n", framelength);
88 exit(1);
89 }
86 90
87 /* Get Input and Output files */ 91 /* Get Input and Output files */
88 sscanf(argv[2], "%s", inname); 92 sscanf(argv[2], "%s", inname);
89 sscanf(argv[3], "%s", outbit); 93 sscanf(argv[3], "%s", outbit);
90 sscanf(argv[4], "%s", outname); 94 sscanf(argv[4], "%s", outname);
91 95
92 if ((inp = fopen(inname,"rb")) == NULL) { 96 if ((inp = fopen(inname,"rb")) == NULL) {
93 printf(" G.722: Cannot read file %s.\n", inname); 97 printf(" G.722: Cannot read file %s.\n", inname);
94 exit(1); 98 exit(1);
95 } 99 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 printf("\n\nLength of speech file: %.1f s\n", length_file); 158 printf("\n\nLength of speech file: %.1f s\n", length_file);
155 printf("Time to run G.722: %.2f s (%.2f %% of realtime)\n\n", runtime, (100*runtime/length_file)); 159 printf("Time to run G.722: %.2f s (%.2f %% of realtime)\n\n", runtime, (100*runtime/length_file));
156 printf("---------------------END----------------------\n"); 160 printf("---------------------END----------------------\n");
157 161
158 fclose(inp); 162 fclose(inp);
159 fclose(outbitp); 163 fclose(outbitp);
160 fclose(outp); 164 fclose(outp);
161 165
162 return 0; 166 return 0;
163 } 167 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698