Commit Graph

332 Commits

Author SHA1 Message Date
ee30082af8 Set correct sample rate in far_frame in audioproc tool.
One debug recording with non matching sample rates between render and capture revealed a bug in modules/audio_processing/test/process_test.cc
The far_frame (render audio frame) used was loaded with the capture rate instead of the render rate with a data length mismatch error as result.

BUG=N/A
TESTED=manually on linux
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7695 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-13 11:00:10 +00:00
0e37b898f0 replace inline assembly WebRtcAecm_CalcLinearEnergiesNeon by intrinsics.
The modification only uses the unique part of the CalcLinearEnergies
 function. Pass byte to byte conformance test both on ARMv7 and ARM64,
 and the single function performance is similar with original assembly
 version on different platforms. If not specified, the code is compiled
 by GCC 4.6. The result is the "X version / C version" ratio, and the
 less is better.

| run 100k times             | cortex-a7 | cortex-a9 | cortex-a15 |
| use C as the base on each  |  (1.2Ghz) |  (1.0Ghz) |   (1.7Ghz) |
| CPU target                 |           |           |            |
|----------------------------+-----------+-----------+------------|
| Neon asm                   |    19.48% |    19.26% |     13.68% |
| Neon inline                |    27.90% |    28.87% |     17.79% |
| Neon intrinsics (GCC 4.8)  |    18.69% |    20.18% |     14.69% |
| Neon intrinsics (LLVM 3.4) |    18.52% |    21.15% |     13.56% |

BUG=3580
R=andrew@webrtc.org

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7686 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-11 19:34:14 +00:00
e497be3de1 replace inline assembly WebRtcAecm_StoreAdaptiveChannelNeon by intrinsics.
The modification only uses the unique part of the StoreAdaptiveChannel
 function. Pass byte to byte conformance test both on ARM32 and ARM64,
 and the single function performance is similar with original assembly
 version on different platforms. If not specified, the code is compiled
 by GCC 4.6.  The result is the "X version / C version" ratio, and the
 less is better.

| run 100k times             | cortex-a7 | cortex-a9 | cortex-a15 |
| use C as the base on each  |  (1.2Ghz) |  (1.0Ghz) |   (1.7Ghz) |
| CPU target                 |           |           |            |
|----------------------------+-----------+-----------+------------|
| Neon asm                   |    20.97% |    37.70% |     25.41% |
| Neon inline                |    36.93% |    51.80% |     38.14% |
| Neon intrinsics (GCC 4.6)  |    27.78% |    43.71% |     26.50% |
| Neon intrinsics (GCC 4.8)  |    27.16% |    38.22% |     26.87% |
| Neon intrinsics (LLVM 3.4) |    27.82% |    39.90% |     26.69% |

Change-Id: Ia55d8a268a70164b50676c604ae40b68fc183106

BUG=3580
R=andrew@webrtc.org

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7685 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-11 19:32:33 +00:00
4ffc7341ca replace inline assembly WebRtcAecm_ResetAdaptiveChannelNeon by intrinsics.
The modification only uses the unique part of the ResetAdaptiveChannel
 function. Pass byte to byte conformance test both on ARM32 and ARM64,
 and the single function performance is similar with original assembly
 version on different platforms. If not specified, the code is compiled
 by GCC 4.6. The result is the "X version / C version" ratio, and the
 less is better.

| run 100k times             | cortex-a7 | cortex-a9 | cortex-a15 |
| use C as the base on each  |  (1.2Ghz) |  (1.0Ghz) |   (1.7Ghz) |
| CPU target                 |           |           |            |
|----------------------------+-----------+-----------+------------|
| Neon asm                   |       15% |       30% |        12% |
| Neon inline                |       21% |       30% |        12% |
| Neon intrinsics (GCC 4.6)  |       19% |       32% |        12% |
| Neon intrinsics (GCC 4.8)  |       20% |       32% |        12% |
| Neon intrinsics (LLVM 3.4) |       19% |       30% |        12% |

