Dear Brian,
as the description of the pixel format PIX_FMT_RGBA says, your data must
be packed:
//pixfmt.h
PIX_FMT_RGBA, ///< packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Your raw data has a different alignment.
Try the following tool ImageJ (http://rsbweb.nih.gov/ij/) to inspect
your raw data.
There you can open raw files. Use the menu entry "File>Import>Raw...",
then select the raw file.
Choose the following settings:
Image Type: 8-bit
Width: 2880
Height: 480
Your raw data alignment is not PIX_FMT_RGBA, it looks like:
Row 0: (row 0 of component 1) (row 0 of component 2) (row 0 of component
3) (row 0 of component 4)
Row 1: (row 1 of component 1) (row 1 of component 2) (row 1 of component
3) (row 1 of component 4)
...
Best regards
Sylvia
Am 08.01.2011 06:22, schrieb Brian C. Wiles:
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
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user