[Libav-user] Encoding RGB Data to YUV420p

Chris Share cpsmusic at yahoo.com
Thu Feb 14 01:41:39 CET 2013


I'm currently working on the open source animation application Pencil2D.

I'd like to get file export working and I'm using the decoding_encoding.c example as a guide.

At the moment, I'm developing a test application that imports a .png image and encodes it as a 1 second movie file (using the default output format).

I've got the .png image data in a vector as RGB data (0-255 range).

What I'm not clear about is how to convert this image data to YUV420p format as per the decoding_encoding.c example. I posted a question on this topic on a general programming site and it was suggested that I should convert the RGB data to YUV444 and then convert this to YUV420p. Is that correct?

A simple example of how to do this would be greatly appreciated.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130213/f9c93971/attachment.html>

More information about the Libav-user mailing list