From dea52eb730b4c221c89c7f87bbd6bb26ad111481 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Tue, 4 Sep 2012 14:51:31 +0400 Subject: [PATCH] fixed 4-channel resizeAreaFast x2 decimation case --- modules/imgproc/src/imgwarp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/imgproc/src/imgwarp.cpp b/modules/imgproc/src/imgwarp.cpp index cbe9e29b17..a3e118311a 100644 --- a/modules/imgproc/src/imgwarp.cpp +++ b/modules/imgproc/src/imgwarp.cpp @@ -1271,10 +1271,10 @@ struct ResizeAreaFast_2x2_8u for( ; dx < w; dx += 4 ) { int index = dx*2; - D[dx] = (S[index] + S[index+3] + nextS[index] + nextS[index+3] + 2) >> 2; - D[dx+1] = (S[index+1] + S[index+4] + nextS[index+1] + nextS[index+4] + 2) >> 2; - D[dx+2] = (S[index+2] + S[index+5] + nextS[index+2] + nextS[index+5] + 2) >> 2; - D[dx+3] = (S[index+3] + S[index+6] + nextS[index+3] + nextS[index+6] + 2) >> 2; + D[dx] = (S[index] + S[index+4] + nextS[index] + nextS[index+4] + 2) >> 2; + D[dx+1] = (S[index+1] + S[index+5] + nextS[index+1] + nextS[index+5] + 2) >> 2; + D[dx+2] = (S[index+2] + S[index+6] + nextS[index+2] + nextS[index+6] + 2) >> 2; + D[dx+3] = (S[index+3] + S[index+7] + nextS[index+3] + nextS[index+7] + 2) >> 2; } }