From patchwork Wed Mar 27 12:51:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhong Li X-Patchwork-Id: 12495 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 13A654475D4 for ; Wed, 27 Mar 2019 14:52:16 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E7B2368A8CC; Wed, 27 Mar 2019 14:52:15 +0200 (EET) 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 0C1A968A15C for ; Wed, 27 Mar 2019 14:52:08 +0200 (EET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2019 05:52:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,276,1549958400"; d="scan'208";a="126295962" Received: from blue-kbl.sh.intel.com ([10.239.13.16]) by orsmga007.jf.intel.com with ESMTP; 27 Mar 2019 05:52:07 -0700 From: Zhong Li To: ffmpeg-devel@ffmpeg.org Date: Wed, 27 Mar 2019 20:51:47 +0800 Message-Id: <20190327125147.21358-4-zhong.li@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190327125147.21358-1-zhong.li@intel.com> References: <20190327125147.21358-1-zhong.li@intel.com> Subject: [FFmpeg-devel] [PATCH 4/4] lavc/qsvenc_h264: remove the privite option trellis 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" There are many problems of current qsv trellis option: 1. Duplicated with AVCodecContext definition 2. MFX_TRELLIS_XXX is introduced by MSDK API 1.17 Currently Without MSDK API checking thus may cause compilation issue. 3. user is inclined to enable trellis when set "-trellis 1", but actually it is to disable since MFX_TRELLIS_OFF is equal to 1. 4. It is too complex for user to enable trellis for every frame(I/P/B). Just simply remove the private option, and switch to the AVCodecContext definition. Compatibility should not a big problem (expect can't exact map) since the option name is same as AVCodecContext. Signed-off-by: Zhong Li --- libavcodec/qsvenc.h | 1 - libavcodec/qsvenc_h264.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h index 3030e4413f..6e50baa783 100644 --- a/libavcodec/qsvenc.h +++ b/libavcodec/qsvenc.h @@ -160,7 +160,6 @@ typedef struct QSVEncContext { int single_sei_nal_unit; int max_dec_frame_buffering; - int trellis; int bitrate_limit; int mbbrc; diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c index 4fea69fb2c..2bf3419d27 100644 --- a/libavcodec/qsvenc_h264.c +++ b/libavcodec/qsvenc_h264.c @@ -132,12 +132,6 @@ static const AVOption options[] = { { "int_ref_qp_delta", "QP difference for the refresh MBs", OFFSET(qsv.int_ref_qp_delta), AV_OPT_TYPE_INT, { .i64 = INT16_MIN }, INT16_MIN, INT16_MAX, VE }, { "recovery_point_sei", "Insert recovery point SEI messages", OFFSET(qsv.recovery_point_sei), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, - { "trellis", "Trellis quantization", OFFSET(qsv.trellis), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, 0, UINT_MAX, VE, "trellis" }, - { "off", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TRELLIS_OFF }, .flags = VE, "trellis" }, - { "I", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TRELLIS_I }, .flags = VE, "trellis" }, - { "P", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TRELLIS_P }, .flags = VE, "trellis" }, - { "B", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TRELLIS_B }, .flags = VE, "trellis" }, - { "profile", NULL, OFFSET(qsv.profile), AV_OPT_TYPE_INT, { .i64 = MFX_PROFILE_UNKNOWN }, 0, INT_MAX, VE, "profile" }, { "unknown" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, VE, "profile" }, { "baseline", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_PROFILE_AVC_BASELINE }, INT_MIN, INT_MAX, VE, "profile" },