|
Match existing type usage better.
This makes a variety of small changes to synchronize bits of code using different types, remove useless code or casts, and add explicit casts in some places previously doing implicit ones. For example:
* Change a few type declarations to better match how the majority of code uses those objects.
* Eliminate "< 0" check for unsigned values.
* Replace "(float)sin(x)", where |x| is also a float, with "sinf(x)", and similar.
* Add casts to uint32_t in many places timestamps were used and the existing code stored signed values into the unsigned objects.
* Remove downcasts when the results would be passed to a larger type, e.g. calling "foo((int16_t)x)" with an int |x| when foo() takes an int instead of an int16_t.
* Similarly, add casts when passing a larger type to a function taking a smaller one.
* Add casts to int16_t when doing something like "int16_t = int16_t + int16_t" as the "+" operation would implicitly upconvert to int, and similar.
* Use "false" instead of "0" for setting a bool.
* Shift a few temp types when doing a multi-stage calculation involving typecasts, so as to put the most logical/semantically correct type possible into the temps. For example, when doing "int foo = int + int; size_t bar = (size_t)foo + size_t;", we might change |foo| to a size_t and move the cast if it makes more sense for |foo| to be represented as a size_t.
BUG=none
R=andrew@webrtc.org, asapersson@webrtc.org, henrika@webrtc.org, juberti@webrtc.org, kwiberg@webrtc.org
TBR=andrew, asapersson, henrika
Committed: https://chromium.googlesource.com/external/webrtc/+/b7e5054414ff524f9db81dab7917729b8c4c8bcb
Total comments: 25
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+175 lines, -151 lines) |
Patch |
|
M |
talk/app/webrtc/test/fakeaudiocapturemodule.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
talk/app/webrtc/test/fakeaudiocapturemodule_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/common_audio/fft4g.c
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
webrtc/common_audio/lapped_transform_unittest.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
webrtc/common_audio/real_fourier.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/common_audio/signal_processing/auto_correlation.c
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/common_audio/signal_processing/complex_fft.c
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/common_audio/signal_processing/get_scaling_square.c
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c
|
View
|
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/ilbc/cb_search.c
|
View
|
1
2
3
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/ilbc/decode.c
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c
|
View
|
1
2
3
|
4 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/ilbc/encode.c
|
View
|
1
2
3
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c
|
View
|
1
2
3
|
5 chunks |
+7 lines, -8 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/ilbc/frame_classify.c
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/ilbc/my_corr.c
|
View
|
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/ilbc/nearest_neighbor.c
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/ilbc/refiner.c
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/ilbc/state_construct.c
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/ilbc/state_search.c
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/ilbc/xcorr_coef.c
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.c
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c
|
View
|
1
2
3
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/isac/fix/source/encode.c
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c
|
View
|
3
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/isac/fix/test/kenny.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/isac/fix/test/test_iSACfixfloat.c
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/isac/main/source/isac.c
|
View
|
1
2
3
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
|
View
|
1
2
3
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/isac/main/test/simpleKenny.c
|
View
|
1
2
3
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
|
View
|
3
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/codecs/opus/opus_fec_test.cc
|
View
|
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/main/acm2/acm_receiver.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/main/acm2/acm_send_test.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
|
View
|
1
2
3
|
2 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/main/test/initial_delay_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/neteq/background_noise.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/neteq/background_noise.cc
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/neteq/decision_logic_normal.cc
|
View
|
|
3 chunks |
+11 lines, -9 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/neteq/expand.h
|
View
|
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/neteq/expand.cc
|
View
|
1
2
3
|
6 chunks |
+11 lines, -8 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/neteq/merge.cc
|
View
|
1
2
3
|
3 chunks |
+9 lines, -6 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/neteq/neteq_impl.cc
|
View
|
1
2
3
|
7 chunks |
+14 lines, -9 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/neteq/neteq_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/neteq/normal.cc
|
View
|
1
2
3
|
5 chunks |
+16 lines, -13 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/neteq/statistics_calculator.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/neteq/statistics_calculator.cc
|
View
|
|
3 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_coding/neteq/test/RTPencode.cc
|
View
|
1
2
3
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_device/audio_device_buffer.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_device/dummy/file_audio_device.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_processing/ns/ns_core.c
|
View
|
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
webrtc/modules/audio_processing/ns/nsx_core_mips.c
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/modules/utility/source/coder.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
webrtc/voice_engine/channel.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
webrtc/voice_engine/utility_unittest.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
Total messages: 21 (3 generated)
|