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

Side by Side Diff: webrtc/modules/audio_coding/codecs/isac/fix/test/test_iSACfixfloat.c

Issue 1168753002: Match existing type usage better. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: 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) 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 int bottleneck, /* excluding headers; bits/s */ 61 int bottleneck, /* excluding headers; bits/s */
62 BottleNeckModel* BN_data) { 62 BottleNeckModel* BN_data) {
63 const int HeaderSize = 35; 63 const int HeaderSize = 35;
64 int HeaderRate; 64 int HeaderRate;
65 65
66 HeaderRate = HeaderSize * 8 * FS / current_framesamples; /* bits/s */ 66 HeaderRate = HeaderSize * 8 * FS / current_framesamples; /* bits/s */
67 67
68 /* everything in samples */ 68 /* everything in samples */
69 BN_data->sample_count = BN_data->sample_count + current_framesamples; 69 BN_data->sample_count = BN_data->sample_count + current_framesamples;
70 70
71 BN_data->arrival_time += 71 BN_data->arrival_time += (uint32_t)
72 ((packet_size + HeaderSize) * 8 * FS) / (bottleneck + HeaderRate); 72 (((packet_size + HeaderSize) * 8 * FS) / (bottleneck + HeaderRate));
73 BN_data->send_time += current_framesamples; 73 BN_data->send_time += current_framesamples;
74 74
75 if (BN_data->arrival_time < BN_data->sample_count) 75 if (BN_data->arrival_time < BN_data->sample_count)
76 BN_data->arrival_time = BN_data->sample_count; 76 BN_data->arrival_time = BN_data->sample_count;
77 77
78 BN_data->rtp_number++; 78 BN_data->rtp_number++;
79 } 79 }
80 80
81 int main(int argc, char* argv[]) { 81 int main(int argc, char* argv[]) {
82 char inname[50], outname[50], bottleneck_file[50], bitfilename[60], 82 char inname[50], outname[50], bottleneck_file[50], bitfilename[60],
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 fclose(outp); 610 fclose(outp);
611 611
612 WebRtcIsac_Free(ISAC_main_inst); 612 WebRtcIsac_Free(ISAC_main_inst);
613 WebRtcIsacfix_Free(ISACFIX_main_inst); 613 WebRtcIsacfix_Free(ISACFIX_main_inst);
614 614
615 // fclose(histfile); 615 // fclose(histfile);
616 // fclose(ratefile); 616 // fclose(ratefile);
617 617
618 return 0; 618 return 0;
619 } 619 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/codecs/isac/fix/test/kenny.cc ('k') | webrtc/modules/audio_coding/codecs/isac/main/source/isac.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698