From 93b1d5a5d3f90e85f071160449b4e517a48f65b9 Mon Sep 17 00:00:00 2001 From: Henrik Gramner Date: Mon, 22 Mar 2010 02:59:50 +0100 Subject: [PATCH] Pad non-mod16 resolutions using the correct field Improves compression of interlaced videos with non-mod16 heights. --- common/frame.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 ); } } -- 2.47.3