Rate-distortion optimization quantization method, system, device and storage medium for video coding

By using fixed values ​​to replace some bit consumption estimation steps in the rate-distortion optimization quantization process of video coding, the entropy coding bit estimation is simplified, the problem of long time consumption of rate-distortion optimization quantization is solved, and efficient video coding is achieved.

CN116962700BActive Publication Date: 2025-09-05PENINSULA INFORMATION TECH INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310797042.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-30
Publication Date
2025-09-05
Estimated Expiration
2043-06-30

AI Technical Summary

Technical Problem

The existing rate-distortion optimization quantization scheme is computationally complex and time-consuming during the video encoding process, making it difficult to meet real-time requirements and affecting user experience.

Method used

In the entropy coding bit estimation process of rate-distortion optimized quantization, fixed values ​​are used to replace some bit consumption estimation steps that have little impact on coding quality, simplifying the rate-distortion optimized quantization process. By setting the first fixed value to represent the bit consumption information of the current pixel point when the coefficient to be encoded is greater than 1, and the second fixed value to represent the bit consumption information of the last non-zero bit, the optimal quantization coefficient and rate-distortion cost are calculated.

Benefits of technology

On the premise of ensuring coding quality, the time consumption of rate-distortion optimization and quantization is shortened, the video coding efficiency is improved, and the real-time requirements are met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116962700B_ABST
    Figure CN116962700B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a rate-distortion optimization quantization method, system, device and storage medium for video coding. The technical solution provided by the embodiments of the present application calculates the optimal quantization coefficient of the current pixel point based on the first fixed value in the entropy coding bit estimation process of rate-distortion optimization quantization, represents the first bit consumption information required for encoding the current pixel point when the coefficient to be encoded is greater than 1 according to a set first fixed value; represents the second bit consumption information of the current pixel point marked as the last non-zero bit of the current transformation unit according to a set second fixed value, and calculates the rate-distortion cost of encoding the current pixel point as the last non-zero coefficient based on the second fixed value. By adopting the above technical means, the time consumption of rate-distortion optimization quantization can be shortened while ensuring the coding quality, the optimization of the rate-distortion optimization quantization process can be achieved, and the video coding efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of video coding technology, and in particular to a rate-distortion optimization quantization method, system, device, and storage medium for video coding. Background Art

[0002] Currently, rate-distortion optimized quantization (RDOQ) is often used in video encoding to improve encoding performance. RDOQ combines the quantization process of video encoding with the principle of rate-distortion optimization. It uses the rate-distortion optimization criterion to determine the optimal quantization value for each non-zero coefficient and the position of the last non-zero coefficient, minimizing encoding distortion while still meeting the target bitrate.

[0003] However, to improve video coding performance, the related rate-distortion optimized quantization scheme needs to calculate the context of the coded significant bits for each pixel during the entropy coding bit estimation process. This includes estimating the bit consumption when the pixel's coefficient to be coded is greater than 1, as well as the bit consumption when the pixel is marked as the last non-zero bit of the current transform unit. This entire process requires complex computational procedures and is time-consuming. For some scenarios with high real-time video coding requirements, the complex rate-distortion optimized quantization process struggles to meet these real-time requirements, resulting in a relatively poor user experience. Summary of the Invention

[0004] The embodiments of the present application provide a rate-distortion optimization quantization method, system, device and storage medium for video coding, which can simplify the rate-distortion optimization quantization process while ensuring the quality of video coding, improve video coding efficiency, and solve the technical problem that related rate-distortion optimization quantization schemes are time-consuming.

[0005] In a first aspect, an embodiment of the present application provides a rate-distortion optimized quantization method for video coding, comprising:

[0006] In the entropy coding bit estimation process of rate-distortion optimized quantization, a first fixed value is set to represent first bit consumption information required for encoding the current pixel when the coefficient to be encoded is greater than 1, and an optimal quantization coefficient of the current pixel is calculated based on the first fixed value;

[0007] According to the set second fixed value, the second bit consumption information indicating that the current pixel is marked as the last non-zero bit of the current transform unit is represented, and the rate-distortion cost of encoding the current pixel as the last non-zero coefficient is calculated based on the second fixed value.

