[Webkit-unassigned] [Bug 73545] [GStreamer] FFTFrame implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 23 02:50:10 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=73545





--- Comment #16 from Philippe Normand <pnormand at igalia.com>  2012-01-23 02:50:10 PST ---
(In reply to comment #15)
> (From update of attachment 122727 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=122727&action=review
> 
> > Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:29
> > +unsigned unpackedFFTDataSize(unsigned fftSize)
> 
> Shouldn't this be static or something to prevent it from being exported?
> 

I think it's fine as it is. The anonymous namespace keeps this function private to this file, I think.

> > Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48
> > +    ASSERT(1UL << m_log2FFTSize == m_FFTSize);
> 
> GstFFT can handle FFT sizes that are multiples of only 2, 3, 5 fast (e.g. 30 too) but can also handle every other size (but might be slow)
> 

The other 2 FFTFrame implementations I can see in WebKit trunk force a power-of-two size, I think I'll just remove this ASSERT and keep using gst_fft_next_fast_length :)

> > Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:52
> > +    int fftLength = gst_fft_next_fast_length(m_FFTSize);
> 
> This doesn't make sense, you're forcing it to a power of two anyway ;) Either remove that assertion or this here.
> 
> > Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:154
> > +    for (unsigned i = 0; i < halfSize; i++) {
> 
> Hm, aren't you dropping one value here? It's n/2 + 1, not n/2.
> 

I think it's n/2, it's the size of the m_realData and m_imagData arrays.

> > Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:175
> > +    const float scaleFactor = 1.0 / (2 * m_FFTSize);
> 
> You only have to divide by m_FFTSize IIRC. Or divide by 1/sqrt(m_FFTSize) after both transformations.

Ah Ok, I think I just did like in another FFTFrame implementation ;)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list