Changeset 228592 in webkit


Ignore:
Timestamp:
Feb 16, 2018 6:13:59 PM (6 years ago)
Author:
aestes@apple.com
Message:

[Cocoa] Stop using non-prefixed vDSP functions in 32-bit builds
https://bugs.webkit.org/show_bug.cgi?id=182898
<rdar://problem/37195079>

Reviewed by Tim Horton.

There's no need to use non-prefixed vDSP function aliases on 32-bit builds.
The vDSP-prefixed versions are available on all Cocoa platforms we currently support.

  • platform/audio/DirectConvolver.cpp:

(WebCore::DirectConvolver::process):

  • platform/audio/VectorMath.cpp:

(WebCore::VectorMath::vsmul):
(WebCore::VectorMath::vadd):
(WebCore::VectorMath::vmul):
(WebCore::VectorMath::zvmul):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r228591 r228592  
     12018-02-16  Andy Estes  <aestes@apple.com>
     2
     3        [Cocoa] Stop using non-prefixed vDSP functions in 32-bit builds
     4        https://bugs.webkit.org/show_bug.cgi?id=182898
     5        <rdar://problem/37195079>
     6
     7        Reviewed by Tim Horton.
     8
     9        There's no need to use non-prefixed vDSP function aliases on 32-bit builds.
     10        The vDSP-prefixed versions are available on all Cocoa platforms we currently support.
     11
     12        * platform/audio/DirectConvolver.cpp:
     13        (WebCore::DirectConvolver::process):
     14        * platform/audio/VectorMath.cpp:
     15        (WebCore::VectorMath::vsmul):
     16        (WebCore::VectorMath::vadd):
     17        (WebCore::VectorMath::vmul):
     18        (WebCore::VectorMath::zvmul):
     19
    1202018-02-16  Ryan Haddad  <ryanhaddad@apple.com>
    221
  • trunk/Source/WebCore/platform/audio/DirectConvolver.cpp

    r191844 r228592  
    7575
    7676#if USE(ACCELERATE)
    77 #if defined(__ppc__) || defined(__i386__)
    78 #pragma clang diagnostic push
    79 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    80     conv(inputP - kernelSize + 1, 1, kernelP + kernelSize - 1, -1, destP, 1, framesToProcess, kernelSize);
    81 #pragma clang diagnostic pop
    82 #else
    8377    vDSP_conv(inputP - kernelSize + 1, 1, kernelP + kernelSize - 1, -1, destP, 1, framesToProcess, kernelSize);
    84 #endif // defined(__ppc__) || defined(__i386__)
    8578#else
    8679    // FIXME: The macro can be further optimized to avoid pipeline stalls. One possibility is to maintain 4 separate sums and change the macro to CONVOLVE_FOUR_SAMPLES.
  • trunk/Source/WebCore/platform/audio/VectorMath.cpp

    r210496 r228592  
    5050#if USE(ACCELERATE)
    5151// On the Mac we use the highly optimized versions in Accelerate.framework
    52 // In 32-bit mode (__ppc__ or __i386__) <Accelerate/Accelerate.h> includes <vecLib/vDSP_translate.h> which defines macros of the same name as
    53 // our namespaced function names, so we must handle this case differently. Other architectures (64bit, ARM, etc.) do not include this header file.
    5452
    5553void vsmul(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess)
    5654{
    57 #if defined(__ppc__) || defined(__i386__)
    58 #pragma clang diagnostic push
    59 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    60     ::vsmul(sourceP, sourceStride, scale, destP, destStride, framesToProcess);
    61 #pragma clang diagnostic pop
    62 #else
    6355    vDSP_vsmul(sourceP, sourceStride, scale, destP, destStride, framesToProcess);
    64 #endif
    6556}
    6657
    6758void vadd(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess)
    6859{
    69 #if defined(__ppc__) || defined(__i386__)
    70 #pragma clang diagnostic push
    71 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    72     ::vadd(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess);
    73 #pragma clang diagnostic pop
    74 #else
    7560    vDSP_vadd(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess);
    76 #endif
    7761}
    7862
    7963void vmul(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess)
    8064{
    81 #if defined(__ppc__) || defined(__i386__)
    82 #pragma clang diagnostic push
    83 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    84     ::vmul(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess);
    85 #pragma clang diagnostic pop
    86 #else
    8765    vDSP_vmul(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess);
    88 #endif
    8966}
    9067
     
    10077    dest.realp = realDestP;
    10178    dest.imagp = imagDestP;
    102 #if defined(__ppc__) || defined(__i386__)
    103 #pragma clang diagnostic push
    104 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    105     ::zvmul(&sc1, 1, &sc2, 1, &dest, 1, framesToProcess, 1);
    106 #pragma clang diagnostic pop
    107 #else
    10879    vDSP_zvmul(&sc1, 1, &sc2, 1, &dest, 1, framesToProcess, 1);
    109 #endif
    11080}
    11181
Note: See TracChangeset for help on using the changeset viewer.