summaryrefslogtreecommitdiffstats
path: root/libhb/deinterlace.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2012-07-18 18:45:05 +0000
committerjstebbins <[email protected]>2012-07-18 18:45:05 +0000
commita5fcca4c60638eb25f497a60067b39b6cea400e4 (patch)
tree2c20d9c0be9e42f0edd1f48aa902b98e6041396b /libhb/deinterlace.c
parent334edb802327776d74cbb546507c3f214ba8a784 (diff)
libhb: fix deinterlace fast green stripe
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4865 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/deinterlace.c')
-rw-r--r--libhb/deinterlace.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libhb/deinterlace.c b/libhb/deinterlace.c
index ee410a1cf..095693ab1 100644
--- a/libhb/deinterlace.c
+++ b/libhb/deinterlace.c
@@ -534,14 +534,17 @@ static int hb_deinterlace_work( hb_filter_object_t * filter,
/* Use libavcodec deinterlace if yadif_mode < 0 */
if( !( pv->yadif_mode & MODE_YADIF_ENABLE ) )
{
+ int width = (pv->buf_out[0]->plane[0].width + 3) & ~0x3;
+ int height = (pv->buf_out[0]->plane[0].height + 3) & ~0x3;
+
hb_avpicture_fill( &pic_out, pv->buf_out[0] );
- // avpicture_deinterlace requires 8 byte aligned width and height
+ // avpicture_deinterlace requires 4 pixel aligned width and height
// we have aligned all buffers to 16 byte width and height strides
- // so use the image stride when deinterlacing
+ // so there is room in the buffers to accomodate a litte
+ // overscan.
avpicture_deinterlace( &pic_out, &pic_in, pv->buf_out[0]->f.fmt,
- pv->buf_out[0]->plane[0].stride,
- pv->buf_out[0]->plane[0].height_stride );
+ width, height );
pv->buf_out[0]->s = in->s;
hb_buffer_move_subs( pv->buf_out[0], in );