]> granicus.if.org Git - libx264/commitdiff
Fix padding bug in x264_expand_border_mbpair
authorHenrik Gramner <hengar-6@student.ltu.se>
Fri, 29 Jul 2011 18:15:52 +0000 (20:15 +0200)
committerFiona Glaser <fiona@x264.com>
Fri, 29 Jul 2011 19:09:30 +0000 (12:09 -0700)
common/frame.c

index 09f2079075e270f0caced28a31615e585205bc8d..26670042124e0fbaef626dd4aa5156e5343459a5 100644 (file)
@@ -577,12 +577,9 @@ void x264_expand_border_mbpair( x264_t *h, int mb_x, int mb_y )
         int stride = h->fenc->i_stride[i];
         int height = h->param.i_height >> shift;
         int pady = (h->mb.i_mb_height * 16 - h->param.i_height) >> shift;
-        int mbsize = 16>>shift;
-        pixel *fenc = h->fenc->plane[i] + mbsize * mb_x;
+        pixel *fenc = h->fenc->plane[i] + 16*mb_x;
         for( int y = height; y < height + pady; y++ )
-            memcpy( fenc + y*stride,
-                    fenc + (height-1)*stride,
-                    mbsize * sizeof(pixel) );
+            memcpy( fenc + y*stride, fenc + (height-1)*stride, 16*sizeof(pixel) );
     }
 }