From patchwork Tue Sep 10 16:07:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fu, Linjie" X-Patchwork-Id: 15008 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 648ED448843 for ; Tue, 10 Sep 2019 19:10:27 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4D8EF688122; Tue, 10 Sep 2019 19:10:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8866A68015C for ; Tue, 10 Sep 2019 19:10:19 +0300 (EEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 09:10:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,490,1559545200"; d="scan'208";a="200314402" Received: from icl-dev.sh.intel.com ([10.239.158.73]) by fmsmga001.fm.intel.com with ESMTP; 10 Sep 2019 09:10:16 -0700 From: Linjie Fu To: ffmpeg-devel@ffmpeg.org Date: Wed, 11 Sep 2019 00:07:55 +0800 Message-Id: <1568131675-19726-1-git-send-email-linjie.fu@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [FFmpeg-devel] [PATCH 4/6] lavu/hwcontext_vaapi: add vaapi_format_map support for AYUV/Y210/Y410 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Linjie Fu MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" There is no VA_RT_FORMAT_AYUV in defined in libva, and currently in media-driver, VA_FOURCC_AYUV is used to represent VA_RT_FORMAT_AYUV. Another patch could be sent to refine the code after this issue is addressed: https://github.com/intel/libva/issues/335 Signed-off-by: Linjie Fu --- libavutil/hwcontext_vaapi.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index cf11764..724bbeb 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -116,6 +116,15 @@ static const VAAPIFormatDescriptor vaapi_format_map[] = { #endif MAP(UYVY, YUV422, UYVY422, 0), MAP(YUY2, YUV422, YUYV422, 0), +#ifdef VA_FOURCC_Y210 + MAP(Y210, YUV422_10,Y210, 0), +#endif +#define VA_RT_FORMAT_AYUV VA_FOURCC_AYUV + MAP(AYUV, AYUV, AYUV, 0), +#undef VA_RT_FORMAT_AYUV +#ifdef VA_FOURCC_Y410 + MAP(Y410, YUV444_10,Y410, 0), +#endif MAP(411P, YUV411, YUV411P, 0), MAP(422V, YUV422, YUV440P, 0), MAP(444P, YUV444, YUV444P, 0),