BUG=3580
R=andrew@webrtc.org

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7672 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-10 17:27:53 +00:00
d024f759a8 clear asm code and unused functions in audio processing module
BUG=
R=andrew@webrtc.org

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7671 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-10 17:19:57 +00:00
b81e304ac0 replace inline assembly WebRtcNsx_AnalysisUpdate by intrinsics.
The modification only uses the unique part of the analysis_update
 function. Pass byte to byte conformance test on both ARMv7 and AArch64,
 and the single function performance is similar with original assembly
 version on different platforms. If not specified, the code is compiled
 by GCC 4.6. The result is the "X version / C version" ratio, and the
 less is better.

| run 100k times             | cortex-a7 | cortex-a9 | cortex-a15 |
| use C as the base on each  |  (1.2Ghz) |  (1.0Ghz) |   (1.7Ghz) |
| CPU target                 |           |           |            |
|----------------------------+-----------+-----------+------------|
| Neon asm                   |    15.61% |    20.15% |     14.89% |
| Neon inline asm (LLVM 3.4) |    25.98% |    33.96% |     18.18% |
| Neon intrinsics (GCC 4.6)  |    22.06% |    27.01% |     19.24% |
| Neon intrinsics (GCC 4.8)  |    17.28% |    18.23% |     18.55% |
| Neon intrinsics (LLVM 3.4) |    21.02% |    19.98% |     16.76% |

BUG=
R=andrew@webrtc.org

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7596 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-03 17:17:51 +00:00
818c9f9e14 replace inline assembly WebRtcNsx_SynthesisUpdateNeon by intrinsics.
The modification only uses the unique part of the synthesis_update
function. Pass byte to byte conformance test both on ARMv7 and ARMv8,
and the single function performance is similar with original assembly
version on different platforms (if not specified, the code is compiled
by GCC 4.6):

| run 100k times             | cortex-a7 | cortex-a9 | cortex-a15 |
| use C as the base          |  (1.2Ghz) |  (1.0Ghz) |   (1.7Ghz) |
| (the smaller the better)   |           |           |            |
|----------------------------+-----------+-----------+------------|
| C                          |      100% |      100% |       100% |
| Neon asm                   |    15.93% |    17.01% |     12.50% |
| Neon inline asm            |    27.74% |    31.41% |     14.64% |
| Neon intrinsics (GCC 4.8)  |    17.84% |    14.10% |     13.84% |
| Neon intrinsics (LLVM 3.4) |    16.63% |    14.01% |     12.98% |

BUG=3580
R=andrew@webrtc.org

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7586 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-31 22:07:35 +00:00
a3ed713dad Add a WavReader counterpart to WavWriter.
Don't bother with a C interface as we currently have no need to call
this from C code. The first use will be in the audioproc tool.

R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7585 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-31 21:51:03 +00:00
508c91683c Build fix for MIPS32R6.
Exclude MIPS optimizations for MIPS32R6 build since some of the instructions
are not supported. This is temporary fix, until the MIPS32R6 code is added.

R=andrew@webrtc.org

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7580 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-31 16:26:17 +00:00
8328e7c44d Revert "Revert part of r7561, "Refactor audio conversion functions.""
This restores the conversion changes to AudioProcessing originally
added in r7561, with minor alterations to ensure it passes all tests.

TBR=kwiberg

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7574 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-31 04:58:14 +00:00
bcfb4d0403 Revert part of r7561, "Refactor audio conversion functions."
Specifically, revert this part:

  "Remove hacks in AudioBuffer intended to maintain bit-exactness with
   the float path. The conversions etc. are now all natural, and
   instead we enforce close but not bit-exact output between the two
   paths."

But keep the conversion function rename, since that doesn't seem to be
causing problems.

R=tina.legrand@webrtc.org, bjornv@webrtc.org
TBR=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7569 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-30 11:16:06 +00:00
4fc4addc81 Refactor audio conversion functions.
Use a consistent naming scheme that can be understood at the callsite
without having to refer to documentation.

Remove hacks in AudioBuffer intended to maintain bit-exactness with the
float path. The conversions etc. are now all natural, and instead we
enforce close but not bit-exact output between the two paths.

Output of ApmTest.Process:
https://paste.googleplex.com/5931055831842816

