From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTP id 477B0431A1
	for <ffmpegdev@gitmailbox.com>; Sat, 23 Jul 2022 18:54:09 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A072468B7D3;
	Sat, 23 Jul 2022 21:53:43 +0300 (EEST)
Received: from mail.overt.org (mail.overt.org [157.230.92.47])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B707768B6AC
 for <ffmpeg-devel@ffmpeg.org>; Sat, 23 Jul 2022 21:53:33 +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 632D53F6BC;
 Sat, 23 Jul 2022 13:53:32 -0500 (CDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=overt.org; s=mail;
 t=1658602412; bh=+yeTzvq5x4FCCYXXaOlWeHJ9uyiGANV7uZ+TnIBnzPo=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=k53G+wNe3Q+zxyO/2ynkglx1Jpwxm0H+Cxr4+u5Uh+x68TW9mfRGRvmGhx09P07pS
 uVnJCfIbpDtj1rfnikY+K/5u7vKM9fDOsINshixv+u+tE45qt4dgj9vVseghwfJskQ
 OQ9TmoQJZfHKGK45Warv1odtBq4KIyAh9GCsMPDrhFNfHJRKqEE7VOmb2xGtuMdq5b
 QP+BPwDcPHftrInFseROdxR+iz70MA5lQh9ogc0JmkMkSQW/0VfGRgDCGu2RtRfcoh
 eSoZh22vs0laygG+JFkNVyHzoqNcL+CFZMv0KWkDyiyTyvfG8bkoTI6h38JqATydKW
 X+j1LqLTXgRLA==
From: Philip Langdale <philipl@overt.org>
To: ffmpeg-devel@ffmpeg.org
Date: Sat, 23 Jul 2022 11:53:15 -0700
Message-Id: <20220723185315.207081-4-philipl@overt.org>
In-Reply-To: <20220723185315.207081-1-philipl@overt.org>
References: <20220723185315.207081-1-philipl@overt.org>
MIME-Version: 1.0
Subject: [FFmpeg-devel] [PATCH 3/3] lavc/vaapi: Declare support for decoding
 8bit 4:4:4 content
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Mark Thompson <sw@jkqxz.net>, Philip Langdale <philipl@overt.org>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/20220723185315.207081-4-philipl@overt.org/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

Now that we have a combination of capable hardware (new enough Intel)
and a mutually understood format ("AYUV"), we can declare support for
decoding 8bit 4:4:4 content via VAAPI.

This requires listing AYUV as a supported format, and then adding VAAPI
as a supported hwaccel for the relevant codecs (HEVC and VP9). I also
had to add VP9Profile1 to the set of supported profiles for VAAPI as it
was never relevant before.
---
 Changelog                 | 1 +
 libavcodec/hevcdec.c      | 3 +++
 libavcodec/vaapi_decode.c | 2 ++
 libavcodec/version.h      | 2 +-
 libavcodec/vp9.c          | 5 +++++
 5 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Changelog b/Changelog
index 92780c9953..a5539d5ec3 100644
--- a/Changelog
+++ b/Changelog
@@ -7,6 +7,7 @@ version <next>:
 - ffmpeg -shortest_buf_duration option
 - ffmpeg now requires threading to be built
 - ffmpeg now runs every muxer in a separate thread
+- VAAPI hwaccel for 8bit 444 HEVC and VP9
 
 
 version 5.1:
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 2d06d09b75..7070ed3f02 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -452,6 +452,9 @@ static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
 #endif
         break;
     case AV_PIX_FMT_YUV444P:
+#if CONFIG_HEVC_VAAPI_HWACCEL
+        *fmt++ = AV_PIX_FMT_VAAPI;
+#endif
 #if CONFIG_HEVC_VDPAU_HWACCEL
         *fmt++ = AV_PIX_FMT_VDPAU;
 #endif
diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
index a7abddb06b..db48efc3ed 100644
--- a/libavcodec/vaapi_decode.c
+++ b/libavcodec/vaapi_decode.c
@@ -267,6 +267,7 @@ static const struct {
     MAP(422V, YUV440P),
     // 4:4:4
     MAP(444P, YUV444P),
+    MAP(AYUV, VUYA),
     // 4:2:0 10-bit
 #ifdef VA_FOURCC_P010
     MAP(P010, P010),
@@ -410,6 +411,7 @@ static const struct {
     MAP(VP9,         VP9_0,           VP9Profile0 ),
 #endif
 #if VA_CHECK_VERSION(0, 39, 0)
+    MAP(VP9,         VP9_1,           VP9Profile1 ),
     MAP(VP9,         VP9_2,           VP9Profile2 ),
 #endif
 #if VA_CHECK_VERSION(1, 8, 0)
diff --git a/libavcodec/version.h b/libavcodec/version.h
index f2f14eaed1..ecdbc51c74 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -30,7 +30,7 @@
 #include "version_major.h"
 
 #define LIBAVCODEC_VERSION_MINOR  39
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 12ec87992c..834fbebb01 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -231,6 +231,11 @@ static int update_size(AVCodecContext *avctx, int w, int h)
 #endif
 #if CONFIG_VP9_VDPAU_HWACCEL
             *fmtp++ = AV_PIX_FMT_VDPAU;
+#endif
+            break;
+        case AV_PIX_FMT_YUV444P:
+#if CONFIG_VP9_VAAPI_HWACCEL
+            *fmtp++ = AV_PIX_FMT_VAAPI;
 #endif
             break;
         }
-- 
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".