From patchwork Tue Apr 2 08:00:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhong Li X-Patchwork-Id: 12590 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 2C767448016 for ; Tue, 2 Apr 2019 18:15:42 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0E65768AC90; Tue, 2 Apr 2019 18:15:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2B1F868AAF7 for ; Tue, 2 Apr 2019 18:15:34 +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 orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Apr 2019 08:15:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,301,1549958400"; d="scan'208";a="334301720" Received: from blue-kbl.sh.intel.com ([10.239.13.16]) by fmsmga005.fm.intel.com with ESMTP; 02 Apr 2019 08:15:30 -0700 From: Zhong Li To: ffmpeg-devel@ffmpeg.org Date: Tue, 2 Apr 2019 16:00:11 +0800 Message-Id: <20190402080012.17786-1-zhong.li@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH 1/2] lavc/qsvenc: enable hevc coding options configuration 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Zhong Li --- libavcodec/qsvenc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index e76c580b4a..55f1223f02 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -629,9 +629,10 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) #endif } - // the HEVC encoder plugin currently fails if coding options - // are provided - if (avctx->codec_id != AV_CODEC_ID_HEVC) { + // The HEVC encoder plugin currently fails with some old libmfx version if coding options + // are provided. Can't find the extract libmfx version which fixed it, just enable it from + // V1.28 in order to keep compatibility security. + if ((avctx->codec_id != AV_CODEC_ID_HEVC) || QSV_RUNTIME_VERSION_ATLEAST(q->ver, 1, 28)) { q->extco.Header.BufferId = MFX_EXTBUFF_CODING_OPTION; q->extco.Header.BufferSz = sizeof(q->extco);