[FFmpeg-devel] [PATCH 10/13] Add rawvideo pixel formats to codec tags mapping for the newly added nut rawvideo pixel formats codec tags.
Stefano Sabatini
stefano.sabatini-lala
Tue May 18 21:23:56 CEST 2010
On date Tuesday 2010-05-18 17:37:21 +0200, Michael Niedermayer encoded:
> On Tue, May 18, 2010 at 12:22:53AM +0200, Stefano Sabatini wrote:
> > On date Monday 2010-05-17 01:10:03 +0200, Michael Niedermayer encoded:
[...]
> > > all these fall under the same kind
> > > the information to store for them is
> > > 8bit/16LE/16BE
> > > the 2 chroma subsample factors (special values for no chroma seem to fit in too)
> > > something to indicate alpha
> >
> > gray16le ->Y[00][16]L
> > gray16be ->Y[00][16]B
> > yuv420p16le ->Y[20][16]L
> > yuv420p16be ->Y[20][16]B
> > yuv422p16le ->Y[22][16]L
> > yuv422p16be ->Y[22][16]B
> > yuv444p16le ->Y[44][16]L
> > yuv444p16be ->Y[44][16]B
> > yuva420p ->Y[00][8]A
> > y400a ->Y[00][8]A
>
> fails for 16bit + alpha
>
>
> >
> > Second scheme:
> > gray16le ->Y3[00][16]
> > gray16be ->Y3[00][61]
> > yuv420p16le ->Y3[20][16]
> > yuv420p16be ->Y3[20][61]
> > yuv422p16le ->Y3[22][16]
> > yuv422p16be ->Y3[22][61]
> > yuv444p16le ->Y3[44][16]
> > yuv444p16be ->Y3[44][61]
> > yuva420p ->Y4[20][ 8]
> > y400a ->Y4[00][ 8]
>
> totally wrong, we need the 2 subsample factors not random
> numbers
> and it should not be mixed by 10*a+b but some power of 2
> and the way be/le is indicated should be the same as is used for rgb and
> in the mov container
Y1 = only Y
Y3 = YUV
Y4 = YUVA
YA = Y+A
The third byte contains the log_2_chroma_w/h values for UV.
The fourth byte is the number of bits used (8, 16, ...).
If the order of bytes is inverted, that means that each component has
to be read big-endian.
gray16le ->Y1[00][16]
gray16be ->[16][00]1Y
yuv420p16le ->Y3[11][16]
yuv420p16be ->[16][11]3Y
yuv422p16le ->Y3[10][16]
yuv422p16be ->[16][10]3Y
yuv444p16le ->Y3[00][16]
yuv444p16be ->[16][00]3Y
yuva420p ->Y4[11][ 8]
y400a ->YA[00][ 8]
Regards.
--
FFmpeg = Fundamentalist Fundamental Magnificient Problematic Energized Gigant
More information about the ffmpeg-devel
mailing list