Commit Graph

204 Commits

Author SHA1 Message Date
bc440d5651 Revert "Reland "Upconvert various types to int.", common_audio portion."
This reverts commit 15b58eea282b03b6347c64714079691f55e6097f.

BUG=499241
TBR=andrew

Review URL: https://codereview.webrtc.org/1182683003

Cr-Commit-Position: refs/heads/master@{#9426}
2015-06-12 02:56:24 +00:00
15b58eea28 Reland "Upconvert various types to int.", common_audio portion.
This reverts portions of commit cb180976dd0e9672cde4523d87b5f4857478b5e9, which
reverted commit 83ad33a8aed1fb00e422b6abd33c3e8942821c24.  Specifically, the
files in webrtc/common_audio/ are relanded.

The original commit message is below:

Upconvert various types to int.

Per comments from HL/kwiberg on https://webrtc-codereview.appspot.com/42569004 , when there is existing usage of mixed types (int16_t, int, etc.), we'd prefer to standardize on larger types like int and phase out use of int16_t.

Specifically, "Using int16 just because we're sure all reasonable values will fit in 16 bits isn't usually meaningful in C."

This converts some existing uses of int16_t (and, in a few cases, other types such as uint16_t) to int (or, in a few places, int32_t).  Other locations will be converted to size_t in a separate change.

BUG=none
TBR=andrew

Review URL: https://codereview.webrtc.org/1184613003

Cr-Commit-Position: refs/heads/master@{#9425}
2015-06-12 02:40:58 +00:00
728d9037c0 Reformat existing code. There should be no functional effects.
This includes changes like:
* Attempt to break lines at better positions
* Use "override" in more places, don't use "virtual" with it
* Use {} where the body is more than one line
* Make declaration and definition arg names match
* Eliminate unused code
* EXPECT_EQ(expected, actual) (but use (actual, expected) for e.g. _GT)
* Correct #include order
* Use anonymous namespaces in preference to "static" for file-scoping
* Eliminate unnecessary casts
* Update reference code in comments of ARM assembly sources to match actual current C code
* Fix indenting to be more style-guide compliant
* Use arraysize() in more places
* Use bool instead of int for "boolean" values (0/1)
* Shorten and simplify code
* Spaces around operators
* 80 column limit
* Use const more consistently
* Space goes after '*' in type name, not before
* Remove unnecessary return values
* Use "(var == const)", not "(const == var)"
* Spelling
* Prefer true, typed constants to "enum hack" constants
* Avoid "virtual" on non-overridden functions
* ASSERT(x == y) -> ASSERT_EQ(y, x)

BUG=none
R=andrew@webrtc.org, asapersson@webrtc.org, henrika@webrtc.org, juberti@webrtc.org, kjellander@webrtc.org, kwiberg@webrtc.org

Review URL: https://codereview.webrtc.org/1172163004

Cr-Commit-Position: refs/heads/master@{#9420}
2015-06-11 21:31:48 +00:00
b7e5054414 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

Review URL: https://codereview.webrtc.org/1168753002

Cr-Commit-Position: refs/heads/master@{#9419}
2015-06-11 19:56:03 +00:00
cb180976dd Revert "Upconvert various types to int."
This reverts commit 83ad33a8aed1fb00e422b6abd33c3e8942821c24.

BUG=499241
TBR=hlundin

Review URL: https://codereview.webrtc.org/1179953003

Cr-Commit-Position: refs/heads/master@{#9418}
2015-06-11 19:42:42 +00:00
f045e4da43 Prepare to convert various types to size_t.
This makes some behaviorally-invariant changes to make certain code that
currently only works correctly with signed types work safely regardless of the
signedness of the types in question.  This is preparation for a future change
that will convert a variety of types to size_t.

There are also some formatting changes (e.g. converting "enum hack" usage to real consts) to make it simpler to just change "int" to "size_t" in the future to change the types of those constants.

BUG=none
R=andrew@webrtc.org, juberti@webrtc.org, kwiberg@webrtc.org
TBR=ajm

Review URL: https://codereview.webrtc.org/1174813003

Cr-Commit-Position: refs/heads/master@{#9413}
2015-06-11 04:15:51 +00:00
83ad33a8ae Upconvert various types to int.
Per comments from HL/kwiberg on https://webrtc-codereview.appspot.com/42569004 , when there is existing usage of mixed types (int16_t, int, etc.), we'd prefer to standardize on larger types like int and phase out use of int16_t.

Specifically, "Using int16 just because we're sure all reasonable values will fit in 16 bits isn't usually meaningful in C."

This converts some existing uses of int16_t (and, in a few cases, other types such as uint16_t) to int (or, in a few places, int32_t).  Other locations will be converted to size_t in a separate change.

BUG=none
R=andrew@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/54629004

Cr-Commit-Position: refs/heads/master@{#9405}
2015-06-10 00:20:09 +00:00
cc84649389 Add LappedTransform accessors.
These are necessary for clients to validate that they conform to its API.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/53519005

Cr-Commit-Position: refs/heads/master@{#9327}
2015-05-29 01:01:43 +00:00
c3deaa30d5 common_audio/vad: Removes head allocation failure check
Related to https://webrtc-codereview.appspot.com/51919004/ where Create() was changed. This CL removes a useless malloc failure check.

BUG=441, 3347
R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51109004

Cr-Commit-Position: refs/heads/master@{#9312}
2015-05-28 12:30:29 +00:00
9b720f7016 Add GetChunkLength to LappedTransform.
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/56529004

Cr-Commit-Position: refs/heads/master@{#9301}
2015-05-28 00:09:56 +00:00
de4703c5d1 Refactor common_audio/vad: Create now returns the handle directly instead of an error code
Changed the WebRtcVad_Create() function to the more conventional format of returning the handle directly instead of an error code to take care of.
In addition NULL was changed to nullptr in the files where it applied.

Affected components:
* AGC
* VAD
* NetEQ

BUG=441, 3347
TESTED=locally on Linux and trybots
R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51919004

Cr-Commit-Position: refs/heads/master@{#9291}
2015-05-27 05:23:11 +00:00
57e5fd2e60 PRESUBMIT: Improve PyLint check and add GN format check.
Add pylintrc file based on
https://code.google.com/p/chromium/codesearch#chromium/src/tools/perf/pylintrc
bit tightened up quite a bit (the one in depot_tools is far
more relaxed).

Remove a few excluded directories from pylint check and fixed/
suppressed all warnings generated.

Add GN format check + formatted all GN files using 'gn format'.
Cleanup redundant rules in tools/PRESUBMIT.py

TESTED=Ran 'git cl presubmit -vv', fixed the PyLint violations.
Ran it again with a modification in webrtc/build/webrtc.gni, formatted
all the GN files and ran it again.

R=henrika@webrtc.org, phoglund@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/50069004

Cr-Commit-Position: refs/heads/master@{#9274}
2015-05-25 10:55:50 +00:00
cb7f8ce2df Clear ARM NEON flag
Merge WEBRTC_ARCH_ARM64_NEON and WEBRTC_ARCH_ARM_NEON into one
WEBRTC_HAS_NEON.
Replace WEBRTC_DETECT_ARM_NEON by WEBRTC_DETECT_NEON.
Replace WEBRTC_ARCH_ARM by WEBRTC_ARCH_ARM64 for arm64 cpu.

BUG=4002
R=andrew@webrtc.org, jridges@masque.com, kjellander@webrtc.org

Change-Id: I870a4d0682b80633b671c9aab733153f6d95a980

Review URL: https://webrtc-codereview.appspot.com/49309004

Cr-Commit-Position: refs/heads/master@{#9228}
2015-05-20 05:20:04 +00:00
5a92aa8440 Add 3-band filter-bank implementation
The implementation is a FIR filter bank with DCT modulation, similar to the proposed in "Multirate Signal Processing for Communication Systems" by Fredric J Harris.
The lowpass filter prototype has these characteristics:
* Passband ripple = 0.3dB
* Passband frequency = 0.147 (7kHz at 48kHz)
* Stopband attenuation = 40dB
* Stopband frequency = 0.192 (9.2kHz at 48kHz)
* Delay = 24 samples (500us at 48kHz)
* Linear phase

This filter bank does not satisfy perfect reconstruction. The SNR after analysis and synthesis (with no processing in between) is approximately 9.5dB depending on the input signal after compensating for the delay.

The performance on my workstation of AudioProcessing (with AGC and NS enabled) on a 413s recording compared to previous versions is as follows:
* Input signal has 32kHz sample rate: 3.01s
* Resampling 48kHz to 32kHz: 3.56s
* Today's temporary filter bank: 5.67s
* This filter-bank: 4.62s

BUG=webrtc:3146
R=andrew@webrtc.org, bjornv@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/48999005

Cr-Commit-Position: refs/heads/master@{#9090}
2015-04-27 18:34:16 +00:00
23dc68e515 Add the rtc_build_openmax_dl variable to the GN build.
For symmetry with the gyp build.

R=kjellander@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/49109005

Cr-Commit-Position: refs/heads/master@{#9083}
2015-04-24 15:46:31 +00:00
affcfb2f16 Refactor common_audio/signal_processing: Removed usage of trivial macro WEBRTC_SPL_MUL_16_16
The macro is in C defined as
#define WEBRTC_SPL_MUL_16_16(a, b) \
((int32_t) (((int16_t)(a)) * ((int16_t)(b))))
(For definitions on ARMv7 and MIPS, see common_audio/signal_processing/include/spl_inl_{armv7,mips}.h)

Also includes
- style changes
- replaced pointer operations with direct element access

BUG=3348,3353
TESTED=locally on Linux and trybots
R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/48949004

Cr-Commit-Position: refs/heads/master@{#9075}
2015-04-24 06:11:50 +00:00
f2497cf517 Fix unknown option '-msse2' warning
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/43169004

Cr-Commit-Position: refs/heads/master@{#9016}
2015-04-16 06:57:12 +00:00
a9c0ae284c Add a sparse FIR filter implementation
A Finite Impulse Response filter implementation which takes advantage of sparse coefficients.
The coefficients are assumed to be uniformly distributed and have an initial offset.

BUG=webrtc:3146
R=andrew@webrtc.org, bjornv@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/49659004

Cr-Commit-Position: refs/heads/master@{#9002}
2015-04-14 22:51:22 +00:00
61a4b04f40 Refactor common_audio/vad: Removed usage of trivial macro WEBRTC_SPL_MUL_16_16(a, b)
The macro is in C defined as
#define WEBRTC_SPL_MUL_16_16(a, b) \
((int32_t) (((int16_t)(a)) * ((int16_t)(b))))
(For definitions on ARMv7 and MIPS, see common_audio/signal_processing/include/spl_inl_{armv7,mips}.h)

BUG=3348,3353
TESTED=locally on Linux and trybots
R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/43129004

Cr-Commit-Position: refs/heads/master@{#8986}
2015-04-13 13:43:42 +00:00
d417c93c10 Remove android_webview_build conditions.
Now that android_webview_build is no longer supported, remove build
conditionals referencing it and also remove the extra level of
indirection used to reference the cpufeatures target.

BUG=chromium:440793
R=henrika@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/44119005

Patch from Richard Coles <torne@chromium.org>.

Cr-Commit-Position: refs/heads/master@{#8963}
2015-04-09 15:36:13 +00:00
bc46bf22e7 common_audio: Explicit cast in WebRtcSpl_NormW16 on ARM
We currently hit asserts in AECM where the output of WebRtcSpl_NormW16() on armv7 is incorrect.
I've verified that it outputs -17 for negative values. Internally that means that clz returns 0 after a two's complement operation on a int16_t.
There is a mismatch between the int16_t input and otherwise 32 bit assumptions. Explicitly casting to int32_t makes the two's complement do the correct thing.

The CL also extends the unit tests by running through a larger set of values.

BUG=4486
TESTED=locally on Android Nexus 7 and trybots
R=aluebs@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/49549004

Cr-Commit-Position: refs/heads/master@{#8897}
2015-03-30 21:38:36 +00:00
2c9c83d7ec Remove non-functional asynchronous resampling mode.
A few other cleanups, most notably using a sane parameter to specify the
number of channels.

BUG=chromium:469814
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/46729004

Cr-Commit-Position: refs/heads/master@{#8894}
2015-03-30 17:08:28 +00:00
dfa36058c9 Reparent Nonlinear beamformer under beamforming interface.
R=aluebs@webrtc.org, andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41269004

Cr-Commit-Position: refs/heads/master@{#8862}
2015-03-25 23:37:33 +00:00
3fbf99c44a Refactor common_audio/vad: Removed usage of WEBRTC_SPL_MUL_16_16_RSFT
The macro is defined as
#define WEBRTC_SPL_MUL_16_16_RSFT(a, b, c) \
(WEBRTC_SPL_MUL_16_16(a, b) >> (c))

where the latter macro is in C defined as
#define WEBRTC_SPL_MUL_16_16(a, b) \
((int32_t) (((int16_t)(a)) * ((int16_t)(b))))
(For definitions on ARMv7 and MIPS, see common_audio/signal_processing/include/spl_inl_{armv7,mips}.h)

The replacement consists of
- avoiding casts to int16_t if inputs already are int16_t
- adding explicit cast to <type> if result is assigned to <type> (other than int or int32_t)
- minor cleanups like remove of unnecessary parentheses and style changes

BUG=3347, 3348, 3353
TESTED=locally on Linux for both fixed and floating point and trybots
R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/44799004

Cr-Commit-Position: refs/heads/master@{#8857}
2015-03-25 13:37:37 +00:00
1ccd8b4281 Refactor common_audio/signal_processing: Removed usage of WEBRTC_SPL_MUL_16_16_RSFT
The macro is defined as
#define WEBRTC_SPL_MUL_16_16_RSFT(a, b, c) \
(WEBRTC_SPL_MUL_16_16(a, b) >> (c))

where the latter macro is in C defined as
#define WEBRTC_SPL_MUL_16_16(a, b) \
((int32_t) (((int16_t)(a)) * ((int16_t)(b))))
(For definitions on ARMv7 and MIPS, see common_audio/signal_processing/include/spl_inl_{armv7,mips}.h)

The replacement consists of
- avoiding casts to int16_t if inputs already are int16_t
- adding explicit cast to <type> if result is assigned to <type> (other than int or int32_t)
- minor cleanups like remove of unnecessary parentheses and style changes

BUG=3348, 3353
TESTED=locally on Linux for both fixed and floating point and trybots
R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/49499004

Cr-Commit-Position: refs/heads/master@{#8853}
2015-03-25 12:30:01 +00:00
4553941d32 Document the 'int' return value of Resampler methods.
Remove an obsolete TODO comment.

R=andrew@webrtc.org
BUG=none

Review URL: https://webrtc-codereview.appspot.com/48589004

Cr-Commit-Position: refs/heads/master@{#8814}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8814 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-20 23:28:39 +00:00
04c50981f8 Add the Ooura FFT to RealFourier.
We are using the Ooura FFT in a few places:
- AGC
- Transient suppression
- Noise suppression

The optimized OpenMAX DL FFT is considerably faster, but currently does
not compile everywhere, notably on iOS. This change will allow us to use
Openmax when possible and otherwise fall back to Ooura.

(Unfortunately, noise suppression won't be able to take advantage of it
since it's not C++. Upgrade time?)

R=aluebs@webrtc.org, mgraczyk@chromium.org

Review URL: https://webrtc-codereview.appspot.com/45789004

Cr-Commit-Position: refs/heads/master@{#8798}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8798 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-19 20:07:43 +00:00
e534086492 Clean up LappedTransform and Blocker.
- Remove unnecessary window member from lapped_transform.
  - Add comment indicated that Blocker does not take ownership of
    the window passed to its constructor.
  - Streamline LappedTransform constructor so members can be const.

Also use a range-based for loop in audio_processing_impl.cc for clarity.

R=aluebs@webrtc.org, andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41229004

Cr-Commit-Position: refs/heads/master@{#8708}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8708 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-12 23:24:19 +00:00
d2c09dd339 Make building openmax_dl conditional in gyp.
Intentionally not modifying the GN build.

R=kjellander@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/48479004

Cr-Commit-Position: refs/heads/master@{#8688}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8688 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-11 22:07:18 +00:00
0933d01d09 Enabling common_audio building with NEON on ARM64
Passed building common_audio_neon and common_audio_unittests both on
Android ARMv7 and Android ARM64. Pass common_audio_unittests tests both
on Android ARMv7 and Android ARM64.

BUG=4002
R=andrew@webrtc.org, jridges@masque.com, kjellander@webrtc.org

Change-Id: I8e0722f356db8cca6fc8232f00ae1e898a086f5a

Review URL: https://webrtc-codereview.appspot.com/40629004

Patch from Zhongwei Yao <zhongwei.yao@arm.com>.

Cr-Commit-Position: refs/heads/master@{#8620}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8620 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-05 19:14:21 +00:00
14665ff7d4 Roll chromium_revision e144d30..6fdb142 (318658:318841) + remove OVERRIDE macro
Clang version changed 223108:230914
Details: e144d30..6fdb142/tools/clang/scripts/update.sh

Removes the OVERRIDE macro defined in:
* webrtc/base/common.h
* webrtc/typedefs.h

The majority of the source changes were done by running this in src/:
perl -0pi -e "s/virtual\s([^({;]*(\([^({;]*\)[^({;]*))(OVERRIDE|override)/\1override/sg" `find {talk,webrtc} -name "*.h"  -o -name "*.cc*" -o -name "*.mm*"`

which converted all:
virtual Foo() OVERRIDE
functions to:
Foo() override

Then I manually edited:
* talk/media/webrtc/fakewebrtccommon.h
* webrtc/test/fake_common.h

Remaining uses of OVERRIDE was fixed by search+replace.

Manual edits were done to fix virtual destructors that were
overriding inherited ones.

Finally a build error related to the pure virtual definitions of
Read, Write and Rewind in common_types.h required a bit of
refactoring in:
* webrtc/common_types.cc
* webrtc/common_types.h
* webrtc/system_wrappers/interface/file_wrapper.h
* webrtc/system_wrappers/source/file_impl.cc

This roll should make it possible for us to finally re-enable deadlock
detection for TSan on the buildbots.

BUG=4106
R=pbos@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41069004

Cr-Commit-Position: refs/heads/master@{#8596}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8596 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-04 13:04:54 +00:00
00b8f6b364 Use base/scoped_ptr.h; system_wrappers/interface/scoped_ptr.h is going away
BUG=
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36229004

Cr-Commit-Position: refs/heads/master@{#8517}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8517 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-26 14:43:50 +00:00
ac2d27d9ae Fix style violations in common_types.h and config.h
Mostly, it's about moving constructors and descructors to the .cc
files, so that they won't be inlined everywhere.

The reason this CL is so big is that a lot of code was using
common_types.h without declaring a dependency on webrtc_common, which
broke the build once common_types.h started to depend on
common_types.cc.

BUG=163
R=kjellander@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/26089004

Cr-Commit-Position: refs/heads/master@{#8516}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8516 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-26 14:01:28 +00:00
722739108a Roll chromium_revision b0c3ed3..2c3ffb2 (316737:317530)
Includes GN changes from
https://webrtc-codereview.appspot.com/39249004/

Android changes for JNI were required due to
https://codereview.chromium.org/843103003

Other relevant changes:
* src/buildtools: 5c5e924..93b3d0a
* src/third_party/boringssl/src: d306f16..b180ee9
* src/third_party/icu: 4e3266f..2081ee6
* src/third_party/libvpx: 5cdd302..33bbffe
* src/third_party/usrsctp/usrsctplib: 190c8cb..13718c7
* src/tools/gyp: 4d7c139..3464008
* src/tools/swarming_client: bdad118..1b7bfec
Details: b0c3ed3..2c3ffb2/DEPS

Clang version was not updated in this roll.

R=dpranke@chromium.org, phoglund@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/40079004

Cr-Commit-Position: refs/heads/master@{#8466}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8466 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-23 19:09:22 +00:00
073dd7b423 WebRtc_GetCPUFeaturesARM is only available on android
R=andrew@webrtc.org, jridges@masque.com, zhongwei.yao@arm.com

Review URL: https://webrtc-codereview.appspot.com/35119004

Patch from Mostyn Bramley-Moore <mostynb@opera.com>.

Cr-Commit-Position: refs/heads/master@{#8336}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8336 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-11 17:03:24 +00:00
2c29c2eae2 C++ readability review for ajm.
As part of the review, refactored AudioConverter into internal derived
classes, each focused on one type of conversion. A factory method
returns the correct converter (or chain of converters, via
CompositionConverter).

BUG=b/18938079
R=rojer@google.com

Review URL: https://webrtc-codereview.appspot.com/35699004

Cr-Commit-Position: refs/heads/master@{#8322}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8322 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-11 01:10:17 +00:00
d35a5c3506 Make ChannelBuffer aware of frequency bands
Now the ChannelBuffer has 2 separate arrays, one for the full-band data and one for the splitted one. The corresponding accessors are added to the ChannelBuffer.
This is done to avoid having to refresh the bands pointers in AudioBuffer. It will also allow us to have a general accessor like data()[band][channel][sample].
All the files using the ChannelBuffer needed to be re-factored.
Tested with modules_unittests, common_audio_unittests, audioproc, audioproc_f, voe_cmd_test.

R=andrew@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36999004

Cr-Commit-Position: refs/heads/master@{#8318}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8318 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 22:52:43 +00:00
035e9123e9 Move channel_buffer.{h,cc} to common_audio.
In https://code.google.com/p/webrtc/source/detail?r=8166
I added a check preventing GYP files from referencing
sources above their directory level.
This CL fixes the disallowed reference added in
https://code.google.com/p/webrtc/source/detail?r=8157
by moving channel_buffer.{h,cc} to common_audio for real.

BUG=4185
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35939004

Cr-Commit-Position: refs/heads/master@{#8190}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8190 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-28 19:57:44 +00:00
922cfcd150 Use non-zero data in AudioRingBufferTest.
TBR=aluebs@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35909004

Cr-Commit-Position: refs/heads/master@{#8176}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8176 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-27 21:59:44 +00:00
041035b390 Add an AudioRingBuffer class wrapper for the ring_buffer.h C interface.
Integrate it in Blocker to demonstrate use.

TEST=beamforming sounds good.
R=aluebs@webrtc.org, mgraczyk@chromium.org, sahark@google.com

Review URL: https://webrtc-codereview.appspot.com/36799004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8157 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-26 21:23:53 +00:00
d7e34e1086 Make it easier to use external libyuv + cleanup GYP files.
It is now easier to use an external libyuv library.
Fix some GYP errors.
Remove the temporary webrtc_base target (depends on
https://codereview.chromium.org/865603002/ being landed
first).

BUG=4185
R=andresp@webrtc.org, andrew@webrtc.org, perkj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39579004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8154 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-26 19:17:26 +00:00
d25c034051 Refactor common_audio/vad: Removed usage of macro WEBRTC_SPL_MUL_16_16()
BUG=3348,3353
TESTED=Locally on Mac and trybots
R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/34719004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8152 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-26 15:32:47 +00:00
5a92b78e86 Add beamforming to audioproc_float utility.
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41469004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8069 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-15 01:28:36 +00:00
6b6301588e Move ring_buffer to common_audio.
In preparation for adding a C++ wrapper in common_audio. Also, change
the return type of Init to void and call it from Create.

R=aluebs@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/37619004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8068 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-15 00:09:53 +00:00
2ebfac5649 Remove COMPILE_ASSERT and use static_assert everywhere
COMPILE_ASSERT is no longer needed now that we have C++11's
static_assert.

R=aluebs@webrtc.org, andrew@webrtc.org, hellner@chromium.org, henrike@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39469004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8058 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-14 10:51:54 +00:00
86e1e487e7 Move system_wrappers.gyp files to the proper directory.
Build targets should not refer to non-subpaths as was happening before when
 source/system_wrappers.gyp refers to ../interface/ files.

R=kjellander@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/37609004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8057 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-14 09:30:52 +00:00
c0da63c707 Optimize minimum delay in blocker
Could not hear any difference when running the beamformer_test, although sample-wise it changes because of the non-linear character of the processing.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35679004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8051 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-13 22:28:35 +00:00
3df38b442f Unify the two copies of compile_assert.h
This patch basically deletes webrtc/base/compile_assert.h (which is
the more outdated copy) and moves
webrtc/system_wrappers/source/compile_assert.h to take its place.

R=aluebs@webrtc.org, andrew@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36719004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8048 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-13 11:37:48 +00:00
88a4298234 common_audio: Made input vector const in WebRtcSpl_LevinsonDurbin()
In addition, expanded the unit test to verify both unstable and stable filters.

BUG=3353, 1132
TESTED=locally on Mac and trybots
R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35599004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8038 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-12 05:53:43 +00:00
c14e3572c6 common_audio: Made input signal const in WebRtcSplFilterMAFastQ12()
BUG=3353, 1133
TESTED=locally on Mac and trybots
R=henrik.lundin@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/37499004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8037 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-12 05:50:52 +00:00