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

Changeset 267428 in webkit


Ignore:
Timestamp:
Sep 22, 2020, 12:03:05 PM (6 years ago)
Author:
Chris Dumez
Message:

Unreviewed, partial revert of r267383.

Restore GStreamer-specific implementation of FFTFrame::multiply() since it appears
r267383 introduced test failures on GTK port.

  • platform/audio/FFTFrame.cpp:

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

  • platform/audio/FFTFrameStub.cpp:

(WebCore::FFTFrame::multiply):

  • platform/audio/gstreamer/FFTFrameGStreamer.cpp:

(WebCore::FFTFrame::multiply):

  • platform/audio/mac/FFTFrameMac.cpp:

(WebCore::FFTFrame::multiply):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r267418 r267428  
     12020-09-22  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, partial revert of r267383.
     4
     5        Restore GStreamer-specific implementation of FFTFrame::multiply() since it appears
     6        r267383 introduced test failures on GTK port.
     7
     8        * platform/audio/FFTFrame.cpp:
     9        (WebCore::FFTFrame::multiply): Deleted.
     10        * platform/audio/FFTFrameStub.cpp:
     11        (WebCore::FFTFrame::multiply):
     12        * platform/audio/gstreamer/FFTFrameGStreamer.cpp:
     13        (WebCore::FFTFrame::multiply):
     14        * platform/audio/mac/FFTFrameMac.cpp:
     15        (WebCore::FFTFrame::multiply):
     16
    1172020-09-22  Zalan Bujtas  <zalan@apple.com>
    218
  • trunk/Source/WebCore/platform/audio/FFTFrame.cpp

    r267383 r267428  
    180180}
    181181
    182 void 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 
    204182double FFTFrame::extractAverageGroupDelay()
    205183{
  • trunk/Source/WebCore/platform/audio/FFTFrameStub.cpp

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

    r267383 r267428  
    104104}
    105105
     106void 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
    106120void FFTFrame::doFFT(const float* data)
    107121{
  • trunk/Source/WebCore/platform/audio/mac/FFTFrameMac.cpp

    r267383 r267428  
    9898FFTFrame::~FFTFrame() = default;
    9999
     100void 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
    100122void FFTFrame::doFFT(const float* data)
    101123{
Note: See TracChangeset for help on using the changeset viewer.