All-zero block detection method and system for data coding

By predicting residual feature coefficients to determine all-zero blocks, the video encoding and decoding process is simplified, solving the problem of low detection efficiency of all-zero blocks in the existing technology, and achieving more efficient encoding operations.

CN118764622APending Publication Date: 2024-10-11绍兴市北大信息技术科创中心
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410946822.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

The coding efficiency of the all-zero block detection method in existing video encoding and decoding technology is not high, resulting in high computational complexity and algorithm complexity, which limits its applicability and robustness.

Method used

By calculating the characteristic coefficients of the prediction residual, it is judged whether it is an all-zero block. If it is an all-zero block, the transformation and quantization operations are skipped, and the relationship between the characteristic coefficient and the threshold is used to judge, simplifying the calculation process and reducing the algorithm complexity.

Benefits of technology

It improves the calculation efficiency in the encoding process, provides a more efficient, simple and robust all-zero block detection scheme, and optimizes the encoding and decoding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764622A_ABST
    Figure CN118764622A_ABST
Patent Text Reader

Abstract

The invention provides an all-zero-block detection method and system for data coding, and the method at least comprises the following steps: judging whether all-zero-block detection is started or not according to the hierarchical value of a time domain where a coding unit is located, calculating the feature coefficient of a prediction residual error for each coding unit, obtaining an all-zero-block detection threshold value through a preset method, and determining whether all-zero-block detection is started or not. And judging whether the block is an all-zero block or not according to the characteristic coefficient and the threshold value calculated in the steps.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of image and video data compression processing, in particular to an all-zero block detection method and system for data encoding. Background Art

[0002] In today's digital media field, efficient video coding and decoding technology is the key to improving transmission efficiency and reducing storage costs. For the transformation and quantization stages in video coding and decoding technology, these stages are usually the most computationally intensive parts of the encoding process, and there are significant efficiency issues: a large number of blocks become all-zero blocks after quantization, especially under low bit rate encoding conditions. These all-zero blocks do not actually carry any valid video information, but transformation and quantization operations still need to be performed during the encoding process, which undoubtedly adds unnecessary computational burden.

[0003] Although there are all-zero block detection methods that use advanced technologies such as the sum of absolute differences (SAD) in the time domain, the sum of absolute differences (SATD) in the frequency domain, and machine learning methods, which can reduce the computational complexity and improve the detection performance to a certain extent, the algorithmic complexity introduced by these methods and their high dependence on the statistical characteristics of video sequences greatly limit their applicability and robustness in different scenarios. Summary of the invention

[0004] The present invention aims to solve the problem that the existing all-zero block detection method has low coding efficiency.

[0005] The present invention provides an all-zero block detection method and system for data encoding.

[0006] A method for detecting an all-zero block for data encoding, comprising:

[0007] Step 1: The coding unit generates a predicted image after prediction, obtains a predicted residual according to the predicted image, and the encoder calculates the characteristic coefficient of the predicted residual by the ratio of the predicted residual to the length and width of the predicted image;

[0008] Step 2, considering the characteristic coefficient of the prediction residual as the transformation coefficient after the prediction residual is transformed, quantizing the transformation coefficient, and calculating the threshold value Th when the transformation coefficient becomes 1 after quantization;

[0009] Step 3: determine whether it is an all-zero block based on the relationship between the characteristic coefficient and the threshold Th. If it is an all-zero block, the encoding unit does not perform transformation and quantization operations in the subsequent encoding process.

[0010] Preferably, the quantization process is to quantize the transform coefficients according to the quantization parameters, implicit scaling, offset coefficients and offsets to obtain corresponding quantization coefficients.

[0011] Preferably, the quantization process is to quantize the transform coefficients according to the quantization parameter, the quantization step size and the offset to obtain corresponding quantization coefficients.

[0012] Preferably, the threshold Th is obtained according to the offset, the quantization table corresponding to the quantization parameter and the implicit scaling offset.

[0013] Preferably, the calculation method of the quantization process is: the quantization coefficient is equal to the absolute value of the transform coefficient multiplied by the quantization step size of the corresponding quantization parameter plus 2 偏移量-1 , add the two together and divide by 2 偏移量 The offset is equal to the implicit scaling offset plus 14.

