[vlc-devel] [PATCH] vaapi: add YUVJ420P pixfmt
Steve Lhomme
robux4 at ycbcr.xyz
Thu Oct 17 12:24:37 CEST 2019
Hi,
I see what you mean. I think it comes from this code:
https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/h264_slice.c#L832
That's the software fallback that will be used if we don't use hardware
decoding. But that's also the format we use in VLC to check the source
format and can tell if we can support hardware acceleration for this chroma.
So your patch is probably correct. It should also be extended to
DXVA2/D3D11VA as the chroma is also used for those.
I'll merge your patch and do the DXVA ones and check for other similar
cases.
Thanks a lot.
On 2019-10-17 11:10, Mathieu Velten wrote:
> Hi,
>
> It fixes HW playback of my phone videos (Google Pixel 3).
> I couldn't find this constant in VLC MP4 parser code either, my guess is
> that is is converted from the fourcc. It is deprecated in ffmpeg headers
> so I guess that on this side it just treats YUVJ420P and YUV420P exactly
> the same, and probably convert one to the other before it hits the vaapi
> code.
> Here is a sample:
> https://photos.app.goo.gl/wZ8PsRKzp4HirS9S9
>
> Mathieu
>
>
> Le jeu. 17 oct. 2019 à 08:07, Steve Lhomme <robux4 at ycbcr.xyz
> <mailto:robux4 at ycbcr.xyz>> a écrit :
>
> Hi,
>
> Looking at the ffmpeg code I see no reference to AV_PIX_FMT_YUVJ420P in
> the VAAPI code. What does this patch do ?
>
> You can find the list of output supported by ffmpeg here:
> https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/vaapi_decode.c#L237
>
> Notice there is no YUVJ420P and I couldn't see anywhere it changed from
> YUV420P when the source is full range.
>
> On 2019-10-17 0:36, Mathieu Velten wrote:
> > ---
> > modules/codec/avcodec/va.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c
> > index 7d4660012e..05831232d2 100644
> > --- a/modules/codec/avcodec/va.c
> > +++ b/modules/codec/avcodec/va.c
> > @@ -40,6 +40,7 @@ vlc_fourcc_t vlc_va_GetChroma(enum PixelFormat
> hwfmt, enum PixelFormat swfmt)
> > case AV_PIX_FMT_VAAPI_VLD:
> > switch (swfmt)
> > {
> > + case AV_PIX_FMT_YUVJ420P:
> > case AV_PIX_FMT_YUV420P:
> > return VLC_CODEC_VAAPI_420;
> > case AV_PIX_FMT_YUV420P10LE:
> > --
> > 2.21.0
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> >
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
More information about the vlc-devel
mailing list