[x265-commits] [x265] rest: improve rate control documentation
Steve Borho
steve at borho.org
Thu Mar 27 23:16:00 CET 2014
details: http://hg.videolan.org/x265/rev/6a139bbaddb8
branches:
changeset: 6614:6a139bbaddb8
user: Steve Borho <steve at borho.org>
date: Thu Mar 27 15:27:04 2014 -0500
description:
rest: improve rate control documentation
Subject: [x265] TComTrQuant: fix compiler warning in debug builds
details: http://hg.videolan.org/x265/rev/0692d586def7
branches:
changeset: 6615:0692d586def7
user: Steve Borho <steve at borho.org>
date: Thu Mar 27 15:28:08 2014 -0500
description:
TComTrQuant: fix compiler warning in debug builds
Subject: [x265] rest: improve --ssim, --psnr, recon, and VUI descriptions
details: http://hg.videolan.org/x265/rev/ec97d22b021c
branches:
changeset: 6616:ec97d22b021c
user: Steve Borho <steve at borho.org>
date: Thu Mar 27 17:14:24 2014 -0500
description:
rest: improve --ssim, --psnr, recon, and VUI descriptions
diffstat:
doc/reST/cli.rst | 125 +++++++++++++++++++++--------------
source/Lib/TLibCommon/TComTrQuant.h | 2 +-
2 files changed, 77 insertions(+), 50 deletions(-)
diffs (256 lines):
diff -r 3c366c8973e0 -r ec97d22b021c doc/reST/cli.rst
--- a/doc/reST/cli.rst Thu Mar 27 14:25:05 2014 -0500
+++ b/doc/reST/cli.rst Thu Mar 27 17:14:24 2014 -0500
@@ -445,26 +445,32 @@ Quality, rate control and rate distortio
.. option:: --bitrate <integer>
- Enables ABR rate control. Specify the target bitrate in kbps.
- Default is 0 (CRF)
+ Enables single-pass ABR rate control. Specify the target bitrate in
+ kbps. Default is 0 (CRF)
**Range of values:** An integer greater than 0
.. option:: --crf <0..51.0>
- Quality-controlled VBR. Default rate factor is 28.0
+ Quality-controlled variable bitrate. CRF is the default rate control
+ method; it does not try to reach any particular bitrate target,
+ instead it tries to achieve a given uniform quality and the size of
+ the bitstream is determined by the complexity of the source video.
+ The higher the rate factor the higher the quantization and the lower
+ the quality. Default rate factor is 28.0.
.. option:: --max-crf <0..51.0>
- Specify an upper limit for which the adaptive rate factor algorithm
- can assign a rate factor for any given frame (ensuring a max QP).
- This is dangerous when CRF is used with VBV as it may result in
- buffer underruns. Default disabled
+ Specify an upper limit to the rate factor which may be assigned to
+ any given frame (ensuring a max QP). This is dangerous when CRF is
+ used in combination with VBV as it may result in buffer underruns.
+ Default disabled
.. option:: --vbv-bufsize <integer>
- Enables VBV in ABR mode. Sets the size of the VBV buffer (kbits).
- Default 0 (disabled)
+ Specify the size of the VBV buffer (kbits). Enables VBV in ABR
+ mode. In CRF mode, :option:`--vbv-maxrate` must also be specified.
+ Default 0 (vbv disabled)
.. option:: --vbv-maxrate <integer>
@@ -474,22 +480,29 @@ Quality, rate control and rate distortio
.. option:: --vbv-init <float>
- Initial VBV buffer occupancy. The portion of the VBV which must be
- full before the decoder will begin decoding. Determines absolute
- maximum frame size. Default 0.9
+ Initial buffer occupancy. The portion of the decode buffer which
+ must be full before the decoder will begin decoding. Determines
+ absolute maximum frame size. Default 0.9
**Range of values:** 0 - 1.0
.. option:: --qp, -q <integer>
- Base Quantization Parameter for Constant QP mode. Using this option
- causes x265 to use Constant QP rate control. Default 0 (CRF)
+ Specify base quantization parameter for Constant QP rate control.
+ Using this option enables Constant QP rate control. The specified QP
+ is assigned to P slices. I and B slices are given QPs relative to P
+ slices using param->rc.ipFactor and param->rc.pbFactor. Default 0
+ (CRF)
**Range of values:** an integer from 0 to 51
.. option:: --aq-mode <0|1|2>
- Adaptive Quantization operating mode.
+ Adaptive Quantization operating mode. Raise or lower per-block
+ quantization based on complexity analysis of the source image. The
+ more complex the block, the more quantization is used. This offsets
+ the tendency of the encoder to spend too many bits on complex areas
+ and not enough in flat areas.
0. disabled
1. AQ enabled **(default)**
@@ -497,39 +510,43 @@ Quality, rate control and rate distortio
.. option:: --aq-strength <float>
- Reduces blocking and blurring in flat and textured areas. Default 1.0
+ Adjust the strength of the adaptive quantization offsets. Setting
+ :option:`--aq-strength` to 0 disables AQ. Default 1.0.
**Range of values:** 0.0 to 3.0
.. option:: --cutree, --no-cutree
Enable the use of lookahead's lowres motion vector fields to
- determine the amount of reuse of each block to tune the quantization
- factors. CU blocks which are heavily reused as motion reference for
- later frames are given a lower QP (more bits) while CU blocks which
- are quickly changed and are not referenced are given less bits. This
- tends to improve detail in the backgrounds of video with less detail
- in areas of high motion. Default enabled
+ determine the amount of reuse of each block to tune adaptive
+ quantization factors. CU blocks which are heavily reused as motion
+ reference for later frames are given a lower QP (more bits) while CU
+ blocks which are quickly changed and are not referenced are given
+ less bits. This tends to improve detail in the backgrounds of video
+ with less detail in areas of high motion. Default enabled
.. option:: --cbqpoffs <integer>
Offset of Cb chroma QP from the luma QP selected by rate control.
- This is a general way to more or less bits to the chroma channel.
- Default 0
+ This is a general way to spend more or less bits on the chroma
+ channel. Default 0
**Range of values:** -12 to 12
.. option:: --crqpoffs <integer>
Offset of Cr chroma QP from the luma QP selected by rate control.
- This is a general way to more or less bits to the chroma channel.
- Default 0
+ This is a general way to spend more or less bits on the chroma
+ channel. Default 0
**Range of values:** -12 to 12
.. option:: --rd <0..6>
- Level of RDO in mode decision. Default 3
+ Level of RDO in mode decision. The higher the value, the more
+ exhaustive the analysis and the more rate distortion optimization is
+ used. The lower the value the faster the encode, the higher the
+ value the smaller the bitstream (in general). Default 3
**Range of values:** 0: least .. 6: full RDO analysis
@@ -568,29 +585,30 @@ Quality reporting metrics
.. option:: --ssim, --no-ssim
- Calculate and report Structural Similarity values. Default disabled
- It is recommended to use :option:`--tune` ssim if you are measuring
- ssim, else the results should not be used for comparison purposes.
+ Calculate and report Structural Similarity values. It is
+ recommended to use :option:`--tune` ssim if you are measuring ssim,
+ else the results should not be used for comparison purposes.
+ Default disabled
.. option:: --psnr, --no-psnr
- Calculate and report Peak Signal to Noise Ratio. Default disabled
- It is recommended to use :option:`--tune` psnr if you are measuring
- PSNR, else the results should not be used for comparison purposes.
+ Calculate and report Peak Signal to Noise Ratio. It is recommended
+ to use :option:`--tune` psnr if you are measuring PSNR, else the
+ results should not be used for comparison purposes. Default
+ disabled
VUI (Video Usability Information) options
=========================================
-By default, no VUI will be emitted by x265. If you enable any of the VUI
-parts (sar or color primitives) the VUI itself is also enabled.
+By default x265 does not emit a VUI in the SPS, but if you specify any
+of the VUI fields (:option:`--sar`, :option:`--range`, etc) the VUI is
+implicitly enabled.
.. option:: --vui, --no-vui
- Enable video usability Information with all fields in the SPS. It is
- generally unnecessary to enable the VUI itself. Enabling any of the
- VUI properties will enable the VUI. This is mostly a debugging
- feature and will likely be removed in a later release. Default
- disabled
+ Enable video usability information with all fields in the SPS. This
+ is a debugging feature and will likely be removed in a later
+ release. Default disabled
.. option:: --sar <integer|w:h>
@@ -618,18 +636,21 @@ parts (sar or color primitives) the VUI
.. option:: --crop-rect <left,top,right,bottom>
- Region of image that does not contain information was added to achieve
- certain resolution or aspect ratio. Default undefined
+ Define the (overscan) region of the image that does not contain
+ information because it was added to achieve certain resolution or
+ aspect ratio. The decoder may be directed to crop away this region
+ before displaying the images via the :option:`--overscan` option.
+ Default undefined
.. option:: --overscan <show|crop>
- Specify whether it is appropriate for the decoder to display the
- overscan area
+ Specify whether it is appropriate for the decoder to display or crop
+ the overscan area. Default unspecified
.. option:: --videoformat <integer|string>
- Specify format of original analog video prior to digitizing and
- encoding. Default undefined
+ Specify the source format of the original analog video prior to
+ digitizing and encoding. Default undefined
0. component
1. pal
@@ -698,10 +719,13 @@ parts (sar or color primitives) the VUI
.. option:: --chromalocs <0..5>
Specify chroma sample location for 4:2:0 inputs. Default undefined
+ Consult the HEVC specification for a description of these values.
.. option:: --timinginfo, --no-timinginfo
- Add timing information (fps, timebase) to the VUI. Default disabled
+ Add timing information to the VUI. This is identical to the timing
+ info reported in the PPS header but is sometimes required. Default
+ disabled
Debugging options
=======================================
@@ -716,14 +740,17 @@ Debugging options
.. option:: --recon, -r <filename>
- Reconstructed image YUV or Y4M output file name
+ Output file containing reconstructed images in display order. If the
+ file extension is ".y4m" the file will contain a YUV4MPEG2 stream
+ header and frame headers. Otherwise it will be a raw YUV file in the
+ encoder's internal bit depth.
**CLI ONLY**
.. option:: --recon-depth <integer>
Bit-depth of output file. This value defaults to the internal bit
- depth and is not currently allowed to be modified.
+ depth and currently cannot to be modified.
**CLI ONLY**
diff -r 3c366c8973e0 -r ec97d22b021c source/Lib/TLibCommon/TComTrQuant.h
--- a/source/Lib/TLibCommon/TComTrQuant.h Thu Mar 27 14:25:05 2014 -0500
+++ b/source/Lib/TLibCommon/TComTrQuant.h Thu Mar 27 17:14:24 2014 -0500
@@ -192,7 +192,7 @@ public:
else
{
result.firstSignificanceMapContext = (ctype ? 12 : 21);
- assert(significanceMapContextSetStart[ctype][CONTEXT_TYPE_NxN] == (ctype ? 12 : 21));
+ assert(significanceMapContextSetStart[ctype][CONTEXT_TYPE_NxN] == (uint32_t)(ctype ? 12 : 21));
}
}
estBitsSbacStruct* m_estBitsSbac;
More information about the x265-commits
mailing list