From patchwork Wed Sep 11 05:39:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zachary Zhou X-Patchwork-Id: 15017 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 4BCD8447F86 for ; Wed, 11 Sep 2019 08:40:48 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2DA87687F85; Wed, 11 Sep 2019 08:40:48 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C14BA687F4B for ; Wed, 11 Sep 2019 08:40:41 +0300 (EEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 22:40:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,492,1559545200"; d="scan'208";a="175544376" Received: from u18-kbl-zz.sh.intel.com ([10.239.159.34]) by orsmga007.jf.intel.com with ESMTP; 10 Sep 2019 22:40:39 -0700 From: Zachary Zhou To: ffmpeg-devel@ffmpeg.org Date: Wed, 11 Sep 2019 13:39:55 +0800 Message-Id: <20190911053956.23488-1-zachary.zhou@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH v4 1/2] libavuitl: add A2R10G10B10 & A2B10G10R10 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: zachary.zhou@intel.com MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavutil/hwcontext_vaapi.c | 6 ++++++ libavutil/pixfmt.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index cf117640f2..9838250b66 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -125,6 +125,12 @@ static const VAAPIFormatDescriptor vaapi_format_map[] = { #endif MAP(BGRA, RGB32, BGRA, 0), MAP(BGRX, RGB32, BGR0, 0), +#ifdef VA_FOURCC_A2R10G10B10 + MAP(A2R10G10B10, RGB32_10, A2R10G10B10, 0), +#endif +#ifdef VA_FOURCC_A2B10G10R10 + MAP(A2B10G10R10, RGB32_10, A2B10G10R10, 0), +#endif MAP(RGBA, RGB32, RGBA, 0), MAP(RGBX, RGB32, RGB0, 0), #ifdef VA_FOURCC_ABGR diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index d78e863d4b..e00f129b46 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -348,6 +348,9 @@ enum AVPixelFormat { AV_PIX_FMT_NV24, ///< planar YUV 4:4:4, 24bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V) AV_PIX_FMT_NV42, ///< as above, but U and V bytes are swapped + AV_PIX_FMT_A2R10G10B10, ///< 10-bit Pixel RGB formats. + AV_PIX_FMT_A2B10G10R10, ///< 10-bit Pixel BGR formats. + AV_PIX_FMT_NB ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions };