From fa4bfd703a445abf666721a70d00ba60832ad9e7 Mon Sep 17 00:00:00 2001 From: Praveen R Jadhav Date: Wed, 3 Apr 2013 12:14:02 +0900 Subject: [PATCH] Audio is not proper in WebAudio Tests [Title] : Audio is not proper in WebAudio Tests [Issue] : WEB-2918 [Problem] : vsmul() in VectorMath is not handled properly [Solution] : vsmul() is updated to handle properly as in OpenSource Change-Id: I8d0cc87136684dabd028cbbed0ee0b254f793cbb --- Source/WebCore/platform/audio/VectorMath.cpp | 50 ---------------------------- 1 file changed, 50 deletions(-) diff --git a/Source/WebCore/platform/audio/VectorMath.cpp b/Source/WebCore/platform/audio/VectorMath.cpp index 630bc95..a014130 100644 --- a/Source/WebCore/platform/audio/VectorMath.cpp +++ b/Source/WebCore/platform/audio/VectorMath.cpp @@ -676,52 +676,6 @@ void zvmul(const float* real1P, const float* imag1P, const float* real2P, const } } #elif HAVE(ARM_NEON_INTRINSICS) -#if ENABLE(TIZEN_WEB_AUDIO) - UNUSED_PARAM(i); - - const float32_t* realSource1 = real1P; - const float32_t* imgSource1 = imag1P; - const float32_t* realSource2 = real2P; - const float32_t* imgSource2 = imag2P; - float32_t* realDest = realDestP; - float32_t* imgDest = imagDestP; - - unsigned int loopCount = framesToProcess >> 2; - unsigned int residueCount = framesToProcess & 3; - float32x4_t real1, real2, img1, img2; - float32x4_t result1, result2; - - for (;loopCount>0;loopCount--) { - real1= vld1q_f32(realSource1); // load 4xfloat values - img1= vld1q_f32(imgSource1); // load 4xfloat values - real2= vld1q_f32(realSource2); // load 4xfloat values - img2= vld1q_f32(imgSource2); // load 4xfloat values - - result1 = vmulq_f32(real1, real2); - result2 = vmulq_f32(real1, img2); - - result1 = vmlsq_f32(result1, img1, img2); - result2 = vmlaq_f32(result2, real2, img1); - - vst1q_f32(realDest, result1); - vst1q_f32(imgDest, result2); - - realSource1 += 4; - imgSource1 += 4; - realSource2 += 4; - imgSource2 += 4; - realDest += 4; - imgDest += 4; - } - if (residueCount) { - for (;residueCount>0;residueCount--) { - float real = ((*realSource1)*(*realSource2))-((*imgSource1)*(*imgSource2)); - float img = ((*realSource1++)*(*imgSource2++))+((*imgSource1++)*(*realSource2++)); - *realDest++ = real; - *imgDest++ = img; - } - } -#else // ENABLE(TIZEN_WEB_AUDIO) unsigned endSize = framesToProcess - framesToProcess % 4; while (i < endSize) { float32x4_t real1 = vld1q_f32(real1P + i); @@ -737,10 +691,7 @@ void zvmul(const float* real1P, const float* imag1P, const float* real2P, const i += 4; } -#endif // ENABLE(TIZEN_WEB_AUDIO) #endif - -#if !ENABLE(TIZEN_WEB_AUDIO) for (; i < framesToProcess; ++i) { // Read and compute result before storing them, in case the // destination is the same as one of the sources. @@ -750,7 +701,6 @@ void zvmul(const float* real1P, const float* imag1P, const float* real2P, const realDestP[i] = realResult; imagDestP[i] = imagResult; } -#endif // ENABLE(TIZEN_WEB_AUDIO) } void vsvesq(const float* sourceP, int sourceStride, float* sumP, size_t framesToProcess) -- 2.7.4