⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 267471 in webkit


Ignore:
Timestamp:
Sep 23, 2020, 6:36:28 AM (6 years ago)
Author:
Philippe Normand
Message:

REGRESSION(r267383): fast/mediastream/getUserMedia-webaudio.html is failing
https://bugs.webkit.org/show_bug.cgi?id=216813

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Revert r267428 and fixup the GStreamer FFT implementation which broke in r267383.

  • platform/audio/FFTFrame.cpp:

(WebCore::FFTFrame::multiply):

  • platform/audio/FFTFrameStub.cpp:

(WebCore::FFTFrame::multiply): Deleted.

  • platform/audio/gstreamer/FFTFrameGStreamer.cpp:

(WebCore::FFTFrame::doFFT): Update the real and imaginary arrays after applying the FFT.
(WebCore::FFTFrame::multiply): Deleted.

  • platform/audio/mac/FFTFrameMac.cpp:

(WebCore::FFTFrame::multiply): Deleted.

LayoutTests:

Unflag passing tests.

  • platform/glib/TestExpectations:
  • platform/glib/webaudio/Analyser/realtimeanalyser-fftsize-reset-expected.txt:
  • platform/glib/webaudio/Analyser/realtimeanalyser-freq-data-expected.txt: Added. There's

still a FAIL test there though.

  • platform/glib/webaudio/Analyser/realtimeanalyser-multiple-calls-expected.txt:
