summaryrefslogtreecommitdiffstats
path: root/libhb/deinterlace.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2012-06-25 07:56:49 +0000
committerjstebbins <[email protected]>2012-06-25 07:56:49 +0000
commitefbf9c29a90a8590080c98a53a67cb5e98cddb02 (patch)
tree2e2e1748ea3ce9ad24fe7ba8413b43ada2ec764b /libhb/deinterlace.c
parent7e1d3dc3448805803138cb4fe4ad1e1c8d6f1c85 (diff)
libhb: fix deinterlace fast problem with sources that have <mod8 alignment
avpicture_deinterlace requires that both width and height of the input be 8 pixel aligned. Video buffers already have padding to align horizontally to 16 pixels, but they were not padded vertically. This adds vertical padding. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4776 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/deinterlace.c')
-rw-r--r--libhb/deinterlace.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libhb/deinterlace.c b/libhb/deinterlace.c
index e654817c3..ee410a1cf 100644
--- a/libhb/deinterlace.c
+++ b/libhb/deinterlace.c
@@ -536,8 +536,12 @@ static int hb_deinterlace_work( hb_filter_object_t * filter,
{
hb_avpicture_fill( &pic_out, pv->buf_out[0] );
+ // avpicture_deinterlace requires 8 byte aligned width and height
+ // we have aligned all buffers to 16 byte width and height strides
+ // so use the image stride when deinterlacing
avpicture_deinterlace( &pic_out, &pic_in, pv->buf_out[0]->f.fmt,
- pv->buf_out[0]->f.width, pv->buf_out[0]->f.height );
+ pv->buf_out[0]->plane[0].stride,
+ pv->buf_out[0]->plane[0].height_stride );
pv->buf_out[0]->s = in->s;
hb_buffer_move_subs( pv->buf_out[0], in );