Video coding method and corresponding encoding device
OwnerVincent Ruolinventor
Life of this patent
Estimating the term…
Abstract
The invention relates to a video coding method applied to a sequence of video frames and comprising the steps of encoding each frame in a first encoding pass with a fixed quantization step size, decoding the coded bitstream, building up for this frame a map of blocking effects, and re-encoding said frame, on the basis of modifications depending on said map, in a second encoding pass with a variable quantization step size, for generating a second output bitstream with a modified number of bits with respect to the first one. In an improved implementation, an additional normalization operation provided for avoiding some undesirable effects is carried out before the re-encoding step.
Claims7
A video coding method applied to a sequence of video frames divided into macroblocks themselves subdivided into blocks, said method comprising for each frame of the sequence the steps of:
- (A) encoding said frame in a first encoding pass with a fixed quantization step size, for generating a first output bitstream and statistics associated to each macroblock of this frame;
- (B) on the basis of said statistics, re-encoding said frame in a second encoding pass with a variable quantization step size, for generating a second output bitstream with for each macroblock of this frame a modified number of bits with respect to the first output bitstream;
- said method being further characterized in that it also comprises, between said first and second encoding passes, the steps of:
- (a) decoding said first output bitstream, for generating a decoded output bitstream;
- (b) in said decoded bitstream, detecting blocking artifacts for building up a map of blocking effects occurring at the internal block boundaries of all the macroblocks;
- (c) modifying according to said map the statistics on the basis of which the second encoding pass is performed.
A device for encoding a sequence of video frames divided into macroblocks themselves subdivided into blocks, said device comprising:
- (a) at least a coding branch, including in series at least a quantization circuit and a variable length circuit;
- (b) a control circuit provided for controlling for each frame of the sequence the implementation of the following steps:
- (A) encoding said frame in a first encoding pass with a fixed quantization step size, for generating a first output bitstream and statistics associated to each macroblock of this frame;
- (B) on the basis of said statistics, re-encoding said frame in a second encoding pass with a variable quantization step size, for generating a second output bitstream with for each macroblock of this frame a modified number of bits with respect to the first output bitstream;
- (C) between said first and second encoding passes, an additional step comprising the sub-steps of:
- (a) decoding said first output bitstream, for generating a decoded output bitstream;
- (b) in said decoded bitstream, detecting blocking artifacts for building up a map of blocking effects occurring at the internal block boundaries of all the macroblocks;
- (c) modifying according to said map the statistics on the basis of which the second encoding pass is performed.
A device for encoding a sequence of video frames divided into macroblocks themselves subdivided into blocks, said device comprising:
- (a) at least a coding branch, including in series at least a quantization circuit and a variable length circuit;
- (b) a control circuit provided for controlling for each frame of the sequence the implementation of the following steps:
- (A) encoding said frame in a first encoding pass with a fixed quantization step size, for generating a first output bitstream and statistics associated to each macroblock of this frame;
- (B) decoding said first output bitstream, for generating a decoded output bitstream;
- (C) in said decoded bitstream, detecting blocking artifacts, for building up a map of blocking effects occurring at the internal block boundaries of all the macroblocks;
- (D) modifying the statistics according to said map;
- (E) on the basis of said modified statistics, re-encoding said frame in a second encoding pass with a variable quantization step size, for generating a second output bitstream with, for each macroblock of this frame, a modified number of bits with respect to the first output bitstream;
- said device being further characterized in that the control circuit is also provided for controlling for each frame of the sequence the implementation, before the re-encoding step, of the following additional steps:
- (a) computing a normalization factor based on the following expression:
- F(norm)=X(in)/X(out)
- where X(in) and X(out) are respectively the sums of the values of statistics before and after the modifications according to said map;
- (b) multiplying by said normalization factor each value of statistics after said modifications.
Dependencies are inferred from the claim text.