[vlc-commits] [Git][videolan/vlc][master] avcodec: do not hard-code pix format wrong
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Wed Feb 21 19:10:53 UTC 2024
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
270a9e1d by Rémi Denis-Courmont at 2024-02-21T18:52:39+00:00
avcodec: do not hard-code pix format wrong
This is plain wrong. This is practically wrong because it actually
broke HDR support in VDPAU and it is theoretically wrong because it
requires hard-coding values internal to avcodec, and which vary by
versions at that.
Fixes #28530.
- - - - -
1 changed file:
- modules/codec/avcodec/va.c
Changes:
=====================================
modules/codec/avcodec/va.c
=====================================
@@ -35,69 +35,10 @@ bool vlc_va_MightDecode(enum AVPixelFormat hwfmt, enum AVPixelFormat swfmt)
switch (hwfmt)
{
case AV_PIX_FMT_VAAPI:
- switch (swfmt)
- {
- case AV_PIX_FMT_YUVJ420P:
- case AV_PIX_FMT_YUV420P:
- case AV_PIX_FMT_YUV420P10LE:
- return true;
- default:
- return false;
- }
case AV_PIX_FMT_DXVA2_VLD:
- switch (swfmt)
- {
- case AV_PIX_FMT_YUV420P10LE:
- case AV_PIX_FMT_YUVJ420P:
- case AV_PIX_FMT_YUV420P:
- case AV_PIX_FMT_YUV444P:
- case AV_PIX_FMT_YUV420P12:
- case AV_PIX_FMT_YUV444P10:
- case AV_PIX_FMT_YUV444P12:
- case AV_PIX_FMT_YUV422P10:
- case AV_PIX_FMT_YUV422P12:
- return true;
- default:
- return false;
- }
- break;
-
case AV_PIX_FMT_D3D11VA_VLD:
- switch (swfmt)
- {
- case AV_PIX_FMT_YUV420P10LE:
- case AV_PIX_FMT_YUVJ420P:
- case AV_PIX_FMT_YUV420P:
- case AV_PIX_FMT_YUV444P:
- case AV_PIX_FMT_YUV420P12:
- case AV_PIX_FMT_YUV444P10:
- case AV_PIX_FMT_YUV444P12:
- case AV_PIX_FMT_YUV422P10:
- case AV_PIX_FMT_YUV422P12:
- return true;
- default:
- return false;
- }
- break;
-
case AV_PIX_FMT_VDPAU:
- switch (swfmt)
- {
- case AV_PIX_FMT_YUVJ444P:
- case AV_PIX_FMT_YUV444P:
- case AV_PIX_FMT_YUV444P10:
- case AV_PIX_FMT_YUV444P12:
- case AV_PIX_FMT_YUVJ422P:
- case AV_PIX_FMT_YUV422P:
- case AV_PIX_FMT_YUVJ420P:
- case AV_PIX_FMT_YUV420P:
- case AV_PIX_FMT_YUV420P10:
- case AV_PIX_FMT_YUV420P12:
- return true;
- default:
- return false;
- }
- break;
+ return true;
default:
return false;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/270a9e1d1a39161a599b92871b0fdcf1e122e31b
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/270a9e1d1a39161a599b92871b0fdcf1e122e31b
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list