1. Field of the Invention
The present invention generally relates to video coding, and more particularly to a method of rate-distortion optimized quantization.
2. Description of Related Art
Conventional rate-distortion optimized quantization methods can require an exhaustive search process and a redundantly entropy coding process. For this reason, the computational cost of coding performance of conventional methods is high, and the computational efficiency of conventional methods is low.
A need has thus arisen to develop a novel scheme with high efficiency and low computational complexity for a video coding process.
In view of the foregoing, it is an object of the embodiment of the present invention to provide a rate-distortion optimized quantization method that allows the bitrate of quantized transform coefficient(s) to be efficiently estimated in an offline state. Another object of the embodiment of the present invention is to provide a closed-form solution for quantized transform coefficients of the rate-distortion optimized quantization, in order to simplify the computational process and substantially (e.g., greatly) reduce the computational cost.
According to one embodiment, the rate-distortion optimized quantization method includes the steps of determining a rate model and a distortion model respectively, establishing a rate-distortion objective function according to the rate model and the distortion model, estimating a closed-form solution for the rate-distortion objective function, and generating quantized transform coefficients by way of the closed-form solution according to an input frame.
Referring more particularly to the drawings,
At step 102, the method 100 determines a rate model. In one embodiment, the rate model is generated by using a preset quantizer and a plurality of training sequences to perform an iterative process. The preset quantizer may be a mid-tread uniform quantizer. More particularly, in the embodiment, the rate model is determined on the basis of information theory, as shown below:
wherein α, β and γ are model parameters, |xi| is one norm of the quantized transform coefficient xi, which is defined as the absolute value of xi, ∥xi∥0 is zero norm of the quantized transform coefficient xi,
According to one aspect of the embodiment, the model parameters α and β may be determined by training in the offline state. On the other hand, when each quantized transform coefficient xi is zero, it will result in a zero bitrate, and therefore the least one model parameter γ is directly set to be zero. Accordingly, the rate model may be expressed as follows:
Referring to
At first, the mid-tread uniform quantizer is applied to encode a plurality of the training sequences to obtain a set of coded blocks Vo, which are then used to train model parameters α0 and β0. In this embodiment, the mid-tread uniform quantizer is shown as follows:
where └•┘ denotes a floor operation, Qs denotes a quantization step size, Si is a predefined scale factor, ti is a transform coefficient(s) of the coding block, f is rounding offset. In this embodiment, f is set to 0.5.
Afterwards, the model parameters α0 and β0 are used to activate an analytical RDOQ process, in order to generate an update quantizer (RDOQ1). Then, the same training sequences are encoded with RDOQ1 to generate a set of coded block V1, which are further used for training another set of model parameters α1 and β1. Repeatedly, the resulting model parameters α1 and β1 are used to activate an analytical RDOQ process, so as to generate another update quantizer (RDOQ2) correspondingly. Thus, according to the iterative training scheme mentioned above, the kth model parameters αk-1 and βk-1, which are convergent, may eventually be obtained, and therefore the optimal model parameters α and β of the rate model can be well predicted. Simultaneously, the optimal model parameters α and β of the rate model may be well predicted with any possible input training sequence in the offline state, in order to establish an optimal model parameter table for the rate model in advance.
In step 104, the method 100 determines a distortion model. In one embodiment, the distortion model is measured by the sum of squared error (SSE) between the residual signals r, which are obtained by subtracting the (intra/inter) predicted signal from an input signal, and the corresponding reconstructed residual signals {tilde over (r)}, and therefore the distortion model can be expressed as follows:
where A is an inverse transform matrix, ∥ ∥2 denotes two norm, which is defined as a sum of squared values of all elements therein, Ai denotes ith column vector of A, and ti is the transform coefficient of the coding block.
In step 106, the rate model and the distortion model expressed in (2) and (3) are substituted in the flowing rate-distortion minimization formulation, which is expressed as:
where {circumflex over (x)} are optimal quantized transform coefficients,
Hence, the rate-distortion objective function, with the consideration of mutual effect between the quantization and the rate model, may be well established as follows:
As each quantized transform coefficient xi in (5) is obviously separated from the other, each quantized transform coefficient xi therefore may be solved independently, so as to obtain an optimal quantized transform coefficient {circumflex over (x)}i by an independent formulation as:
Then, in step 108, according to one aspect of the embodiment, a closed-form solution may be derived from (6) as follows:
and
and ┌┐ is a ceiling operation.
In step 110, each input frame is applied to the closed-form solution mentioned above for generating the correspondingly optimal quantized transform coefficients. More particularly, as the model parameters α and β of the closed-form solution may be trained to obtain and establish a model parameter table, thus when the coding process is applied to one input frame, the correspondingly optimal model parameters α and β can be immediately provided by dynamically checking the model parameter table according to the feature of the input frame. Therefore, the computational cost of rate-distortion optimized quantization is greatly reduced.
According to the method 100 and the disclosed rate-distortion model thereof discussed above, the coding efficiency and reliability of the present embodiment may be significantly enhanced and improved. Further, compared with the conventional methods, this embodiment may immediately provide the optimal model parameters by checking table according to the feature of the input frame, so as to greatly reduce the computational cost.
Although specific embodiments have been illustrated and described, it will be appreciated by those skilled in the art that various modifications may be made without departing from the scope of the present invention, which is intended to be limited solely by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
102141141 | Nov 2013 | TW | national |