[FFmpeg-devel] [PATCH 1/6] lavu/pixfmt: add new pixel format ayuv/y210/y410

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed Sep 11 23:31:37 EEST 2019


Am Mi., 11. Sept. 2019 um 09:35 Uhr schrieb Hendrik Leppkes
<h.leppkes at gmail.com>:
>
> On Wed, Sep 11, 2019 at 5:20 AM Fu, Linjie <linjie.fu at intel.com> wrote:
> >
> > > -----Original Message-----
> > > From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> > > Of Carl Eugen Hoyos
> > > Sent: Wednesday, September 11, 2019 03:25
> > > To: FFmpeg development discussions and patches <ffmpeg-
> > > devel at ffmpeg.org>
> > > Subject: Re: [FFmpeg-devel] [PATCH 1/6] lavu/pixfmt: add new pixel format
> > > ayuv/y210/y410
> > >
> > > Am Di., 10. Sept. 2019 um 18:08 Uhr schrieb Linjie Fu <linjie.fu at intel.com>:
> > > >
> > > > Add some packed pixel formats for hardware decode support
> > > > in VAAPI and QSV:
> > > >
> > > > 4:2:2 10 bit: Y210
> > > > 4:4:4  8 bit: AYUV
> > > > 4:4:4 10 bit: Y410
> > >
> > > Please add a short explanation (either in the commit message or
> > > only in this thread) for which kind of samples these pixel formats
> > > are needed.
> > >
> > > Or to say it differently: Why is the hardware outputting planar
> > > formats for some samples and packed for others?
> >
> > I kind of remember that it was discussed in previous patch thread:
> > Previously, media driver provided planar format(like 420 8 bit),
> > but for HEVC Range Extension (422/444 8/10 bit), the decoded image
> > is produced in packed format. And the reason is " because Windows
> > expects it" as you have pointed.
> >
> > It could be updated in the commit message if this is good enough.
> >
> > > I see you added LE and BE versions: Why are both needed?
> > > And if they are needed, why is there only AYUV and not AYUV
> > > and VUYA?
> >
> > I noticed LE and BE versions are added for some of the added pixel
> > format, out of the compatibility for big-endian and little-endian(IMHO).
> > And that's the reason I add it for Y210 and Y410.
> >
> > I'm not sure I understood it correctly, LE/BE version is necessary for
> > newly added pixel format right?
> >
>
> It depends on  the definition of the pixel format. AYUV is defined as
> 4 consecutive BYTEs, which means its identical on LE and BE.
> Y210 is defined as being stored as an array of 4 WORDs (Y0, U, Y1, V).
> For a WORD, the difference of LE/BE matters.
> Y410 is defined as being stored as a single DWORD, again LE/BE matters here.
>
> Obviously the differences in LE/BE need to be implemented properly as
> well, for Y210 for each WORD, and for Y410 for the entire DWORD.

I wonder if only the LE variants would be sufficient for the time being.
Or is it (theoretically) possible to use this code on BE?

Carl Eugen


More information about the ffmpeg-devel mailing list