From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 6A54F4025A for ; Sat, 20 Aug 2022 02:15:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E14C568B998; Sat, 20 Aug 2022 05:14:55 +0300 (EEST) Received: from mail.overt.org (mail.overt.org [157.230.92.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 77C6268B67D for ; Sat, 20 Aug 2022 05:14:47 +0300 (EEST) Received: from authenticated-user (mail.overt.org [157.230.92.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mail.overt.org (Postfix) with ESMTPSA id 26E5C3F6B1; Fri, 19 Aug 2022 21:14:46 -0500 (CDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=overt.org; s=mail; t=1660961686; bh=MVyKh7RgkNqE849vTT+jyKd8/KQtRZIFrD3XSaQT2tk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fXFA5jXr8UXFYGfsejBUGfMVecdAZv+A8p8iXb+RQTi8BeAaee+s2jIlMbMnnBgsv d/73SE/cUthAB2gFeiZpaRnFytTRqyqy38boo2CCm4TnuTGPXX+Z1SWxi/VmspAv39 O37e4aXEzU+wjVBjF4IToKuOtOAPgQ2co3Y/uhmMkDBvB5GzsS0+TyzVvgvwvBLhUO 0jqJvXmljrCD+i7RHUP6R3ihvDiK9lTQ4QjcQFgYvraVPqfB7Mo05MbX9/RJ+HNEgm 4DSU/ywof9KR3nLJdlxZLzkpDaaXd/Wq3ya0CSk1w24z8HoT/WHP5grtwmCt1U5Zcx WNERrOrEHaB9Q== From: Philip Langdale To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Aug 2022 19:14:36 -0700 Message-Id: <20220820021436.1224908-4-philipl@overt.org> In-Reply-To: <20220820021436.1224908-1-philipl@overt.org> References: <20220820021436.1224908-1-philipl@overt.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] lavc/vaapi: Switch preferred 8bit 444 format to VUYX X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Philip Langdale Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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 --- 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".