Location:
trunk
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r267467 r267471  
     12020-09-23  Philippe Normand  <pnormand@igalia.com>
     2
     3        REGRESSION(r267383): fast/mediastream/getUserMedia-webaudio.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=216813
     5
     6        Reviewed by Adrian Perez de Castro.
     7
     8        Unflag passing tests.
     9
     10        * platform/glib/TestExpectations:
     11        * platform/glib/webaudio/Analyser/realtimeanalyser-fftsize-reset-expected.txt:
     12        * platform/glib/webaudio/Analyser/realtimeanalyser-freq-data-expected.txt: Added. There's
     13        still a FAIL test there though.
     14        * platform/glib/webaudio/Analyser/realtimeanalyser-multiple-calls-expected.txt:
     15
    1162020-09-23  Diego Pino Garcia  <dpino@igalia.com>
    217
  • trunk/LayoutTests/platform/glib/TestExpectations

    r267467 r267471  
    277277webkit.org/b/216118 webaudio/convolver-setBuffer-different-samplerate.html [ Skip ]
    278278webkit.org/b/216118 webaudio/convolver-setBuffer-null.html [ Skip ]
    279 
    280 webkit.org/b/216813 fast/mediastream/getUserMedia-webaudio.html [ Failure ]
    281 webkit.org/b/216813 imported/w3c/web-platform-tests/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html [ Failure ]
    282 webkit.org/b/216813 webaudio/Analyser/realtimeanalyser-freq-data-smoothing.html [ Failure ]
    283 webkit.org/b/216813 webaudio/Analyser/realtimeanalyser-freq-data.html [ Failure ]
    284 webkit.org/b/216813 webaudio/AudioParam/audioparam-k-rate.html [ Crash ]
    285 webkit.org/b/216813 webrtc/audio-peer-connection-webaudio.html [ Failure ]
    286 webkit.org/b/216813 webrtc/peer-connection-audio-unmute.html [ Failure ]
    287 webkit.org/b/216813 webrtc/peer-connection-remote-audio-mute2.html [ Failure ]
    288 # Tests below are timing out.
    289 webkit.org/b/216813 webrtc/peer-connection-audio-mute.html [ Skip ]
    290 webkit.org/b/216813 webrtc/peer-connection-remote-audio-mute.html [ Skip ]
    291279
    292280#////////////////////////////////////////////////////////////////////////////////////////
  • trunk/LayoutTests/platform/glib/webaudio/Analyser/realtimeanalyser-fftsize-reset-expected.txt

    r267419 r267471  
    66PASS > [128->1024] 
    77PASS   Time data equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    8 PASS   Linear FFT data after setting fftSize = 1024 equals [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0.0000019455}.
     8PASS   Linear FFT data after setting fftSize = 1024 equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0.0000019455}.
    99PASS < [128->1024] All assertions passed. (total 2 assertions)
    1010PASS > [512->256] 
    1111PASS   Time data equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    12 PASS   Linear FFT data after setting fftSize = 256 equals [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0.0000018592}.
     12PASS   Linear FFT data after setting fftSize = 256 equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0.0000018592}.
    1313PASS < [512->256] All assertions passed. (total 2 assertions)
    1414PASS # AUDIT TASK RUNNER FINISHED: 2 tasks ran successfully.
  • trunk/LayoutTests/platform/glib/webaudio/Analyser/realtimeanalyser-multiple-calls-expected.txt

    r267419 r267471  
    44PASS Audit report
    55PASS > [test] 
    6 PASS   Second call to getFloatFrequencyData is identical to the array [-Infinity,-Infinity,-Infinity,-Infinity,-Infinity,-Infinity,-Infinity,-Infinity,-Infinity,-Infinity,-Infinity,-Infinity,-Infinity,-Infinity,-Infinity,-Infinity...].
    7 PASS   Second call to getByteFrequencyData is identical to the array [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...].
    8 PASS   Output of getByteFrequencyData after getFloatFrequencyData is identical to the array [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...].
    9 PASS   Output of getFloatFrequenycData (converted to byte) after getByteFrequencyData is identical to the array [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...].
     6PASS   Second call to getFloatFrequencyData is identical to the array [expected array].
     7PASS   Second call to getByteFrequencyData is identical to the array [167,232,255,255,238,239,223,228,216,217,214,206,211,197,206,196...].
     8PASS   Output of getByteFrequencyData after getFloatFrequencyData is identical to the array [163,242,255,255,252,250,237,238,229,228,225,219,221,212,216,209...].
     9PASS   Output of getFloatFrequenycData (converted to byte) after getByteFrequencyData is identical to the array [176,248,255,255,255,255,243,244,235,234,231,225,227,217,222,215...].
    1010PASS < [test] All assertions passed. (total 4 assertions)
    1111PASS # AUDIT TASK RUNNER FINISHED: 1 tasks ran successfully.
  • trunk/Source/WebCore/ChangeLog

    r267470 r267471  
     12020-09-23  Philippe Normand  <pnormand@igalia.com>
     2
     3        REGRESSION(r267383): fast/mediastream/getUserMedia-webaudio.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=216813
     5
     6        Reviewed by Adrian Perez de Castro.
     7
     8        Revert r267428 and fixup the GStreamer FFT implementation which broke in r267383.
     9
     10        * platform/audio/FFTFrame.cpp:
     11        (WebCore::FFTFrame::multiply):
     12        * platform/audio/FFTFrameStub.cpp:
     13        (WebCore::FFTFrame::multiply): Deleted.
     14        * platform/audio/gstreamer/FFTFrameGStreamer.cpp:
     15        (WebCore::FFTFrame::doFFT): Update the real and imaginary arrays after applying the FFT.
     16        (WebCore::FFTFrame::multiply): Deleted.
     17        * platform/audio/mac/FFTFrameMac.cpp:
     18        (WebCore::FFTFrame::multiply): Deleted.
     19
    1202020-09-23  Philippe Normand  <pnormand@igalia.com>
    221
  • trunk/Source/WebCore/platform/audio/FFTFrame.cpp

    r267428 r267471  
    180180}
    181181
     182void FFTFrame::multiply(const FFTFrame& frame)
     183{
     184    FFTFrame& frame1 = *this;
     185    const FFTFrame& frame2 = frame;
     186
     187    float* realP1 = frame1.realData();
     188    float* imagP1 = frame1.imagData();
     189    const float* realP2 = frame2.realData();
     190    const float* imagP2 = frame2.imagData();
     191
     192    unsigned halfSize = m_FFTSize / 2;
     193    float real0 = realP1[0];
     194    float imag0 = imagP1[0];
     195
     196    // Complex multiply
     197    VectorMath::zvmul(realP1, imagP1, realP2, imagP2, realP1, imagP1, halfSize);
     198
     199    // Multiply the packed DC/nyquist component
     200    realP1[0] = real0 * realP2[0];
     201    imagP1[0] = imag0 * imagP2[0];
     202}
     203
    182204double FFTFrame::extractAverageGroupDelay()
    183205{
  • trunk/Source/WebCore/platform/audio/FFTFrameStub.cpp

    r267428 r267471  
    6565}
    6666
    67 void FFTFrame::multiply(const FFTFrame& frame)
    68 {
    69     ASSERT_NOT_REACHED();
    70 }
    71 
    7267void FFTFrame::doFFT(const float* data)
    7368{
  • trunk/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp

    r267428 r267471  
    104104}
    105105
    106 void FFTFrame::multiply(const FFTFrame& frame)
    107 {
    108     FFTFrame& frame1 = *this;
    109     FFTFrame& frame2 = const_cast<FFTFrame&>(frame);
    110 
    111     float* realP1 = frame1.realData();
    112     float* imagP1 = frame1.imagData();
    113     const float* realP2 = frame2.realData();
    114     const float* imagP2 = frame2.imagData();
    115 
    116     size_t size = unpackedFFTDataSize(m_FFTSize);
    117     VectorMath::zvmul(realP1, imagP1, realP2, imagP2, realP1, imagP1, size);
    118 }
    119 
    120106void FFTFrame::doFFT(const float* data)
    121107{
    122108    gst_fft_f32_fft(m_fft, data, m_complexData.get());
     109
     110    float* imagData = m_imagData.data();
     111    float* realData = m_realData.data();
     112    for (unsigned i = 0; i < unpackedFFTDataSize(m_FFTSize); ++i) {
     113        imagData[i] = m_complexData[i].i;
     114        realData[i] = m_complexData[i].r;
     115    }
    123116}
    124117
  • trunk/Source/WebCore/platform/audio/mac/FFTFrameMac.cpp

    r267428 r267471  
    9898FFTFrame::~FFTFrame() = default;
    9999
    100 void FFTFrame::multiply(const FFTFrame& frame)
    101 {
    102     FFTFrame& frame1 = *this;
    103     const FFTFrame& frame2 = frame;
    104 
    105     float* realP1 = frame1.realData();
    106     float* imagP1 = frame1.imagData();
    107     const float* realP2 = frame2.realData();
    108     const float* imagP2 = frame2.imagData();
    109 
    110     unsigned halfSize = m_FFTSize / 2;
    111     float real0 = realP1[0];
    112     float imag0 = imagP1[0];
    113 
    114     // Complex multiply
    115     VectorMath::zvmul(realP1, imagP1, realP2, imagP2, realP1, imagP1, halfSize);
    116 
    117     // Multiply the packed DC/nyquist component
    118     realP1[0] = real0 * realP2[0];
    119     imagP1[0] = imag0 * imagP2[0];
    120 }
    121 
    122100void FFTFrame::doFFT(const float* data)
    123101{
Note: See TracChangeset for help on using the changeset viewer.