Commit Graph

18 Commits

Author SHA1 Message Date
f6a99e63b6 Refactor audio_processing: Free functions return void
There is no point in returning an error when Free() fails. In fact it can only happen if we have a null pointer as object. There is further no place where the return value is used.

Affected components are
- aec
- aecm
- agc
- ns

BUG=441
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8966}
2015-04-10 05:56:59 +00:00
b1786dbab0 audio_processing: Added a new AEC delay metric value that gives the amount of poor delays
To more easily determine if for example the AEC is not working properly one could monitor how often the estimated delay is out of bounds. With out of bounds we mean either being negative or too large, where both cases will break the AEC.

A new delay metric is added telling the user how often poor delay values were estimated. This is measured in percentage since last time the metrics were calculated.

All APIs have been updated with a third parameter with EchoCancellation::GetDelayMetrics() giving the option to exclude the new metric not to break existing code.

The new metric has been added to audio_processing_unittests with an additional protobuf member, and reference files accordingly updated.
voe_auto_test has not been updated to display the new metric.

BUG=4246
TESTED=audioproc on files
R=aluebs@webrtc.org, andrew@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8230}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8230 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-03 06:07:21 +00:00
c78d81ae89 Re-land "Support 48kHz in AEC"
Doing something similar for the band 16-24kHz to what is done for the band 8-16kHz. The only difference is that there is no comfort noise added in this band. Could not test how this sounds because there are no aecdumps with 48kHz sample rate as nfar as I know.
Tested for 32kHz sample rate and the output is bitexact with how it was before this CL.

Original: https://webrtc-codereview.appspot.com/28319004/
Reverted: https://webrtc-codereview.appspot.com/33949004/

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8116 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-21 19:10:55 +00:00
ee0c100d54 Revert 8080 "Support 48kHz in AEC"
> Support 48kHz in AEC
> 
> Doing something similar for the band 16-24kHz to what is done for the band 8-16kHz. The only difference is that there is no comfort noise added in this band. Could not test how this sounds because there are no aecdumps with 48kHz sample rate as nfar as I know.
> Tested for 32kHz sample rate and the output is bitexact with how it was before this CL.
> 
> BUG=webrtc:3146
> R=andrew@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/28319004

TBR=aluebs@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8100 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-20 10:22:49 +00:00
64d3c4b9ac Support 48kHz in AEC
Doing something similar for the band 16-24kHz to what is done for the band 8-16kHz. The only difference is that there is no comfort noise added in this band. Could not test how this sounds because there are no aecdumps with 48kHz sample rate as nfar as I know.
Tested for 32kHz sample rate and the output is bitexact with how it was before this CL.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8080 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-15 19:52:05 +00:00
38214d53db EchoCancellationImpl::ProcessRenderAudio: Use float samples directly
This patch lets EchoCancellationImpl::ProcessRenderAudio ask the given
AudioBuffer for float sample data directly, instead of asking for
int16 samples and then converting manually.

Since EchoCancellationImpl::ProcessRenderAudio takes a const
AudioBuffer*, it was necessary to add some const accessors for float
data to AudioBuffer.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6590 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-07-03 09:47:33 +00:00
d5da25063c Revert "Revert "Audio processing: Feed each processing step its choice
of int or float data"

This reverts commit 6142.

R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6172 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-15 11:17:21 +00:00
b1a66d166c Revert "Audio processing: Feed each processing step its choice of int or float data"
This reverts r6138.

tbr=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6142 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-14 09:39:56 +00:00
934a265a47 Audio processing: Feed each processing step its choice of int or float data
Each audio processing step is given a pointer to an AudioBuffer, where
it can read and write int data. This patch adds corresponding
AudioBuffer methods to read and write float data; the buffer will
automatically convert the stored data between int and float as
necessary.

This patch also modifies the echo cancellation step to make use of the
new methods (it was already using floats internally; now it doesn't
have to convert from and to ints anymore).

(The reference data to the ApmTest.Process test had to be modified
slightly; this is because the echo canceller no longer unnecessarily
converts float data to int and then immediately back to float for each
iteration in the loop in EchoCancellationImpl::ProcessCaptureAudio.)

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6138 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-14 09:01:35 +00:00
924e81f797 Echo cancellation functions docs: Follow style guide w.r.t. placement of *
The style guide says to use "void* x", not void *x", and the code in
these files already do so, but the comments do not. Fix that.

Also, in the interest of reducing eye strain, I fixed the vertical
alignment in a small number of cases.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6101 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-12 09:55:19 +00:00
13b2d46593 clang-format audio_processing/aec/*
TBR=bjornv
TESTED=trybots

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4944 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-08 23:41:42 +00:00
b7192b8247 WebRtc_Word32 -> int32_t in audio_processing/
BUG=314

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3809 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-10 07:50:54 +00:00
132c15de30 AEC Refactoring:
* Adds pointer to low level AecCore struct.
* Adds a simple unit test of this new call.

Tested with audioproc_unittest, trybots

TEST=none
BUG=none

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3577 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-02-27 21:03:41 +00:00
47b274de44 Refactoring AEC: Added a SetConfigCore function
* Configuraion parameters now passed down the AEC Core struct.
* Tested with audioproc_unittest and on trybots.

TEST=none
BUG=none

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3548 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-02-20 17:09:47 +00:00
ee7202f7a4 Removed unused get_config function. The configuration is already stored and handled in the audio processing module, so there is no need for this functionality.
Tested with audioproc_unittest and on trybots.

TEST=none
BUG=none

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3546 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-02-20 16:36:59 +00:00
b4cd342eb9 This refactoring CL contains an API to get low level echo metrics stats.
TEST=audioproc_unittest, trybots
BUG=None

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3523 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-02-15 18:40:34 +00:00
21a2fc902d This Cl includes
* A getter for echo_state
* Style changes, such as changes to int where appropriate

TEST=audioproc_unittest, trybots
BUG=None

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3522 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-02-15 17:01:03 +00:00
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