Commit graph

177 commits

Author SHA1 Message Date
Karl Wiberg
1a8fffbb01 Restrict visibility in some places where we can get away with doing so
BUG=webrtc:8255

Change-Id: I091a43703b7b7a75406ba58afb505f9b631a5521
Reviewed-on: https://webrtc-review.googlesource.com/10810
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21226}
2017-12-12 12:00:37 +00:00
Henrik Lundin
6f54e7ab67 Avoid integer-overflow in WebRtcSpl_FilterARFastQ12
Simply use int64_t instead of int32_t for two local variables.
This avoids integer-overflow in some rare cases.

Bug: chromium:784216
Change-Id: Ie96835d6dc04e338b157469b74ead29e8bd403dd
Reviewed-on: https://webrtc-review.googlesource.com/26580
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21141}
2017-12-07 16:56:47 +00:00
Henrik Lundin
5dcbbfd153 Create a fuzzer for ComfortNoiseDecoder
The fuzzer will hammer on the UpdateSid and Generate methods of
ComfortNoiseDecoder.

The change also includes a fix to an issue in WebRtcSpl_FilterAR, which
was immediately found by running the fuzzer locally.

Bug: none
Change-Id: I5283427cb27844fb953e2caa35423ea873aca2ff
Reviewed-on: https://webrtc-review.googlesource.com/28100
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21134}
2017-12-07 08:53:37 +00:00
Mirko Bonadei
a498ae83ac Stop using public_deps in system_wrappers.
TBR=phoglund@webrtc.org

Bug: webrtc:8603
Change-Id: I5e515f0e4dc955a01460d69ba4e21bdfdf152d20
Reviewed-on: https://webrtc-review.googlesource.com/29104
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21112}
2017-12-06 08:56:52 +00:00
Oskar Sundbom
5e1a7496bb Optional: Use nullopt and implicit construction in /common_audio
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.

This CL was uploaded by git cl split.

R=tina.legrand@webrtc.org

Bug: None
Change-Id: Iea6f04db7c1f92fe9da2c855bb60ad2f70c371d3
Reviewed-on: https://webrtc-review.googlesource.com/23615
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20915}
2017-11-28 15:46:48 +00:00
Karl Wiberg
e40468ba3d Move some numeric utility code from rtc_base/ to rtc_base/numerics/
Specifically, I'm moving

  safe_compare.h
  safe_conversions.h
  safe_minmax.h

They shouldn't be part of the API, and moving them to an appropriate
subdirectory of rtc_base/ is a good way to keep track of that.

BUG=webrtc:8445

Change-Id: I458531aeb30bcf4291c4bec3bf22a2fffbf054ff
Reviewed-on: https://webrtc-review.googlesource.com/20860
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20829}
2017-11-22 11:21:47 +00:00
Patrik Höglund
f715c53bca Fix circular deps in common_audio.
This makes it easier to import cleanly downstream, and makes it
a lot easier to reason about.

Bug: webrtc:6828
Change-Id: I953e129de73053f8619333fe7e318b36e3a1fffa
Reviewed-on: https://webrtc-review.googlesource.com/22722
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20727}
2017-11-17 11:20:17 +00:00
Mirko Bonadei
675513b96a Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:

for m in PLOG \
  LOG_TAG \
  LOG_GLEM \
  LOG_GLE_EX \
  LOG_GLE \
  LAST_SYSTEM_ERROR \
  LOG_ERRNO_EX \
  LOG_ERRNO \
  LOG_ERR_EX \
  LOG_ERR \
  LOG_V \
  LOG_F \
  LOG_T_F \
  LOG_E \
  LOG_T \
  LOG_CHECK_LEVEL_V \
  LOG_CHECK_LEVEL \
  LOG
do
  git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g"
done
git checkout rtc_base/logging.h
git cl format

Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
2017-11-09 11:56:32 +00:00
Alex Loiko
aeb5d88dee Replace left shift with equivalent multiplication.
Issue was found by the NetEq fuzzer.


TBR=kwiberg@webrtc.org

Bug: chromium:779380
Change-Id: Ib6a3db78fadc3c7ae11478ca4f695c6d19a2db19
Reviewed-on: https://webrtc-review.googlesource.com/20869
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20586}
2017-11-07 14:47:05 +00:00
Alex Loiko
187c6992fb Replacing undefined left shifts with multiplication.
Issue was found by the Audio Processing fuzzer.

Bug: chromium:778939, chromium:778921, chromium:778919
Change-Id: If613cf4c533f546d118f10a6358cecd329958177
Reviewed-on: https://webrtc-review.googlesource.com/16161
Commit-Queue: Alex Loiko <aleloi@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20494}
2017-10-31 09:43:02 +00:00
Sam Zackrisson
9da7c7480b Change Resampler to not change state on invalid Reset and ResetIfNeeded calls.
Adds a unittest to test this.

A Reset() with unsupported frequencies will fail, but currently leaves the resampler in an illegal state.
Subsequent calls to ResetIfNeeded(), which depends on the internal state, will then have unreliable behavior.

