示例#1
0
inline void FEComposite::platformArithmeticSoftware(Uint8ClampedArray* source, Uint8ClampedArray* destination,
    float k1, float k2, float k3, float k4)
{
    int length = source->length();
    ASSERT(length == static_cast<int>(destination->length()));
    // The selection here eventually should happen dynamically.
#if HAVE(ARM_NEON_INTRINSICS)
    ASSERT(!(length & 0x3));
    platformArithmeticNeon(source->data(), destination->data(), length, k1, k2, k3, k4);
#else
    arithmeticSoftware(source->data(), destination->data(), length, k1, k2, k3, k4);
#endif
}
示例#2
0
inline void FEComposite::platformArithmeticSoftware(ByteArray* source, ByteArray* destination,
    float k1, float k2, float k3, float k4)
{
    int length = source->length();
    ASSERT(length == static_cast<int>(destination->length()));
    // The selection here eventually should happen dynamically.
#if CPU(ARM_NEON) && COMPILER(GCC)
    ASSERT(!(length & 0x3));
    float coefficients[4]  = { k1, k2, k3, k4 };
    platformArithmeticNeon(source->data(), destination->data(), length, coefficients);
#else
    arithmeticSoftware(source->data(), destination->data(), length, k1, k2, k3, k4);
#endif
}