From patchwork Sun Sep 29 10:21:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhong Li X-Patchwork-Id: 15382 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 E1FF144800A for ; Sun, 29 Sep 2019 13:21:34 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C4681689BF4; Sun, 29 Sep 2019 13:21:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7D8E96881EE for ; Sun, 29 Sep 2019 13:21:27 +0300 (EEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Sep 2019 03:21:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,562,1559545200"; d="scan'208";a="390511766" Received: from media_ffmpeg_skl_e3.sh.intel.com ([10.239.159.38]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2019 03:21:25 -0700 From: Zhong Li To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Sep 2019 18:21:56 +0800 Message-Id: <1569752516-6274-2-git-send-email-zhong.li@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1569752516-6274-1-git-send-email-zhong.li@intel.com> References: <1569752516-6274-1-git-send-email-zhong.li@intel.com> Subject: [FFmpeg-devel] [PATCH 2/2] lavc/qsv: force internal allocator for MFX_FOURCC_VP9_SEGMAP surface 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: Zhong Li , Haihao Xiang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Return MFX_ERR_UNSUPPORTED for MFX_FOURCC_VP9_SEGMAP to force internal allocator. See https://github.com/Intel-Media-SDK/MediaSDK/issues/762 for more detail Signed-off-by: Zhong Li Signed-off-by: Haihao Xiang --- libavcodec/qsv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 994c9eb..3608c3e 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -576,6 +576,16 @@ static mfxStatus qsv_frame_alloc(mfxHDL pthis, mfxFrameAllocRequest *req, return MFX_ERR_MEMORY_ALLOC; } } else if (req->Type & MFX_MEMTYPE_INTERNAL_FRAME) { + /* MFX_MAKEFOURCC('V','P','8','S') is used for MFX_FOURCC_VP9_SEGMAP surface + * in MSDK and this surface is an internal surface. The external allocator + * shouldn't be used for this surface allocation. + * Return UNSUPPORTED and force MSDK allocates surface using the internal allocator + * + * See https://github.com/Intel-Media-SDK/MediaSDK/issues/762 + */ + if (req->Info.FourCC == MFX_MAKEFOURCC ('V', 'P', '8', 'S')) { + return MFX_ERR_UNSUPPORTED; + } /* internal frames -- allocate a new hw frames context */ AVHWFramesContext *ext_frames_ctx = (AVHWFramesContext*)ctx->hw_frames_ctx->data; mfxFrameInfo *i = &req->Info;