On Thu, 30 Apr 2009 15:09:12 -0400, Lukas Diduch <[email protected]> wrote:
i'm using libavcodec for decoding mpeg2 and have some questions. Decoding to YCbCr works fine but when i copy this data (AVFrame) to BGR24 the picture is stored kind of monochrome planar instead of packed (aligned). I was using img_convert for that with the older versions of ffmpeg but this method is gone. I guess av_picture_copy is the way to go now.
av_picture_copy copies a picture. It doesn't do any conversioin at all. (notice that you can only give it one format parameter; it would need to know both the source and destination format in order to convert.)
I'm not sure why you were getting those results... I would expect it to segfault. (as data for a BGR24 image is larger than a YCbCr)
Use sws_scale. If you don't enable gpl, you will get the old img_convert code wrapped within the new swscale API.
-- Michael Conrad IntelliTree Solutions llc. 513-552-6362 [email protected] _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
