Commit 5eaa9bcf authored by Adrian Grange's avatar Adrian Grange
Browse files

Corrected usage of image strides

The function vp8_post_proc_down_and_across_c takes the
stride of both the src and dst images as parameters, but
assumes that they are the same.

I modified the code to use the correct strides, as the
assembler versions of these functions do.

Change-Id: I222715b774cd071b21c15a4b0d2f4aef64a520de
parent 0277c70a
......@@ -143,9 +143,7 @@ void vp8_post_proc_down_and_across_c
int col;
int i;
int v;
int pitch = src_pixels_per_line;
unsigned char d[8];
(void)dst_pixels_per_line;
for (row = 0; row < rows; row++)
{
......@@ -161,10 +159,10 @@ void vp8_post_proc_down_and_across_c
for (i = -2; i <= 2; i++)
{
if (abs(v - p_src[col+i*pitch]) > flimit)
if (abs(v - p_src[col+i*src_pixels_per_line]) > flimit)
goto down_skip_convolve;
kernel += kernel5[2+i] * p_src[col+i*pitch];
kernel += kernel5[2+i] * p_src[col+i*src_pixels_per_line];
}
v = (kernel >> 3);
......@@ -211,10 +209,9 @@ void vp8_post_proc_down_and_across_c
p_dst[col-2] = d[(col-2)&7];
p_dst[col-1] = d[(col-1)&7];
/* next row */
src_ptr += pitch;
dst_ptr += pitch;
src_ptr += src_pixels_per_line;
dst_ptr += dst_pixels_per_line;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment