[go: up one dir, main page]

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

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

Info

Publication number
CN116962700B
CN116962700B CN202310797042.1A CN202310797042A CN116962700B CN 116962700 B CN116962700 B CN 116962700B CN 202310797042 A CN202310797042 A CN 202310797042A CN 116962700 B CN116962700 B CN 116962700B
Authority
CN
China
Prior art keywords
rate
distortion
zero
pixel point
fixed value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310797042.1A
Other languages
Chinese (zh)
Other versions
CN116962700A (en
Inventor
张旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
You Peninsula Beijing Information Technology Co ltd
Original Assignee
You Peninsula Beijing Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by You Peninsula Beijing Information Technology Co ltd filed Critical You Peninsula Beijing Information Technology Co ltd
Priority to CN202310797042.1A priority Critical patent/CN116962700B/en
Publication of CN116962700A publication Critical patent/CN116962700A/en
Priority to PCT/CN2024/099398 priority patent/WO2025001888A1/en
Application granted granted Critical
Publication of CN116962700B publication Critical patent/CN116962700B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请实施例公开了一种视频编码的率失真优化量化方法、系统、设备及存储介质。本申请实施例提供的技术方案,通过在率失真优化量化的熵编码比特估计过程中,依据设定的第一固定值表示当前像素点在待编码系数大于1时编码所需的第一比特消耗信息,基于第一固定值计算当前像素点的最优量化系数;依据设定的第二固定值表示当前像素点标记为当前变换单元最后一个非零比特位的第二比特消耗信息,基于第二固定值计算当前像素点编码为最后一个非零系数的率失真代价。采用上述技术手段,可以在保障编码质量的前提下缩短率失真优化量化的耗时,实现率失真优化量化流程的优化,进而提升视频编码效率。

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.

Description

Rate-distortion optimized quantization method, system, device and storage medium for video coding
Technical Field
The embodiment of the application relates to the technical field of video coding, in particular to a rate distortion optimization quantization method, a system, equipment and a storage medium for video coding.
Background
Currently, in video coding, rate-distortion optimized quantization techniques (RDOQ, rate Distortion Optimized Quantization) are often used to improve coding performance. The rate-distortion optimization quantization technology combines the quantization process of video coding with the rate-distortion optimization principle, and utilizes the 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 under the condition that the code rate meets the target code rate.
However, in order to improve video coding performance, in the entropy coding bit estimation process of rate distortion optimization quantization, the context of coding significant bits needs to be calculated pixel by pixel, the bit consumption of the estimated pixel when the coefficient to be coded is greater than 1, and the bit consumption of the pixel marked as the last non-zero bit of the current transformation unit are estimated. The whole process needs to carry out a complex calculation flow, and the time consumption is long. For scenes with high real-time requirements of partial video coding, the complex rate-distortion optimization quantization flow is difficult to reach the real-time requirements, and the user experience is relatively poor.
Disclosure of Invention
The embodiment of the application provides a rate distortion optimization quantization method, a system, equipment and a storage medium for video coding, which can simplify the rate distortion optimization quantization flow while guaranteeing the video coding quality, improve the video coding efficiency and solve the technical problem that a correlation rate distortion optimization quantization scheme consumes longer time.
In a first aspect, an embodiment of the present application provides a rate-distortion optimized quantization method for video coding, including:
In the entropy coding bit estimation process of rate distortion optimization quantization, according to a set first fixed value, representing first bit consumption information required by coding when a coefficient to be coded of a current pixel point is greater than 1, calculating an optimal quantization coefficient of the current pixel point based on the first fixed value;
And calculating the rate distortion cost of the current pixel point code as the last non-zero coefficient based on the second fixed value according to the second bit consumption information which is set to indicate that the current pixel point is marked as the last non-zero bit of the current conversion unit.
In a second aspect, an embodiment of the present application provides a rate-distortion optimized quantization system for video coding, including:
The first optimizing module is configured to calculate an optimal quantization coefficient of the current pixel point based on a first fixed value according to the first bit consumption information which is required by the coding of the current pixel point when the coefficient to be coded is larger than 1 and is represented by the set first fixed value in the entropy coding bit estimation process of rate distortion optimization quantization;
And the second optimization module is configured to calculate the rate distortion cost of the current pixel point code as the last non-zero coefficient based on the second fixed value according to the set second fixed value and the second bit consumption information which indicates the current pixel point code as the last non-zero bit of the current transformation unit.
In a third aspect, an embodiment of the present application provides a rate-distortion optimized quantization apparatus for video coding, including:
A memory and one or more processors;
The memory is configured to store one or more programs;
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the rate-distortion optimized quantization method of video coding as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium storing computer-executable instructions that, when executed by a computer processor, are configured to perform a rate-distortion optimized quantization method of video encoding as described in the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on a computer or processor, cause the computer or processor to perform the rate-distortion optimized quantization method of video coding as described in the first aspect.
In the entropy coding bit estimation process of rate distortion optimization quantization, the embodiment of the application calculates the optimal quantization coefficient of the current pixel point based on a first fixed value according to the first bit consumption information which is set by the first fixed value and is required by coding when the coefficient to be coded is larger than 1, and calculates the rate distortion cost of the current pixel point coded as the last non-zero coefficient based on a second fixed value according to the second bit consumption information which is set by the second fixed value and is used for indicating the current pixel point marked as the last non-zero bit of the current conversion unit. By adopting the technical means, the bit consumption estimation step with less influence on the coding quality by the skipped part is selected in the entropy coding bit estimation process of rate-distortion optimization quantization, and the bit estimation result is represented by a fixed value, so that the time consumption of rate-distortion optimization quantization can be shortened on the premise of ensuring the coding quality, the optimization of the rate-distortion optimization quantization flow is realized, and the video coding efficiency is further improved.
Drawings
Fig. 1 is a flowchart of a rate-distortion optimized quantization method for video coding according to an embodiment of the present application;
FIG. 2 is a rate-distortion optimized quantization flowchart in an embodiment of the present application;
FIG. 3 is a flow chart of rate distortion cost calculation in an embodiment of the application;
Fig. 4 is a schematic structural diagram of a rate-distortion optimized quantization system for video coding according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a rate-distortion optimized quantization apparatus for video coding according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the following detailed description of specific embodiments of the present application is given with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the matters related to the present application are shown in the accompanying drawings. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
The application provides a rate distortion optimization quantization method for video coding, which aims at selecting a bit consumption estimation step with less influence on coding quality by a skipped part in the entropy coding bit estimation process of rate distortion optimization quantization, and using a fixed value to represent a bit estimation result so as to shorten the time consumption of rate distortion optimization quantization and realize the optimization of a rate distortion optimization quantization flow on the premise of ensuring the coding quality.
In the related video coding scene, the computational complexity of the coding process is relatively large for the benefit of video coding performance. For the rate-distortion optimized quantization flow therein, the whole process takes a long time. However, in specific applications, there are some encoders and encoding scenes that have near-severe requirements on real-time performance, and due to different services, the features of the sequences to be encoded are different, such as natural video with intense and irregular motion and video based on live broadcast, and the effects of using different algorithms are different. For the scenes with higher real-time requirements of the video coding, the complex rate-distortion optimization quantization flow is difficult to reach the real-time requirements. Based on the above, the rate distortion optimization quantization method for video coding provided by the embodiment of the application optimizes the rate distortion optimization quantization flow, improves video coding efficiency, and solves the technical problem that the correlation rate distortion optimization quantization scheme takes longer time.
Examples:
Fig. 1 is a flowchart of a rate-distortion optimization quantization method for video coding according to an embodiment of the present application, where the rate-distortion optimization quantization method for video coding provided in the embodiment may be implemented by a rate-distortion optimization quantization device for video coding, where the rate-distortion optimization quantization device for video coding may be implemented by software and/or hardware, and the rate-distortion optimization quantization device for video coding may be configured by two or more physical entities or may be configured by one physical entity. In general, the rate-distortion optimized quantization device for video encoding may be an encoder device, a computer, a mobile phone, a tablet, or the like.
The following description will take the main body of the rate-distortion optimized quantization apparatus for video encoding as an example to perform the rate-distortion optimized quantization method for video encoding. Referring to fig. 1, the rate-distortion optimized quantization method for video coding specifically includes:
S110, in the entropy coding bit estimation process of rate distortion optimization quantization, according to the set first fixed value, representing first bit consumption information required by coding when the coefficient to be coded of the current pixel point is greater than 1, and calculating the optimal quantization coefficient of the current pixel point based on the first fixed value;
S120, calculating the rate distortion cost of the current pixel point code as the last non-zero coefficient based on the second fixed value according to the second bit consumption information which is set to the second fixed value and indicates the current pixel point to be marked as the last non-zero bit of the current transformation unit.
In the rate-distortion optimization quantization process of video coding, partial steps of the entropy coding bit estimation process are screened and skipped, partial bit estimation steps with less influence on the video coding quality, which are the result of rate-distortion optimization quantization, are selected and skipped, so that the optimization of the rate-distortion optimization quantization process is realized, the time consumption of rate-distortion optimization quantization is shortened, and the video coding efficiency is improved.
The Rate distortion optimization quantization algorithm combines the quantization process of video coding with the Rate distortion optimization principle, and determines the optimal quantization value of each non-zero coefficient and the position of the last non-zero coefficient by utilizing the RDO (Rate-distortion optimization) criterion, so that the coding distortion is as small as possible under the condition that the code Rate meets the target code Rate. In the rate-distortion optimization quantization process, for the accuracy of the result, the coding coefficient of each pixel point is respectively provided with an entropy coding context environment so as to calculate the accurate rate consumption. Because the entropy coding bit estimation process needs to consume a certain time, according to the actual test, the application discovers that omitting some entropy coding bit estimation steps can obtain better cost performance, namely, the coding quality is ensured not to be excessively lost, and meanwhile, the rate distortion optimization quantization process can be optimized, and the coding efficiency is improved. Therefore, the application sets the bit consumption estimation result as a fixed value by adaptively selecting the corresponding bit consumption estimation flow of the entropy coding bit estimation process, thereby omitting the calculation of the bit consumption estimation result and realizing the simplification of the rate distortion optimization quantization process.
As shown in fig. 2, in the rate-distortion optimization quantization process, each pixel of the transform unit is uniformly quantized first, and candidate quantization values of coding coefficients of each pixel are determined, and then non-zero coefficients are counted numsig. If numsig =0, direct return 0 (the number of non-zero coefficients of the function return value), otherwise, the algorithm continues to determine the preliminary position of the last non-zero coefficient in the transform unit from the result of uniform quantization. The transform unit TU is segmented into a plurality of 4x4 unit quantized blocks CG, and the quantization is performed block by block starting from the quantized block CG where the last non-zero coefficient is located. The quantization block CG and its internal scan order are determined by the variable scantype and are divided into horizontal, vertical and diagonal. For intra blocks, variable scantype relates to the angle of intra prediction, and for inter blocks, variable scantype is fixed to diag. Rate-distortion optimized quantization is performed for each quantization block CG. Firstly, calculating rate distortion cost of different candidate quantized values according to a candidate quantized value table, selecting an optimal quantized value, and then hiding data needed by a symbol after calculation. The update context model then attempts to quantize the current quantized block CG to all zero CG. If the rate-distortion cost decreases, the previous optimal quantization value is discarded and the quantization coefficients are set to all zeros. And then judging whether the transformation unit TU is quantized into all-zero blocks, fine-tuning the position of the last non-zero coefficient in each quantized block CG, recalculating the number numsig of the non-zero coefficients, and hiding the symbol by 0.
In the rate-distortion optimized quantization process, all zeros of the coding coefficient are detected first. If the transform unit is not all zeros, entropy encoding bit estimation is started to determine the optimal quantization coefficients and rate distortion costs based on the result. Since the rate distortion optimization quantization is large in calculation amount, bit consumption required for coding different symbols is calculated through the pre-reading entropy coding model.
Wherein, the following four entropy coding contexts need to be estimated in the process:
struct EstBitsSbacSimple
{
int32_t greaterOneBits[16][2];
int32_t significantBits[2][8];
int32_t significantCoeffGroupBits[NUM_SIG_CG_FLAG_CTX][2];
int32_t lastBits[2][10];
};
Wherein significantBits and significantCoeffGroupBits represent the context of coding significant bits, and practical tests show that the coding significant bits cannot be optimized, and have a large influence on coding quality. And greaterOneBits represents bit consumption of the pixel point when the coefficient to be encoded is greater than 1, namely the first bit consumption information, and experiments prove that omitting the part of bit estimation flow, the influence on encoding quality is smaller by using a specified value instead. In addition, in the assembly realization of codes, operations such as rearrangement, shuffling and the like are needed for processing the syntax elements, the realization is not easy in an arm instruction set, and the delay is high. Therefore, the embodiment of the application sets a fixed value instead of the bit consumption information greaterOneBits, and defines the fixed value as the first fixed value, so as to reduce the time consumption of rate-distortion optimization quantization. In addition, lastBits indicates the bit consumption required for marking the current pixel point as the last non-zero bit of the current transformation unit, namely the second bit consumption information, and the entropy coding estimation flow of the symbol has less influence on the coding quality, which is omitted. The fixed value is defined as a second fixed value by setting a fixed value instead of the bit consumption information lastBits.
The optimal quantization coefficients of the current pixel point are then calculated directly using the contexts significantBits and significantCoeffGroupBits of the encoded significant bits of the above bit estimation operation, in combination with the above set first fixed value (i.e., the first bit consumption information corresponding to greaterOneBits). Since greaterOneBits has a small influence on the final result, the influence on the calculation result of the optimal quantization coefficient is small, and the coding quality is not excessively reduced. Likewise, using the second fixed value to represent the second bit consumption information, a rate-distortion cost for encoding the current pixel point into the last non-zero coefficient is calculated. Therefore, simplification of the entropy coding bit estimation flow can be realized, and the time consumption of rate distortion optimization quantization is shortened.
Illustratively, the bits consumed here are directly replaced with 0's by skipping the estimation model loading of the two-part bit consumption information at the time of bit estimation and deleting the corresponding data structure. The method is used for carrying out the subsequent optimal quantization coefficient calculation and rate distortion cost calculation, so that better coding acceleration can be obtained, assembly acceleration is facilitated, and unnecessary calculation amount is reduced. It should be noted that, in practical application, according to an actual test result, the first bit consumption property and the second bit consumption information adaptability may be set to corresponding fixed values, where the fixed values are combined with the actual coding acceleration requirement adaptability according to the bit consumption information of the actual test.
Specifically, as shown in fig. 3, calculating the rate-distortion cost of the current pixel point code as the last non-zero coefficient based on the second fixed value includes:
s1201, traversing each non-zero pixel point of the current transformation unit, and determining an estimated code rate required for coding the current pixel point;
s1202, calculating the rate distortion cost of the current pixel point coded as the last non-zero coefficient based on the estimated code rate and the second fixed value.
Based on the set second fixed value, when the last non-zero coefficient of the transformation unit is positioned later, the rate distortion cost of the last non-zero coefficient coded at the corresponding position of each pixel point needs to be calculated. The present application therefore uses this second fixed value to calculate the rate-distortion cost for the pixel-point code to be the last non-zero coefficient. And (3) calculating the rate distortion cost of the last non-zero coefficient coded by the current pixel point by determining the estimated code rate of the current pixel point and combining the second fixed value.
Wherein determining an estimated code rate required for encoding a current pixel point includes:
Determining a pixel value of a current pixel point, inquiring a pre-constructed mapping relation table based on the pixel value, determining an estimated code rate required for encoding the current pixel point, and constructing the mapping relation table in advance according to mapping relations between different pixel values and corresponding estimated code rates.
And estimating the code rate required by coding the current pixel point by using a table look-up method according to the numerical value of the pixel point, namely, the estimated code rate. It will be appreciated that the code rate consumption of different pixel values when encoding is different. The mapping relation is constructed by testing the code rate consumption of different pixel values in advance for coding. And then, the estimated code rate required by coding the current pixel point can be quickly determined by inquiring the mapping relation, so that the coding efficiency is further improved.
Calculating the rate distortion cost of the current pixel point coded as the last non-zero coefficient based on the estimated code rate and the second fixed value, including:
And acquiring the set rate-distortion cost influence coefficient and the set coefficient amplification information, determining initial rate consumption information according to the sum of the estimated code rate and the second fixed value, and calculating the rate-distortion cost of the last non-zero coefficient coded by the current pixel point based on the initial rate consumption information, the rate-distortion cost influence coefficient and the coefficient amplification information.
Based on the queried estimated code rate, adding bit consumption information (second fixed value) of lastBits flag bits, namely the code rate consumption of the current pixel point position code non-0, and defining the initial code rate consumption information. Based on the initial code rate consumption information, the set rate distortion cost influence coefficient and the set coefficient amplification information are combined, so that the rate distortion cost of the current pixel point coded as the last non-zero coefficient can be calculated. In addition, the original rate distortion cost calculation flow is complex, and the coding efficiency is further improved by simplifying the rate distortion cost calculation process. The original rate distortion cost calculation formula is as follows:
lastCoeffCost=lambda*(IEP_RATE*suffixLen+estBitsSbac.lastBits)>>bitsCostShift
Wherein lastCoeffCost represents the RATE distortion cost of the last non-zero coefficient encoded by the current pixel, suffixLen is the estimated code RATE of the pixel, estButssbac. Lastbits is the second bit consumption information of the last non-zero bit of the current conversion unit marked by the current pixel, lambda and bitsCostShift are both RATE distortion cost influence coefficients set in the RATE distortion calculation process, IEP_RATE is the original coefficient amplification information, and the value is 1< <15. Since the entropy coding model calculates the second bit consumption information consumption for calculation accuracy, the result is multiplied by iep_rate. Correspondingly, iep_rate also needs to be multiplied when calculating the RATE-distortion cost.
The present application optimizes the above calculation formula in view of its great influence on the coding complexity. Because the second bit consumption information estbmissbac.lastbits takes the value of the second fixed value, the embodiment of the application takes the value of the second fixed value as 0, and the estimated code rate suffixLen of the pixel point is used as the initial code rate consumption information to calculate the rate distortion cost. It can be seen that in the original RATE-distortion cost calculation formula, the estimated code RATE suffixLen is multiplied by iep_rate and lambda and then right shift has obvious calculation redundancy, and the reason is that the estBItssbac. In the above we have simplified the entropy coding model of estbmtssbac. Lastbits, using the second fixed value as the estbmtssbac. Lastbits, so the entropy coding bit consumption here is not calculated any more, and thus iep_rate can no longer be multiplied, as long as bitsCostShift minus 15, reducing the computational effort, essentially lossless. And in the actual consumption code RATE, IEP_RATE is not needed to be multiplied, so that the corresponding RATE distortion calculation formula is modified, the calculated amount can be obviously reduced, and the load of an encoder is reduced. The optimized rate distortion cost calculation formula is as follows:
lastcoeffcost=lambda*suffixLen>>(bitscostshift-log2_IEP_RATE)
after calculating the rate distortion cost of the current pixel point coded as the last non-zero coefficient based on the second fixed value, the method further comprises:
Traversing the non-zero pixel point forwards from the last non-zero pixel point of the current transformation unit, and selecting the non-zero pixel point corresponding to the rate distortion cost with the minimum value as the last non-zero coefficient position of the current transformation unit.
When the last non-zero coefficient is positioned, traversing from the last non-zero pixel point of the current transformation unit to the beginning all the way forward, and determining the rate distortion cost of each non-zero pixel point by referring to the rate distortion cost calculation mode. And then selecting the pixel point with the minimum rate distortion cost as the last non-zero coefficient position of the current transformation unit.
The method comprises the steps of traversing a set number of non-zero pixel points forwards from the last non-zero pixel point of a current transformation unit, determining the minimum cost from rate distortion costs corresponding to the set number of non-zero pixel points, and taking the non-zero pixel point corresponding to the minimum cost as the last non-zero coefficient position of the current transformation unit.
The last non-zero coefficient of most transform units is easier to locate at the later position of the block for statistical considerations, and the rate-distortion optimization process has initially decided whether the pixel point is to be quantized to all zeros, so it is not necessary to traverse all pixels completely. Based on this, the embodiment of the application traverses up to K non-zero coefficients for each transformation unit, from which the best last non-zero coefficient point is calculated. Therefore, the influence on the coding quality is extremely small, the last non-zero coefficient position of the current transformation unit can be accurately determined, and the coding efficiency is accelerated to a certain extent. Optionally, the application takes K as a value of 3, traverses 3 pixel points forwards from the last non-zero pixel point of the current transformation unit, selects the pixel point with the minimum rate distortion cost as the last non-zero coefficient position of the current transformation unit, and can better promote the coding efficiency while guaranteeing the coding quality according to the actual test.
According to the method, in the entropy coding bit estimation process of rate distortion optimization quantization, the optimal quantization coefficient of the current pixel point is calculated based on the first fixed value according to the first bit consumption information which is set by the first fixed value and is required by coding when the coefficient to be coded is larger than 1, and the rate distortion cost of the current pixel point coded as the last non-zero coefficient is calculated based on the second fixed value according to the second bit consumption information which is set by the second fixed value and is used for indicating that the current pixel point is marked as the last non-zero bit of the current conversion unit. By adopting the technical means, the bit consumption estimation step with less influence on the coding quality by the skipped part is selected in the entropy coding bit estimation process of rate-distortion optimization quantization, and the bit estimation result is represented by a fixed value, so that the time consumption of rate-distortion optimization quantization can be shortened on the premise of ensuring the coding quality, the optimization of the rate-distortion optimization quantization flow is realized, and the video coding efficiency is further improved.
Based on the above embodiments, fig. 4 is a schematic structural diagram of a rate-distortion optimization quantization system for video coding according to the present application. Referring to fig. 4, the rate-distortion optimized quantization system for video coding provided in this embodiment specifically includes a first optimizing module 21 and a second optimizing module 22.
The first optimizing module 21 is configured to skip bit consumption estimation of the current pixel point when the coefficient to be encoded is greater than 1 in the entropy encoding bit estimation process of rate distortion optimization quantization, and calculate an optimal quantization coefficient of the current pixel point based on the first fixed value according to the first bit consumption information required by the first fixed value to indicate that the current pixel point is encoded when the coefficient to be encoded is greater than 1;
The second optimization module 22 is configured to skip the bit consumption estimation of the current pixel marked as the last non-zero bit of the current transform unit, calculate the rate-distortion cost of the current pixel encoded as the last non-zero coefficient based on the second fixed value according to the second bit consumption information set to the second fixed value to indicate that the current pixel is marked as the last non-zero bit of the current transform unit.
Specifically, calculating the rate-distortion cost of the current pixel point code as the last non-zero coefficient based on the second fixed value includes:
And traversing each non-zero pixel point of the current transformation unit, determining an estimated code rate required for encoding the current pixel point, and calculating the rate distortion cost of the current pixel point encoded as the last non-zero coefficient based on the estimated code rate and the second fixed value.
Determining an estimated code rate required to encode a current pixel, comprising:
Determining a pixel value of a current pixel point, inquiring a pre-constructed mapping relation table based on the pixel value, determining an estimated code rate required for encoding the current pixel point, and constructing the mapping relation table in advance according to mapping relations between different pixel values and corresponding estimated code rates.
Calculating the rate distortion cost of the current pixel point coded as the last non-zero coefficient based on the estimated code rate and the second fixed value, including:
And acquiring the set rate-distortion cost influence coefficient and the set coefficient amplification information, determining initial rate consumption information according to the sum of the estimated code rate and the second fixed value, and calculating the rate-distortion cost of the last non-zero coefficient coded by the current pixel point based on the initial rate consumption information, the rate-distortion cost influence coefficient and the coefficient amplification information.
Specifically, after calculating the rate distortion cost of the current pixel point encoded as the last non-zero coefficient based on the second fixed value, the method further includes:
Traversing the non-zero pixel point forwards from the last non-zero pixel point of the current transformation unit, and selecting the non-zero pixel point corresponding to the rate distortion cost with the minimum value as the last non-zero coefficient position of the current transformation unit.
Traversing the non-zero pixel point forwards from the last non-zero pixel point of the current transformation unit, selecting the non-zero pixel point corresponding to the rate distortion cost with the minimum value as the last non-zero coefficient position of the current transformation unit, and comprising the following steps:
Traversing the set number of non-zero pixel points forwards from the last non-zero pixel point of the current transformation unit, determining the minimum cost from the rate distortion cost corresponding to the set number of non-zero pixel points, and taking the non-zero pixel point corresponding to the minimum cost as the last non-zero coefficient position of the current transformation unit.
According to the method, in the entropy coding bit estimation process of rate distortion optimization quantization, the optimal quantization coefficient of the current pixel point is calculated based on the first fixed value according to the first bit consumption information which is set by the first fixed value and is required by coding when the coefficient to be coded is larger than 1, and the rate distortion cost of the current pixel point coded as the last non-zero coefficient is calculated based on the second fixed value according to the second bit consumption information which is set by the second fixed value and is used for indicating that the current pixel point is marked as the last non-zero bit of the current conversion unit. By adopting the technical means, the bit consumption estimation step with less influence on the coding quality by the skipped part is selected in the entropy coding bit estimation process of rate-distortion optimization quantization, and the bit estimation result is represented by a fixed value, so that the time consumption of rate-distortion optimization quantization can be shortened on the premise of ensuring the coding quality, the optimization of the rate-distortion optimization quantization flow is realized, and the video coding efficiency is further improved.
The rate distortion optimization quantization system for video coding provided by the embodiment of the application can be configured to execute the rate distortion optimization quantization method for video coding provided by the embodiment of the application, and has corresponding functions and beneficial effects.
On the basis of the actual embodiment, the embodiment of the application also provides rate distortion optimization quantization equipment for video coding, which comprises a processor, a memory, a communication module, an input device and an output device. The memory is used as a computer readable storage medium and can be configured to store a software program, a computer executable program and a module, and the program instructions/modules (for example, a first optimization module and a second optimization module in a rate distortion optimization quantization system of video coding) corresponding to the rate distortion optimization quantization method of video coding according to any embodiment of the present application. The communication module is configured to perform data transmission. The processor executes various functional applications of the device and data processing by running software programs, instructions and modules stored in the memory, i.e., implements the rate-distortion optimized quantization method for video coding described above. The input means may be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the device. The output means may comprise a display device such as a display screen. The rate-distortion optimized quantization device for video coding provided above may be configured to execute the rate-distortion optimized quantization method for video coding provided in the above embodiment, and has corresponding functions and beneficial effects.
On the basis of the above embodiments, the present application further provides a computer-readable storage medium storing computer-executable instructions that, when executed by a computer processor, are configured to perform a rate-distortion optimized quantization method for video encoding, where the storage medium may be any of various types of memory devices or storage devices. Of course, the computer-readable storage medium provided by the embodiments of the present application has computer-executable instructions not limited to the rate-distortion optimization quantization method for video coding described above, but may also perform related operations in the rate-distortion optimization quantization method for video coding provided by any of the embodiments of the present application.
On the basis of the above embodiments, the embodiments of the present application further provide a computer program product, where the technical solution of the present application is essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product, and the computer program product is stored in a storage medium, and includes several instructions to cause 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 according to the embodiments of the present application.

Claims (10)

1.一种视频编码的率失真优化量化方法,其特征在于,包括:1. A rate-distortion optimization quantization method for video coding, comprising: 在率失真优化量化的熵编码比特估计过程中,依据设定的第一固定值表示当前像素点在待编码系数大于1时编码所需的第一比特消耗信息,基于所述第一固定值计算当前像素点的最优量化系数;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.根据权利要求1所述的视频编码的率失真优化量化方法,其特征在于,基于所述第二固定值计算当前像素点编码为最后一个非零系数的率失真代价,包括:2. The rate-distortion optimization quantization method for video coding according to claim 1, wherein calculating the rate-distortion cost of encoding the current pixel as the last non-zero coefficient based on the second fixed value comprises: 遍历当前变换单元的各个非零像素点,确定编码当前像素点所需的估计码率;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.根据权利要求2所述的视频编码的率失真优化量化方法,其特征在于,所述确定编码当前像素点所需的估计码率,包括:3. The rate-distortion optimization quantization method for video coding according to claim 2, wherein determining the estimated bit rate required for encoding the current pixel comprises: 确定当前像素点的像素值,基于所述像素值查询预构建的映射关系表,确定编码当前像素点所需的估计码率,所述映射关系表预先根据不同像素值与对应的估计码率的映射关系构建。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.根据权利要求2所述的视频编码的率失真优化量化方法,其特征在于,基于所述估计码率和所述第二固定值计算当前像素点编为最后一个非零系数的率失真代价,包括:4. The rate-distortion optimization quantization method for video coding according to claim 2, wherein the step of calculating 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 comprises: 获取设定的率失真代价影响系数和设定的系数放大信息,根据所述估计码率和所述第二固定值之和确定初始码率消耗信息,基于初始码率消耗信息、所述率失真代价影响系数和所述系数放大信息计算当前像素点编为最后一个非零系数的率失真代价。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.根据权利要求1所述的视频编码的率失真优化量化方法,其特征在于,在所述基于所述第二固定值计算当前像素点编为最后一个非零系数的率失真代价之后,还包括:5. The rate-distortion optimization quantization method for video coding according to claim 1, characterized in that after calculating the rate-distortion cost of encoding the current pixel as the last non-zero coefficient based on the second fixed value, the method further comprises: 从当前变换单元最后一个非零像素点开始向前遍历非零像素点,选择取值最小的所述率失真代价对应的非零像素点为当前变换单元最后一个非零系数位置。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.根据权利要求5所述的视频编码的率失真优化量化方法,其特征在于,所述从当前变换单元最后一个非零像素点开始向前遍历非零像素点,选择取值最小的所述率失真代价对应的非零像素点为当前变换单元最后一个非零系数位置,包括:6. The rate-distortion optimization quantization method for video coding according to claim 5, wherein the step of traversing non-zero pixels starting from the last non-zero pixel in the current transform unit and selecting the non-zero pixel corresponding to the minimum rate-distortion cost as the last non-zero coefficient position of the current transform unit comprises: 从当前变换单元最后一个非零像素点开始向前遍历设定数量个非零像素点,从设定数量个非零像素点对应的所述率失真代价中确定最小代价,以最小代价对应的非零像素点做为当前变换单元最后一个非零系数位置。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.一种视频编码的率失真优化量化系统,其特征在于,包括:7. A rate-distortion optimized quantization system for video coding, comprising: 第一优化模块,配置为在率失真优化量化的熵编码比特估计过程中,依据设定的第一固定值表示当前像素点在待编码系数大于1时编码所需的第一比特消耗信息,基于所述第一固定值计算当前像素点的最优量化系数;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.一种视频编码的率失真优化量化设备,其特征在于,包括:8. A rate-distortion optimization quantization device for video coding, comprising: 存储器以及一个或多个处理器;memory and one or more processors; 所述存储器,配置为存储一个或多个程序;The memory is configured to store one or more programs; 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-6任一所述的视频编码的率失真优化量化方法。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.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令在由计算机处理器执行时配置为执行如权利要求1-6任一所述的视频编码的率失真优化量化方法。9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a computer processor, they are configured to execute the rate-distortion optimized quantization method for video coding according to any one of claims 1 to 6. 10.一种计算机程序产品,其特征在于,所述计算机程序产品中包含有指令,当所述指令在计算机或处理器上运行时,使得所述计算机或处理器执行如权利要求1-6任一所述的视频编码的率失真优化量化方法。10. A computer program product, characterized in that the computer program product contains instructions, which, when executed on a computer or a processor, enable the computer or the processor to execute the rate-distortion optimized quantization method for video coding according to any one of claims 1 to 6.
CN202310797042.1A 2023-06-30 2023-06-30 Rate-distortion optimization quantization method, system, device and storage medium for video coding Active CN116962700B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202310797042.1A CN116962700B (en) 2023-06-30 2023-06-30 Rate-distortion optimization quantization method, system, device and storage medium for video coding
PCT/CN2024/099398 WO2025001888A1 (en) 2023-06-30 2024-06-14 Rate-distortion optimized quantization method, system and device for video coding, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310797042.1A CN116962700B (en) 2023-06-30 2023-06-30 Rate-distortion optimization quantization method, system, device and storage medium for video coding

Publications (2)

Publication Number Publication Date
CN116962700A CN116962700A (en) 2023-10-27
CN116962700B true CN116962700B (en) 2025-09-05

Family

ID=88461187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310797042.1A Active CN116962700B (en) 2023-06-30 2023-06-30 Rate-distortion optimization quantization method, system, device and storage medium for video coding

Country Status (2)

Country Link
CN (1) CN116962700B (en)
WO (1) WO2025001888A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116962700B (en) * 2023-06-30 2025-09-05 有半岛(北京)信息科技有限公司 Rate-distortion optimization quantization method, system, device and storage medium for video coding
CN118317091B (en) * 2024-06-07 2024-09-06 浙江大华技术股份有限公司 Rate distortion optimization method, image encoding device and computer storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104221375A (en) * 2012-04-13 2014-12-17 高通股份有限公司 Level decision in rate distortion optimized quantization
CN105812804A (en) * 2014-12-30 2016-07-27 浙江大华技术股份有限公司 Method and device used for determining optimal quantization value in RDOQ process

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1727370A1 (en) * 2005-05-25 2006-11-29 Thomson Licensing Rate-distortion based video coding mode selection foreseeing the esitmation of bit rate and distortion using a simplified transform on low activity prediction residuals
US8798137B2 (en) * 2008-02-29 2014-08-05 City University Of Hong Kong Bit rate estimation in data or video compression
JP6197496B2 (en) * 2013-08-30 2017-09-20 富士通株式会社 Quantization apparatus, quantization method, and quantization program
CN105898300B (en) * 2016-05-06 2019-03-26 西安电子科技大学 A kind of improvement transformation coefficient sign bit hidden method based on recovery transformation coefficient
CN107257461B (en) * 2017-04-21 2019-08-20 中国计量大学 Hard Decision Quantization Method for Video and Audio Coding Based on Context Adaptive Offset Model
CN108322749B (en) * 2018-03-15 2021-03-16 北京数码视讯科技股份有限公司 RDOQ coefficient optimization method, RDOQ acceleration method and device
JP7346837B2 (en) * 2019-02-06 2023-09-20 株式会社リコー Encoding device, decoding device, encoding method, decoding method, encoding program, and decoding program
CN110418131B (en) * 2019-07-15 2021-07-27 杭州电子科技大学 A code rate prediction method and a fast mode decision method based on code rate prediction
CN115174918B (en) * 2022-06-30 2025-06-03 杭州电子科技大学 A VVC Fast Bitrate Estimation Method Based on Statistical Modeling
CN115334306A (en) * 2022-08-12 2022-11-11 有半岛(北京)信息科技有限公司 Rate distortion optimization quantization method, device, equipment and storage medium
CN116962700B (en) * 2023-06-30 2025-09-05 有半岛(北京)信息科技有限公司 Rate-distortion optimization quantization method, system, device and storage medium for video coding

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104221375A (en) * 2012-04-13 2014-12-17 高通股份有限公司 Level decision in rate distortion optimized quantization
CN105812804A (en) * 2014-12-30 2016-07-27 浙江大华技术股份有限公司 Method and device used for determining optimal quantization value in RDOQ process

Also Published As

Publication number Publication date
CN116962700A (en) 2023-10-27
WO2025001888A1 (en) 2025-01-02

Similar Documents

Publication Publication Date Title
CN116962700B (en) Rate-distortion optimization quantization method, system, device and storage medium for video coding
WO2022088631A1 (en) Image encoding method, image decoding method, and related apparatuses
JP5032313B2 (en) Motion estimation in video compression systems
JP6276199B2 (en) Significance map coding complexity reduction
US9210435B2 (en) Video encoding method and apparatus for estimating a code amount based on bit string length and symbol occurrence frequency
WO2021134635A1 (en) Transform method, encoder, decoder, and storage medium
CN110636313A (en) Transformation and quadratic transformation matrix training method, encoder and related device
KR20120084168A (en) Method for video encoding mode selection and video encoding apparatus performing the same
CN111586406B (en) A kind of VVC intra-frame skip method, system, device and storage medium
US20230232016A1 (en) Point cloud encoding method and related apparatuses
JP2001339730A (en) Video coding method
WO2025001883A1 (en) Precoding information multiplexing-based multi-video stream coding method and system
WO2025001886A1 (en) Motion search processing method, system and device for video coding, and storage medium
CN109756739B (en) Image prediction method and device
CN115379218B (en) A vector quantization method and system for video coding
CN108769689A (en) skip macro block judging method, video transcoding method, electronic equipment and storage medium
CN113347425B (en) Information processing method and device, equipment and storage medium
WO2024255561A1 (en) Coding acceleration method and system based on precoding information splitting
CN109756737A (en) Image prediction method and device
CN118354086A (en) Unmanned aerial vehicle image processing method and device based on FPGA and computer equipment
CN113365077B (en) Inter prediction method, encoder, decoder, computer readable storage medium
CN115022636A (en) Rate-distortion optimized quantization method and device
CN114449277B (en) Method and apparatus for context derivation for coefficient coding
US12212761B2 (en) Encoder and associated signal processing method
TWI893191B (en) Image encoding method, image decoding method and related devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant