From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 3C8D4403F2 for ; Mon, 24 Jan 2022 03:01:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4A8F268B007; Mon, 24 Jan 2022 05:01:43 +0200 (EET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 940D768AF87 for ; Mon, 24 Jan 2022 05:01:36 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642993301; x=1674529301; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=dT9jy4Ab4Su2P0wgZkbN8CA4SVhhxFAZHitD6QEK2Y4=; b=OTMLWGXd+4AYnfQSuUczU4d5rhQhND9fBW0pKWFRzZe9L4MwfFSx8ZXR qSiqT7kGMHfmU5lTzw4xpPPTpJohXFitJvJIeKYUN6RqFmUKEPVqwZp40 7vkqW8fMS12FUWFIcOB7rlY7zFUqGvGYzGGzcFsDRDhuBxdMvjyazBE16 fSE15kFWhBV49x2L+ErAqlPwHCcnizlSUkHUQCW//MQlO9rKg/fgPJgQ0 VFA/q2ehPfhpYaN2DWgJEEFSsLKbBhXeQmV1pGYhbLDMJbOjkL8hnSPD7 XRqOjnBskinPcLJZFFKJF8xbWjTwmRAZ+Ugyd7/kF9KYwidONPZ8GhxUo w==; X-IronPort-AV: E=McAfee;i="6200,9189,10236"; a="246168123" X-IronPort-AV: E=Sophos;i="5.88,311,1635231600"; d="scan'208";a="246168123" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2022 19:01:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,311,1635231600"; d="scan'208";a="673480633" Received: from chenwenbin-z390-aorus-ultra.sh.intel.com ([10.239.35.110]) by fmsmga001.fm.intel.com with ESMTP; 23 Jan 2022 19:01:33 -0800 From: Wenbin Chen To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jan 2022 10:59:53 +0800 Message-Id: <20220124025955.204168-1-wenbin.chen@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] libavcodec/qsvenc: Add max slice size support to hevc_qsv X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Add max_slice_size option to hevc_qsv as well. Signed-off-by: Wenbin Chen --- doc/encoders.texi | 3 +++ libavcodec/qsvenc.c | 9 ++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index e3adbf4325..8966610263 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -3397,6 +3397,9 @@ Enable rate distortion optimization. @item @var{max_frame_size} Maximum encoded frame size in bytes. +@item @var{max_slice_size} +Maximum encoded slice size in bytes. + @item @var{p_strategy} Enable P-pyramid: 0-default 1-simple 2-pyramid(bf need to be set to 0). diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 413e5ae8f6..f311cd9ce4 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -877,11 +877,6 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) if (q->mbbrc >= 0) q->extco2.MBBRC = q->mbbrc ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF; -#if QSV_HAVE_MAX_SLICE_SIZE - if (q->max_slice_size >= 0) - q->extco2.MaxSliceSize = q->max_slice_size; -#endif - #if QSV_HAVE_TRELLIS if (avctx->trellis >= 0) q->extco2.Trellis = (avctx->trellis == 0) ? MFX_TRELLIS_OFF : (MFX_TRELLIS_I | MFX_TRELLIS_P | MFX_TRELLIS_B); @@ -907,6 +902,10 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) q->extco2.ExtBRC = q->extbrc ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF; if (q->max_frame_size >= 0) q->extco2.MaxFrameSize = q->max_frame_size; +#if QSV_HAVE_MAX_SLICE_SIZE + if (q->max_slice_size >= 0) + q->extco2.MaxSliceSize = q->max_slice_size; +#endif #if QSV_HAVE_DISABLEDEBLOCKIDC q->extco2.DisableDeblockingIdc = q->dblk_idc; #endif -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".