Diff
Modified: trunk/Source/WebCore/ChangeLog (267427 => 267428)
--- trunk/Source/WebCore/ChangeLog 2020-09-22 19:01:06 UTC (rev 267427)
+++ trunk/Source/WebCore/ChangeLog 2020-09-22 19:03:05 UTC (rev 267428)
@@ -1,3 +1,19 @@
+2020-09-22 Chris Dumez <[email protected]>
+
+ 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):
+
2020-09-22 Zalan Bujtas <[email protected]>
[LFC] FormattingState should never be copied.
Modified: trunk/Source/WebCore/platform/audio/FFTFrame.cpp (267427 => 267428)
--- trunk/Source/WebCore/platform/audio/FFTFrame.cpp 2020-09-22 19:01:06 UTC (rev 267427)
+++ trunk/Source/WebCore/platform/audio/FFTFrame.cpp 2020-09-22 19:03:05 UTC (rev 267428)
@@ -179,28 +179,6 @@
VectorMath::vsmul(imagData(), 1, &factor, imagData(), 1, fftSize());
}
-void FFTFrame::multiply(const FFTFrame& frame)
-{
- FFTFrame& frame1 = *this;
- const FFTFrame& frame2 = frame;
-
- float* realP1 = frame1.realData();
- float* imagP1 = frame1.imagData();
- const float* realP2 = frame2.realData();
- const float* imagP2 = frame2.imagData();
-
- unsigned halfSize = m_FFTSize / 2;
- float real0 = realP1[0];
- float imag0 = imagP1[0];
-
- // Complex multiply
- VectorMath::zvmul(realP1, imagP1, realP2, imagP2, realP1, imagP1, halfSize);
-
- // Multiply the packed DC/nyquist component
- realP1[0] = real0 * realP2[0];
- imagP1[0] = imag0 * imagP2[0];
-}
-
double FFTFrame::extractAverageGroupDelay()
{
float* realP = realData();
Modified: trunk/Source/WebCore/platform/audio/FFTFrameStub.cpp (267427 => 267428)
--- trunk/Source/WebCore/platform/audio/FFTFrameStub.cpp 2020-09-22 19:01:06 UTC (rev 267427)
+++ trunk/Source/WebCore/platform/audio/FFTFrameStub.cpp 2020-09-22 19:03:05 UTC (rev 267428)
@@ -64,6 +64,11 @@
ASSERT_NOT_REACHED();
}
+void FFTFrame::multiply(const FFTFrame& frame)
+{
+ ASSERT_NOT_REACHED();
+}
+
void FFTFrame::doFFT(const float* data)
{
ASSERT_NOT_REACHED();
Modified: trunk/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp (267427 => 267428)
--- trunk/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp 2020-09-22 19:01:06 UTC (rev 267427)
+++ trunk/Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp 2020-09-22 19:03:05 UTC (rev 267428)
@@ -103,6 +103,20 @@
m_inverseFft = 0;
}
+void FFTFrame::multiply(const FFTFrame& frame)
+{
+ FFTFrame& frame1 = *this;
+ FFTFrame& frame2 = const_cast<FFTFrame&>(frame);
+
+ float* realP1 = frame1.realData();
+ float* imagP1 = frame1.imagData();
+ const float* realP2 = frame2.realData();
+ const float* imagP2 = frame2.imagData();
+
+ size_t size = unpackedFFTDataSize(m_FFTSize);
+ VectorMath::zvmul(realP1, imagP1, realP2, imagP2, realP1, imagP1, size);
+}
+
void FFTFrame::doFFT(const float* data)
{
gst_fft_f32_fft(m_fft, data, m_complexData.get());
Modified: trunk/Source/WebCore/platform/audio/mac/FFTFrameMac.cpp (267427 => 267428)
--- trunk/Source/WebCore/platform/audio/mac/FFTFrameMac.cpp 2020-09-22 19:01:06 UTC (rev 267427)
+++ trunk/Source/WebCore/platform/audio/mac/FFTFrameMac.cpp 2020-09-22 19:03:05 UTC (rev 267428)
@@ -97,6 +97,28 @@
FFTFrame::~FFTFrame() = default;
+void FFTFrame::multiply(const FFTFrame& frame)
+{
+ FFTFrame& frame1 = *this;
+ const FFTFrame& frame2 = frame;
+
+ float* realP1 = frame1.realData();
+ float* imagP1 = frame1.imagData();
+ const float* realP2 = frame2.realData();
+ const float* imagP2 = frame2.imagData();
+
+ unsigned halfSize = m_FFTSize / 2;
+ float real0 = realP1[0];
+ float imag0 = imagP1[0];
+
+ // Complex multiply
+ VectorMath::zvmul(realP1, imagP1, realP2, imagP2, realP1, imagP1, halfSize);
+
+ // Multiply the packed DC/nyquist component
+ realP1[0] = real0 * realP2[0];
+ imagP1[0] = imag0 * imagP2[0];
+}
+
void FFTFrame::doFFT(const float* data)
{
unsigned halfSize = m_FFTSize / 2;