Commit 67086c85 authored by Michael Niedermayer's avatar Michael Niedermayer

width,height%16!=0 fix

Originally committed as revision 2889 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent ee59b4b6
...@@ -3411,10 +3411,10 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y) ...@@ -3411,10 +3411,10 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
if(mb_x*16+16 > s->width || mb_y*16+16 > s->height){ if(mb_x*16+16 > s->width || mb_y*16+16 > s->height){
ff_emulated_edge_mc(s->edge_emu_buffer , ptr_y , wrap_y,16,16,mb_x*16,mb_y*16, s->width , s->height); ff_emulated_edge_mc(s->edge_emu_buffer , ptr_y , wrap_y,16,16,mb_x*16,mb_y*16, s->width , s->height);
ptr_y= s->edge_emu_buffer; ptr_y= s->edge_emu_buffer;
ff_emulated_edge_mc(s->edge_emu_buffer+16*wrap_y , ptr_cb, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1); ff_emulated_edge_mc(s->edge_emu_buffer+18*wrap_y , ptr_cb, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1);
ptr_cb= s->edge_emu_buffer+16*wrap_y; ptr_cb= s->edge_emu_buffer+18*wrap_y;
ff_emulated_edge_mc(s->edge_emu_buffer+16*wrap_y+8, ptr_cr, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1); ff_emulated_edge_mc(s->edge_emu_buffer+18*wrap_y+9, ptr_cr, wrap_c, 8, 8, mb_x*8, mb_y*8, s->width>>1, s->height>>1);
ptr_cr= s->edge_emu_buffer+16*wrap_y+8; ptr_cr= s->edge_emu_buffer+18*wrap_y+9;
} }
if (s->mb_intra) { if (s->mb_intra) {
......
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