[vlc-devel] [PATCH] YUV->RGBA conversion only supports multiples of 16

XilasZ xilasz at gmail.com
Fri Feb 10 09:54:00 CET 2012

> Of course not! VLC pads the pitches of allocated pictures to a multiple of
> 16 bytes (or was if 16 pixels). But that only works if the picture is
> allocated by the VLC core.

Yes, the input is ok, but since we build the output picture_t from the
android surface, the pitch comes from android. That's the issue.

The hardware video acceleration does not work on this device.
> Something about samsung libs not correctly responding to AOSP events

Martin knows more about this, ask him.

> checking dst->p->i_pitch in the filter before the crash returns: 2104
> and that is not a multiple of 16

Yes, pitch is in bytes, 4 bytes per pixel : 2104 / 4 = 526, that's your
video width, not rounded to a multiple of 16.
The converter assume it's 2112 = 528 * 4, which is what we have on most
android devices.

> My fix was definitely wrong but I'm not sure how to check destination
> pitch from Open.

I don't know yet, we could fallback to the C version of the converter
(commented right now) at each frame, but that's very ugly :/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120210/89c20c62/attachment.html>

More information about the vlc-devel mailing list