[x264-devel] Fix padding bug in x264_expand_border_mbpair

Henrik Gramner git at videolan.org
Sat Jul 30 05:54:46 CEST 2011


x264 | branch: master | Henrik Gramner <hengar-6 at student.ltu.se> | Fri Jul 29 20:15:52 2011 +0200| [178455cd4df5f5a36f39c49c8f7b03965b269a91] | committer: Jason Garrett-Glaser

Fix padding bug in x264_expand_border_mbpair

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=178455cd4df5f5a36f39c49c8f7b03965b269a91
---

 common/frame.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/common/frame.c b/common/frame.c
index 93d5d9f..7aabaf5 100644
--- a/common/frame.c
+++ b/common/frame.c
@@ -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) );
     }
 }
 



More information about the x264-devel mailing list