[Libav-user] How to Convert AV_PIX_FMT_RGB24 to AV_PIX_FMT_YUV420P

Chris Share cpsmusic at yahoo.com
Thu Feb 14 10:00:32 CET 2013


I'm currently trying to implement file export for the open source animation program Pencil2D. This involves converting RGB (0 - 255) image data to a suitable movie format.

The examples in the source tree have been very helpful however I still have some questions:

The scaling_video.c is close to what I need however the conversion is the opposite of what I want. What I'm not clear about is how to change the "fill_yuv_image" function to something like "fill_rgb_image". How does the RGB data get written into the "uint8_t *data[4]"? Is it written consecutively (all R values get written to data[0], all G values to data[1], etc.)?



More information about the Libav-user mailing list