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

Side by Side Diff: webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testLib.c

Issue 1184643002: Reland "Upconvert various types to int.", ilbc portion. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: 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
« no previous file with comments | « webrtc/modules/audio_coding/codecs/ilbc/my_corr.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 23 matching lines...) Expand all
34 * 34 *
35 * Usage: 35 * Usage:
36 * exefile_name.exe <infile> <bytefile> <outfile> 36 * exefile_name.exe <infile> <bytefile> <outfile>
37 * 37 *
38 *---------------------------------------------------------------*/ 38 *---------------------------------------------------------------*/
39 39
40 int main(int argc, char* argv[]) 40 int main(int argc, char* argv[])
41 { 41 {
42 FILE *ifileid,*efileid,*ofileid, *chfileid; 42 FILE *ifileid,*efileid,*ofileid, *chfileid;
43 short encoded_data[55], data[240], speechType; 43 short encoded_data[55], data[240], speechType;
44 short len, mode, pli; 44 int len;
45 short mode, pli;
45 size_t readlen; 46 size_t readlen;
46 int blockcount = 0; 47 int blockcount = 0;
47 48
48 IlbcEncoderInstance *Enc_Inst; 49 IlbcEncoderInstance *Enc_Inst;
49 IlbcDecoderInstance *Dec_Inst; 50 IlbcDecoderInstance *Dec_Inst;
50 #ifdef JUNK_DATA 51 #ifdef JUNK_DATA
51 int i; 52 int i;
52 FILE *seedfile; 53 FILE *seedfile;
53 unsigned int random_seed = (unsigned int) time(NULL);//1196764538 54 unsigned int random_seed = (unsigned int) time(NULL);//1196764538
54 #endif 55 #endif
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 fprintf(stderr, "Error. Channel file too short\n"); 167 fprintf(stderr, "Error. Channel file too short\n");
167 exit(0); 168 exit(0);
168 } 169 }
169 } else { 170 } else {
170 pli=1; 171 pli=1;
171 } 172 }
172 173
173 /* decoding */ 174 /* decoding */
174 fprintf(stderr, "--- Decoding block %i --- ",blockcount); 175 fprintf(stderr, "--- Decoding block %i --- ",blockcount);
175 if (pli==1) { 176 if (pli==1) {
176 len=WebRtcIlbcfix_Decode(Dec_Inst, encoded_data, len, data, 177 len=WebRtcIlbcfix_Decode(Dec_Inst, encoded_data, (int16_t)len, data,
177 &speechType); 178 &speechType);
178 if (len < 0) { 179 if (len < 0) {
179 fprintf(stderr, "Error decoding\n"); 180 fprintf(stderr, "Error decoding\n");
180 exit(0); 181 exit(0);
181 } 182 }
182 } else { 183 } else {
183 len=WebRtcIlbcfix_DecodePlc(Dec_Inst, data, 1); 184 len=WebRtcIlbcfix_DecodePlc(Dec_Inst, data, 1);
184 } 185 }
185 fprintf(stderr, "\r"); 186 fprintf(stderr, "\r");
186 187
(...skipping 16 matching lines...) Expand all
203 WebRtcIlbcfix_EncoderFree(Enc_Inst); 204 WebRtcIlbcfix_EncoderFree(Enc_Inst);
204 WebRtcIlbcfix_DecoderFree(Dec_Inst); 205 WebRtcIlbcfix_DecoderFree(Dec_Inst);
205 206
206 /* close files */ 207 /* close files */
207 fclose(ifileid); 208 fclose(ifileid);
208 fclose(efileid); 209 fclose(efileid);
209 fclose(ofileid); 210 fclose(ofileid);
210 211
211 return 0; 212 return 0;
212 } 213 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/codecs/ilbc/my_corr.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698