[0014] Preferably, the threshold Th is calculated as follows: the offset is equal to the implicit scaling offset plus 14, according to 2 偏移量-1 The threshold Th is calculated by comparing it with the ratio of the quantization table.

[0015] A full-zero block detection system for data encoding includes: a storage device and a processing device, the storage device is used to store the program of the full-zero block detection method for data encoding, and the processing device is used to implement the full-zero block detection method for data encoding.

[0016] Compared with the prior art, the present invention has the following advantages and effects:

[0017] The present invention utilizes the characteristic that the residual energy after transformation is mainly concentrated in the upper left corner, and uses the calculated characteristic coefficient to represent the maximum value of the transformation coefficient, which simplifies the calculation process, reduces the algorithm complexity, and maintains a high detection accuracy. Compared with the method based on SAD, SATD and machine learning, the method adopted by the present invention provides a more efficient, simpler and more robust all-zero block detection scheme, effectively optimizes the calculation-intensive links in the encoding process, and improves the encoding and decoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0019] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0021] A method for detecting an all-zero block for data encoding, comprising:

[0022] Step 1: prediction is performed for each coding unit. After the current coding unit is predicted, a prediction image is generated. A prediction residual is obtained according to the prediction image. The encoder transforms the prediction residual and calculates the characteristic coefficient by the ratio of the length and width of the prediction residual to the prediction image.

[0023] Step 2, considering the characteristic coefficient of the prediction residual as the transformation coefficient after the prediction residual is transformed, quantizing the absolute value of the transformation coefficient, and calculating the threshold value Th when the transformation coefficient becomes 1 after quantization;

[0024] Step 3: determine whether it is an all-zero block based on the relationship between the characteristic coefficient and the threshold Th. If it is an all-zero block, skip the discrete cosine transform and quantization operations of the subsequent coding units.

[0025] In a specific implementation, in step 1, because the all-zero block detection method itself introduces some complexity and has a certain error rate, it has a greater impact on the video quality at these time domain levels, and the efficiency improvement is not obvious. The present invention determines whether it is necessary to enable all-zero block detection by the time domain level before transform quantization. Preferably, the present invention counts the proportion of all-zero blocks at different time domain levels in AVS3. When the time domain levels are 0, 1 and 2, the proportion of all-zero blocks is less than 60%. Therefore, when the time domain level is greater than 2, all-zero block detection is enabled, otherwise, the transform quantization process is performed.

[0026] In a specific implementation, in step 2, after the prediction of the current coding unit is completed, a predicted image is generated, and the prediction residual can be obtained by subtracting the original image from the predicted image. The video encoder transforms and quantizes the prediction residual to reduce the number of encoding bits.

[0027] In AVS3 transformation, DCT-Ⅱ is usually used to transform the prediction residual. When transforming the length and width of M and N, its two-dimensional DCT can be written in matrix form:

[0028] Y=A N XA M T

[0029] When calculating the characteristic coefficient of the upper left corner, only A is needed. N The first row and A M TThe first column of A N The first row value is A M T The value of the first column is From this we can get the formula for calculating the characteristic coefficient:

[0030]

[0031] Where FC represents the calculated characteristic coefficient, M and N represent the length and width of the predicted image respectively, and x(m,n) represents the residual value at the position (m,n). The calculated characteristic coefficient is used as the feature of the predicted residual transformation to facilitate subsequent comparison. The characteristic coefficient obtained here will be used as the maximum value of the discrete cosine transform in theory for subsequent comparison, so the whole process does not perform discrete cosine transform, but replaces the discrete cosine transform process with a characteristic coefficient.

[0032] In a specific implementation, in step 3, after the prediction residual is transformed, the transform coefficients usually need to be quantized. In AVS3, the quantization formula is:

[0033]

[0034] Among them, QC i Represents the quantization coefficient, TC i represents the transformation coefficient, Shift represents the offset, QT qp Represents the quantization table corresponding to the quantization parameter, and QP stands for quantization parameter (Quantization Parameter).

[0035] The code formula corresponding to the quantitative calculation formula is:

