From: Henrik Gramner Date: Mon, 22 Mar 2010 01:59:50 +0000 (+0100) Subject: Pad non-mod16 resolutions using the correct field X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=93b1d5a5d3f90e85f071160449b4e517a48f65b9;p=x264.git Pad non-mod16 resolutions using the correct field Improves compression of interlaced videos with non-mod16 heights. --- diff --git a/common/frame.c b/common/frame.c index 362c4d6b..ab4aaffc 100644 --- a/common/frame.c +++ b/common/frame.c @@ -363,10 +363,9 @@ void x264_frame_expand_border_mod16( x264_t *h, x264_frame_t *frame ) } if( i_pady ) { - //FIXME interlace? or just let it pad using the wrong field for( y = i_height; y < i_height + i_pady; y++ ) memcpy( &frame->plane[i][y*frame->i_stride[i]], - &frame->plane[i][(i_height-1)*frame->i_stride[i]], + &frame->plane[i][(i_height-(~y&h->param.b_interlaced)-1)*frame->i_stride[i]], i_width + i_padx ); } }