[0008] In a second aspect, an embodiment of the present application provides a rate-distortion optimized quantization system for video coding, comprising:

[0009] A first optimization module is configured to calculate an optimal quantization coefficient for the current pixel based on a first fixed value representing first bit consumption information required for encoding the current pixel when the coefficient to be encoded is greater than 1 during an entropy coding bit estimation process of rate-distortion optimization quantization;

[0010] The second optimization module is configured to represent the second bit consumption information of the current pixel point marked as the last non-zero bit of the current transformation unit according to the set second fixed value, and calculate the rate-distortion cost of the current pixel point encoded as the last non-zero coefficient based on the second fixed value.

[0011] In a third aspect, an embodiment of the present application provides a rate-distortion optimization quantization device for video coding, comprising:

[0012] memory and one or more processors;

[0013] The memory is configured to store one or more programs;

[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement the rate-distortion optimized quantization method for video coding as described in the first aspect.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a computer processor, they are configured to perform the rate-distortion optimized quantization method for video coding as described in the first aspect.

[0016] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed on a computer or a processor, the computer or the processor executes the rate-distortion optimization quantization method for video coding as described in the first aspect.

[0017] The embodiment of the present application calculates the optimal quantization coefficient of the current pixel point based on the first fixed value in the entropy coding bit estimation process of rate-distortion optimized quantization, and represents the first bit consumption information required for encoding the current pixel point when the coefficient to be encoded is greater than 1 according to the set first fixed value; and calculates the rate-distortion cost of encoding the current pixel point as the last non-zero coefficient based on the second fixed value according to the set second fixed value. By adopting the above technical means, by choosing to skip some bit consumption estimation steps that have little impact on the encoding quality in the entropy coding bit estimation process of rate-distortion optimized quantization, and using fixed values ​​to represent the bit estimation results, the time consumption of rate-distortion optimized quantization can be shortened while ensuring the encoding quality, and the rate-distortion optimized quantization process can be optimized, thereby improving the video encoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a flow chart of a rate-distortion optimization quantization method for video coding provided by an embodiment of the present application;

[0019] Figure 2 is a flow chart of rate-distortion optimization quantization in an embodiment of the present application;

[0020] Figure 3 is a flow chart of rate-distortion cost calculation in an embodiment of the present application;

[0021] Figure 4 This is a structural diagram of a rate-distortion optimized quantization system for video coding provided by an embodiment of the present application;

[0022] Figure 5 This is a structural diagram of a rate-distortion optimization quantization device for video coding provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. It should also be noted that, for ease of description, only parts related to the present application, not all of the contents, are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0024] The rate-distortion optimization quantization method for video coding provided in this application aims to skip some bit consumption estimation steps that have little impact on coding quality in the entropy coding bit estimation process of rate-distortion optimization quantization, and use fixed values ​​to represent the bit estimation results, so as to shorten the time consumption of rate-distortion optimization quantization while ensuring coding quality, and realize the optimization of the rate-distortion optimization quantization process.

[0025] In relevant video coding scenarios, in order to achieve performance gains in video coding, the computational complexity of the coding process is relatively large. For the rate-distortion optimization and quantization process, the entire process takes a long time. However, in specific applications, there are some encoders and coding scenarios that have almost stringent requirements for real-time performance, and due to different services, the characteristics of the sequences to be encoded are also different. For example, videos with intense and irregular movements and videos that are mainly live broadcasts have different effects when using different algorithms. For these scenarios with high real-time requirements for video coding, complex rate-distortion optimization and quantization processes are difficult to meet real-time requirements. Based on this, a rate-distortion optimization and quantization method for video coding in an embodiment of the present application is provided to optimize the rate-distortion optimization and quantization process, improve video coding efficiency, and solve the technical problem that the relevant rate-distortion optimization and quantization schemes take a long time.

[0026] Example:

