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

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

Issue 1179953003: Revert "Upconvert various types to int." (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
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 int len; 44 short len, mode, pli;
45 short mode, pli;
46 int blockcount = 0; 45 int blockcount = 0;
47 46
48 IlbcEncoderInstance *Enc_Inst; 47 IlbcEncoderInstance *Enc_Inst;
49 IlbcDecoderInstance *Dec_Inst; 48 IlbcDecoderInstance *Dec_Inst;
50 #ifdef JUNK_DATA 49 #ifdef JUNK_DATA
51 int i; 50 int i;
52 FILE *seedfile; 51 FILE *seedfile;
53 unsigned int random_seed = (unsigned int) time(NULL);//1196764538 52 unsigned int random_seed = (unsigned int) time(NULL);//1196764538
54 #endif 53 #endif
55 54
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 fprintf(stderr, "Error. Channel file too short\n"); 170 fprintf(stderr, "Error. Channel file too short\n");
172 exit(0); 171 exit(0);
173 } 172 }
174 } else { 173 } else {
175 pli=1; 174 pli=1;
176 } 175 }
177 176
178 /* decoding */ 177 /* decoding */
179 fprintf(stderr, "--- Decoding block %i --- ",blockcount); 178 fprintf(stderr, "--- Decoding block %i --- ",blockcount);
180 if (pli==1) { 179 if (pli==1) {
181 len=WebRtcIlbcfix_Decode(Dec_Inst, encoded_data, (int16_t)len, data, 180 len=WebRtcIlbcfix_Decode(Dec_Inst, encoded_data, len, data,
182 &speechType); 181 &speechType);
183 if (len < 0) { 182 if (len < 0) {
184 fprintf(stderr, "Error decoding\n"); 183 fprintf(stderr, "Error decoding\n");
185 exit(0); 184 exit(0);
186 } 185 }
187 } else { 186 } else {
188 len=WebRtcIlbcfix_DecodePlc(Dec_Inst, data, 1); 187 len=WebRtcIlbcfix_DecodePlc(Dec_Inst, data, 1);
189 } 188 }
190 fprintf(stderr, "\r"); 189 fprintf(stderr, "\r");
191 190
(...skipping 16 matching lines...) Expand all
208 WebRtcIlbcfix_EncoderFree(Enc_Inst); 207 WebRtcIlbcfix_EncoderFree(Enc_Inst);
209 WebRtcIlbcfix_DecoderFree(Dec_Inst); 208 WebRtcIlbcfix_DecoderFree(Dec_Inst);
210 209
211 /* close files */ 210 /* close files */
212 fclose(ifileid); 211 fclose(ifileid);
213 fclose(efileid); 212 fclose(efileid);
214 fclose(ofileid); 213 fclose(ofileid);
215 214
216 return 0; 215 return 0;
217 } 216 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/codecs/ilbc/my_corr.c ('k') | webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698