[0036] QuantCoeff i =(Coeff i |×QuantTable qp ×Scale+Offset)>>Shift

[0037] Offset=f×1<<Shift

[0038] Shift=14+ScaleShift

[0039] Among them, QuantCoeff i Expressed as quantization coefficient, Coeff i Expressed as transformation coefficients, QuantTable qpIt is represented by the quantization table corresponding to the quantization parameter (Quantization Parameter, QP), QP represents the quantization parameter, Scale is to compensate for the implicit scaling in the transformation, f represents the offset coefficient; Shift represents the offset, and ScaleShift represents the implicit scaling offset.

[0040] Because it is an all-zero block detection, it can only be judged as 0 when the quantized number is less than 1. The absolute value of the transform coefficient is quantized, 1 is the threshold of the coefficient after quantization, and the threshold Th when it becomes 1 after quantization is the threshold of the transform coefficient.

[0041] The calculation formula of the threshold value Th when the transform coefficient just becomes 1 after quantization is:

[0042]

[0043] Where Th represents the calculated threshold, Shift represents the offset, and QT qp Represents the quantization table corresponding to QP, where QP stands for quantization parameter.

[0044] The code formula corresponding to the threshold Th calculation formula is:

[0045] Th=((1<<(Shift-1))-1) / QuantTable qp +1

[0046] Shift=14+ScaleShift

[0047] Where Th represents the calculated threshold, Shift represents the offset, and QuantTable qp It is represented by the quantization table corresponding to QP, QP is represented by the quantization parameter, and ScaleShift represents the implicit scaling offset.

[0048] In a specific implementation, in step 4, whether it is an all-zero block is determined by the characteristic coefficient calculated in step 2 and the threshold calculated in step 3. When the characteristic coefficient is not greater than the threshold, it means that the current coding unit is determined to be an all-zero block, the transform quantization process is skipped, and the number of non-zero coefficients is set to 0; otherwise, it means that the current coding unit is not an all-zero block, and the transform quantization process continues to be executed.

[0049] A full-zero block detection system for data encoding includes: a storage device and a processing device, the storage device is used to store the program of the full-zero block detection method for data encoding, such as a storage unit, and the processing device is used to implement the full-zero block detection method for data encoding, such as a chip.

[0050] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting all-zero blocks for data encoding, It is characterized in that include: Step 1: The coding unit generates a predicted image after prediction, obtains a predicted residual according to the predicted image, and the encoder calculates the characteristic coefficient of the predicted residual by the ratio of the predicted residual to the length and width of the predicted image; Step 2, considering the characteristic coefficient of the prediction residual as the transformation coefficient after the prediction residual is transformed, quantizing the transformation coefficient, and calculating the threshold value Th when the transformation coefficient becomes 1 after quantization; Step 3: determine whether it is an all-zero block based on the relationship between the characteristic coefficient and the threshold Th. If it is an all-zero block, the encoding unit does not perform transformation and quantization operations in the subsequent encoding process.

2. The all-zero block detection method for data encoding according to claim 1, It is characterized in that The quantization process is to quantize the transform coefficients according to the quantization parameters, quantization step length and offset to obtain corresponding quantization coefficients.

3. The all-zero block detection method for data encoding according to claim 1, It is characterized in that The threshold Th is obtained according to the offset and the quantization table corresponding to the quantization parameter.

4. The all-zero block detection method for data encoding according to claim 2, It is characterized in that The calculation method of the quantization process is: the quantization coefficient is equal to the absolute value of the transform coefficient multiplied by the quantization step size of the corresponding quantization parameter plus 2 偏移量-1 , add the two together and divide by 2 偏移量 .

5. The all-zero block detection method for data encoding according to claim 3, It is characterized in that The threshold Th is calculated as follows: 偏移量-1 The threshold Th is calculated by comparing it with the ratio of the quantization table.

6. An all-zero block detection system for data encoding, It is characterized in that include: A storage device and a processing device, the storage device is used to store the program of the all-zero block detection method for data encoding described in any one of claims 1-5, and the processing device is used to implement the all-zero block detection method for data encoding described in any one of claims 1-5.