Realization of H.264_AVC video coding transform quantization kernel

In 2003, the new video compression standard H.264 / MPEG-4 -10AVC, or H.264 / AVC for short, was launched. H.264 / AVC adopts a series of new compression methods [1], which can obtain better compression effect, and its compression rate reaches 1.5 ~ 2 times of the previous standard. Therefore, related research and hardware implementation based on this standard are of great significance. The key to the implementation of video compression hardware is the codec module, of which the coding module is the core. This paper mainly studies the 4 & TImes; 4 integer transform quantization kernel in the coding module, proposes the optimization method of hardware implementation, and uses Verilog HDL language for hardware design and synthesis.

1 4 & TImes; 4 The principle of integer transform quantization kernel

In previous video coding standards such as MPEG-2 and H.263, 8 & TImes; 8 Discrete Cosine Transform (DCT) [1] was used as the basic operation of transform for predicted residual data; while in H.264 / In the AVC coding standard, an integer transformation based on 4 & TImes; 4 pixel blocks, which is similar to the DCT transformation form, is used. As the size of the transform block is reduced, the division of the moving object is more accurate, and the convergence error at the edge of the moving object is greatly reduced.

For integer transformation, the transformation formula [3] of 4 × 4 pixel blocks is:

In the formula, (CXCT) is a two-dimensional transform kernel, Ef is a scaling factor matrix, and the symbol indicates that each element in the CXCT matrix is ​​multiplied by the element at the same position in the Ef matrix, a = 1/2, b =

. In order to compress the data more effectively, it is necessary to use the quantization method to perform lossy compression on the transformed data. At the same time, since the integer transform needs to use the normalization factor of the matrix row vector to perform the coefficient scaling process, in order to reduce the operation amount of the transform, the transformed coefficients are scaled and quantized in the H.264 / AVC standard to avoid complex Real number operation and division operation are more conducive to the realization of hardware.

For the quantization method, the positive vectorization operation can be realized by the following formula [3]:

In the formula, Zij is the coefficient after quantization; Wij is the element in the transformation matrix W = CXCT; MF =

· 2q, PF is called the scaling factor. According to the different positions of the elements in the array block, the values ​​are shown in Table 1. Qstep is the quantization step size, which is determined by a total of 52 quantization parameters QP from 0 to 51. QP increases by 1, Qstep is increased by 12.5%; q = 15 + QP / 6, QP / 6 takes an integer; for intra-frame macroblock f, 2q / 3, and inter-frame macroblock f, 2q / 6. It should be pointed out that the value of MF can be obtained by simple calculation according to the values ​​of PF and QP, and can form a table, which can realize hardware operations by looking up the table, and effectively improve the operation speed.

2 Optimization design of 4 × 4 integer transform quantization kernel

In order to further improve the hardware operation speed and reduce the hardware overhead, the following optimization methods are adopted in the design:

(1) When calculating the transformation matrix W = CXCT, according to the symmetry of the transformation, the column transformation (matrix left multiplication) and the row transformation (matrix right multiplication) of X are implemented separately, and the two-dimensional transformation is divided into two one-dimensional Transform, and use the fast castellation algorithm [4] to achieve. The fast algorithm implementation of the one-dimensional transformation is shown in Figure 1, where the column transformation can be expressed as follows:

For each column transformation, 8 additions and 2 shift operations are required, and row transformation can be based on the nature of matrix transposition ABT = (BAT) T, the result matrix after column transformation is first transposed, and then used The same transformation form operation. In this way, a transformation of 4 × 4 point data can be completed only by 8 × 8 additions and 2 × 8 shift operations.

High Frequency Inverter

High Frequency Inverter,High Frequency Power Inverter,high frequency pure sine wave inverter ,high frequency sine wave inverter

SUZHOU DEVELPOWER ENERGY EQUIPMENT CO.,LTD , https://www.fisoph-power.com