On non-Android the delay estimator in audio_processing/aec has solely been used for logging purposes. The maximum possible observed delay has been 236 ms. We have seen longer delays for which the delay estimate at best ends up at 236 ms, but can also be 'random'. reported delays are clamped to 500 ms.
This cl extends the delay estimation window to match that.
BUG=4086, 3504, 4113
TESTED=locally on Linux and trybots
R=kwiberg@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/36569004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7989 4adac7df-926f-26a2-2b94-8c16560cd09d
This provides more flexibility if some component in AudioProcessing wants to operate before downmixing.
Now the AudioProcessing does only track the processing rate, but not the processing number of channels. This is tracked by the AudioBuffer itself and can be changed at any time to one smaller or equal the input number of channels. For each chunk it is reset to input number of channels and the end it should be equal to the output number of channels.
R=andrew@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/28169004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7879 4adac7df-926f-26a2-2b94-8c16560cd09d
Implemented the 3 bands splitting filter bank by:
1. Upsample by 4/3.
2. Split twice into 2 bands.
3. Discard upper most band, because it is empty anyway.
A unittest was also implemented:
1. Generate a signal from presence or absence of sine waves of different frequencies.
2. Split into 3 bands and check their presence or absence.
3. Recombine the bands.
4. Calculate delay (as it is an IIR it depends on frequency).
5. Check that the cross correlation of input and output is high enough at that delay.
BUG=webrtc:3146
R=andrew@webrtc.org, bjornv@webrtc.org, kwiberg@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/31029004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7754 4adac7df-926f-26a2-2b94-8c16560cd09d
This doesn't change the behavior at all.
The logic behind this is having one class which manages all the splitting filters, because in the future we plan to add a 3 band one for 48kHz support.
It also breaks the dependency of the AudioBuffer with the filter states of these filters (which are going to be different for the 3 band one). The AudioBuffer is complicated enough and is going to need changes to support 3 bands in the future, so any simplification is a good idea.
On top of that it eliminates repeated code in the APM (now only iterating over channels, but then also deciding in how many bands to split). This should be managed by the AudioBuffer directly.
BUG=webrtc:3146
R=bjornv@webrtc.org, kwiberg@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/32469004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7705 4adac7df-926f-26a2-2b94-8c16560cd09d
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
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
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
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
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
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