Parameter | Description and Possible Values |
---|---|
RateCtrlMode | Selects the way the bit rate is controlled
Default value: CONST_QP |
BitRate | Target bit rate in Kb/s. Not used when
RateCtrlMode = CONST_QP Default value: 4000 |
MaxBitRate | Target bit rate in Kb/s. Not used when
RateCtrlMode = CONST_QP Default value: 4000 Note: When RateCtrlMode is CBR, MaxBitRate shall be
set to the same value as BitRate.
|
FrameRate | Number of frames per second Default value: 30 |
SliceQP | Quantization parameter. When RateCtrlMode =
CONST_QP the specified QP is applied to all slices. When
RateCtrlMode = CBR the specified QP is used as initial QP. Allowed values: from 0 to 51 Default value: 30 |
MinQP 1 | Minimum QP value allowed. This parameter is
especially useful when using VBR rate control. In VBR rate control
the value AUTO can be used to let the encoder select the MinQP
according to SliceQP. Allowed values: from 0 to SliceQP Default value: 10 |
MaxQP | Maximum QP value allowed. Allowed values: from SliceQP to 51 Default value: 51 |
InitialDelay | Specifies the initial removal delay as specified
in the HRD model, in seconds. Not used when RateCtrlMode =
CONST_QP. Note: If this value is set too low (less
than 1 frame period), you may see reduced visual
quality.
Default value: 1.5 |
CPBSize | Specifies the size of the Coded Picture Buffer as
specified in the HRD model, in seconds. Not used when RateCtrlMode =
CONST_QP. Default value: 3.0 |
IPDelta | Specifies the QP difference between I frames and
P frames. Allowed values: AUTO or positive value (≥ 0) Default value: AUTO |
PBDelta | Specifies the QP difference between P frames and
B frames. Allowed values: AUTO or positive value (≥ 0) Default value: AUTO |
ScnChgResilience | Specifies the scene change resilience handling
during encode process. Improves quality during scene changes. ENABLE, DISABLE, TRUE, FALSE Default value: TRUE |
MaxPictureSize 2 | Maximum frame size allowed in Kb/s. If only
MaxPictureSize is provided, it sets MaxPictureSize for all I, P, and
B frames. To set MaxPictureSize individually, refer
MaxPictureSize.I, MaxPictureSize.P, and MaxPictureSize.B MaxPictureSize = TargetBitrate(in Kbits/s) / FrameRate * AllowedPeakMargin Recommend a 10%AllowedPeakMargin. That is, MaxPictureSize = (100Mb/s / 60 fps) * 1.1 = 1834 Kbits per frame |
EnableSkip | Enabling frameskip feature. available values:
DISABLE, ENABLE, FALSE, TRUE Default value: FALSE |
MaxConsecutiveSkip | Specifies the maximum number of consecutive skipped frames if
EnableSkip is enabled. Default value: 4294967295 |
MaxPictureSize.B | Specifies a coarse size (in Kbits) for B-frame
that should not be exceeded. Default value: DISABLE |
MaxPictureSize.I | Specifies a coarse size (in Kbits) for I-frame
that should not be exceeded. Default value: DISABLE |
MaxPictureSize.P | Specifies a coarse size (in Kbits) for P-frame
that should not be exceeded. Default value: DISABLE |
MaxQuality | Max quality target. Default value: 14.000000 |
|
The CPBSize default value is set to 3 sec in the VCU software (if allowed by the defined encoding level and bit rate parameters), with an option to change this value based on the application requirements. The encoder CBR rate control tries to reach the target bit rate over the period of the GOP length but the main constraint is that it must avoid buffer underflows/overflows as defined by the standard Hypothetical Reference Decoder (HRD) model. A larger CPBSize allows the Encoder rate control to distribute the encoded bits over a larger number of frames so that it can handle larger bit rate variations among consecutive frames and increase video quality. Setting the CPBSize so a smaller value can reduce the bit rate peaks but can also impact the video quality.
- Video recording and storage applications, where instantaneous bit rate fluctuations are unimportant, and can support larger buffering, and should set the CPBSize to larger values (~1s-3s).
- It is recommended to set the CPBSize to a value that is greater than the GOP length duration (for example, for a 60 fps setting, the GOP length could be set to 60 frames and the CPBSize to more than 1s.)
- Applications that require smaller bit rate variations can reduce the CPBSize but it is recommended to set a value larger than ~6 frame periods. It is also recommended in such cases to enable the low-latency rate control mode.
- Low-latency applications should use a "low-delay" GOP type (or intra-only GOP type) and then can reduce the CPBSize down to ~1-2 frame periods.
- For applications that require lower bit-rates like one Mb/s and minimal variation expected in the instantaneous bit-rate, it is recommended to have smaller CPBSize, which makes it easier for the VCU to keep a constant bit-rate. The only reason to scale the CPBSize between very high rates and very low rates is to trade-off quality versus instantaneous bit-rate fluctuations.
- If your use case does bother about instantaneous bit-rate fluctuations (which can cause high CPU usage resulting in dropped frames), then its recommended to increase the CPBSize, which gives the rate algorithm a bit more flexibility to allocate more bits to specific frames, which can improve the quality. For very high bitrates like 100 Mb/s, the quality difference should be negligible, but it might make a difference as the bit-rate decreases.
- Ensure to update InitialDelay whenever you change the CPBSize. InitialDelay can be any value less than or equal to the CPBSize.
- The InitialDelay should have a very minimal effect on the
frame-bits consumption. Xilinx recommends
that you use half of the CPBSize, but for a small CPBSize (approximately 6
frames), set
CPBSize=InitialDelay
. The default InitialDelay parameter is 1.5s (half of the default CPBSize of 3s). - The CPBSize and InitialDelay parameters are generally used to verify the hypothetical reference decoder (HDF) buffer model conformance. The InitialDelay parameter specifies the time at which the first picture data needs to be removed from the buffer. It does not refer to the physical buffers, but it helps in verifying the HRD conformance. For more details, see the H264 standard Annex C.
- It is not recommended to have the CPBSize smaller than 6 frames (approximately). This can result in cases where the bits, allocated to each frame, are not as expected because the algorithm does not have enough frames for adjusting the quantization.