Commit Graph

96 Commits

Author SHA1 Message Date
b2328d11dc Remove additional channel constraints when Beamforming is enabled in AudioProcessing
The general constraints on number of channels for AudioProcessing is:
num_in_channels == num_out_channels || num_out_channels == 1

When Beamforming is enabled and additional constraint was added forcing:
num_out_channels == 1

This artificial constraint was removed by adding upmixing support in CopyTo, since it was already supported for the AudioFrame interface using InterleaveTo.

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

Cr-Commit-Position: refs/heads/master@{#11215}
2016-01-12 04:32:32 +00:00
2a34688f86 Make Beamforming dynamically settable for Android platform builds
Review URL: https://codereview.webrtc.org/1563493005

Cr-Commit-Position: refs/heads/master@{#11213}
2016-01-12 02:04:33 +00:00
53805324c0 Rename RTC_HISTOGRAM_* macros to RTC_HISTOGRAM_*_SPARSE_* to indicate that these are for infrequent updates.
This implementation will be replaced by a faster one and sparse will be removed.

BUG=webrtc:5283

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

Cr-Commit-Position: refs/heads/master@{#11099}
2015-12-21 09:46:25 +00:00
a4df27b671 Revert of Reland "Added option to specify a maximum file size when recording an AEC dump." (patchset #2 id:20001 of https://codereview.webrtc.org/1541633002/ )
Reason for revert:
Compile error on Android needs to be fixed before relanding.

Original issue's description:
> Reland "Added option to specify a maximum file size when recording an AEC dump.", commit ae2c5ad12afc8cc29fe9c59dea432b697b871a87.
>
> The revert of the original CL was commit 36d4c545007129446e551c45c17b25377dce89a4.
> Original review: https://codereview.webrtc.org/1413483003/
>
> The original CL changes a function on audio_processing.h that is used by Chrome, this CL adds back the old function.
>
> NOTRY=true
> TBR=glaznev@webrtc.org, henrik.lundin@webrtc.org, solenberg@google.com, henrikg@webrtc.org, perkj@webrtc.org
> BUG=webrtc:4741
>
> Committed: https://crrev.com/f4f5cb09277d5ef6aeac8341e5f54a055867803a
> Cr-Commit-Position: refs/heads/master@{#11093}

TBR=glaznev@webrtc.org,henrik.lundin@webrtc.org,solenberg@google.com,henrikg@webrtc.org,perkj@webrtc.org,kwiberg@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4741

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

Cr-Commit-Position: refs/heads/master@{#11094}
2015-12-19 18:14:18 +00:00
f4f5cb0927 Reland "Added option to specify a maximum file size when recording an AEC dump.", commit ae2c5ad12afc8cc29fe9c59dea432b697b871a87.
The revert of the original CL was commit 36d4c545007129446e551c45c17b25377dce89a4.
Original review: https://codereview.webrtc.org/1413483003/

The original CL changes a function on audio_processing.h that is used by Chrome, this CL adds back the old function.

NOTRY=true
TBR=glaznev@webrtc.org, henrik.lundin@webrtc.org, solenberg@google.com, henrikg@webrtc.org, perkj@webrtc.org
BUG=webrtc:4741

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

Cr-Commit-Position: refs/heads/master@{#11093}
2015-12-19 18:02:39 +00:00
36d4c54500 Revert of Added option to specify a maximum file size when recording an AEC dump. (patchset #5 id:120001 of https://codereview.webrtc.org/1413483003/ )
Reason for revert:
Breaks Chrome-FYI bots because of a change in the StartDebugRecording function in audio_processing.h, that is called from Chrome.

Original issue's description:
> Added option to specify a maximum file size when recording an AEC dump.
>
> For applications with a strict filesize limit for debug files,
> I added an option to specify a maximum filesize for AEC dumps. An
> existing unit test is extended to check that the feature works as
> advertised.
>
> BUG=webrtc:4741
> TBR=glaznev@webrtc.org
>
> Committed: https://crrev.com/ae2c5ad12afc8cc29fe9c59dea432b697b871a87
> Cr-Commit-Position: refs/heads/master@{#11081}

TBR=pthatcher@webrtc.org,henrik.lundin@webrtc.org,henrikg@webrtc.org,solenberg@webrtc.org,andrew@webrtc.org,kwiberg@webrtc.org,perkj@webrtc.org,glaznev@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4741

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

Cr-Commit-Position: refs/heads/master@{#11087}
2015-12-18 16:05:21 +00:00
ae2c5ad12a Added option to specify a maximum file size when recording an AEC dump.
For applications with a strict filesize limit for debug files,
I added an option to specify a maximum filesize for AEC dumps. An
existing unit test is extended to check that the feature works as
advertised.

BUG=webrtc:4741
TBR=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11081}
2015-12-18 11:53:42 +00:00
369f828bfe Adding trace events for the APM render and capture stream processing functions.
BUG=webrtc:5099

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

Cr-Commit-Position: refs/heads/master@{#11069}
2015-12-17 14:42:42 +00:00
a29386c26d Make VoiceDetection not a ProcessingComponent (bit exact).
BUG=webrtc:5354

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

Cr-Commit-Position: refs/heads/master@{#11047}
2015-12-16 11:31:16 +00:00
66085beef8 Bugfix that fixes the error where the audio processing module is called
using the wrong sample rate for the render signal.

The CL is basically a partial revert of the related changes done on
output_mixer.cc in the CL https://codereview.webrtc.org/1234463003.

The CL also reverts the removal of the input_sample_rate_hz() method
that was removed as part of the CL
https://codereview.webrtc.org/1379123002 (as it was at that point
no longer used).

It should be noted that this CL turns off the effect of the
IntelligibilityEnhancer when the AudioFrame AudioProcessing APIs are
used. While it may be possible to solve that by adding upsampling after
the API call, that  approach was discarded due to that:
-That would add extra processing in the echo path, leading to possible
AEC performance reduction.
-That would add extra complexity for the mobile case.
-That would only patch the intelligibility enhancer operation as the
proper way to do such an operation is within APM.
-The intelligibility enhancer is not active by default anywhere.

BUG=webrtc:5237

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

Cr-Commit-Position: refs/heads/master@{#11045}
2015-12-16 10:02:26 +00:00
949028fbf1 Make LevelEstimation not a ProcessingComponent.
BUG=webrtc:5355

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

Cr-Commit-Position: refs/heads/master@{#11033}
2015-12-15 19:39:49 +00:00
5e465c33ca Make NoiseSuppression not a processing component (bit exact).
BUG=webrtc:5298

patch from issue 1490333004 at patchset 1 (http://crrev.com/1490333004#ps1)

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

Cr-Commit-Position: refs/heads/master@{#10944}
2015-12-08 21:22:35 +00:00
70f9903e57 Make HighPassFilter not a ProcessingComponent anymore (bit exact).
BUG=webrtc:5298

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

Cr-Commit-Position: refs/heads/master@{#10939}
2015-12-08 19:07:38 +00:00
df3efa8c07 Introduced the new locking scheme
BUG=webrtc:5099

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

Cr-Commit-Position: refs/heads/master@{#10836}
2015-11-28 20:35:18 +00:00
81b9bfe685 Added a threadchecking scheme to APM that checks that the APM API calls are called from the correct threads. The actual threadcheckers were, however, removed and will be reintroduced in another upcoming CL.
BUG=webrtc:5099

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

Cr-Commit-Position: refs/heads/master@{#10817}
2015-11-27 10:47:36 +00:00
192164eebc Preparational work before introducing the locks in order to harmonize the code:
-Moved the initialize function
-Moved api_format into the shared state

BUG=

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

Cr-Commit-Position: refs/heads/master@{#10668}
2015-11-17 10:16:51 +00:00
4d291f7d5e Applied the render queueing to the agc.
BUG=webrtc:5099

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

Cr-Commit-Position: refs/heads/master@{#10667}
2015-11-17 07:52:32 +00:00
fa6228e221 Introduced the render sample queue for the aec and aecm.
BUG=webrtc:5099

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

Cr-Commit-Position: refs/heads/master@{#10662}
2015-11-17 00:27:50 +00:00
ff761fba82 modules: more interface -> include renames
This changes the following module directories:
* webrtc/modules/audio_conference_mixer/interface
* webrtc/modules/interface
* webrtc/modules/media_file/interface
* webrtc/modules/rtp_rtcp/interface
* webrtc/modules/utility/interface

To avoid breaking downstream, I followed this recipe:
1. Copy the interface dir to a new sibling directory: include
2. Update the header guards in the include directory to match the style guide.
3. Update the header guards in the interface directory to match the ones in include. This is required to avoid getting redefinitions in the not-yet-updated downstream code.
4. Add a pragma warning in the header files in the interface dir. Example:
#pragma message("WARNING: webrtc/modules/interface is DEPRECATED; "
                "use webrtc/modules/include")
5. Search for all source references to webrtc/modules/interface and update them to webrtc/modules/include (*.c*,*.h,*.mm,*.S)
6. Update all GYP+GN files. This required manual inspection since many subdirectories of webrtc/modules referenced the interface dir using ../interface etc(*.gyp*,*.gn*)

BUG=5095
TESTED=Passing compile-trybots with --clobber flag:
git cl try --clobber --bot=win_compile_rel --bot=linux_compile_rel --bot=android_compile_rel --bot=mac_compile_rel --bot=ios_rel -m tryserver.webrtc

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

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

Cr-Commit-Position: refs/heads/master@{#10500}
2015-11-04 07:32:04 +00:00
cb3f9bd9c0 Make the nonlinear beamformer steerable
Depends on this CL: https://codereview.webrtc.org/1395453004/

R=andrew@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10458}
2015-10-30 01:21:40 +00:00
98f53510b2 system_wrappers: rename interface -> include
BUG=webrtc:5095
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10438}
2015-10-28 17:17:50 +00:00
13b96ba90f Adding APM configuration in AEC dump.
The AEC dump was not self-contented enough in the sense that APM configuration is missing, and therefore, given an AEC dump, it is sometimes not clear how to reproduce problems.

This CL tries to address the problem.

Note that this cannot guarantee a perfect reproduction in all cases. Dumping from the middle of a call makes the initial states unknown and thus may make the result non-reproducible.

BUG=
TEST= 1. new dump in Chromium and unpack
      2. unpack old dump

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

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

Cr-Commit-Position: refs/heads/master@{#10155}
2015-10-02 22:39:27 +00:00
5aaa9b4fe4 Removed unused API functions in AudioProcessing and AudioProcessingModule
BUG=

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

Cr-Commit-Position: refs/heads/master@{#10138}
2015-10-02 06:58:21 +00:00
cdfe20bfc1 Fix the maximum native sample rate in AudioProcessing
BUG=webrtc:4983
R=andrew@webrtc.org, henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10037}
2015-09-23 19:49:21 +00:00
dce40cf804 Update a ton of audio code to use size_t more correctly and in general reduce
use of int16_t/uint16_t.

This is the upshot of a recommendation by henrik.lundin and kwiberg on an original small change ( https://webrtc-codereview.appspot.com/42569004/#ps1 ) to stop using int16_t just because values could fit in it, and is similar in nature to a previous "mass change to use size_t more" ( https://webrtc-codereview.appspot.com/23129004/ ) which also needed to be split up for review but to land all at once, since, like adding "const", such changes tend to cause a lot of transitive effects.

This was be reviewed and approved in pieces:
https://codereview.webrtc.org/1224093003
https://codereview.webrtc.org/1224123002
https://codereview.webrtc.org/1224163002
https://codereview.webrtc.org/1225133003
https://codereview.webrtc.org/1225173002
https://codereview.webrtc.org/1227163003
https://codereview.webrtc.org/1227203003
https://codereview.webrtc.org/1227213002
https://codereview.webrtc.org/1227893002
https://codereview.webrtc.org/1228793004
https://codereview.webrtc.org/1228803003
https://codereview.webrtc.org/1228823002
https://codereview.webrtc.org/1228823003
https://codereview.webrtc.org/1228843002
https://codereview.webrtc.org/1230693002
https://codereview.webrtc.org/1231713002

The change is being landed as TBR to all the folks who reviewed the above.

BUG=chromium:81439
TEST=none
R=andrew@webrtc.org, pbos@webrtc.org
TBR=aluebs, andrew, asapersson, henrika, hlundin, jan.skoglund, kwiberg, minyue, pbos, pthatcher

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

Cr-Commit-Position: refs/heads/master@{#9768}
2015-08-24 21:52:45 +00:00
60d9b332a5 Integrate Intelligibility with APM
- Integrates intelligibility into audio_processing.
    - Allows modification of reverse stream if intelligibility enabled.
- Makes intelligibility available in audioproc_float test.
    - Adds reverse stream processing to audioproc_float.
- (removed) Makes intelligibility toggleable in real time in voe_cmd_test.
- Cleans up intelligibility construction, parameters, constants and dead code.

TBR=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9713}
2015-08-14 17:35:58 +00:00
4bc66fc387 Fix data race in AMP.
R=aluebs@webrtc.org, aluebs-webrtc
BUG=516637

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

Cr-Commit-Position: refs/heads/master@{#9694}
2015-08-10 22:26:43 +00:00
b3b79b6115 Clean up the Config to enable 48kHz support in AudioProcessing
Now 48kHz is enabled by default.

BUG=webrtc:3146

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

Cr-Commit-Position: refs/heads/master@{#9643}
2015-07-27 17:18:05 +00:00
86c6d33aec Allow more than 2 input channels in AudioProcessing.
The number of output channels is constrained to be equal to either 1 or the
number of input channels.

An earlier version of this commit caused a crash on AEC dump.

TBR=aluebs@webrtc.org,pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9626}
2015-07-23 18:41:45 +00:00
64e753c399 Revert of Allow more than 2 input channels in AudioProcessing. (patchset #13 id:240001 of https://codereview.webrtc.org/1226093007/)
Reason for revert:
Breaks Chromium FYI content_browsertest on all platforms. The testcase that fails is WebRtcAecDumpBrowserTest.CallWithAecDump.

https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux/builds/19388

Sample output:
[ RUN      ] WebRtcAecDumpBrowserTest.CallWithAecDump
Xlib:  extension "RANDR" missing on display ":9".
[4:14:0722/211548:1282124453:WARNING:webrtcvoiceengine.cc(472)] Unexpected codec: ISAC/48000/1 (105)
[4:14:0722/211548:1282124593:WARNING:webrtcvoiceengine.cc(472)] Unexpected codec: PCMU/8000/2 (110)
[4:14:0722/211548:1282124700:WARNING:webrtcvoiceengine.cc(472)] Unexpected codec: PCMA/8000/2 (118)
[4:14:0722/211548:1282124815:WARNING:webrtcvoiceengine.cc(472)] Unexpected codec: G722/8000/2 (119)
[19745:19745:0722/211548:1282133667:INFO:CONSOLE(64)] "Looking at video in element remote-view-1", source: http://127.0.0.1:48819/media/webrtc_test_utilities.js (64)
[19745:19745:0722/211548:1282136892:INFO:CONSOLE(64)] "Looking at video in element remote-view-2", source: http://127.0.0.1:48819/media/webrtc_test_utilities.js (64)
../../content/test/webrtc_content_browsertest_base.cc:62: Failure
Value of: ExecuteScriptAndExtractString( shell()->web_contents(), javascript, &result)
  Actual: false
Expected: true
Failed to execute javascript call({video: true, audio: true});.
From javascript: (nothing)
When executing 'call({video: true, audio: true});'
../../content/test/webrtc_content_browsertest_base.cc:75: Failure
Failed
../../content/browser/media/webrtc_aecdump_browsertest.cc:26: Failure
Expected: (base::kNullProcessId) != (*id), actual: 0 vs 0
../../content/browser/media/webrtc_aecdump_browsertest.cc:95: Failure
Value of: GetRenderProcessHostId(&render_process_id)
  Actual: false
Expected: true
../../content/browser/media/webrtc_aecdump_browsertest.cc:99: Failure
Value of: base::PathExists(dump_file)
  Actual: false
Expected: true
../../content/browser/media/webrtc_aecdump_browsertest.cc:101: Failure
Value of: base::GetFileSize(dump_file, &file_size)
  Actual: false
Expected: true
../../content/browser/media/webrtc_aecdump_browsertest.cc:102: Failure
Expected: (file_size) > (0), actual: 0 vs 0
[  FAILED  ] WebRtcAecDumpBrowserTest.CallWithAecDump, where TypeParam =  and GetParam() =  (361 ms)

Original issue's description:
> Allow more than 2 input channels in AudioProcessing.
>
> The number of output channels is constrained to be equal to either 1 or the
> number of input channels.
>
> R=aluebs@webrtc.org, andrew@webrtc.org, pbos@webrtc.org
>
> Committed: c204754b7a

TBR=andrew@webrtc.org,aluebs@webrtc.org,ajm@chromium.org,pbos@chromium.org,pbos@webrtc.org,mgraczyk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#9621}
2015-07-23 11:30:14 +00:00
c204754b7a Allow more than 2 input channels in AudioProcessing.
The number of output channels is constrained to be equal to either 1 or the
number of input channels.

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

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

Cr-Commit-Position: refs/heads/master@{#9619}
2015-07-23 04:06:16 +00:00
4e7aa43ea0 audio_processing: Adds two UMA histograms logging delay jumps in AEC
We have two histograms today that trigger on large jumps in either platform reported stream delays (WebRTC.Audio.PlatformReportedStreamDelayJump) or the system delay in the AEC (WebRTC.Audio.AecSystemDelayJump). The latter is the internal buffer size in the AEC.
The sizes of such jumps are of relevance since it can harm the AEC and even put it in a complete failure state. It is hard, not to say impossible, to tell how frequent it is.
Therefore, two complementary histograms are added; number of jumps in each metric.
This way we get a quick way to determine how often a jump occurs in general and also how frequent it is within a call.

This is solved by adding a counter for each metric.
The counter is activated either upon an event trigger or if we know for sure when the AEC is running.
Unfortunately, we can't rely on the destructor at the end of a call so we add a public API for the user to take on the action of calling it at the end of a call.

Tested locally by building ToT chromium including changes and three triggered jumps (200, 50 and 60 ms).
The stats picked up the 60 and 200 ms jumps as expected.

BUG=488124
R=asapersson@webrtc.org, pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9544}
2015-07-07 09:50:16 +00:00
d92f2674d7 audio_processing: Changed kMinDiffDelayMs from 50 to 60 ms
The UMA histograms WebRTC.Audio.AecSystemDelayJump and WebRTC.Audio.PlatformReportedStreamDelayJump triggers if the jump is larger than kMinDiffDelayMs.
Especially WebRTC.Audio.AecSystemDelayJump is sensitive around 50 ms differences, since the granularity is 4 ms and we can get a significant amount of hits at 52 ms.
Therefore, a change to 60 ms can make the logging more robust. The effect of not logging jumps in the interval 50-60 ms is of minor importance since they are not likely to affect the AEC performance. It's when we get values from ~100 ms and above that we should be worried.

Tested with a local ToT Chromium build where 52, 64 and 200 ms jumps were forced.

BUG=488124
TBR=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9540}
2015-07-05 08:46:10 +00:00
1ca324f237 Adds UMA histogram for system delay jumps
Sudden platform system delay jumps can hurt AEC and we have no stats that monitor these jumps. How often do they occur, and when they are reported are they accurate?

This CL logs all jumps in both the reported and actual delay.

The histogram has been tested with a chromium build where a fake jump of 200 ms was applied after 5 seconds and it was registered correctly in chrome://histograms

BUG=488124
R=henrik.lundin@webrtc.org, peah@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9513}
2015-06-29 12:57:42 +00:00
1c7075f076 Ensure transient suppression is never enabled on mobile.
Review URL: https://codereview.webrtc.org/1209653002

Cr-Commit-Position: refs/heads/master@{#9500}
2015-06-25 01:14:17 +00:00
664cdafb8a Replace assert() with static_assert() if the condition is evaluatable at
compile time.

The condition of static_assert() is evaluated at compile time which is safer and
more efficient.

Note that static_assert() requires C++11.

The changes were generated by the misc-static-assert ClangTidy check by alexfh@google.com

R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9231}
2015-05-20 09:11:02 +00:00
adc46c4cf7 audio_processing/agc: Adds config to set minimum microphone volume at startup
The AGC is currently bumping up the mic volume to 33% at startup if it is below that level. This is to avoid getting stuck in a poor state from which the AGC can not move, simply a too low input audio level. For some users, 33% is instead too loud.

This CL gives the user the possibility to set that level at create time.
- Extends the Config ExperimentalAgc with a startup_mic_volume for the user to set if desired. Note that the bump up does not apply to the legacy AGC and the "regular" AGC is controlled by ExperimentalAgc.
- Without any actions, the same default value as previously is used.
- In addition I removed a return value from InitializeExperimentalAgc() and InitializeTransient()

This has been tested by building Chromium on Mac and verify through apprtc that
1) startup_mic_volume = 128 bumps up to 50%.
2) startup_mic_volume = 500 (out of range) bumps up to 100%.
3) startup_mic_volume = 0 bumps up to 4%, the AGC min level.

BUG=4529
TESTED=locally
R=andrew@webrtc.org, kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9004}
2015-04-15 09:42:35 +00:00
424694ce79 audio_processing/agc: Put entire method set_output_will_be_muted() under lock
Setting the member value output_will_be_muted_ in set_output_will_be_muted() was done before the lock.
This caused a data race.

BUG=4477
R=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8877}
2015-03-27 10:30:54 +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
bd8c865f43 Remove build-time beamformer flags.
RealFourier is now unconditionally enabled since we can fall back to the
Ooura FFT. We no longer need to condition users on rtc_use_openmax_dl.

R=aluebs@webrtc.org, mgraczyk@google.com

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

Cr-Commit-Position: refs/heads/master@{#8799}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8799 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-20 00:28:42 +00:00
0f663de2ec Rename Beamformer to NonlinearBeamformer.
R=aluebs@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8710}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8710 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-13 00:14:18 +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
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
c9ce07ed87 Add Config option to enable 48kHz support in AudioProcessing
BUG=webrtc:3146
R=andrew@webrtc.org, bjornv@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8563}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8563 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-02 20:07:51 +00:00
3aca0b0b31 Add 48kHz support to Beamformer
Doing something similar for the band 16-24kHz to what is done for the band 8-16kHz
Tested for 32kHz sample rate and the output is bitexact with how it was before this CL.

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

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

Cr-Commit-Position: refs/heads/master@{#8522}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8522 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-26 21:53:00 +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
63da1dd972 audio_processing: Now records mic volume level also when using new AGC
Previously only mic level calculated by the legacy agc was logged in aecdebug dumps.
Now we log it for any agc.
In addition, it is now possible to turn on and off debug recording in the test tool voe_cmd_test.

BUG=4274
TESTED=verified using voe_cmd_test
R=andrew@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8274}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8274 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-06 19:44:46 +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
d82f55d2a7 Only adapt AGC when the desired signal is present
Take the 50% quantile of the mask and compare it to certain threshold to determine if the desired signal is present. A hold is applied to avoid fast switching between states.
is_signal_present_ has been plotted and looks as expected. The AGC adaptation sounds promising, specially for the cases when the speaker fades in and out from the beam direction.

R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8078 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-15 18:07:21 +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