[vlc-devel] [PATCH] De-interlace filters incorrectly using source buffer pitch as dest buffer pitch

Greg Farrell greg at gregfarrell.org
Fri Feb 10 13:23:02 CET 2006


   as per my mails about via drivers giving 32 byte aligned xv surfaces
and libmpeg2/vlc deinterlace filters having problems with them. I've
attached a patch that I hope fixes the deinterlace filters to correctly
work with drivers that 32 byte align. 

The deinterlace filters were using the p_pic->p[i_plane].i_pitch to
increment the p_out pointer into the p_outpic buffer.

This would only work if both the p_pic and p_outpic had the same pitch,
which they usually will as vlc bumps everything to a multiple of 16.
However the via unichrome drivers in YV12 and I420 mode align all xv
surfaces to 32 bytes for hardware reasons.

So the p_pic pitch could be 720 for example and the p_out pitch 736 (720
32 byte aligned). Using the p_pic pitch to offset into the p_out buffer
would then result in garbled output.

Using the p_outpic pitch value for all line increments in the p_outpic
buffer fixes things for me. I hope someone can have a look over this and
commit it if possible.


Lincor Solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deinterlace.patch
Type: text/x-patch
Size: 8389 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20060210/c72ffa29/attachment.bin>

More information about the vlc-devel mailing list