22 Commits

Author SHA1 Message Date
andrew@webrtc.org
ddbb8a2c24 Support arbitrary input/output rates and downmixing in AudioProcessing.
Select "processing" rates based on the input and output sampling rates.
Resample the input streams to those rates, and if necessary to the
output rate.

- Remove deprecated stream format APIs.
- Remove deprecated device sample rate APIs.
- Add a ChannelBuffer class to help manage deinterleaved channels.
- Clean up the splitting filter state.
- Add a unit test which verifies the output against known-working
native format output.

BUG=2894
R=aluebs@webrtc.org, bjornv@webrtc.org, xians@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5959 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-22 21:00:04 +00:00
andrew@webrtc.org
56e4a05053 Remove ProcessingComponent's dependence on AudioProcessingImpl.
- Move needed accessors to AudioProcessing.
- Inject the crit directly as a dependency.
- Remove the now unneeded EchoCancellationImplWrapper.

BUG=2894
R=aluebs@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5620 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-27 22:23:17 +00:00
andrew@webrtc.org
c0907eff42 MIPS optimizations for AEC audio processing module
The resulting output streams obtained by testing with audioproc test application
are bit-exact with generic C code output streams.

Performance gain achieved:
- mips32 ~ 17%
- mips32r2 ~ 20%
- mipsdsp & mipsdspr2 ~ 21%

R=andrew@webrtc.org

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

Patch from Ljubomir Papuga <lpapuga@mips.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5591 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-21 00:13:31 +00:00
michaelbai@google.com
82ebb463fd Use libvpx's obj_int_extract and unpack_lib_posix to generate offset header file.
This patch removes generate_asm_header.gypi and uses libvpx's obj_int_extract and
unpack_lib_posix to generate offset header files.

It make the simliar feature's implementation consistent.

R=andrew@webrtc.org, fischman@webrtc.org, fischman@chromium.org
BUG=334447

Committed: https://code.google.com/p/webrtc/source/detail?r=5517

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5524 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-11 04:48:27 +00:00
michaelbai@google.com
a65abf9d3a Revert "Use libvpx's obj_int_extract and unpack_lib_posix to generate offset header file."
This reverts commit 7686f0ddda717a9e776be0e219f039f68a10f9ed.

BUG=

TBR=andrew@webrtc.org, fischman@webrtc.org,

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5520 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-10 19:26:26 +00:00
michaelbai@google.com
7686f0ddda Use libvpx's obj_int_extract and unpack_lib_posix to generate offset header file.
This patch removes generate_asm_header.gypi and uses libvpx's obj_int_extract and
unpack_lib_posix to generate offset header files.

It make the simliar feature's implementation consistent.

R=andrew@webrtc.org, fischman@webrtc.org, fischman@chromium.org
BUG=334447

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5517 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-10 17:42:34 +00:00
henrikg@webrtc.org
c693704cc2 Move out typing detection to its own class.
This will allow an embedder to use it directly.

Adding inertia/hangover time between updates of the reported detection status to the algorithm, controlled by a parameter. That is usually desired and this way a consumer of
the class don't have to implement that. (VoiceEngine will let it be 1, which results in the same behavior as before, and keep controlling the hangover itself.)

R=andrew@webrtc.org, niklas.enbom@webrtc.org, xians@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5462 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-30 09:50:46 +00:00
andrew@webrtc.org
ea9392d5eb MIPS optimizations for NS audio processing module
R=andrew@webrtc.org

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

Patch from Ljubomir Papuga <lpapuga@mips.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5393 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-16 07:22:01 +00:00
andrew@webrtc.org
60730cfe3c Remove the requirement to call set_sample_rate_hz and friends.
Instead have ProcessStream transparently handle changes to the stream
audio parameters (sample rate and channels). This removes two locks
per 10 ms ProcessStream call taken by VoiceEngine (four total with the
audio level indicator.)

Also, prepare future improvements by having the splitting filter take
a length parameter. This will allow it to work at different sample
rates. Remove the useless splitting_filter wrapper.

TESTED=voe_cmd_test with audio processing enabled and switching between
codecs; unit tests.

R=aluebs@webrtc.org, bjornv@webrtc.org, turaj@webrtc.org, xians@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5346 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-07 17:45:09 +00:00
kjellander@webrtc.org
917306d3fd Change uses of the obsolete armv7 setting to arm_version==7.
BUG=http://crbug.com/234135
R=andrew@webrtc.org, fischman@webrtc.org, kjellander@webrtc.org

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5250 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-10 09:26:07 +00:00
andrew@webrtc.org
e03cafaebc MIPS optimizations for AECM audio processing module
R=andrew@webrtc.org

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