R=aluebs@webrtc.org, bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7561 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-30 03:40:10 +00:00
ffeaeed8c1 Make NSinst_t* const and rename to self in ns_core
This is only to make the code more readable and maintainable.
It generates a bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7550 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-28 22:52:09 +00:00
8b1b23f8f8 Make local functions static and dropWebRtcNs_ in ns_core
This is only to make the code more readable and maintainable.
It generates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7548 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-28 21:06:57 +00:00
28b54671cb Make all comments whole sentences in ns_core
This is done to make the code more readable.
It generates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7547 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-28 20:56:53 +00:00
7e19a11a71 Break out WebRtcNs_ComputeDdUpdate function in ns_core
This is done in order to make the code more readible and maintainable.
It generates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7514 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-23 19:54:33 +00:00
f8ea0d5518 Break out WebRtcNs_UpdateNoise function in ns_core
This is done in order to make the code more readible and maintainable.
It generates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7513 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-23 19:49:42 +00:00
799e88ae19 Break out FFT function in ns_core
This is done in order to make the code more readible and maintainable.
This introduces an error of only +1 and -1.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7512 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-23 19:36:42 +00:00
8454ad88ed Break out ComputeSnr function in ns_core
This is done in order to make the code more readible and maintainable.
The output is bit-exact.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7511 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-23 19:34:14 +00:00
67cf1d742b Break out WebRtcNs_Windowing function in ns_core
This is done in order to make the code more readible and maintainable.
This introduces only +1 and -1 errors.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7488 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-21 22:35:40 +00:00
0e7099244c Break out WebRtcNs_Energy function in ns_core
This is done in order to make the code more readible and maintainable.
This generates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7487 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-21 22:14:10 +00:00
7634c09406 Break out WebRtcNs_IFFT function in ns_core
This is done in order to make the code more readible and maintainable.
This creates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7486 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-21 21:27:00 +00:00
333e2556ed Break out WebRtcNs_UpdateBuffer function in ns_core
This is done in order to make the code more readible and maintainable.
It generates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7483 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-21 20:33:09 +00:00
f87c0aff7f audio_processing: Replaced macro WEBRTC_SPL_RSHIFT_W32 with >>
Also includes a typo in a comment.
Affects
* aecm
* hpf

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7456 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-15 12:51:23 +00:00
f02ba9be54 audio_processing/agc: Replaced macro WEBRTC_SPL_RSHIFT_W32 with >>
Affects AGC only.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7455 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-15 11:16:48 +00:00
8dc00d76af audio_processing/ns: Replaced macro WEBRTC_SPL_RSHIFT_W32 with >>
Affects fixed point version of Noise Suppression.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7454 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-15 09:31:40 +00:00
b6af4283ca Adjust speech probability in NS when echo
The average speech probability for the higher band is multiplied by the quotient of the process and analyze powers, to avoid thinking that suppressed echo is speech. In order to do this both magnitudes, alanyze and process, needed to be stored. This also was used to calculate different previous STSA estimates for analyze and process.
This CL was tested on two long team member recordings (bjornv and kwiberg) and the noisiest (5) recordings from the QA set.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7437 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-13 20:48:05 +00:00
bc1a4578e0 common_audio: Removed macro WEBRTC_SPL_RSHIFT_W16
Replaced the trivial right shift macro at remaining 4 places and removed from signal_processing.

Affected components:
* vad
* aecm

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7434 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-13 14:00:43 +00:00
d4fe824862 audio_processing: Replaced macro WEBRTC_SPL_RSHIFT_W16 with >>
The implementation of WEBRTC_SPL_RSHIFT_W16 is simply >>. This CL removes the macro usage in audio_processing and signal_processing.

Affected components:
* aecm
* agc
* nsx

Indirectly affecting (through signal_processing changes)
* codecs/cng
* codecs/isac/fix
* codecs/isac/main

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7432 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-13 13:01:13 +00:00
e46bc77e94 Reland 28629004: adding new AEC dump start interface for chrome.
This is required because we are not allow to pass CRT objects across dll boundaries, that says, when we pass a file descriptor from chrome dll to libpeerconnection dll, the file descriptor will become invalid immediate, more information can be found here:
http://msdn.microsoft.com/en-us/library/ms235460.aspx