The following sequence of calls demonstrate this: It appears as though the resampler is successfully reinitialized to upsample from 44 kHz to 48 kHz, but will in fact crash on Push().

Resampler::Reset() with in=44000, out=32000           // Returns 0
Resampler::ResetIfNeeded() with in=44000, out=48000   // Returns -1
Resampler::ResetIfNeeded() with in=44000, out=48000   // Returns 0
Resampler::Push() with some data

Bug: webrtc:8426
Change-Id: Id1e0528ffcb7a86702d4c2f4c5103a1db419c07d
Reviewed-on: https://webrtc-review.googlesource.com/16424
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20474}
2017-10-30 10:03:19 +00:00
Alex Loiko
b9f536167c Removing undefined left shifts in AudioProcessing
This CL replaces 5 left shifts where the shifted value may be 
negative. The shifts are replaced with equivalent multiplications.

Bug: chromium:777231, chromium:776719, chromium:776624, chromium:776286
Change-Id: Ifb27d5506eac779e60f238432bdf9e4bc5b2da4c
Reviewed-on: https://webrtc-review.googlesource.com/14800
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20430}
2017-10-25 13:35:36 +00:00
Edward Lemur
c5ee987d26 Stop using std::tr1
It's all in std now.

Bug: b/67839180
Change-Id: I95fc78e87055f5f7456e4fc1a80779e29e98db3d
Reviewed-on: https://webrtc-review.googlesource.com/14642
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20400}
2017-10-23 22:11:58 +00:00
Mirko Bonadei
7120742701 Adding NOLINT for typedefs.h and common_types.h
Now that we have moved WebRTC from src/webrtc to src/, common_types.h
and typedefs.h are triggering a cpplint error.

The cpplint complaint is:
Include the directory when naming .h files  [build/include] [4]

This CL disables the error but we have to remove these two headers
from the root directory.

NOPRESUBMIT=true

Bug: webrtc:5876
Change-Id: I08e1b69aadcc4b28ab83bf25e3819d135d41d333
Reviewed-on: https://webrtc-review.googlesource.com/1577
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19859}
2017-09-15 13:03:51 +00:00
charujain
9a45116b5e Fix Gn Untracked headers in webrtc/common_audio
Fixed following headers in this CL
===================================
src/webrtc/common_audio/vad/mock/mock_vad.h
src/webrtc/common_audio/mocks/mock_smoothing_filter.h
src/webrtc/common_audio/signal_processing/include/spl_inl_armv7.h

BUG=webrtc:7648

Review-Url: https://codereview.webrtc.org/3013063002
Cr-Original-Commit-Position: refs/heads/master@{#19824}
Review-Url: https://codereview.webrtc.org/3013673002
Cr-Commit-Position: refs/heads/master@{#19852}
2017-09-15 10:51:34 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
niklase@google.com
569c805674 git-svn-id: http://webrtc.googlecode.com/svn/trunk@165 4adac7df-926f-26a2-2b94-8c16560cd09d 2011-07-07 08:45:49 +00:00
henrika@google.com
dcdf311b6c Rollback to working sqrt version.
git-svn-id: http://webrtc.googlecode.com/svn/trunk@154 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-07-07 08:05:26 +00:00
leozwang@google.com
48c02db6cf enable optimized code for android
Review URL: http://webrtc-codereview.appspot.com/23015

git-svn-id: http://webrtc.googlecode.com/svn/trunk@96 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-06-17 17:39:05 +00:00
leozwang@google.com
d99fa58ced optimized sqrt in general and for android
Review URL: http://webrtc-codereview.appspot.com/42001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@95 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-06-17 17:38:50 +00:00
ajm@google.com
a6f54fd726 Removing some warnings from the APM build with -Wall -Wextra. Also cleaning up the unit test a bit.
Review URL: http://webrtc-codereview.appspot.com/38002

git-svn-id: http://webrtc.googlecode.com/svn/trunk@90 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-06-16 00:04:40 +00:00
bjornv@google.com
cb3017faea Re-deleting a VAD file in common_audio
git-svn-id: http://webrtc.googlecode.com/svn/trunk@81 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-06-15 07:43:32 +00:00
bjornv@google.com
0c08ed1ef9 Re-deleting files that reappeared when moved to webrtc.
git-svn-id: http://webrtc.googlecode.com/svn/trunk@73 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-06-14 08:48:02 +00:00
leozwang@google.com
0b0c28c495 add android makefile, some modification in vpx makefile to build encoder from c source for now
Review URL: http://webrtc-codereview.appspot.com/29012

git-svn-id: http://webrtc.googlecode.com/svn/trunk@50 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-06-07 17:24:39 +00:00
ajm@google.com
990a93b5c8 Removing unneeded CMake files.
http://code.google.com/p/webrtc/issues/detail?id=2
Review URL: http://webrtc-codereview.appspot.com/35001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@43 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-06-06 16:48:56 +00:00
niklase@google.com
3f0254baab git-svn-id: http://webrtc.googlecode.com/svn/trunk@2 4adac7df-926f-26a2-2b94-8c16560cd09d 2011-05-30 11:19:44 +00:00