[FFmpeg-devel] [PATCH 2/8] swscale: Add swscale input support for Y210

Fu, Linjie linjie.fu at intel.com
Wed Jan 15 07:15:44 EET 2020


> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Carl Eugen Hoyos
> Sent: Tuesday, January 14, 2020 23:55
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH 2/8] swscale: Add swscale input support
> for Y210
> 
> Am Di., 14. Jan. 2020 um 08:25 Uhr schrieb Fu, Linjie <linjie.fu at intel.com>:
> >
> > > -----Original Message-----
> > > From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> > > Carl Eugen Hoyos
> > > Sent: Tuesday, January 14, 2020 12:42
> > > To: FFmpeg development discussions and patches <ffmpeg-
> > > devel at ffmpeg.org>
> > > Subject: Re: [FFmpeg-devel] [PATCH 2/8] swscale: Add swscale input
> support
> > > for Y210
> > >
> > >
> > >
> > > > Am 14.01.2020 um 04:20 schrieb Fu, Linjie <linjie.fu at intel.com>:
> > > >
> > > > Zitierten Inhalt anzeigen
> > > >> -----Original Message-----
> > > >> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf
> Of
> > > >> Carl Eugen Hoyos
> > > >> Sent: Monday, January 13, 2020 00:40
> > > >> To: FFmpeg development discussions and patches <ffmpeg-
> > > >> devel at ffmpeg.org>
> > > >> Subject: Re: [FFmpeg-devel] [PATCH 2/8] swscale: Add swscale input
> > > support
> > > >> for Y210
> > > >>
> > > >>> Am So., 29. Dez. 2019 um 17:40 Uhr schrieb Linjie Fu
> > > <linjie.fu at intel.com>:
> > > >>>
> > > >>> Add swscale input support for Y210, output support and fate
> > > >>> test could be added later if there is requirement for software
> > > >>> CSC to this packed format.
> > > >>>
> > > >>> Signed-off-by: Linjie Fu <linjie.fu at intel.com>
> > > >>> ---
> > > >> format_entries[AV_PIX_FMT_NB] = {
> > > >>>     [AV_PIX_FMT_YUVA444P12LE] = { 1, 1 },
> > > >>>     [AV_PIX_FMT_NV24]        = { 1, 1 },
> > > >>>     [AV_PIX_FMT_NV42]        = { 1, 1 },
> > > >>> +    [AV_PIX_FMT_Y210BE]      = { 1, 0 },
> > > >>> +    [AV_PIX_FMT_Y210LE]      = { 1, 0 },
> > > >>
> > > >> Am I correct that this functions only work on LE because the vaapi
> drivers
> > > >> only exist for LE?
> > > >
> > > >
> > > > The only output from VAAPI driver is Y210LE.
> > >
> > > But does the driver also exist on big-endian hardware? And was your
> > > conversion routine tested on big-endian hardware?
> >
> > As far as I know from media-driver, there is no support on big-endian
> hardware,
> > hence no testing for big endian conversion locally. To avoid any uncertainty,
> we
> > can hold the big-endian support unless it's demanded someday.
> 
> Sorry for being unclear:
> This patch is about libswscale and (by itself) unrelated to vaapi.
> The patch must work on all platforms for which libswscale can be
> compiled, that includes big-endian hardware. It looks to me as if
> the patch will not work correctly (and in this case hopefully break
> fate) on big-endian. If I am correct, the patch can not be committed.
> (I did not test myself and could of course be wrong.)

> I have no strong opinion if it makes sense to add code for
> Y210BE or not, it may even be a possibility to only add
> Y210 (native) which will likely simplify the patch, but I
> fear fate will not like it.

Thanks, I agree this should be verified on big-endian hardware and
should not break fate.
While seeing the behavior of AYUV64LE in 052f64ecb2, one better solution came
to mind:
Add pixel format for both Y210BE and Y210LE,  and only add swscale input support
for Y210LE.
This is what currently AYUV64LE does, and is more friendly to FATE. (Also without
potential issues if Y210BE is going to be added in pixfmt.h in the future)



More information about the ffmpeg-devel mailing list