From patchwork Thu Jan 6 03:00:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chen, Wenbin" X-Patchwork-Id: 33110 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp1284387iog; Wed, 5 Jan 2022 19:01:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfm8JgpM2ayujQfwKJReDyNLJ1iaBpMnwYp6ycobL0rml3YXLA1IIq3Eb4Pnx9A69ctGwh X-Received: by 2002:a50:fb03:: with SMTP id d3mr54598605edq.123.1641438066870; Wed, 05 Jan 2022 19:01:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641438066; cv=none; d=google.com; s=arc-20160816; b=v2WikhBxEvNow65Da9vNrSTW6Lfh6QiPxaEf1Z4ChiVFnaEKDEIHX81Lv2V6rzD4fZ 4K/OBnzxDKqfy0O9r1ptOCAgIkdP4M6mEFxU9JsNM91MsghKTgjD7hAj8wmYypL+aq8z 1KVDjOI4cfa+LZ7Z4uNYNRwKdADDZwpDPKkMqWzG3MNh3ysry2e5m3t8dn1E57NAKfAS f1Qeliaq9Mizuk35vffBzqLqrRYfUqo6ZDLv8UImEaeP5uca/ggYVCsSNznfOb9Yvq/L xHaE6p2esa3Wgbr32eWnyY5cnhwHchxlt92augrmwITxO1xNq72rmKG5B8C3GW0h7Z9M WnIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=GKZJ2OYuUnm7iMtwxJI9QRr2Gqvq6K7Y6J/cnMM4VeQ=; b=CguXdgp3Gs90KvGtpz5i/t/Lkz72iGiLEaLiw92Bd9UWTKDoVh6g9htBct47Caq0/3 BGpqINiVBCqKwVj7R033v7EQkOFHZiHFU6Af5uJNPDoa3gQDnrg9iz74VnnQAXJQg80/ UjqJqYyX27EHdSMiUo3qUbDsUWDiD6FGJmg4Sp4KMlnkjyf+pNUr2kJYYj6q/nXdbP9O SMTmEPtCrIFsx4S+srDUR6em179eR5AP6mhSGN/6/lImNdhMqD3YoMFphJiU810E+zex oaT+2nG3z2ItxcXMScKuvfR1Ck6S9om8O0xNIRvsD99eXwrTH6tPVcFdeSnVeVlYaaB7 YvbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=OQdHPLb1; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id r2si424090edo.333.2022.01.05.19.01.03; Wed, 05 Jan 2022 19:01:06 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=OQdHPLb1; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C83A468AE25; Thu, 6 Jan 2022 05:00:59 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 11D7C680394 for ; Thu, 6 Jan 2022 05:00:52 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641438058; x=1672974058; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=owF+JOc3WnwKotk/pMZr7JYzsx7ELCvJ8bCApGeqxMU=; b=OQdHPLb1M6dXAaQ/+WpDEAmWJ02P0nosypC5RAR2ztniMosh0m63eQ7l cjVU69BwuDH/SsXiN3e6ChmP8NzNtBjqV1t9hB1n1FvDGVIE+8gKEPnIS tNLLS1kqVoP/JGsu3m9DrVD6sOqf+LMGL6DI5JWRrS4IQ5gOOBwz1T4dv SwJXVyemhg7A8FDVJfb/JdBU3SV0Jbd0s71KbhWl8QyNFCuODUnz1qJNU RmM/+aiyXEeJZlQm4uelNsImC0qriu8TYnHEAmzw8srytPzu6LgUYRnur p3Erv9/BsuOmvLOz0gCE1RNZcCc9AYJaZPqlmTVVIINinN6QvdenuXLp9 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10217"; a="242785946" X-IronPort-AV: E=Sophos;i="5.88,265,1635231600"; d="scan'208";a="242785946" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2022 19:00:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,265,1635231600"; d="scan'208";a="513245279" Received: from chenwenbin-z390-aorus-ultra.sh.intel.com ([10.239.35.110]) by orsmga007.jf.intel.com with ESMTP; 05 Jan 2022 19:00:49 -0800 From: Wenbin Chen To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Jan 2022 11:00:40 +0800 Message-Id: <20220106030040.781111-1-wenbin.chen@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH V2] doc/encoders.texi: Add doc for 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: aArANV/auQKZ Add doc for qsv decoder. Add more option's introduction to qsv encoder. Signed-off-by: Wenbin Chen --- doc/decoders.texi | 42 ++++++++ doc/encoders.texi | 253 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 292 insertions(+), 3 deletions(-) diff --git a/doc/decoders.texi b/doc/decoders.texi index 49ab735dce..de2429abba 100644 --- a/doc/decoders.texi +++ b/doc/decoders.texi @@ -126,6 +126,48 @@ Set amount of frame threads to use during decoding. The default value is 0 (auto @end table +@section QSV Decoders + +The family of Intel QuickSync Video decoders (VC1, MPEG-2, H.264, HEVC, +JPEG/MJPEG, VP8, VP9, AV1). + +@subsection Common Options + +The following options are supported by all qsv decoders. + +@table @option + +@item @var{async_depth} +Internal parallelization depth, the higher the value the higher the latency. + +@item @var{gpu_copy} +A GPU-accelerated copy between video and system memory +@table @samp +@item default +@item on +@item off +@end table + +@end table + +@subsection HEVC Options +Extra options for hevc_qsv. + +@table @option + +@item @var{load_plugin} +A user plugin to load in an internal session +@table @samp +@item none +@item hevc_sw +@item hevc_hw +@end table + +@item @var{load_plugins} +A :-separate list of hexadecimal plugin UIDs to load in an internal session + +@end table + @c man end VIDEO DECODERS @chapter Audio Decoders diff --git a/doc/encoders.texi b/doc/encoders.texi index e3b61de5a1..7cc8be1209 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -3123,12 +3123,13 @@ Setting a higher @option{bits_per_mb} limit will improve the speed. For the fastest encoding speed set the @option{qscale} parameter (4 is the recommended value) and do not set a size constraint. -@section QSV encoders +@section QSV Encoders -The family of Intel QuickSync Video encoders (MPEG-2, H.264, HEVC, JPEG/MJPEG and VP9) +The family of Intel QuickSync Video encoders (MPEG-2, H.264, HEVC, JPEG/MJPEG +and VP9) +@subsection Ratecontrol Method The ratecontrol method is selected as follows: - @itemize @bullet @item When @option{global_quality} is specified, a quality-based mode is used. @@ -3176,6 +3177,7 @@ Note that depending on your system, a different mode than the one you specified may be selected by the encoder. Set the verbosity level to @var{verbose} or higher to see the actual settings used by the QSV runtime. +@subsection Global Options -> MSDK Options Additional libavcodec global options are mapped to MSDK options as follows: @itemize @@ -3212,6 +3214,251 @@ encoder use CAVLC instead of CABAC. @end itemize +@subsection Common Options +Following options are used by all qsv encoders. + +@table @option +@item @var{async_depth} +Specifies how many asynchronous operations an application performs +before the application explicitly synchronizes the result. If zero, +the value is not specified. + +@item @var{avbr_accuracy} +Accuracy of the AVBR ratecontrol (unit of tenth of percent). + +@item @var{avbr_convergence} +Convergence of the AVBR ratecontrol (unit of 100 frames) + +The parameters @var{avbr_accuracy} and @var{avbr_convergence} are for the +average variable bitrate control (AVBR) algorithm. +The algorithm focuses on overall encoding quality while meeting the specified +bitrate, @var{target_bitrate}, within the accuracy range @var{avbr_accuracy}, +after a @var{avbr_Convergence} period. This method does not follow HRD and the +instant bitrate is not capped or padded. + +@item @var{preset} +This option itemizes a range of choices from veryfast (best speed) to veryslow +(best quality). +@table @samp +@item veryfast +@item faster +@item fast +@item medium +@item slow +@item slower +@item veryslow +@end table + +@item @var{forced_idr} +Forcing I frames as IDR frames. + +@item @var{low_power} +For encoders set this flag to ON to reduce power consumption and GPU usage. +@end table + +@subsection H264 options +These options are used by h264_qsv + +@table @option +@item @var{extbrc} +Extended bitrate control. + +@item @var{recovery_point_sei} +Set this flag to insert the recovery point SEI message at the beginning of every +intra refresh cycle. + +@item @var{rdo} +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{bitrate_limit} +Toggle bitrate limitations. +Modifies bitrate to be in the range imposed by the QSV encoder. Setting this +flag off may lead to violation of HRD conformance. Mind that specifying bitrate +below the QSV encoder range might significantly affect quality. If on this +option takes effect in non CQP modes: if bitrate is not in the range imposed +by the QSV encoder, it will be changed to be in the range. + +@item @var{mbbrc} +Setting this flag enables macroblock level bitrate control that generally +improves subjective visual quality. Enabling this flag may have negative impact +on performance and objective visual quality metric. + +@item @var{adaptive_i} +This flag controls insertion of I frames by the QSV encoder. Turn ON this flag +to allow changing of frame type from P and B to I. + +@item @var{adaptive_b} +This flag controls changing of frame type from B to P. + +@item @var{b_strategy} +This option controls usage of B frames as reference. + +@item @var{cavlc} +If set, CAVLC is used; if unset, CABAC is used for encoding. + +@item @var{vcm} +Video conferencing mode, please see ratecontrol method. + +@item @var{idr_interval} +Distance (in I-frames) between IDR frames. + +@item @var{pic_timing_sei} +Insert picture timing SEI with pic_struct_syntax element. + +@item @var{single_sei_nal_unit} +Put all the SEI messages into one NALU. + +@item @var{max_dec_frame_buffering} +Maximum number of frames buffered in the DPB. + +@item @var{look_ahead} +Use VBR algorithm with look ahead. + +@item @var{look_ahead_depth} +Depth of look ahead in number frames. + +@item @var{look_ahead_downsampling} +Downscaling factor for the frames saved for the lookahead analysis. +@table @samp +@item unknown +@item auto +@item off +@item 2x +@item 4x +@end table + +@item @var{int_ref_type} +Specifies intra refresh type. The major goal of intra refresh is improvement of +error resilience without significant impact on encoded bitstream size caused by +I frames. The SDK encoder achieves this by encoding part of each frame in +refresh cycle using intra MBs. @var{none} means no refresh. @var{vertical} means +vertical refresh, by column of MBs. + +@item @var{int_ref_cycle_size} +Specifies number of pictures within refresh cycle starting from 2. 0 and 1 are +invalid values. + +@item @var{int_ref_qp_delta} +Specifies QP difference for inserted intra MBs. This is signed value in +[-51, 51] range if target encoding bit-depth for luma samples is 8 and this +range is [-63, 63] for 10 bit-depth or [-75, 75] for 12 bit-depth respectively. + +@item @var{profile} +@table @samp +@item unknown +@item baseline +@item main +@item high +@end table + +@item @var{a53cc} +Use A53 Closed Captions (if available). + +@item @var{aud} +Insert the Access Unit Delimiter NAL. + +@item @var{mfmode} +Multi-Frame Mode. +@table @samp +@item off +@item auto +@end table + +@item @var{repeat_pps} +Repeat pps for every frame. +@end table + +@subsection HEVC Options +These options are used by hevc_qsv + +@table @option +@item @var{extbrc} +Extended bitrate control. + +@item @var{recovery_point_sei} +Set this flag to insert the recovery point SEI message at the beginning of every +intra refresh cycle. + +@item @var{rdo} +Enable rate distortion optimization. + +@item @var{idr_interval} +Distance (in I-frames) between IDR frames. +@table @samp +@item begin_only +Output an IDR-frame only at the beginning of the stream. +@end table + +@item @var{load_plugin} +A user plugin to load in an internal session. +@table @samp +@item none +@item hevc_sw +@item hevc_hw +@end table + +@item @var{load_plugins} +A :-separate list of hexadecimal plugin UIDs to load in +an internal session. + +@item @var{look_ahead_depth} +Depth of look ahead in number frames, available when extbrc option is enabled. + +@item @var{profile} +@table @samp +@item unknown +@item main +@item main10 +@item mainsp +@item rext +@end table + +@item @var{gpb} +1: GPB (generalized P/B frame) + +0: regular P frame. + +@item @var{tile_cols} +Number of columns for tiled encoding. + +@item @var{tile_rows} +Number of rows for tiled encoding. + +@item @var{aud} +Insert the Access Unit Delimiter NAL. +@end table + +@subsection MPEG2 Options +These options are used by mpeg2_qsv +@table @option +@item @var{profile} +@table @samp +@item unknown +@item simple +@item main +@item high +@end table +@end table + +@subsection VP9 Options +These options are used by vp9_qsv +@table @option +@item @var{profile} +@table @samp +@item unknown +@item profile0 +@item profile1 +@item profile2 +@item profile3 +@end table +@end table + @section snow @subsection Options