From: Philip Langdale <philipl@overt.org> To: ffmpeg-devel@ffmpeg.org Cc: Philip Langdale <philipl@overt.org> Subject: [FFmpeg-devel] [PATCH 3/3] lavc/vaapi: Switch preferred 8bit 444 format to VUYX Date: Fri, 19 Aug 2022 18:24:04 -0700 Message-ID: <20220820012404.932086-4-philipl@overt.org> (raw) In-Reply-To: <20220820012404.932086-1-philipl@overt.org> 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. Signed-off-by: Philip Langdale <philipl@overt.org> --- libavcodec/vaapi_decode.c | 4 +++- libavcodec/vaapi_encode.c | 2 +- libavcodec/vaapi_encode_h265.c | 3 +-- libavcodec/vaapi_encode_vp9.c | 3 +-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c index bc2d3ed803..8c13a4f098 100644 --- a/libavcodec/vaapi_decode.c +++ b/libavcodec/vaapi_decode.c @@ -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), diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index f13daa5cff..2dc5c96f7b 100644 --- a/libavcodec/vaapi_encode.c +++ b/libavcodec/vaapi_encode.c @@ -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 }, diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c index 1de323af78..967d71e998 100644 --- a/libavcodec/vaapi_encode_h265.c +++ b/libavcodec/vaapi_encode_h265.c @@ -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 } }; diff --git a/libavcodec/vaapi_encode_vp9.c b/libavcodec/vaapi_encode_vp9.c index 9b455e10c9..9530b2f462 100644 --- a/libavcodec/vaapi_encode_vp9.c +++ b/libavcodec/vaapi_encode_vp9.c @@ -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 } }; -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-08-20 1:24 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-20 1:24 [FFmpeg-devel] [PATCH 0/3] vaapi: switch " Philip Langdale 2022-08-20 1:24 ` [FFmpeg-devel] [PATCH 1/3] lavu/pixfmt: Introduce VUYX format Philip Langdale 2022-08-20 1:24 ` [FFmpeg-devel] [PATCH 2/3] libswscale: add support for " Philip Langdale 2022-08-20 1:37 ` James Almer 2022-08-20 2:15 ` Philip Langdale 2022-08-20 1:24 ` Philip Langdale [this message] 2022-08-20 2:14 [FFmpeg-devel] [PATCH 0/3] v2: vaapi: switch 8bit 444 format to VUYX Philip Langdale 2022-08-20 2:14 ` [FFmpeg-devel] [PATCH 3/3] lavc/vaapi: Switch preferred " Philip Langdale 2022-08-20 4:31 [FFmpeg-devel] [PATCH 0/3] v2: vaapi: switch " Philip Langdale 2022-08-20 4:31 ` [FFmpeg-devel] [PATCH 3/3] lavc/vaapi: Switch preferred " Philip Langdale
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220820012404.932086-4-philipl@overt.org \ --to=philipl@overt.org \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git