[0027] Figure 1 A flow chart of a rate-distortion optimization and quantization method for video coding provided in an embodiment of the present application is provided. The rate-distortion optimization and quantization method for video coding provided in this embodiment can be performed by a rate-distortion optimization and quantization device for video coding. The rate-distortion optimization and quantization device for video coding can be implemented via software and / or hardware. The rate-distortion optimization and quantization device for video coding can be composed of two or more physical entities or a single physical entity. Generally speaking, the rate-distortion optimization and quantization device for video coding can be an encoder device, a computer, a mobile phone, a tablet, or other computing device.

[0028] The following description is made by taking the rate-distortion optimization quantization device of video coding as an example of the main body of the rate-distortion optimization quantization method for executing video coding. Figure 1 , the rate-distortion optimization quantization method for video coding specifically includes:

[0029] S110, in the entropy coding bit estimation process of rate-distortion optimized quantization, according to a set first fixed value representing first bit consumption information required for encoding the current pixel when the coefficient to be encoded is greater than 1, calculating the optimal quantization coefficient of the current pixel based on the first fixed value;

[0030] S120 , calculating the rate-distortion cost of encoding the current pixel as the last non-zero coefficient based on the second fixed value according to the second bit consumption information indicating that the current pixel is marked as the last non-zero bit of the current transform unit.

[0031] In the process of rate-distortion optimization and quantization of video coding, the present application selects and skips some steps of the entropy coding bit estimation process, and selects and skips some bit estimation steps that have little impact on the rate-distortion optimization quantization results and the video coding quality, so as to optimize the rate-distortion optimization quantization process, shorten the time consumption of rate-distortion optimization quantization, and improve video coding efficiency.

[0032] Among them, the rate-distortion optimization quantization algorithm combines the quantization process of video coding with the rate-distortion optimization principle, and uses the RDO (Rate-distortion optimization) criterion to determine the optimal quantization value of each non-zero coefficient and the position of the last non-zero coefficient, so that the coding distortion is as small as possible while the bit rate meets the target bit rate. In the rate-distortion optimization quantization process, for the accuracy of the results, the coding coefficients of each pixel are respectively set with an entropy coding context environment to calculate the accurate bit rate consumption. Since the entropy coding bit estimation process takes a certain amount of time, this application has found based on actual tests that omitting some entropy coding bit estimation steps can achieve a better cost-effectiveness, that is, ensuring that the coding quality will not be excessively lost, while optimizing the rate-distortion optimization quantization process and improving coding efficiency. Therefore, this application adaptively selects the corresponding bit consumption estimation process of the entropy coding bit estimation process and sets its bit consumption estimation result to a fixed value, thereby eliminating the calculation of this part of the bit consumption estimation result and simplifying the rate-distortion optimization quantization process.

[0033] like Figure 2As shown, during rate-distortion optimized quantization, uniform quantization is first performed on each pixel in the transform unit (TU). Candidate quantization values ​​for each pixel's coding coefficient are determined, and the number of non-zero coefficients, numsig, is then counted. If numsig = 0, 0 is returned (the function returns the number of non-zero coefficients); otherwise, the algorithm continues, determining the preliminary position of the last non-zero coefficient in the TU based on the uniform quantization results. The TU is divided into several 4x4 unit quantization blocks CG, and quantization is performed block by block, starting with the quantization block CG containing the last non-zero coefficient. The scan order within the quantization block CG and its internal structure is determined by the variable scantype, which can be horizontal, vertical, or diagonal. For intra blocks, the variable scantype is related to the angle of intra prediction; for inter blocks, the variable scantype is fixed to diag. Rate-distortion optimized quantization is performed on each quantization block CG. The rate-distortion cost of different candidate quantization values ​​is first calculated based on the candidate quantization value table. The optimal quantization value is selected, and the data required for sign hiding is calculated. The context model is then updated to attempt to quantize the current quantization block CG to all zeros. If the rate-distortion cost is reduced, the previous optimal quantization value is abandoned and the quantization coefficients are set to all zero. Then, it is determined whether to quantize the transform unit TU to an all-zero block, fine-tune the position of the last non-zero coefficient in each quantization block CG, recalculate the number of non-zero coefficients numsig, and hide the sign as 0.

[0034] During the rate-distortion optimization quantization process, the coding coefficients are first checked for all-zeros. If the transform unit is not all-zero, entropy coding bit estimation begins to determine the optimal quantization coefficients and rate-distortion cost based on the results. Because rate-distortion optimization quantization is computationally intensive, the entropy coding model is pre-read to calculate the approximate bit cost required to encode different symbols.

[0035] Among them, the following four entropy coding contexts need to be estimated:

[0036] struct EstBitsSbacSimple

[0037] {

[0038] int32_t greaterOneBits

[16] [2];

[0039] int32_t significantBits[2][8];

[0040] int32_t significantCoeffGroupBits[NUM_SIG_CG_FLAG_CTX][2];

[0041] int32_t lastBits[2]

[10] ;

[0042] };

[0043] Among them, significantBits and significantCoeffGroupBits represent the context of the coding effective bits. Actual tests have shown that they cannot be optimized and have a great impact on the coding quality. GreaterOneBits represents the bit consumption of the pixel point when the coefficient to be coded is greater than 1, that is, the first bit consumption information mentioned above. Experimental verification shows that omitting this part of the bit estimation process and replacing it with a specified value has little effect on the coding quality. Moreover, in the assembly implementation of the code, the processing of this syntax element requires operations such as rearrangement and shuffling, which are not easy to implement in the arm instruction set and have a high delay. Therefore, the embodiment of the present application sets a fixed value to replace the bit consumption information greaterOneBits, and defines the fixed value as the first fixed value to reduce the time consumption of rate-distortion optimization quantization. In addition, lastBits represents the bit consumption required to mark the current pixel point as the last non-zero bit of the current transform unit, that is, the second bit consumption information mentioned above. The entropy coding estimation process of this symbol has little effect on the coding quality, so we omit it. By setting a fixed value to replace the bit consumption information lastBits, the fixed value is defined as the second fixed value.

[0044] Subsequently, the context significantBits and significantCoeffGroupBits of the coding significant bits of the above-mentioned bit estimation operation are directly used, combined with the first fixed value set above (i.e., the first bit consumption information corresponding to greaterOneBits), to calculate the optimal quantization coefficient of the current pixel. Since greaterOneBits has little impact on the final result, it has little impact on the calculation result of the optimal quantization coefficient, and the encoding quality will not be excessively reduced. Similarly, the second fixed value is used to represent the second bit consumption information, and the rate-distortion cost of encoding the current pixel as the last non-zero coefficient is calculated. In this way, the entropy coding bit estimation process can be simplified and the time consumption of rate-distortion optimization quantization can be shortened.

[0045] Exemplarily, by skipping the estimation model loading of the above two parts of bit consumption information during bit estimation and deleting the corresponding data structure, the bits consumed here are directly replaced with 0. This is used for subsequent optimal quantization coefficient calculation and rate-distortion cost calculation, thereby obtaining better encoding acceleration, facilitating assembly acceleration, and reducing unnecessary calculations. It should be noted that in actual applications, based on actual test results, the above-mentioned first bit consumption and second bit consumption information adaptability can be set to corresponding fixed values, which are adaptively determined based on the actual bit consumption information of the test and the actual coding acceleration requirements. The embodiment of the present application does not impose fixed restrictions on the specific bit consumption information values, and they are not described here one by one.

[0046] Specifically, if Figure 3 As shown, the rate-distortion cost of encoding the current pixel point as the last non-zero coefficient is calculated based on the second fixed value, including:

[0047] S1201, traverse each non-zero pixel point of the current transform unit to determine the estimated bit rate required to encode the current pixel point;

[0048] S1202: Calculate the rate-distortion cost of encoding the current pixel as the last non-zero coefficient based on the estimated bit rate and the second fixed value.

[0049] Based on the second fixed value set above, when locating the last non-zero coefficient of the transform unit, it is necessary to calculate the rate-distortion cost of each pixel corresponding to the position being encoded as the last non-zero coefficient. Therefore, this application uses this second fixed value to calculate the rate-distortion cost of the pixel being encoded as the last non-zero coefficient. By determining the estimated bit rate of the current pixel, and then combining this second fixed value, the rate-distortion cost of the current pixel being encoded as the last non-zero coefficient is calculated.

[0050] Determining the estimated bit rate required to encode the current pixel includes:

[0051] Determine the pixel value of the current pixel point, query a pre-built mapping relationship table based on the pixel value, and determine the estimated bit rate required to encode the current pixel point. The mapping relationship table is pre-built based on the mapping relationship between different pixel values ​​and corresponding estimated bit rates.

[0052] Based on the pixel value, a table lookup is used to estimate the bitrate required to encode the current pixel, which is referred to as the estimated bitrate. It's understandable that different pixel values ​​require different bitrates when encoding. By pre-testing the bitrates consumed when encoding different pixel values, a mapping relationship is established. By subsequently querying this mapping relationship, the estimated bitrate required to encode the current pixel can be quickly determined, further improving encoding efficiency.

[0053] The rate-distortion cost of encoding the current pixel as the last non-zero coefficient is calculated based on the estimated bit rate and the second fixed value, including:

[0054] Obtain the set rate-distortion cost influence coefficient and the set coefficient amplification information, determine the initial bit rate consumption information based on the estimated bit rate and the sum of the second fixed value, and calculate the rate-distortion cost of the current pixel point encoded as the last non-zero coefficient based on the initial bit rate consumption information, the rate-distortion cost influence coefficient and the coefficient amplification information.

[0055] Based on the estimated bit rate queried above, the bit consumption information of the lastBits flag (the second fixed value) is added, which is the bit rate consumption of encoding non-zero at the current pixel position, and is defined as the initial bit rate consumption information. Based on this initial bit rate consumption information, combined with the set rate-distortion cost influence coefficient and the set coefficient amplification information, the rate-distortion cost of encoding the current pixel as the last non-zero coefficient can be calculated. In addition, since the original rate-distortion cost calculation process is relatively complicated, the embodiment of the present application simplifies the rate-distortion cost calculation process to further improve the coding efficiency. Among them, the original rate-distortion cost calculation formula is as follows:

[0056] lastCoeffCost=lambda*(IEP_RATE*suffixLen+estBitsSbac.lastBits)>>bitsCostShift

[0057] Among them, lastCoeffCost represents the rate-distortion cost of the current pixel encoded as the last non-zero coefficient, suffixLen is the estimated bit rate of the pixel, estBitsSbac.lastBits is the second bit consumption information of the current pixel marked as the last non-zero bit of the current transform unit, lambda and bitsCostShift are the rate-distortion cost impact coefficients set during the rate-distortion calculation process, and IEP_RATE is the original coefficient amplification information, with a value of 1<<15. Because the entropy coding model calculates the second bit consumption information for accuracy, the result is multiplied by IEP_RATE. Therefore, correspondingly, IEP_RATE needs to be multiplied when calculating the rate-distortion cost.

[0058] Taking into account that the above calculation formula greatly affects the coding complexity, this application optimizes it. Since the second bit consumption information estBitsSbac.lastBits takes the second fixed value, the embodiment of the present application takes the second fixed value as 0, and then uses the estimated bit rate suffixLen of the pixel point as the initial bit rate consumption information to perform rate distortion cost calculation. It can be seen that in the original rate distortion cost calculation formula, there is obvious computational redundancy in multiplying the estimated bit rate suffixLen by IEP_RATE and lambda before right shifting, and the reason is that it is necessary to calculate the entropy coding estimated estBitsSbac.lastBits. In the above, we simplified the entropy coding model of estBitsSbac.lastBits and used the second fixed value as estBitsSbac.lastBits, so the entropy coding bit consumption here is no longer calculated, and therefore, it is no longer necessary to multiply IEP_RATE. It is sufficient to subtract 15 from bitsCostShift, which reduces the amount of calculation and is basically lossless. In addition, the actual bit rate consumption no longer needs to be multiplied by IEP_RATE. By modifying the corresponding rate-distortion calculation formula, the amount of calculation can be significantly reduced, reducing the encoder load. The optimized rate-distortion cost calculation formula is as follows:

[0059] lastcoeffcost=lambda*suffixLen>>(bitscostshift-log2_IEP_RATE)

[0060] After calculating the rate-distortion cost of the current pixel encoded as the last non-zero coefficient based on the second fixed value, the method further includes:

[0061] Starting from the last non-zero pixel of the current transform unit, the non-zero pixel is traversed forward, and the non-zero pixel corresponding to the minimum rate-distortion cost is selected as the last non-zero coefficient position of the current transform unit.

[0062] When locating the last non-zero coefficient, we traverse from the last non-zero pixel in the current transform unit to the beginning, and determine the rate-distortion cost for each non-zero pixel using the rate-distortion cost calculation method described above. The pixel with the lowest rate-distortion cost is then selected as the last non-zero coefficient in the current transform unit.

[0063] Among them, starting from the last non-zero pixel point of the current transformation unit, a set number of non-zero pixels are traversed forward, the minimum cost is determined from the rate-distortion costs corresponding to the set number of non-zero pixels, and the non-zero pixel point corresponding to the minimum cost is used as the last non-zero coefficient position of the current transformation unit.

[0064] For statistical reasons, the last non-zero coefficient of most transform units is more likely to be located at the rear of the block, and the rate-distortion optimization process has already determined whether the pixel point is to be quantized to all zeros at the beginning, so there is no need to traverse all pixels completely. Based on this, the embodiment of the present application traverses up to K non-zero coefficients for each transform unit, and calculates the best last non-zero coefficient point from them. This has minimal impact on the coding quality, can more accurately determine the position of the last non-zero coefficient of the current transform unit, and accelerates the coding efficiency to a certain extent. Optionally, the present application takes a value of 3 for K, starts from the last non-zero pixel point of the current transform unit and traverses 3 pixel points forward, and selects the pixel point with the smallest rate-distortion cost as the last non-zero coefficient position of the current transform unit. According to actual tests, the coding efficiency can be improved while ensuring the coding quality.

[0065] In the above, during the entropy coding bit estimation process of rate-distortion optimized quantization, the first bit consumption information required for encoding the current pixel when the coefficient to be encoded is greater than 1 is represented by a set first fixed value, and the optimal quantization coefficient of the current pixel is calculated based on the first fixed value; the second bit consumption information of marking the current pixel as the last non-zero bit of the current transform unit is represented by a set second fixed value, and the rate-distortion cost of encoding the current pixel as the last non-zero coefficient is calculated based on the second fixed value. By adopting the above technical means, during the entropy coding bit estimation process of rate-distortion optimized quantization, some bit consumption estimation steps that have little impact on the encoding quality are selected to be skipped, and the bit estimation results are represented by fixed values. In this way, the time consumption of rate-distortion optimized quantization can be shortened while ensuring the encoding quality, and the rate-distortion optimized quantization process can be optimized, thereby improving the video encoding efficiency.

[0066] Based on the above embodiments, Figure 4 This is a schematic diagram of the structure of a rate-distortion optimization quantization system for video coding provided by this application. Figure 4 The rate-distortion optimization quantization system for video coding provided in this embodiment specifically includes: a first optimization module 21 and a second optimization module 22.

[0067] The first optimization module 21 is configured to skip the bit consumption estimation of the current pixel when the coefficient to be encoded is greater than 1 during the entropy coding bit estimation process of rate-distortion optimized quantization, and calculate the optimal quantization coefficient of the current pixel based on the first fixed value according to the first bit consumption information required for encoding the current pixel when the coefficient to be encoded is greater than 1;

[0068] The second optimization module 22 is configured to skip the bit consumption estimation of the current pixel point being marked as the last non-zero bit of the current transformation unit, and calculate the rate-distortion cost of encoding the current pixel point as the last non-zero coefficient based on the second fixed value according to the second bit consumption information of the current pixel point being marked as the last non-zero bit of the current transformation unit.

[0069] Specifically, calculating the rate-distortion cost of encoding the current pixel as the last non-zero coefficient based on the second fixed value includes:

[0070] Traverse each non-zero pixel point of the current transform unit, determine the estimated bit rate required to encode the current pixel point, and calculate the rate-distortion cost of encoding the current pixel point as the last non-zero coefficient based on the estimated bit rate and a second fixed value.

[0071] Determine the estimated bitrate required to encode the current pixel, including:

