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

Stefano Sabatini stefano.sabatini-lala
Sun Apr 11 22:11:54 CEST 2010


On date Saturday 2010-04-03 21:00:06 +0200, Stefano Sabatini encoded:
> On date Tuesday 2010-03-30 16:46:29 +0200, Michael Niedermayer encoded:
> > On Tue, Mar 30, 2010 at 09:48:33AM +0000, Carl Eugen Hoyos wrote:
> > > Michael Niedermayer <michaelni <at> gmx.at> writes:
> > > 
> > > > >     { PIX_FMT_RGB555,  MKTAG('R', 'G', 'B', 15) },
> > > > >     { PIX_FMT_BGR555,  MKTAG('B', 'G', 'R', 15) },
> > > > >     { PIX_FMT_RGB565,  MKTAG('R', 'G', 'B', 16) },
> > > > >     { PIX_FMT_BGR565,  MKTAG('B', 'G', 'R', 16) },
> > > > >     { PIX_FMT_RGB565,  MKTAG( 3 ,  0 ,  0 ,  0 ) },
> > > > 
> > > > this looks wrong, for which files was that added?
> > > 
> > > svn log -r6806:6807
> > > I especially like the second part of the messages;-)
> > > 
> > > svn log -r19172
> > 
> > well then just change them to the LE variant. It would still be
> > nice to have some idea what uses them though but not essential
> 
> See attachment.
> 
> BTW, now my question is: how can I add nut-specific tags?
> 
> If I add them to raw.c, they will end up to be used also by other
> formats (AVI, QT) for which they are not valid.
> 
> Regards.
> -- 
> FFmpeg = Fanciful and Forgiving Mythic Purposeless Ecumenical Governor

> From 15a363df3bcff3163e9a978eeee35c07ce8db330 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> Date: Sat, 3 Apr 2010 20:52:17 +0200
> Subject: [PATCH 1/6] Change ff_raw_pixelFormatTags RGB entries (RGB555, BGR555, RGB565,
>  BGR565, RGB565) to make them specify the tags for the LE variants
>  rather than for the native endian ones.
> 
> Fix NUT compatibility.
> ---
>  libavcodec/raw.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/libavcodec/raw.c b/libavcodec/raw.c
> index 91aba49..dd502a2 100644
> --- a/libavcodec/raw.c
> +++ b/libavcodec/raw.c
> @@ -56,11 +56,11 @@ const PixelFormatTag ff_raw_pixelFormatTags[] = {
>      { PIX_FMT_UYVY422, MKTAG('A', 'V', 'u', 'p') },
>      { PIX_FMT_UYVY422, MKTAG('V', 'D', 'T', 'Z') }, /* SoftLab-NSK VideoTizer */
>      { PIX_FMT_GRAY8,   MKTAG('G', 'R', 'E', 'Y') },
> -    { PIX_FMT_RGB555,  MKTAG('R', 'G', 'B', 15) },
> -    { PIX_FMT_BGR555,  MKTAG('B', 'G', 'R', 15) },
> -    { PIX_FMT_RGB565,  MKTAG('R', 'G', 'B', 16) },
> -    { PIX_FMT_BGR565,  MKTAG('B', 'G', 'R', 16) },
> -    { PIX_FMT_RGB565,  MKTAG( 3 ,  0 ,  0 ,  0 ) },
> +    { PIX_FMT_RGB555LE, MKTAG('R', 'G', 'B', 15) },
> +    { PIX_FMT_BGR555LE, MKTAG('B', 'G', 'R', 15) },
> +    { PIX_FMT_RGB565LE, MKTAG('R', 'G', 'B', 16) },
> +    { PIX_FMT_BGR565LE, MKTAG('B', 'G', 'R', 16) },
> +    { PIX_FMT_RGB565LE, MKTAG( 3 ,  0 ,  0 ,  0 ) },
>  
>      /* quicktime */
>      { PIX_FMT_UYVY422, MKTAG('2', 'v', 'u', 'y') },

Ping.

This is currently blocking the lavfi test system, as it relies on nut
and on the possibility to play at least with ffplay the rawvideo files
generated by the test script.

Regards.
-- 
FFmpeg = Fabulous Fierce MultiPurpose Enlightened Game



More information about the ffmpeg-devel mailing list