Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Issue 799983002: Adding WebRTC Auto Gain Control Test (linux) (Closed)

Created:
6 years ago by phoglund_chromium
Modified:
6 years ago
CC:
chromium-reviews, posciak+watch_chromium.org, feature-media-reviews_chromium.org, wjia+watch_chromium.org, mcasas+watch_chromium.org, miu+watch_chromium.org, ajm
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

The auto gain control test plays a file into the fake microphone. Then it sets up a one-way WebRTC call with audio only and records Chrome's output on the receiving side using the audio loopback provided by the quality test (see the class comments for more details). Then both the recording and reference file are split on silence. This creates a number of segments with speech in them. The reason for this is to provide a kind of synchronization mechanism so the start of each speech segment is compared to the start of the corresponding speech segment. This is because we will experience inevitable clock drift between the system clock (which runs the fake microphone) and the sound card (which runs play-out). Effectively re-synchronizing on each segment mitigates this. The silence splitting is inherently sensitive to the sound file we run on. Therefore the reference file must have at least 500 ms of pure silence between speech segments; the test will fail if the output produces more segments than the reference. The test reports the difference in dBFS units between the reference and output file per 10 ms interval in each speech segment. A value of 6 means the output was 6 dBFS units louder than the reference, presumably because the AGC applied gain to the signal. We record in CD format here (44.1 kHz) because that's what the fake input device currently supports, and we want to be able to compare directly. This test is currently Linux only. It should work on the other platforms too but I'll try to get this running first. It will run on the WebRTC internal bots and report results to the perf dashboard, so we can look at the data it produces and see if the data on the bots is as consistent as on my workstation. BUG=303259 Committed: https://crrev.com/fd442ed0421ff475ed3db26ec6d5ab61de7021f0 Cr-Commit-Position: refs/heads/master@{#309196}

Patch Set 1 #

Patch Set 2 : Temporary patch set which happens to crash clang #

Patch Set 3 : Finalizing #

Patch Set 4 : Fixing a bug in the AQ test. #

Total comments: 1

Patch Set 5 : Clarified fake device only plays the file once. #

Patch Set 6 : More cleanup #

Total comments: 6

Patch Set 7 : Now computing a whole segment at a time, simplified code. #

Total comments: 12

Patch Set 8 : Addressing henrika's comments. #

Patch Set 9 : Fixed win compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+385 lines, -49 lines) Patch
M chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc View 1 2 3 4 5 6 7 8 12 chunks +260 lines, -43 lines 0 comments Download
A chrome/browser/media/webrtc_browsertest_audio.h View 1 2 3 4 5 6 1 chunk +32 lines, -0 lines 0 comments Download
A chrome/browser/media/webrtc_browsertest_audio.cc View 1 2 3 4 5 6 1 chunk +83 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/data/webrtc/resources/speech_44kHz_16bit_stereo.wav.sha1 View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M media/audio/fake_audio_input_stream.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M media/audio/fake_audio_input_stream.cc View 1 2 3 4 2 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 24 (5 generated)
phoglund_chromium
https://codereview.chromium.org/799983002/diff/60001/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc File chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc (right): https://codereview.chromium.org/799983002/diff/60001/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc#newcode347 chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc:347: const char* kTreshold = "3%"; 5% turned out to ...
6 years ago (2014-12-17 18:52:52 UTC) #2
phoglund_chromium
An early Christmas present for you, mr. Andreasson.
6 years ago (2014-12-17 18:53:13 UTC) #3
phoglund_chromium
https://codereview.chromium.org/799983002/diff/100001/media/audio/fake_audio_input_stream.cc File media/audio/fake_audio_input_stream.cc (right): https://codereview.chromium.org/799983002/diff/100001/media/audio/fake_audio_input_stream.cc#newcode218 media/audio/fake_audio_input_stream.cc:218: // Stop playing if we've played out the whole ...
6 years ago (2014-12-17 18:54:55 UTC) #4
bjornv
Sorry, Patrik. I thought we agreed on calculating the overall energy of the last x ...
6 years ago (2014-12-18 11:30:28 UTC) #6
henrika (OOO until Aug 14)
Not adding any extra comments at this stage since bjornv proposes rather large changes.
6 years ago (2014-12-18 11:32:20 UTC) #7
phoglund_chromium
> > AND > I thought we agreed on computing the energy for the whole ...
6 years ago (2014-12-18 12:05:56 UTC) #8
phoglund_chromium
Here are results when I turn up from 10 to 100 ms for the audio ...
6 years ago (2014-12-18 12:12:57 UTC) #9
phoglund_chromium
I'll send you the actual recorded files offline so you can figure out which of ...
6 years ago (2014-12-18 12:18:38 UTC) #10
bjornv
On 2014/12/18 12:18:38, phoglund wrote: > I'll send you the actual recorded files offline so ...
6 years ago (2014-12-18 12:59:59 UTC) #11
phoglund_chromium
> I looked at the power_monitor and it is a weighted moving average. So if ...
6 years ago (2014-12-18 14:30:24 UTC) #12
phoglund_chromium
Results where I set the measurement value to the file's duration. It appears to work ...
6 years ago (2014-12-18 14:57:47 UTC) #13
phoglund_chromium
Ok, PTAL!
6 years ago (2014-12-18 15:02:38 UTC) #14
henrika (OOO until Aug 14)
Very impressive CL. Nice work indeed. LGTM with nits ;-) https://codereview.chromium.org/799983002/diff/120001/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc File chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc (right): https://codereview.chromium.org/799983002/diff/120001/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc#newcode185 ...
6 years ago (2014-12-19 10:00:15 UTC) #15
phoglund_chromium
https://codereview.chromium.org/799983002/diff/120001/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc File chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc (right): https://codereview.chromium.org/799983002/diff/120001/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc#newcode185 chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc:185: // on success. We record in CD format unless ...
6 years ago (2014-12-19 10:34:21 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/799983002/140001
6 years ago (2014-12-19 10:45:28 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/101078)
6 years ago (2014-12-19 11:22:26 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/799983002/160001
6 years ago (2014-12-19 12:34:03 UTC) #22
commit-bot: I haz the power
Committed patchset #9 (id:160001)
6 years ago (2014-12-19 14:28:42 UTC) #23
commit-bot: I haz the power
6 years ago (2014-12-19 14:29:34 UTC) #24
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/fd442ed0421ff475ed3db26ec6d5ab61de7021f0
Cr-Commit-Position: refs/heads/master@{#309196}

Powered by Google App Engine
This is Rietveld 408576698