]> git.sesse.net Git - x264/commitdiff
fix bottom-right pixel of lowres planes, which was uninitialized.
authorLoren Merritt <pengvado@akuvian.org>
Sat, 7 Nov 2009 06:09:47 +0000 (06:09 +0000)
committerLoren Merritt <pengvado@akuvian.org>
Mon, 9 Nov 2009 01:54:38 +0000 (01:54 +0000)
weirdly, valgrind reported this only with --no-asm.

common/mc.c

index 41cf5938727a527eed6d940fc6f536a11d66a76d..b6d3581c176160e1b62ddcc821cd9a40031d8614 100644 (file)
@@ -317,7 +317,7 @@ void x264_frame_init_lowres( x264_t *h, x264_frame_t *frame )
     // duplicate last row and column so that their interpolation doesn't have to be special-cased
     for( y=0; y<i_height; y++ )
         src[i_width+y*i_stride] = src[i_width-1+y*i_stride];
-    memcpy( src+i_stride*i_height, src+i_stride*(i_height-1), i_width );
+    memcpy( src+i_stride*i_height, src+i_stride*(i_height-1), i_width+1 );
     h->mc.frame_init_lowres_core( src, frame->lowres[0], frame->lowres[1], frame->lowres[2], frame->lowres[3],
                                   i_stride, frame->i_stride_lowres, frame->i_width_lowres, frame->i_lines_lowres );
     x264_frame_expand_border_lowres( frame );