H.265/HEVC rate control

rate control

The current actual video coding rate-distortion optimization process includes two parts: the rate control part divides the video sequence into coding units, determines the target code rate of each coding unit through code rate allocation technology considering the correlation of coding units, and independently determines the key rate based on the target code rate. Coding parameters - quantization parameters; use Lagrangian optimization to determine other coding parameters (except quantization parameters) for each coding unit

Video transmission bandwidth is usually subject to certain restrictions. In order to effectively transmit video data and ensure the playback quality of video services while meeting the constraints of channel bandwidth and transmission delay, the video encoding process needs to be rate controlled. The so-called rate control is to select a series of encoding parameters so that the bit rate after video encoding meets the required rate limit and the encoding distortion is as small as possible. Rate control belongs to the category of rate-distortion optimization. The focus of the rate control algorithm is to determine the rate-related quantization parameter (Quantization Parameter, QP).

The main work of rate control is to establish the relationship model between coding rate and quantization parameters, and determine the quantization parameters in the video coding parameters according to the target bit rate.

Video encoding rate control
Fundamentals of Rate Control

The actual rate control scheme is usually broken down into two steps:

①Consider the correlation of the video in the spatial and temporal domains, and determine the optimal target number of bits for each coding unit based on the total target number of bits. This is called bit allocation;

② Based on the relationship model between coding rate and quantization parameters, the quantization parameters are independently determined for each coding unit according to its target number of bits.

Buffering mechanism

The encoding rate of video is closely related to many factors such as encoding parameters, encoding structure, and video content. Rate control algorithms usually cannot guarantee that the actual encoding rate is completely consistent with the target rate . In order to reduce the difference between the two, a data buffer area is usually established between the encoder and the transmission channel, called a "buffer mechanism", which is used to smooth the difference between the encoding rate and the channel rate.

Insert image description here

A(n) represents the actual coding rate at time n, u(n) is the channel rate at time n

The basic idea of ​​video encoding rate control using buffers is as follows: if the actual encoding rate is higher than the available channel bandwidth, excess bits accumulate in the buffer. When the number of bits in the buffer accumulates to a certain level, the rate control algorithm will take certain measures to appropriately reduce the actual encoding rate to reduce the buffer fullness; conversely, when the buffer fullness is lower than a certain level, the rate control algorithm The actual encoding rate will be increased appropriately to bring the buffer fullness back to a certain level.

rate control technology

Insert image description here

H.265/HEVC rate control
1. Target bit allocation

The target bit allocation algorithm still uses a hierarchical strategy (GOP level, image level, CTU level) to allocate target bits to different coding units in sequence.

Insert image description here

Insert image description here

2. Determination of quantitative parameters

Insert image description here

Insert image description here

Insert image description here

Guess you like

Origin blog.csdn.net/Aure219/article/details/132039885