R=andresp@webrtc.org, andrew@webrtc.org, bjornv@webrtc.org, henrike@webrtc.org, henrikg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7418 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-10 08:36:56 +00:00
348eac641e audio_processing: Replaced WEBRTC_SPL_RSHIFT_U32 with >>
A trivial macro that is replaced. Affected components:
* AGC
* NSx

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7366 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-02 08:07:05 +00:00
79a7148108 Revert 7337 "Reland 28629004: adding new AEC dump start interfac..."
> Reland 28629004: adding new AEC dump start interface for chrome
> 
> adding new AEC dump start interface for chrome.
> 
> This is required because we are not allow to pass CRT objects across dll boundaries, that says, when we pass a file descriptor from chrome dll to libpeerconnection dll, the file descriptor will become invalid immediate, more information can be found here:
> http://msdn.microsoft.com/en-us/library/ms235460.aspx
> 
> Chromium bug:crbug/415935
> TEST=bots
> R=bjornv@webrtc.org, kwiberg@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/27639004

TBR=xians@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7342 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 15:29:13 +00:00
7aad5e5cce Revert 7338 "Fixed the android build by making the interface pur..."
> Fixed the android build by making the interface pure virtual.
> 
> TBR=asapersson@webrtc.org, bjornv@webrtc.org,
> 
> Review URL: https://webrtc-codereview.appspot.com/24789004

TBR=xians@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7341 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 15:26:15 +00:00
db75a66b0f Minor code change to fix some warnings in MIPS build.
R=andrew@webrtc.org, bjornv@webrtc.org, kwiberg@webrtc.org

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7339 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 15:17:50 +00:00
90d1979d77 Fixed the android build by making the interface pure virtual.
TBR=asapersson@webrtc.org, bjornv@webrtc.org,

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7338 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 15:15:22 +00:00
14092e00f1 Reland 28629004: adding new AEC dump start interface for chrome
adding new AEC dump start interface for chrome.

This is required because we are not allow to pass CRT objects across dll boundaries, that says, when we pass a file descriptor from chrome dll to libpeerconnection dll, the file descriptor will become invalid immediate, more information can be found here:
http://msdn.microsoft.com/en-us/library/ms235460.aspx

Chromium bug:crbug/415935
TEST=bots
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7337 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 14:35:15 +00:00
875206196c Revert 7334 "adding new AEC dump start interface for chrome."
> adding new AEC dump start interface for chrome.
> 
> This is required because we are not allow to pass CRT objects across dll boundaries, that says, when we pass a file descriptor from chrome dll to libpeerconnection dll, the file descriptor will become invalid immediate, more information can be found here:
> http://msdn.microsoft.com/en-us/library/ms235460.aspx
> 
> Chromium bug:crbug/415935
> TEST=bots
> R=bjornv@webrtc.org, kwiberg@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/28629004

TBR=xians@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7335 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 13:30:05 +00:00
2e417d6428 adding new AEC dump start interface for chrome.
This is required because we are not allow to pass CRT objects across dll boundaries, that says, when we pass a file descriptor from chrome dll to libpeerconnection dll, the file descriptor will become invalid immediate, more information can be found here:
http://msdn.microsoft.com/en-us/library/ms235460.aspx

Chromium bug:crbug/415935
TEST=bots
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7334 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 13:11:27 +00:00
65e56dba53 audio_processing/aecm: Added help function for calculating log of energy
The same operation of calculating log of the energy was executed four times. This CL adds a help function LogOfEnergyInQ8() for that.

BUG=N/A
TESTED=locally on linux and trybots
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7331 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 09:31:28 +00:00
23ec8372a6 audio_processing: Removed usage of macro WEBRTC_SPL_MUL
WEBRTC_SPL_MUL is a trivial multiplication after casting to int32_t. This is already taken care of by the compiler which makes the macro unnecessary.

Affected components:
* AGC
* NSx

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7330 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 09:29:28 +00:00
750423c722 audio_processing: Replaced trivial macro WEBRTC_SPL_LSHIFT_W32 with <<
Affected components:
* AECM
* AGC
* HPF
* NSx

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7329 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 09:26:36 +00:00
d71118194f audio_processing: Replaced macro WEBRTC_SPL_LSHIFT_W16 with <<
A trivial macro that serves no purpose. Affected components are:
* audio_processing/nsx
* audio_processing/agc
* audio_processing/aecm
* common_audio/LpcToReflCoef

BUG=3348,3353
TESTED=locally on linux
R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7321 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-29 10:56:27 +00:00
f21ea918ad GN: Add common configs to all targets.
This is needed to ensure we have the same build with GN
as with GYP, since GYP includes the common.gypi on a global level.
Several fixes has been needed in the past because some code have
been built without the right defines.

