[x264-devel] commit: Pad non-mod16 resolutions using the correct field (Henrik Gramner )

git at videolan.org git at videolan.org
Sun Mar 28 04:44:34 CEST 2010


x264 | branch: master | Henrik Gramner <hengar-6 at student.ltu.se> | Mon Mar 22 02:59:50 2010 +0100| [93b1d5a5d3f90e85f071160449b4e517a48f65b9] | committer: Jason Garrett-Glaser 

Pad non-mod16 resolutions using the correct field

Improves compression of interlaced videos with non-mod16 heights.

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

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

diff --git a/common/frame.c b/common/frame.c
index 362c4d6..ab4aaff 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 );
         }
     }



More information about the x264-devel mailing list