Patch from Ljubomir Papuga <lpapuga@mips.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5110 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-11 20:10:01 +00:00
andrew@webrtc.org
b0730108a2 Move audio_processing dependencies to a variable.
R=aluebs@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5108 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-11 17:20:27 +00:00
andrew@webrtc.org
6e908b3adf Remove unnecessary include_dirs from audio_processing.
TBR=aluebs
TESTED=trybots

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5106 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-08 19:52:05 +00:00
andrew@webrtc.org
1760a17b8e Add an extended filter mode to AEC.
Re-land: http://review.webrtc.org/2151007/
TBR=bjornv@webrtc.org

Original change description:
This mode extends the filter length from the current 48 ms to 128 ms.
It is runtime selectable which allows it to be enabled through
experiment. We reuse the DelayCorrection infrastructure to avoid having
to replumb everything up to libjingle.

Increases AEC complexity by ~50% on modern x86 CPUs.
Measurements (in percent of usage on one core):

Machine/CPU                                     Normal Extended
MacBook Retina (Early 2013),
Core i7 Ivy Bridge (2.7 GHz, hyperthreaded)     0.6%   0.9%

MacBook Air (Late 2010), Core 2 Duo (2.13 GHz)  1.4%   2.7%

Chromebook Pixel, Core i5 Ivy Bridge (1.8 GHz)  0.6%   1.0%

Samsung ARM Chromebook,
Samsung Exynos 5 Dual (1.7 GHz)                 3.2%   5.6%

The relative value is large of course but the absolute should be
acceptable in order to have a working AEC on some platforms.

Detailed changes to the algorithm:
- The filter length is changed from 48 to 128 ms. This comes with tuning
of several parameters: i) filter adaptation stepsize and error
threshold; ii) non-linear processing smoothing and overdrive.
- Option to ignore the reported delays on platforms which we deem
sufficiently unreliable. Currently this will be enabled in Chromium for
Mac.
- Faster startup times by removing the excessive "startup phase"
processing of reported delays.
- Much more conservative adjustments to the far-end read pointer. We
smooth the delay difference more heavily, and back off from the
difference more. Adjustments force a readaptation of the filter, so they
should be avoided except when really necessary.

Corresponds to these changes:
https://chromereviews.googleplex.com/9412014
https://chromereviews.googleplex.com/9514013
https://chromereviews.googleplex.com/9960013

BUG=454,827,1261

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4848 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25 23:17:38 +00:00
fischman@webrtc.org
31b4a5ac82 Recognize armv7 target_arch for ios support in webrtc common.gyp
BUG=2343
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4684 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-05 16:46:36 +00:00
andrew@webrtc.org
61e596fc49 Add a Config class interface to AudioProcessing for passing options.
Pass the Config down to all AudioProcessing components.

Also add an EchoCancellationImplWrapper to optionally create different
EchoCancellationImpls.

BUG=2117
TBR=turaj@webrtc.org
TESTED=git try

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4400 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-25 18:28:29 +00:00
andrew@webrtc.org
342353780d Consolidate common_audio into a single target.
In principle should reduce gyp processing time, but the difference was not measurable. In any case, it's a good simplification that aligns with having a single common_video target.

R=bjornv@webrtc.org, kma@webrtc.org, tina.legrand@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3928 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-30 23:43:26 +00:00
kma@webrtc.org
2f9bd247ad Ported assembly coding in APM from Android to iOS.
Bugs=none
Test=trybots, and offline file bit-exact tests.
Review URL: https://webrtc-codereview.appspot.com/1066009

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3563 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-02-23 04:16:59 +00:00
bjornv@webrtc.org
56a9ec30e9 Refactoring AEC: AecCore struct made private
* Added aec_core_internal.h for private variables.
* Moved aec_t struct to aec_core_internal.h
* Name change aec_t -> AecCore
* Moved additional declarations to aec_core_internal.h
* Tested with audioproc_unittest and trybots

TEST=none
BUG=none

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3553 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-02-20 22:38:47 +00:00
andrew@webrtc.org
63e0964039 Fix webrtc compilation errors for Chrome Win64
Mostly disabling warnings in the gyp files.

BUG=1348
BUG=http://crbug.com/166496
BUG=http://crbug.com/167187

Review URL: https://webrtc-codereview.appspot.com/1063011
Patch from Justin Schuh <jschuh@chromium.org>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3423 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-29 06:45:22 +00:00
kma@webrtc.org
12454028bc Fixed and enabled ARM assembly code in AECM and NS.
Review URL: https://webrtc-codereview.appspot.com/860005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3060 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-11-07 22:34:31 +00:00
andrew@webrtc.org
14b43beb7c Move src/ -> webrtc/
TBR=niklas.enbom@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2963 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-10-22 18:19:23 +00:00