[0072] Determine the pixel value of the current pixel point, query a pre-built mapping relationship table based on the pixel value, and determine the estimated bit rate required to encode the current pixel point. The mapping relationship table is pre-built based on the mapping relationship between different pixel values ​​and corresponding estimated bit rates.

[0073] The rate-distortion cost of encoding the current pixel as the last non-zero coefficient is calculated based on the estimated bit rate and the second fixed value, including:

[0074] Obtain the set rate-distortion cost influence coefficient and the set coefficient amplification information, determine the initial bit rate consumption information based on the estimated bit rate and the sum of the second fixed value, and calculate the rate-distortion cost of the current pixel point encoded as the last non-zero coefficient based on the initial bit rate consumption information, the rate-distortion cost influence coefficient and the coefficient amplification information.

[0075] Specifically, after calculating the rate-distortion cost of the current pixel encoded as the last non-zero coefficient based on the second fixed value, the method further includes:

[0076] Starting from the last non-zero pixel of the current transform unit, the non-zero pixel is traversed forward, and the non-zero pixel corresponding to the minimum rate-distortion cost is selected as the last non-zero coefficient position of the current transform unit.

[0077] Starting from the last non-zero pixel of the current transform unit, traverse the non-zero pixels forward and select the non-zero pixel corresponding to the minimum rate-distortion cost as the last non-zero coefficient position of the current transform unit, including:

[0078] Starting from the last non-zero pixel point of the current transform unit, traverse forward a set number of non-zero pixels, determine the minimum cost from the rate-distortion costs corresponding to the set number of non-zero pixels, and use the non-zero pixel point corresponding to the minimum cost as the last non-zero coefficient position of the current transform unit.

[0079] In the above, during the entropy coding bit estimation process of rate-distortion optimized quantization, the first bit consumption information required for encoding the current pixel when the coefficient to be encoded is greater than 1 is represented by a set first fixed value, and the optimal quantization coefficient of the current pixel is calculated based on the first fixed value; the second bit consumption information of marking the current pixel as the last non-zero bit of the current transform unit is represented by a set second fixed value, and the rate-distortion cost of encoding the current pixel as the last non-zero coefficient is calculated based on the second fixed value. By adopting the above technical means, during the entropy coding bit estimation process of rate-distortion optimized quantization, some bit consumption estimation steps that have little impact on the encoding quality are selected to be skipped, and the bit estimation results are represented by fixed values. In this way, the time consumption of rate-distortion optimized quantization can be shortened while ensuring the encoding quality, and the rate-distortion optimized quantization process can be optimized, thereby improving the video encoding efficiency.

[0080] The rate-distortion optimized quantization system for video coding provided in the embodiments of the present application can be configured to execute the rate-distortion optimized quantization method for video coding provided in the above embodiments, and has corresponding functions and beneficial effects.

[0081] Based on the above practical example, an embodiment of the present application further provides a rate-distortion optimization and quantization device for video coding, with reference to FIG. The rate-distortion optimization and quantization device for video coding includes: a processor, a memory, a communication module, an input device, and an output device. The memory, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the rate-distortion optimization and quantization method for video coding described in any embodiment of the present application (e.g., the first optimization module and the second optimization module in the rate-distortion optimization and quantization system for video coding). The communication module is configured to perform data transmission. The processor executes the software programs, instructions, and modules stored in the memory to execute various functional applications and data processing of the device, thereby implementing the rate-distortion optimization and quantization method for video coding described above. The input device can be configured to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device can include a display device such as a display screen. The rate-distortion optimization and quantization device for video coding provided above can be configured to execute the rate-distortion optimization and quantization method for video coding provided in the above embodiments, and has corresponding functions and beneficial effects.

[0082] Based on the above embodiments, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a computer processor, the computer-executable instructions are configured to execute a rate-distortion optimization quantization method for video coding. The storage medium can be any of various types of memory devices or storage devices. Of course, the computer-executable instructions of the computer-readable storage medium provided in the embodiment of the present application are not limited to the rate-distortion optimization quantization method for video coding described above, and can also execute related operations in the rate-distortion optimization quantization method for video coding provided in any embodiment of the present application.

