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

Unified Diff: webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h
diff --git a/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h b/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h
index 35ac69e8ab7369055d35384c6173f7933e7cc86c..2736c2912e8bca2ef6dfe14ae1b9bdacd6e63f6e 100644
--- a/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h
+++ b/webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h
@@ -36,14 +36,14 @@ class AudioCodecSpeedTest : public testing::TestWithParam<coding_param> {
// 3. assign |encoded_bytes| with the length of the bit stream (in bytes),
// 4. return the cost of time (in millisecond) spent on actual encoding.
virtual float EncodeABlock(int16_t* in_data, uint8_t* bit_stream,
- int max_bytes, int* encoded_bytes) = 0;
+ size_t max_bytes, size_t* encoded_bytes) = 0;
// DecodeABlock(...) does the following:
// 1. decodes the bit stream in |bit_stream| with a length of |encoded_bytes|
// (in bytes),
// 2. save the decoded audio in |out_data|,
// 3. return the cost of time (in millisecond) spent on actual decoding.
- virtual float DecodeABlock(const uint8_t* bit_stream, int encoded_bytes,
+ virtual float DecodeABlock(const uint8_t* bit_stream, size_t encoded_bytes,
int16_t* out_data) = 0;
// Encoding and decode an audio of |audio_duration| (in seconds) and
@@ -67,9 +67,9 @@ class AudioCodecSpeedTest : public testing::TestWithParam<coding_param> {
rtc::scoped_ptr<uint8_t[]> bit_stream_;
// Maximum number of bytes in output bitstream for a frame of audio.
- int max_bytes_;
+ size_t max_bytes_;
- int encoded_bytes_;
+ size_t encoded_bytes_;
float encoding_time_ms_;
float decoding_time_ms_;
FILE* out_file_;

Powered by Google App Engine
This is Rietveld 408576698