Real-time video coding/decoding
First Claim
1. A method of real-time encoding a digitized sequence of video frames using a codec with high compression efficiency, comprising steps of:
- dividing a video frame into macroblocks of pixels;
performing texture prediction using reconstructed texture of previously encoded/decoded video data;
performing a texture prediction error transform; and
performing quantization and encoding of DCT transform coefficients;
wherein quantization of DCT transform coefficients is performed using the following formula;
q=(c·
A (Quantstep)+round_const)+round_const)/220;
where c—
coefficient value;
q—
quantized coefficient value;
A—
a constant depending on quantization parameter index;
round_const—
rounding control;
0.5 sign (c), if |c|<
20·
220/A (Quantstep) and 0.25 sign (c), if |c|≧
20·
220/A (Quantstep).
8 Assignments
0 Petitions
Accused Products
Abstract
A video codec for real-time encoding/decoding of digitized video data with high compression efficiency, comprising a frame encoder receiving input frame pixels; a codec setting unit for setting and storing coding setting parameters; a CPU load controller for controlling desired frame encoding time and CPU loading; a rate controller for controlling frame size; a coding statistics memory for storing frequency tables for arithmetic coding of bitstream parameters and a reference frame buffer for storing reference frames. The frame encoder comprises a motion estimation unit, a frame head coding unit, a coded frame reconstruction and storage unit and a macroblock encoding unit. The macroblock encoding unit provides calculation of texture prediction and prediction error, transforming texture prediction error and quantization of transform coefficient, calculation of motion vector prediction and prediction error and arithmetic context modeling for motion vectors, header parameters and transform coefficients. The codec also includes a deblocking unit for processing video data to eliminate blocking effect from restored data encoded at high distortion level, which may be a part of encoder or decoder, an internal resize unit, providing matching downscaling of a frame before encoding and upscaling of decoded frame according to the coding setting parameters, and a noise suppression unit.
147 Citations
24 Claims
-
1. A method of real-time encoding a digitized sequence of video frames using a codec with high compression efficiency, comprising steps of:
-
dividing a video frame into macroblocks of pixels; performing texture prediction using reconstructed texture of previously encoded/decoded video data; performing a texture prediction error transform; and performing quantization and encoding of DCT transform coefficients; wherein quantization of DCT transform coefficients is performed using the following formula;
q=(c·
A (Quantstep)+round_const)+round_const)/220;where c—
coefficient value;q—
quantized coefficient value;A—
a constant depending on quantization parameter index;round_const—
rounding control;
0.5 sign (c), if |c|<
20·
220/A (Quantstep) and 0.25 sign (c), if |c|≧
20·
220/A (Quantstep).- View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 20, 21, 22, 23, 24)
-
-
14. A method of real-time encoding a digitized sequence of video frames using a codec with high compression efficiency, comprising steps of:
-
dividing a video frame into macroblocks of pixels; performing texture prediction using reconstructed texture of previously encoded/decoded video data; selecting best parameters for macroblock encoding based on preset coding parameters and codec working parameters for macroblock coding; selecting intra prediction mode predicting block pixels using reconstructed texture of previously coded/decoded blocks of current frame and specifying prediction method; selecting motion compensation mode for macroblock encoding; performing a texture prediction error transform; and performing quantization and encoding DCT transform coefficients using wavelet transform, wherein resulting wavelet transform coefficients are compressed by the context-based entropy coding is based on contexts including three neighboring coefficients and one root coefficient, the value of each coefficient being coded arithmetically, and the context-based entropy coding of absolute value of transform coefficients is determined in accordance with the following algorithm; set a current value of coefficient=0; construct bits of context for entropy-coded binary value; bit 0=abs(n1)>
current value, where abs (n1) is absolute value of the first neighboring coefficient;bit 1=abs(n2)>
current value, where abs (n2) is absolute value of the second neighboring coefficient;bit 2=abs(n3)>
current value, where abs (n3) is absolute value of the third neighboring coefficient;bit 3=0 (root coefficient=0); bits 4,5=(abs(n3)*3+abs(n1)*3+abs(n2)*2+4)/8={0, 1, 2, 3 or greater}; using the context, send bit “
1”
if abs(coefficient)=current value, otherwise send bit “
0”
;increment the current value; if abs(coefficient)≠
current value, repeat the construct step;if abs(coefficient)>
0, sent a sign,wherein the bits of context number are;
Bit 0=(n1>
0);
Bit 1=(n3>
0).
-
-
15. A method of real-time encoding a digitized sequence of video frames using a codec with high compression efficiency, comprising steps of:
-
dividing a video frame into macroblocks of pixels; performing texture prediction using reconstructed texture of previously encoded/decoded video data; selecting best parameters for macroblock encoding based on preset coding parameters and codec working parameters; selecting motion compensation mode for macroblock encoding; selecting inter prediction mode for frame encoding predicting block pixels using reconstructed texture of previously coded/decoded blocks of current frame and specifying prediction method, performing a texture prediction error transform; encoding DCT transform coefficients using wavelet transform, compressing resulting wavelet transform coefficients by context-based entropy coding, and applying an uniform quantization with constant step size to all wavelet transform coefficients; wherein the uniform quantization of transform coefficients is presented as follows;
q_Coeff=round (Coeff/Quantizer),wherein Coeff—
wavelet transform coefficient;q_Coeff—
quantized coefficient;Quantizer—
quantization step size. - View Dependent Claims (16, 17, 19)
-
-
18. A method of real-time encoding a digitized sequence of video frames using a codec with high compression efficiency, comprising steps of:
-
dividing a video frame into macroblocks of pixels; performing texture prediction error transform; selecting best parameters for macroblock coding based on preset coding parameters and codec working parameters; selecting motion compensation mode for encoding; performing a texture prediction error transform; performing quantization and encoding of DCT transform coefficients; and performing calculation of components of motion vectors using motion estimation, wherein the motion estimation comprises; calculating motion vectors MV(wb, hb, CF, RF) with integer-pel accuracy using previously calculated motion data; calculating motion vectors MV(wb, hb, CF, RF) [block_x][block_y]performing inverse logarithmic motion search with parameters block_x, block_y, current_range; performing motion vector refinement choosing from sets of neighboring motion vectors MVNeiborhood (wb, hb, CF, RF)[block_x][block_y]elements (mvx, mvy) that provide minimum value of motion vector weight function Q(mvx, mvy, CF, RF, wb, hb, block_x, block_y); performing motion vector estimation with quarter-pel accuracy based on results of motion vector estimation with integer-pel accuracy by changing components of the integer-pel accuracy motion vector MV(wb, hb, CF, RF) [block_x][block_y]in range [−
¾
;
+¾
] with a step ¼
; andcalculating motion vectors MV(wb, hb, CF, RF) with quarter-pel accuracy by sequentially applying the motion estimation steps with integer-pel accuracy and with quarter-pel accuracy, wherein CF—
current frame with horizontal coordinate x and vertical coordinate y;RF—
reference frame with horizontal coordinate x and vertical coordinate y;wb—
width of the blocks for which motion estimation is performed;hb—
height of the blocks for which motion estimation is performed;W—
a multiple of wb, current and reference frame width;H—
a multiple of hb, current and reference frame height;Q(mvx, mvy, CF, RF, wb, hb, block_x, block_y)—
motion vector weight calculation function;MV(wb, hb, CF, RF)[block_x][block_y]—
motion vector (i.e. pair (mvx,mvy) of integers) corresponding to the frame CF and reference frame RF for a block of width wb, height hb, which left-top corner is located at a pixel with horizontal coordinate block_x and vertical coordinate block_y;MV(wb, hb, CF, HF)—
a set of motion vectors MV(wb, hb, CF, RF)[block_x][block_y] for;
block_x=0, wb, 2·
wb, 3·
wb, . . . , block_x<
W, and block_y=0, hb, 2·
hb, 3·
hb, . . . , block_y<
H;MVNeighborhood (wb, hb, CF, RF)[bloc_y][block_y]—
a set of neighboring motion vectors MV(wb, hb, CF, RF)[nx][ny], where nx may be equal to block_x—
wb, block_x block_x+wb and ny may be equal to block_y−
hb block_y, block_y+hb, and nx≧
0, ny≧
0, nx≦
W−
wb, ny≦
H−
hb.
-
Specification