[0083] Based on the above embodiments, the embodiments of the present application also provide a computer program product. The technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium and includes a number of instructions for enabling a computer device, a mobile terminal, or a processor therein to execute all or part of the steps of the rate-distortion optimization quantization method for video coding described in each embodiment of the present application.

Claims

1. A rate-distortion optimization quantization method for video coding, characterized in that: include: In the entropy coding bit estimation process of rate-distortion optimized quantization, a first fixed value is set to represent first bit consumption information required for encoding the current pixel when the coefficient to be encoded is greater than 1, and an optimal quantization coefficient of the current pixel is calculated based on the first fixed value; The second bit consumption information indicating that the current pixel point is marked as the last non-zero bit of the current transformation unit is represented by the set second fixed value, and the rate-distortion cost of encoding the current pixel point as the last non-zero coefficient is calculated based on the second fixed value.

2. The rate-distortion optimization quantization method for video coding according to claim 1, characterized in that: Calculating a rate-distortion cost of encoding the current pixel point as the last non-zero coefficient based on the second fixed value includes: Traversing each non-zero pixel of the current transform unit to determine the estimated bit rate required to encode the current pixel; A rate-distortion cost of encoding the current pixel point as the last non-zero coefficient is calculated based on the estimated bit rate and the second fixed value.

3. The rate-distortion optimization quantization method for video coding according to claim 2, wherein: The determining of the estimated bit rate required for encoding the current pixel point includes: Determine the pixel value of the current pixel point, query a pre-built mapping relationship table based on the pixel value, and determine the estimated bit rate required to encode the current pixel point. The mapping relationship table is pre-built according to the mapping relationship between different pixel values ​​and corresponding estimated bit rates.

4. The rate-distortion optimization quantization method for video coding according to claim 2, wherein: Calculating a rate-distortion cost of encoding the current pixel point as the last non-zero coefficient based on the estimated bit rate and the second fixed value, including: Obtain the set rate-distortion cost influence coefficient and the set coefficient amplification information, determine the initial bit rate consumption information based on the sum of the estimated bit rate and the second fixed value, and calculate the rate-distortion cost of the current pixel point encoded as the last non-zero coefficient based on the initial bit rate consumption information, the rate-distortion cost influence coefficient and the coefficient amplification information.

5. The rate-distortion optimization quantization method for video coding according to claim 1, wherein: After calculating the rate-distortion cost of the current pixel encoded as the last non-zero coefficient based on the second fixed value, the method further includes: Starting from the last non-zero pixel point of the current transformation unit, the non-zero pixel point corresponding to the rate-distortion cost with the smallest value is selected as the last non-zero coefficient position of the current transformation unit.

6. The rate-distortion optimization quantization method for video coding according to claim 5, characterized in that: The step of traversing non-zero pixels forward from the last non-zero pixel of the current transformation unit and selecting a non-zero pixel corresponding to the minimum rate-distortion cost as the last non-zero coefficient position of the current transformation unit includes: Starting from the last non-zero pixel point of the current transform unit, a set number of non-zero pixel points are traversed forward, a minimum cost is determined from the rate-distortion costs corresponding to the set number of non-zero pixel points, and the non-zero pixel point corresponding to the minimum cost is used as the last non-zero coefficient position of the current transform unit.

7. A rate-distortion optimized quantization system for video coding, characterized in that: include: a first optimization module configured to, in a process of entropy coding bit estimation for rate-distortion optimized quantization, calculate an optimal quantization coefficient for the current pixel based on a set first fixed value representing first bit consumption information required for encoding the current pixel when the coefficient to be encoded is greater than 1; The second optimization module is configured to represent the second bit consumption information of the current pixel point marked as the last non-zero bit of the current transformation unit according to the set second fixed value, and calculate the rate-distortion cost of the current pixel point encoded as the last non-zero coefficient based on the second fixed value.

8. A rate-distortion optimized quantization device for video coding, characterized in that: include: memory and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the rate-distortion optimized quantization method for video coding according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a computer processor, are configured to execute the rate-distortion optimized quantization method for video coding according to any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product includes instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the rate-distortion optimized quantization method for video coding according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Level decision in rate distortion optimized quantization

    CN104221375A

  • Method and device used for determining optimal quantization value in RDOQ process

    CN105812804A