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

Issue 1534193008: Misc. small cleanups (Closed)

Created:
5 years ago by Peter Kasting
Modified:
4 years, 11 months ago
CC:
webrtc-reviews_webrtc.org, kwiberg-webrtc, Andrew MacDonald, fengyue_agora.io, tlegrand-webrtc, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, sdk-team_agora.io, peah-webrtc, minyue-webrtc, mflodman, zhengzhonghou_agora.io, aluebs-webrtc, bjornv1
Base URL:
https://chromium.googlesource.com/external/webrtc@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Misc. small cleanups. * Better param names * Avoid using negative values for (bogus) placeholder channel counts (mostly in tests). Since channels will be changing to size_t, negative values will be illegal; it's sufficient to use 0 in these cases. * Use arraysize() * Use size_t for counting frames, samples, blocks, buffers, and bytes -- most of these are already size_t in most places, this just fixes some stragglers * reinterpret_cast<int64_t>(void*) is not necessarily safe; use uintptr_t instead * Remove unnecessary code, e.g. dead code, needlessly long/repetitive code, or function overrides that exactly match the base definition * Fix indenting * Use uint32_t for timestamps (matching how it's already a uint32_t in most places) * Spelling * RTC_CHECK_EQ(expected, actual) * Rewrap * Use .empty() * Be more pedantic about matching int/int32_t/ * Remove pointless consts on input parameters to functions * Add missing sanity checks All this was found in the course of constructing https://codereview.webrtc.org/1316523002/ , and is being landed separately first. BUG=none TEST=none Committed: https://crrev.com/25702cb1628941427fa55e528f53483f239ae011 Cr-Commit-Position: refs/heads/master@{#11191}

Patch Set 1 #

Patch Set 2 : Compile fixes #

Patch Set 3 : Formatting fixes #

Total comments: 18

Patch Set 4 : Review comments #

Patch Set 5 : Unnecessary parens #

