I am decoding an MPEG2 video, padding it to the proper aspect ratio within a destination video stream. and then encoding that stream. However, when I specify PIX_FMT_RGBA pixel format, it appears the pixel formats in the old and new stream are different.

When I play the destination video, I get a properly-padded frame (letterbox bars on top and bottom), but the image is all greyscale and repeated 4 times horizontally. I am manually padding the frame since I could not get av_picture_pad() to do anything. I thought it would be a simple memcpy() line by line, but am I missing something?

  To illustrate what's happening, here are 3 files:

http://www.poldon.com/origframe000.img (raw RGBA data from original frame) http://www.poldon.com/paddedframe000.img (raw RGBA data from padded frame) http://www.poldon.com/padded.png (screenshot of playing the final video)

Since both frames are set to PIX_FMT_RGBA in the AVFrame, is there somewhere else I can tell they're different? The linesize is {2880. 0, 0, 0} for both, so there must be something else.

I appreciate any help anyone might be able to give. If you need any more details, let me know. Thanks!

-Brian

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to