[FFmpeg-devel] [Patch/RFC] Improved PixelLayout parsing in mxfdec.c

Tomas Härdin tomas.hardin
Thu Jun 10 15:20:54 CEST 2010

On Mon, 2010-06-07 at 11:36 +0200, Tomas H?rdin wrote:
> On Thu, 2010-06-03 at 15:11 -0700, Baptiste Coudurier wrote: 
> [snip]
> > 
> > Thanks for the patch, this is appreciated.
> > 
> > [...]
> > 
> Revised patch attached. It does not pass regtests since pix_fmt differs
> (not setting it makes them pass).

After poking around a bit with rawdec and tracking the usages of
bits_per_coded_sample I realized that as long as all the previous pixel
formats that the old code made work are also in the list, we don't have
to touch bits_per_coded_sample for video (only audio).

I translated the entries in pix_fmt_bps_avi in rawdec.c to entries in
ff_mxf_pixel_layouts (I left out the 4-bit case for now). This means we
don't have to set bits_per_coded_sample for AVMEDIA_TYPE_VIDEO in

Considering that the only sample we know of that should have a correct
PixelLayout is RGB24 this patch should work at least as well as the old
one. The only difference is rawdec translates 16 bps to PIX_FMT_RGB555,
while the similar entry here translates it to PIX_FMT_RGB565BE.

Also, this patch passes the regtests.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mxf_pix_fmt3.patch
Type: text/x-patch
Size: 5355 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100610/d5fef78b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100610/d5fef78b/attachment.pgp>

More information about the ffmpeg-devel mailing list