Unified diffs Side-by-side diffs Delta from patch set Stats (+445 lines, -608 lines) Patch
M talk/media/base/codec.h View 1 2 3 2 chunks +13 lines, -3 lines 0 comments Download
M talk/media/base/codec.cc View 1 2 3 2 chunks +21 lines, -19 lines 0 comments Download
M webrtc/audio/audio_receive_stream_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/audio/audio_send_stream_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/common_audio/audio_converter_unittest.cc View 1 4 chunks +11 lines, -10 lines 0 comments Download
M webrtc/common_audio/blocker_unittest.cc View 10 chunks +35 lines, -34 lines 0 comments Download
M webrtc/common_audio/lapped_transform_unittest.cc View 8 chunks +15 lines, -15 lines 0 comments Download
M webrtc/common_audio/real_fourier.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/common_audio/real_fourier.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/common_audio/real_fourier_unittest.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M webrtc/common_audio/wav_file.h View 4 chunks +7 lines, -7 lines 0 comments Download
M webrtc/common_audio/wav_file.cc View 5 chunks +7 lines, -9 lines 0 comments Download
M webrtc/common_audio/wav_file_unittest.cc View 5 chunks +8 lines, -8 lines 0 comments Download
M webrtc/common_audio/wav_header.h View 3 chunks +6 lines, -6 lines 0 comments Download
M webrtc/common_audio/wav_header.cc View 1 2 6 chunks +24 lines, -23 lines 0 comments Download
M webrtc/common_audio/wav_header_unittest.cc View 6 chunks +9 lines, -9 lines 0 comments Download
M webrtc/modules/audio_coding/acm2/acm_codec_database.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/acm2/acm_resampler.cc View 2 chunks +1 line, -2 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h View 3 chunks +3 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/test/isac_speed_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h View 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc View 2 chunks +7 lines, -8 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/opus/opus_speed_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/pcm16b/audio_encoder_pcm16b.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.h View 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/tools/audio_codec_speed_test.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M webrtc/modules/audio_coding/include/audio_coding_module.h View 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/test/opus_test.h View 2 chunks +5 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/test/opus_test.cc View 4 chunks +10 lines, -11 lines 0 comments Download
M webrtc/modules/audio_device/dummy/file_audio_device.cc View 1 2 3 2 chunks +5 lines, -7 lines 0 comments Download
M webrtc/modules/audio_device/test/audio_device_test_api.cc View 1 chunk +0 lines, -23 lines 0 comments Download
M webrtc/modules/audio_device/test/func_test_manager.h View 1 chunk +0 lines, -22 lines 0 comments Download
M webrtc/modules/audio_device/test/func_test_manager.cc View 1 chunk +0 lines, -26 lines 0 comments Download
M webrtc/modules/audio_processing/audio_buffer.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M webrtc/modules/audio_processing/common.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/echo_cancellation_impl.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M webrtc/modules/audio_processing/echo_control_mobile_impl.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M webrtc/modules/audio_processing/gain_control_impl.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_processing/noise_suppression_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/test/audio_processing_unittest.cc View 1 2 3 35 chunks +60 lines, -68 lines 0 comments Download
M webrtc/modules/audio_processing/test/test_utils.h View 3 chunks +4 lines, -4 lines 0 comments Download
M webrtc/modules/audio_processing/test/test_utils.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M webrtc/modules/audio_processing/test/unpack.cc View 2 chunks +9 lines, -6 lines 0 comments Download
M webrtc/modules/media_file/media_file_utility.h View 4 chunks +11 lines, -11 lines 0 comments Download
M webrtc/modules/media_file/media_file_utility.cc View 1 2 3 4 42 chunks +119 lines, -215 lines 0 comments Download
M webrtc/system_wrappers/include/aligned_array.h View 2 chunks +5 lines, -7 lines 0 comments Download
M webrtc/system_wrappers/source/aligned_array_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 30 (8 generated)
Peter Kasting
henrik.lundin: webrtc/modules/audio_coding/, webrtc/modules/audio_processing/ OWNERS niklas.enbom: webrtc/modules/audio_device/, webrtc/modules/media_file/ OWNERS perkj: talk/, webrtc/system_wrappers/ OWNERS tina.legrand: webrtc/audio/, webrtc/common_audio/ ...
4 years, 12 months ago (2015-12-28 16:45:31 UTC) #4
henrika_webrtc
Replacing niklas.enbom for webrtc/modules/audio_device/: LGTM
4 years, 11 months ago (2015-12-29 08:24:02 UTC) #5
the sun
Please do not create CLs that: a) touch a lot of things b) that are ...
4 years, 11 months ago (2016-01-07 09:37:07 UTC) #7
Peter Kasting
On 2016/01/07 09:37:07, the sun wrote: > Please do not create CLs that: > a) ...
4 years, 11 months ago (2016-01-07 09:44:43 UTC) #8
perkj_webrtc
system/wrappers lgtm talk lgtm with a request. https://codereview.webrtc.org/1534193008/diff/40001/talk/media/base/codec.h File talk/media/base/codec.h (right): https://codereview.webrtc.org/1534193008/diff/40001/talk/media/base/codec.h#newcode134 talk/media/base/codec.h:134: AudioCodec(int id, ...
4 years, 11 months ago (2016-01-07 09:47:05 UTC) #9
Peter Kasting
https://codereview.webrtc.org/1534193008/diff/40001/talk/media/base/codec.h File talk/media/base/codec.h (right): https://codereview.webrtc.org/1534193008/diff/40001/talk/media/base/codec.h#newcode134 talk/media/base/codec.h:134: AudioCodec(int id, On 2016/01/07 09:47:05, perkj_webrtc wrote: > This ...
4 years, 11 months ago (2016-01-07 09:48:36 UTC) #10
Peter Kasting
On 2016/01/07 09:44:43, Peter Kasting wrote: > On 2016/01/07 09:37:07, the sun wrote: > > ...
4 years, 11 months ago (2016-01-07 09:55:09 UTC) #11
the sun
On 2016/01/07 09:55:09, Peter Kasting wrote: > On 2016/01/07 09:44:43, Peter Kasting wrote: > > ...
4 years, 11 months ago (2016-01-07 10:39:49 UTC) #12
hlundin-webrtc
LG, but please see my two questions? https://codereview.webrtc.org/1534193008/diff/40001/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc File webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc (right): https://codereview.webrtc.org/1534193008/diff/40001/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc#newcode415 webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc:415: RTC_CHECK_EQ(kNumFreqBins, num_freq_bins); ...
4 years, 11 months ago (2016-01-07 10:57:06 UTC) #13
hlundin-webrtc
LGTM, with one question still unanswered. https://codereview.webrtc.org/1534193008/diff/40001/webrtc/modules/audio_processing/test/audio_processing_unittest.cc File webrtc/modules/audio_processing/test/audio_processing_unittest.cc (right): https://codereview.webrtc.org/1534193008/diff/40001/webrtc/modules/audio_processing/test/audio_processing_unittest.cc#newcode54 webrtc/modules/audio_processing/test/audio_processing_unittest.cc:54: const google::protobuf::int32 kChannels[] ...
4 years, 11 months ago (2016-01-07 11:00:06 UTC) #14
Peter Kasting
https://codereview.webrtc.org/1534193008/diff/40001/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc File webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc (right): https://codereview.webrtc.org/1534193008/diff/40001/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc#newcode415 webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc:415: RTC_CHECK_EQ(kNumFreqBins, num_freq_bins); On 2016/01/07 10:57:06, hlundin-OOO-to-Jan7 wrote: > Does ...
4 years, 11 months ago (2016-01-07 12:14:13 UTC) #15
hlundin-webrtc
https://codereview.webrtc.org/1534193008/diff/40001/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc File webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc (right): https://codereview.webrtc.org/1534193008/diff/40001/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc#newcode415 webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc:415: RTC_CHECK_EQ(kNumFreqBins, num_freq_bins); On 2016/01/07 12:14:13, Peter Kasting wrote: > ...
4 years, 11 months ago (2016-01-07 12:24:32 UTC) #16
tlegrand-webrtc
LGTM for webrtc/common_audio. I'm skipping webrtc/audio, since Solenberg already reviewed those files. I marked a ...
4 years, 11 months ago (2016-01-07 12:47:52 UTC) #17
Peter Kasting
On 2016/01/07 12:47:52, tlegrand-webrtc wrote: > LGTM for webrtc/common_audio. > I'm skipping webrtc/audio, since Solenberg ...
4 years, 11 months ago (2016-01-07 13:16:57 UTC) #18
niklas.enbom
missed that I was still on the hook for media_file, sorry for the delay. https://codereview.webrtc.org/1534193008/diff/40001/webrtc/modules/media_file/media_file_utility.cc ...
4 years, 11 months ago (2016-01-07 20:16:46 UTC) #19
Peter Kasting
https://codereview.webrtc.org/1534193008/diff/40001/webrtc/modules/media_file/media_file_utility.cc File webrtc/modules/media_file/media_file_utility.cc (right): https://codereview.webrtc.org/1534193008/diff/40001/webrtc/modules/media_file/media_file_utility.cc#newcode130 webrtc/modules/media_file/media_file_utility.cc:130: if (CHUNKheaderObj.fmt_ckSize < 0) On 2016/01/07 20:16:46, niklas.enbom wrote: ...
4 years, 11 months ago (2016-01-07 21:35:05 UTC) #20
niklas.enbom
https://codereview.webrtc.org/1534193008/diff/40001/webrtc/modules/media_file/media_file_utility.cc File webrtc/modules/media_file/media_file_utility.cc (right): https://codereview.webrtc.org/1534193008/diff/40001/webrtc/modules/media_file/media_file_utility.cc#newcode130 webrtc/modules/media_file/media_file_utility.cc:130: if (CHUNKheaderObj.fmt_ckSize < 0) That was my suggestion yes, ...
4 years, 11 months ago (2016-01-07 21:50:36 UTC) #21
Peter Kasting
Niklas: PTAL https://codereview.webrtc.org/1534193008/diff/40001/talk/media/base/codec.h File talk/media/base/codec.h (right): https://codereview.webrtc.org/1534193008/diff/40001/talk/media/base/codec.h#newcode134 talk/media/base/codec.h:134: AudioCodec(int id, On 2016/01/07 09:48:36, Peter Kasting ...
4 years, 11 months ago (2016-01-08 01:36:27 UTC) #22
niklas.enbom
media_file lgtm On 2016/01/08 01:36:27, Peter Kasting wrote: > Niklas: PTAL > > https://codereview.webrtc.org/1534193008/diff/40001/talk/media/base/codec.h > ...
4 years, 11 months ago (2016-01-08 17:37:57 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1534193008/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1534193008/80001
4 years, 11 months ago (2016-01-08 21:27:13 UTC) #26
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 11 months ago (2016-01-08 21:50:32 UTC) #28
commit-bot: I haz the power
4 years, 11 months ago (2016-01-08 21:50:38 UTC) #30
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/25702cb1628941427fa55e528f53483f239ae011
Cr-Commit-Position: refs/heads/master@{#11191}

Powered by Google App Engine
This is Rietveld 408576698