mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-19 22:01:00 +00:00
lavc/vaapi: Switch preferred 8bit 444 format to VUYX
As vaapi doesn't actually do anything useful with the alpha channel, and we have an alphaless format available, let's use that instead. The changes here are mostly 1:1 switching, but do note the explicit change in the number of declared channels from 4 to 3 to reflect that the alpha is being ignored.
This commit is contained in:
parent
45726aa117
commit
caf26a8a12
@ -267,7 +267,9 @@ static const struct {
|
||||
MAP(422V, YUV440P),
|
||||
// 4:4:4
|
||||
MAP(444P, YUV444P),
|
||||
MAP(AYUV, VUYA),
|
||||
#ifdef VA_FOURCC_XYUV
|
||||
MAP(XYUV, VUYX),
|
||||
#endif
|
||||
// 4:2:0 10-bit
|
||||
#ifdef VA_FOURCC_P010
|
||||
MAP(P010, P010),
|
||||
|
@ -1308,7 +1308,7 @@ static const VAAPIEncodeRTFormat vaapi_encode_rt_formats[] = {
|
||||
{ "YUV422_10", VA_RT_FORMAT_YUV422_10, 10, 3, 1, 0 },
|
||||
#endif
|
||||
{ "YUV444", VA_RT_FORMAT_YUV444, 8, 3, 0, 0 },
|
||||
{ "AYUV", VA_RT_FORMAT_YUV444, 8, 4, 0, 0 },
|
||||
{ "XYUV", VA_RT_FORMAT_YUV444, 8, 3, 0, 0 },
|
||||
{ "YUV411", VA_RT_FORMAT_YUV411, 8, 3, 2, 0 },
|
||||
#if VA_CHECK_VERSION(0, 38, 1)
|
||||
{ "YUV420_10", VA_RT_FORMAT_YUV420_10BPP, 10, 3, 1, 1 },
|
||||
|
@ -1278,8 +1278,7 @@ static const VAAPIEncodeProfile vaapi_encode_h265_profiles[] = {
|
||||
#if VA_CHECK_VERSION(1, 2, 0)
|
||||
{ FF_PROFILE_HEVC_REXT, 8, 3, 1, 0, VAProfileHEVCMain422_10 },
|
||||
{ FF_PROFILE_HEVC_REXT, 10, 3, 1, 0, VAProfileHEVCMain422_10 },
|
||||
// Four channels because this uses the AYUV format which has Alpha
|
||||
{ FF_PROFILE_HEVC_REXT, 8, 4, 0, 0, VAProfileHEVCMain444 },
|
||||
{ FF_PROFILE_HEVC_REXT, 8, 3, 0, 0, VAProfileHEVCMain444 },
|
||||
#endif
|
||||
{ FF_PROFILE_UNKNOWN }
|
||||
};
|
||||
|
@ -228,8 +228,7 @@ static av_cold int vaapi_encode_vp9_configure(AVCodecContext *avctx)
|
||||
|
||||
static const VAAPIEncodeProfile vaapi_encode_vp9_profiles[] = {
|
||||
{ FF_PROFILE_VP9_0, 8, 3, 1, 1, VAProfileVP9Profile0 },
|
||||
// Four channels because this uses the AYUV format which has Alpha
|
||||
{ FF_PROFILE_VP9_1, 8, 4, 0, 0, VAProfileVP9Profile1 },
|
||||
{ FF_PROFILE_VP9_1, 8, 3, 0, 0, VAProfileVP9Profile1 },
|
||||
{ FF_PROFILE_VP9_2, 10, 3, 1, 1, VAProfileVP9Profile2 },
|
||||
{ FF_PROFILE_UNKNOWN }
|
||||
};
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVCODEC_VERSION_MINOR 42
|
||||
#define LIBAVCODEC_VERSION_MICRO 102
|
||||
#define LIBAVCODEC_VERSION_MICRO 103
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||
LIBAVCODEC_VERSION_MINOR, \
|
||||
|
@ -125,7 +125,9 @@ static const VAAPIFormatDescriptor vaapi_format_map[] = {
|
||||
MAP(411P, YUV411, YUV411P, 0),
|
||||
MAP(422V, YUV422, YUV440P, 0),
|
||||
MAP(444P, YUV444, YUV444P, 0),
|
||||
MAP(AYUV, YUV444, VUYA, 0),
|
||||
#ifdef VA_FOURCC_XYUV
|
||||
MAP(XYUV, YUV444, VUYX, 0),
|
||||
#endif
|
||||
MAP(Y800, YUV400, GRAY8, 0),
|
||||
#ifdef VA_FOURCC_P010
|
||||
MAP(P010, YUV420_10BPP, P010, 0),
|
||||
@ -1009,6 +1011,9 @@ static const struct {
|
||||
#endif
|
||||
DRM_MAP(ARGB, 1, DRM_FORMAT_BGRA8888),
|
||||
DRM_MAP(XRGB, 1, DRM_FORMAT_BGRX8888),
|
||||
#if defined(VA_FOURCC_XYUV) && defined(DRM_FORMAT_XYUV8888)
|
||||
DRM_MAP(XYUV, 1, DRM_FORMAT_XYUV8888),
|
||||
#endif
|
||||
};
|
||||
#undef DRM_MAP
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user