[FFmpeg-devel] [PATCH 10/13] Add rawvideo pixel formats to codec tags mapping for the newly added nut rawvideo pixel formats codec tags.

Michael Niedermayer michaelni
Sun May 9 23:18:47 CEST 2010


On Sun, May 09, 2010 at 03:33:27PM +0200, Stefano Sabatini wrote:
> On date Sunday 2010-05-09 15:30:00 +0200, Stefano Sabatini encoded:
> > ---
> >  libavcodec/raw.c |   14 ++++++++++++++
> >  1 files changed, 14 insertions(+), 0 deletions(-)
> > 
> > diff --git a/libavcodec/raw.c b/libavcodec/raw.c
> > index 3bb0cc8..ba0ec66 100644
> > --- a/libavcodec/raw.c
> > +++ b/libavcodec/raw.c
> > @@ -80,6 +80,20 @@ const PixelFormatTag ff_raw_pixelFormatTags[] = {
> >      { PIX_FMT_ARGB,     MKTAG('A', 'R', 'G', 'B') },
> >      { PIX_FMT_RGB24,    MKTAG('R', 'G', 'B', 24 ) },
> >      { PIX_FMT_BGR24,    MKTAG('B', 'G', 'R', 24 ) },
> > +    { PIX_FMT_YUV444P,  MKTAG('4', '4', '4', 'P') },
> > +    { PIX_FMT_YUVJ444P, MKTAG('4', '4', '4', 'P') },
> > +    { PIX_FMT_YUV440P,  MKTAG('4', '4', '0', 'P') },
> > +    { PIX_FMT_YUVJ440P, MKTAG('4', '4', '0', 'P') },
> > +    { PIX_FMT_MONOWHITE,MKTAG('M', 'O', 'W', 'H') },
> > +    { PIX_FMT_MONOBLACK,MKTAG('M', 'O', 'B', 'L') },
> > +    { PIX_FMT_BGR8,     MKTAG('B', 'G', 'R',  8 ) },
> > +    { PIX_FMT_BGR4,     MKTAG('B', 'G', 'R',  4 ) },
> > +    { PIX_FMT_RGB8,     MKTAG('R', 'G', 'B',  8 ) },
> > +    { PIX_FMT_RGB4,     MKTAG('R', 'G', 'B',  4 ) },
> > +    { PIX_FMT_NV12,     MKTAG('N', 'V', '1', '2') },
> > +    { PIX_FMT_NV21,     MKTAG('N', 'V', '2', '1') },
> > +    { PIX_FMT_RGB48LE,  MKTAG('R', 'G', 'B', 48 ) },
> > +    { PIX_FMT_RGB48BE,  MKTAG( 48, 'B', 'G', 'R') },
> 
> Attached the corresponding nut4cc.txt patch.
> 
> Regards.
> -- 
> FFmpeg = Friendly and Fascinating Murdering Practical Ecumenical Gangster

>  nut4cc.txt |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 4ad3cc6b63e9431047b26f2965899ae6c9b8cefe  nut4cc-additions.patch
> Index: docs/nut4cc.txt
> ===================================================================
> --- docs/nut4cc.txt	(revision 666)
> +++ docs/nut4cc.txt	(working copy)
> @@ -91,6 +91,16 @@
>  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]
> +MOWH    1bpp, 0 is white, 1 is black [NOT in AVI]
> +MOBL    1bpp, 0 is black, 1 is white [NOT in AVI]

these appear fliped from what i would have expected


> +BGR[8]  Packed RGB 3:3:2,  8bpp, (msb)2B 3G 3R(lsb) [NOT in AVI]
> +RGB[8]  Packed RGB 3:3:2,  8bpp, (msb)2B 3G 3R(lsb) [NOT in AVI]
                                         ^^^^^^^^
copy and paste error


> +BGR[4]  Packed RGB 1:2:1,  4bpp, (msb)1B 2G 1R(lsb) [NOT in AVI]
> +RGB[4]  Packed RGB 1:2:1,  4bpp, (msb)1B 2G 1R(lsb) [NOT in AVI]

ambigous, (the placeent of pixels in a byte)


> +NV12    Planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 for UV [NOT in AVI]
> +NV21    as above, but U and V bytes are swapped [NOT in AVI]

1 for UV is not clear, what is that interleaved bits, rows ?


> +RGB[48] Packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, little-endian [NOT in AVI]
> +[48]BGR Packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, big-endian    [NOT in AVI]

this is not well specified
also iam not sure if not [48]RGB would be more correct name here but
this is debatebale, iam unsure

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

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- 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/20100509/a1d8bd8c/attachment.pgp>



More information about the ffmpeg-devel mailing list