[Webkit-unassigned] [Bug 74842] SSE optimization for FFTFrameFFMPEG.cpp::multiply()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 21 15:44:28 PST 2011


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





--- Comment #9 from Chris Rogers <crogers at google.com>  2011-12-21 15:44:28 PST ---
(From update of attachment 120142)
View in context: https://bugs.webkit.org/attachment.cgi?id=120142&action=review

Looks good overall, with a few comments:

> Source/WebCore/platform/audio/VectorMath.cpp:301
> +void zvmul(const float* real1P, const float* imag1P, const float* real2P, const float* imag2P, float* realDestP, float* imagDestP, size_t framesToProcess)

We need to provide a version of this function in the DARWIN section using vDSP_zvmul.  It shouldn't be too hard.  You can look in FFTFrameMac.cpp for an example usage.

It will involve using three local variables of type "DSPSplitComplex"

/* Complex-split vector multiply, single-precision.*/
/*
 *  vDSP_zvmul()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in vecLib.framework
 *    CarbonLib:        not in Carbon, but vecLib is compatible with CarbonLib
 *    Non-Carbon CFM:   in vecLib 1.0 and later
 */
extern void vDSP_zvmul(
    const DSPSplitComplex *__vDSP_input1, vDSP_Stride __vDSP_stride1,
    const DSPSplitComplex *__vDSP_input2, vDSP_Stride __vDSP_stride2,
    const DSPSplitComplex *__vDSP_result, vDSP_Stride __vDSP_strideResult,
    vDSP_Length __vDSP_size,
    int __vDSP_conjugate)
        AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;

> Source/WebCore/platform/audio/VectorMath.cpp:305
> +    // Only handle the very common case that all addresses are 16-byte aligned.

I would elaborate on this comment a little by saying something like:

// Only use the SSE optimization in the very common case that all addresses are 16-byte aligned.
// Otherwise, fall through to the scalar code below.

As the comment is right now, it seems to imply that we don't handle "at all" the non-aligned case.

> Source/WebCore/platform/audio/ffmpeg/FFTFrameFFMPEG.cpp:-138
> -    }

I would restore the comment:
// Multiply the packed DC/nyquist component

-- 
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