Summary of the invention
Based on this, be necessary to provide one to simplify computational process, effectively reduce amount of calculation, thus the computational methods of the quick distortion rate of the various resources costs such as to save time.
According to an aspect of the present invention, provide the computational methods of the quick distortion rate in a kind of HEVC coding, comprise DCT, Quantization, InverseQuantization and Fssd tetra-algorithm steps, particularly,
DCT:Y=AXAT;
Quantization:Zij=round(Yij/Qstep);
InverseQuantization:Vij=Zij×Qstep;
Fssd:
Wherein in an embodiment, algorithm application is in the HEVC coding environment of Qp > 25.
The computational methods of the quick distortion rate in this HEVC coding, instead of traditional SSSD computational methods, thus significantly reduce amount of calculation, the cost of each side resource such as to save time, and this method is in the range of application of reality, the error produced with traditional SSSD algorithm is insignificant, and therefore this method not only simplify computation complexity, also reaches effect as in the past.
Embodiment
For the ease of understanding the present invention, will be described more fully the present invention with specific embodiment below.But the present invention can realize in many different forms, is not limited to embodiment described herein.On the contrary, provide the object of this embodiment be make the understanding of disclosure of the present invention more comprehensively thorough.
The computational methods of the quick distortion rate in the HEVC coding of one embodiment of the invention, comprise DCT, Quantization, InverseQuantization and Fssd tetra-algorithm steps, particularly,
DCT:Y=AXAT;
Quantization:Zij=round(Yij/Qstep);
InverseQuantization:Vij=Zij×Qstep;
Fssd:
The computational methods that the present embodiment adopts are called for short FFFD algorithm.
Rate distortion (spatialdomainsumofsquareddifference in FFFD algorithm and current calculating time domain, be called for short SSSD algorithm) computational methods compare, the main distinction is the IDCT step eliminated in SSSD algorithm, thus significantly saves amount of calculation, improves coding rate.
Be illustrated in figure 1 the logic diagram of current SSSD algorithm, comprise the steps such as DCT, Quantization, InverseQuantization, IDCT and sssd, in figure, Q represents Quantization, and IQ represents InverseQuantization.
Particularly,
DCT:Y=AXAT;
Quantization:Zij=round(Yij/Qstep);
InverseQuantization:Vij=Zij×Qstep;
IDCT:W=ATVA;
sssd:
Be illustrated in figure 2 the logic diagram of the FFFD algorithm of the present embodiment, in figure, Q represents Quantization, and IQ represents InverseQuantization.
Can be obtained with Fig. 2 by comparison diagram 1, in the present embodiment computational process, eliminate IDCT step, and pick-up rate distortion (SSD) from different parameters.
According to handkerchief Savall theorem (Parseval ' stheorem), the gross energy that waveform x (t) is accumulated according to time-domain t is equal with the gross energy that Fourier transform X (f) of this waveform is accumulated at frequency domain territory f.Be generalized to the dct transform of discrete domain, following proof can be done:
For one dimension DCT,
Transform:y=Fx,
Quantization:yq=Q[y],
Inverse-Quantization:yiq=IQ[yq],
Inverse-Transform:xr=F-1yiq,
Spatialdomainsumofsquareddifference:
Frequencydomainsumofsquareddifference:
Wherein, F is one dimension DCT transition matrix.
Because dct transform F is orthogonal normalizing matrix (orthonormalmatrix), can obtain and prove as follows:
Namely the numerical value after dct transform, the energy in frequency domain equals the energy of original value in time domain.
We can be proved as follows equally:
Namely the FSSD in frequency domain is strictly equivalent to the SSSD in time domain.
Rate distortion (SSD) in actual use comprises following several part:
1, the DCT transition matrix specified in HEVC coding protocol is an INTEGER MATRICES.This integer transition matrix numerical value is the approximation of DCT floating-point transition matrix numerical value, so this integer transition matrix not strict orthogonal normalizing, thus causes rate distortion.This part is referred to as " transfer ratio distortion ".
2, the DCT specified in HEVC agreement is the process of a two-dimensional transformations, in order to ensure low complex degree, agreement is defined in the integral point number that the median of preserving in horizontal conversion and vertical transfer process is 16bit precision, the operation of the rounding existed in the process that this rounds, also the loss of precision will be caused, generation rate distortion.This part is referred to as " rounding rate distortion ".
3, quantification (Quantization) process specified in HEVC agreement is a lossy compression method process, according to the size of quantization parameter (QuantizationParameter) to round DCT coefficient different accuracy, can produce a large amount of rate distortions in this process, this process is also the core that HEVC video compression protocols can reach superelevation compression ratio.This part is referred to as " quantitative rate distortion ".
In actual use, there is error in FSSD algorithm compared with the SSSD algorithm obtained in traditional time domain, and main cause is the above-mentioned 1st and the part 2 that are that rate distortion produces, i.e. " transfer ratio distortion " and " rounding rate distortion ".Owing to eliminating IDCT, FSSD algorithm can comprise different " change and restrain distortion " and " rounding rate distortion " compared with SSSD algorithm.
But when Qp is enough large, " distortion of conversion rule " is quite little with " rounding rate distortion " accounting in whole rate distortion, so in this case, the value difference of FSSD and SSSD is not little.
As shown in Figure 3, the error between the FSSD algorithm calculated after HEVC encoder for random white noise matrix and SSSD algorithm.Error between FSSD algorithm and SSSD algorithm is anticlimax with the increase of Qp, and when Qp is 25 time, both errors are only about 5%.
In field of video compression, the QP value of HEVC all obtains high compression ratio more than 25 in most cases, and the error that therefore the FFFD algorithm of the present embodiment is total is in actual applications insignificant.Visible, the computational methods of the quick distortion rate in the HEVC coding of the present embodiment, instead of traditional SSSD algorithm, significantly simplify computation complexity, effective controlling calculation amount, thus the resources costs of each side such as to save time, and the FFFD algorithm of the present embodiment is in the range of application of reality, the error produced with traditional SSSD algorithm is insignificant, and therefore compare traditional SSSD algorithm, FFFD algorithm has more excellent effect.
The above embodiment only have expressed individual embodiments of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.