[FFmpeg-devel] [PATCH] Make nut muxer and demuxer recognize the extended nut tags associated to rawvideo pixel formats

Michael Niedermayer michaelni
Tue Mar 23 04:23:01 CET 2010


On Tue, Mar 23, 2010 at 01:05:49AM +0100, Stefano Sabatini wrote:
> On date Tuesday 2010-03-23 00:37:42 +0100, Michael Niedermayer encoded:
> > On Mon, Mar 22, 2010 at 11:29:46PM +0100, Stefano Sabatini wrote:
> > > Hi, as in subject.
> > > 
> > > These are defined in the nut spec (nut4cc.txt):
> > > 
> > > RGB[15] Packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), little-endian [NOT in AVI]
> > > BGR[15] Packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), little-endian [NOT in AVI]
> > > RGB[16] Packed RGB 5:6:5, 16bpp, (msb)   5R 6G 5B(lsb), little-endian [NOT in AVI]
> > > BGR[16] Packed BGR 5:6:5, 16bpp, (msb)   5B 6G 5R(lsb), little-endian [NOT in AVI]
> > > [15]BGR Packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), big-endian [NOT in AVI]
> > > [15]RGB Packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), big-endian [NOT in AVI]
> > > [16]BGR Packed RGB 5:6:5, 16bpp, (msb)   5R 6G 5B(lsb), big-endian [NOT in AVI]
> > > [16]RGB Packed BGR 5:6:5, 16bpp, (msb)   5B 6G 5R(lsb), big-endian [NOT in AVI]
> > > RGBA    Packed RGBA 8:8:8:8, 32bpp, RGBA [NOT in AVI]
> > > BGRA    Packed RGBA 8:8:8:8, 32bpp, BGRA [NOT in AVI]
> > > ABGR    Packed RGBA 8:8:8:8, 32bpp, ABGR [NOT in AVI]
> > > ARGB    Packed RGBA 8:8:8:8, 32bpp, ARGB [NOT in AVI]
> > > RGB[24] Packed RGB 8:8:8, 24bpp RGB [NOT in AVI]
> > > BGR[24] Packed RGB 8:8:8, 24bpp BGR [NOT in AVI]
> > > 
> > 
> > > BTW what about to extend nut to make it support also other pixel
> > > formats?
> > 
> > iam not aware of a limitation
> 
> >From nut4cc.txt:
> 
> |This list enumerates fourcc codes and the codecs they identify.
> |
> |Codecs which are not in this list but have a standard fourcc in AVI can be
> |used with the AVI fourcc in nut as well.
> |Codecs which are in this list but are not used with the same fourcc in AVI
> |should be reported to us! (these maybe a typo)
> |Codecs which are in this list and in AVI with the same fourcc as well as
> |other fourccs, SHOULD use the fourcc specified here.
> |For codecs which do not have a fourcc in AVI nor this list, please contact
> |us so we can add them to the list.
> 
> As for limitation I just mean the fact that there are rawvideo pixel
> formats which cannot be represented by an AVI tag, and they can be
> added to nut extending its specification.

so propose to add them


> 
> > > I need that for the libavfilter test.
> > 
> > this patch makes no sense, rejected.
> > the codec_tag-pix_fmt mapping is in libavcodec/raw*
> > add it there where the avi and quicktime mappings already are.
> 
> I thought that that mapping would be nut-specific, so I fail to see
> why it should be implemented in
> libavcodec/raw.c:ff_raw_pixelFormatTags.

because thats how its done. And thats how all non raw video decoders
set the pix_fmt.
the mpeg-ps muxer doesnt set pix_fmt to yuv420p or 422p depending on the
mpeg-es headers
Iam not interrested in redesigning this, its fine as it is, it works.
Find a bug and we can talk but not because you dont like the design
and that doesnt mean anyone would like the alternative more.


> 
> Also that would introduce the possibility for the AVI/QT muxer to use a
> tag which is not valid for it, no?

depends on how you add the tags


> 
> That said, I really don't mind into putting these nut tag definitions
> in ff_raw_pixelFormatTags, but that sounds odd/wrong to me.

setting pix_fmt in the mpeg-ps demxuer sounds wrong to me
setting pix_fmt for some cases in the demxuer and for some cases in the
decoder sounds like something i dont want to have to maintain.
so whats left is what we have. The least ugly IMHO but iam sure some
will disagree ...


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100323/276caefa/attachment.pgp>



More information about the ffmpeg-devel mailing list