BUG=3441
R=brettw@chromium.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7317 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-28 17:37:22 +00:00
384d05f362 Remove the different block lengths in ns_core
Relanding the CL: https://webrtc-codereview.appspot.com/30539004/
It had to be reverted because some development code was uploaded by mistake.

TBR=bjornv@webrtc.org

BUG=webrtc:3811

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7307 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-26 14:41:19 +00:00
5088377d70 Revert 7297 "Remove the different block lengths in ns_core"
> Remove the different block lengths in ns_core
> 
> This CL has bit-exact output.
> 
> What it does:
>   * Remove the blockLen10Ms, as it is hardcoded to be equal to blockLen.
>   * This makes outLen to be always zero, so it can be removed too.
>   * It also avoids the need to have an outBuf, because it is not used, so it is also removed
>   * Replaced blockLen10Ms by blockLen everywhere, since they were hardcoded to be equal.
>   * We don't need to check if outLen is zero, because it always is, so it was removed.
>   * Of course, the outBuf needs no initial set or copying around, because it is not used.
> 
> BUG=webrtc:3811
> R=bjornv@webrtc.org, kwiberg@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/30539004

TBR=aluebs@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7306 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-26 14:33:08 +00:00
bfacaabfce Add accessors for array of channel pointers in AudioBuffer. They are
needed as arguments to any multichannel audio processing unit.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7303 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-25 20:52:08 +00:00
5f3965783b Remove the different block lengths in ns_core
This CL has bit-exact output.

What it does:
  * Remove the blockLen10Ms, as it is hardcoded to be equal to blockLen.
  * This makes outLen to be always zero, so it can be removed too.
  * It also avoids the need to have an outBuf, because it is not used, so it is also removed
  * Replaced blockLen10Ms by blockLen everywhere, since they were hardcoded to be equal.
  * We don't need to check if outLen is zero, because it always is, so it was removed.
  * Of course, the outBuf needs no initial set or copying around, because it is not used.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7297 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-25 13:53:43 +00:00
30be827e6a Enable render downmixing to mono in AudioProcessing.
In practice, we have been doing this since time immemorial, but have
relied on the user to do the downmixing (first voice engine then
Chromium). It's more logical for this burden to fall on AudioProcessing,
however, who can be expected to know that this is a reasonable approach
for AEC. Permitting two render channels results in running two AECs
serially.

Critically, in my recent change to have Chromium adopt the float
interface:
https://codereview.chromium.org/420603004
I removed the downmixing by Chromium, forgetting that we hadn't yet
enabled this feature in AudioProcessing. This corrects that oversight.

The change in paths hit by production users is very minor. As commented
it required adding downmixing to the int16_t path to satisfy
bit-exactness tests.

For reference, find the ApmTest.Process errors here:
https://paste.googleplex.com/6372007910309888

BUG=webrtc:3853
TESTED=listened to the files output from the Process test, and verified
that they sound as expected: higher echo while the AEC is adapting, but
afterwards very close.

R=aluebs@webrtc.org, bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7292 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-24 20:06:23 +00:00
a0ce9fa2a6 Call NS AnalyzeCaptureAudio before AEC
This attenuates the noise pumping generated from the NS adapting to the AEC comfort noise.

When there is echo present the AEC suppresses it and adds comfort noise. This is underestimated on purpose to avoid adding more than the original background noise. The NS has to be called after the AEC, because every non-linear processing before it can ruin its performance. Therefore the noise estimation can adapt to this comfort noise, making it less aggressive and generating noise pumping.

By putting the noise estimation analysis stage from the NS before the AEC, this effect can be avoided. This has been tested manually on recordings where noise pumping was present: Two long recordings done in our team by bjornv and kwiberg plus the most noisy (5) recordings in the QA set.

On the other hand, one risk of doing this is to not adapt to the comfort noise and therefore suppress too much. As verified in the tested files, this is not a problem in practice.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7289 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-24 14:18:03 +00:00
275dac2c1d Moved the filter calculation from analyze to process in ns_core
It makes sense to have it there if the analyze and process methods are called in different stages.
Tested over the entire QA set for bit exactness.

BUG=webrtc:3811
R=bjornv@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7287 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-24 13:23:49 +00:00