Title: [131562] trunk/Source/WebCore
- Revision
- 131562
- Author
- rga...@webkit.org
- Date
- 2012-10-17 01:06:55 -0700 (Wed, 17 Oct 2012)
Log Message
NEON intrinsics Gauss filter does not work properly
https://bugs.webkit.org/show_bug.cgi?id=98875
Reviewed by Zoltan Herczeg.
Fixing the NEON intrinsics Gauss filter. The stride parameter
was missing from the intrinsics algorithm. Tested with pixel
checks, now it's working properly.
* platform/graphics/filters/arm/FEGaussianBlurNEON.h:
(WebCore::boxBlurNEON):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (131561 => 131562)
--- trunk/Source/WebCore/ChangeLog 2012-10-17 08:00:16 UTC (rev 131561)
+++ trunk/Source/WebCore/ChangeLog 2012-10-17 08:06:55 UTC (rev 131562)
@@ -1,3 +1,17 @@
+2012-10-17 Gabor Rapcsanyi <rga...@webkit.org>
+
+ NEON intrinsics Gauss filter does not work properly
+ https://bugs.webkit.org/show_bug.cgi?id=98875
+
+ Reviewed by Zoltan Herczeg.
+
+ Fixing the NEON intrinsics Gauss filter. The stride parameter
+ was missing from the intrinsics algorithm. Tested with pixel
+ checks, now it's working properly.
+
+ * platform/graphics/filters/arm/FEGaussianBlurNEON.h:
+ (WebCore::boxBlurNEON):
+
2012-10-17 MORITA Hajime <morr...@google.com>
Crash on Frame::inScope() part 2
Modified: trunk/Source/WebCore/platform/graphics/filters/arm/FEGaussianBlurNEON.h (131561 => 131562)
--- trunk/Source/WebCore/platform/graphics/filters/arm/FEGaussianBlurNEON.h 2012-10-17 08:00:16 UTC (rev 131561)
+++ trunk/Source/WebCore/platform/graphics/filters/arm/FEGaussianBlurNEON.h 2012-10-17 08:06:55 UTC (rev 131562)
@@ -35,13 +35,14 @@
namespace WebCore {
inline void boxBlurNEON(Uint8ClampedArray* srcPixelArray, Uint8ClampedArray* dstPixelArray,
- unsigned dx, int dxLeft, int dxRight, int stride, int strideLine, int effectWidth, int effectHeight)
+ unsigned dx, int dxLeft, int dxRight, int stride, int strideLine, int effectWidth, int effectHeight)
{
uint32_t* sourcePixel = reinterpret_cast<uint32_t*>(srcPixelArray->data());
uint32_t* destinationPixel = reinterpret_cast<uint32_t*>(dstPixelArray->data());
float32x4_t deltaX = vdupq_n_f32(1.0 / dx);
int pixelLine = strideLine / 4;
+ int pixelStride = stride / 4;
for (int y = 0; y < effectHeight; ++y) {
int line = y * pixelLine;
@@ -49,21 +50,21 @@
// Fill the kernel
int maxKernelSize = std::min(dxRight, effectWidth);
for (int i = 0; i < maxKernelSize; ++i) {
- float32x4_t sourcePixelAsFloat = loadRGBA8AsFloat(sourcePixel + line + i);
+ float32x4_t sourcePixelAsFloat = loadRGBA8AsFloat(sourcePixel + line + i * pixelStride);
sum = vaddq_f32(sum, sourcePixelAsFloat);
}
// Blurring
for (int x = 0; x < effectWidth; ++x) {
- int pixelOffset = line + x;
+ int pixelOffset = line + x * pixelStride;
float32x4_t result = vmulq_f32(sum, deltaX);
- storeFloatAsRGBA8(result, destinationPixel+pixelOffset);
+ storeFloatAsRGBA8(result, destinationPixel + pixelOffset);
if (x >= dxLeft) {
- float32x4_t sourcePixelAsFloat = loadRGBA8AsFloat(sourcePixel + pixelOffset - dxLeft);
+ float32x4_t sourcePixelAsFloat = loadRGBA8AsFloat(sourcePixel + pixelOffset - dxLeft * pixelStride);
sum = vsubq_f32(sum, sourcePixelAsFloat);
}
if (x + dxRight < effectWidth) {
- float32x4_t sourcePixelAsFloat = loadRGBA8AsFloat(sourcePixel + pixelOffset + dxRight);
+ float32x4_t sourcePixelAsFloat = loadRGBA8AsFloat(sourcePixel + pixelOffset + dxRight * pixelStride);
sum = vaddq_f32(sum, sourcePixelAsFloat);
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes