One-pass variable bit rate moving pictures encoding
First Claim
Patent Images
1. A method for variable bit rate control in a single pass moving pictures encoder, comprising:
- selecting a target picture encoding quality;
selecting upper and lower bit rate limits;
encoding at least one picture based on a target bit rate within the upper and lower bit rate limits;
predicting a current bit rate and an encoding quality based on the result of the encoding step;
comparing the encoding quality of the at least one encoded picture with the target picture encoding quality;
adjusting the target bit rate within the upper and lower bit rate limits according to the result of said comparison and the predicted current bit rate, for encoding subsequent pictures; and
repeating, for each picture in a sequence of pictures, said encoding, predicting, comparing and adjusting steps.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for encoding digital video utilizing a single pass variable bit rate encoding procedure. An encoding quality is set and the bit rate for encoding blocks or frames in the sequence of moving pictures is determined to achieve the selected quality according to the complexity of the video sequence. The bit rate is constrained by predetermined upper and lower bit rate limits.
-
Citations
41 Claims
-
1. A method for variable bit rate control in a single pass moving pictures encoder, comprising:
-
selecting a target picture encoding quality;
selecting upper and lower bit rate limits;
encoding at least one picture based on a target bit rate within the upper and lower bit rate limits;
predicting a current bit rate and an encoding quality based on the result of the encoding step;
comparing the encoding quality of the at least one encoded picture with the target picture encoding quality;
adjusting the target bit rate within the upper and lower bit rate limits according to the result of said comparison and the predicted current bit rate, for encoding subsequent pictures; and
repeating, for each picture in a sequence of pictures, said encoding, predicting, comparing and adjusting steps. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
SNRdiff=SNRtarget−
(SNRpicture+K5×
ACTaverage)
BRtarget=BRpredicted+K6×
BRcurrent×
SNRdiffwhere; SNRpicture is the measured signal-to-noise ratio, SNRtarget is the target signal-to-noise ratio, ACTaverage is the measured average pixel activity, K5 and K6 are constants, SNRdiff is the measured difference in picture encoding quality, BRpredicted is the predicted current bit rate, SI, SP, and SB are number of bits generated by said previously encoded I-, P-, B-pictures, respectively nP is a total number of P-pictures in the group of pictures, nB is a total number of B-pictures in the group of pictures, BRcurrent is a previously determined BRtarget, and BRtarget is said target bit rate.
-
-
11. A method as claimed in claim 4, wherein said target picture encoding quality is based on a target encoding quantization step-size.
-
12. A method as claimed in claim 11, wherein different target quantization step-sizes are selected for I-, P-, and B-pictures.
-
13. A method as claimed in claim 11 or 12, including measuring an average quantization step-size for at least one previously encoded picture, and determining said target bit rate based on said predicted current bit rate and a difference between the target encoding quantization step-size and the measured average quantization step-size.
-
14. A method as claimed in claim 13, wherein maximum and minimum bit rates are selected corresponding to the upper and lower bit rate limits, and wherein the predicted current bit rate and the target bit rate are determined according to:
-
if (BRtarget>
BRmax), then BRtarget=BRmax
-
-
15. A method as claimed in claim 10 or 14, including determining a number of bits R remaining for encoding the group of pictures comprising the steps of:
-
before encoding a first picture in a said group of pictures, determining R according to where; N is the number of pictures in the group of pictures, picture_rate is the number of pictures encoded per unit time, and BRtarget is said target bitrate, and before encoding each subsequent picture in the group of pictures, determining R according to where; NP and NB are the number of P- and B-pictures remaining in the current group of pictures, BRtarget is a subsequently determined target bit rate, and S is one of SI, SP or SB according to the picture type of the previously encoded picture.
-
-
16. A method as claimed in claim 15, further comprising the steps of:
-
obtaining average quantization step sizes QI, QP, QB from previously encoded I-, P-, B-pictures, respectively; and
determining the target bit allocation TI, TP, TB for a subsequent respective I-, P-, or B-picture according to;
where; XI=SIQI, XP=SPQP, XB=SB,QB, KP and KB are constants.
-
-
17. A method as claimed in claim 16, wherein the target bit allocations TI, TP, TB have a lower limit Tmin determined according to:
-
where K3 is a constant.
-
-
18. A method as claimed in any one of claims 1 to 17, wherein the target bit allocation is used to encode an input picture, comprising the steps of:
-
deriving macroblocks from the input picture;
calculating a quantization step-size for each said macroblock according to the target bit allocation and its utilization;
performing motion compensation if necessary to each macroblock;
frequency transforming each said macroblock or motion compensated macroblock;
quantizing each transformed macroblock using the calculated quantization step-size; and
coding the quantized macroblock.
-
-
19. A method as claimed in claim 18, wherein the target quantization step-size is used as a lower limit for the determined quantization step-size.
-
20. A method as claimed in claim 18 or 19, wherein the determined quantization step-size for each macroblock is modulated by a corresponding macroblock activity masking factor, and the quantization is performed using the modulated quantization step-size.
-
21. A control apparatus for a single pass moving pictures encoder, comprising:
-
an input for receiving a target picture encoding quality;
an input for receiving upper and lower bit rate limits; and
a controller for controlling the encoder so as to encode at least one picture according to a target bit rate within the upper and lower bit rate limits, predict a current bit rate and an encoding quality based on the result of the encoding, compare the encoding quality of the at least one encoded picture with the target picture encoding quality, and adjust the target bit rate according to the result of said comparison and the predicted current bit rate for encoding subsequent pictures. - View Dependent Claims (22, 23, 24, 25, 26, 27, 28, 29, 30)
-
-
31. A single pass variable bit rate video picture encoder comprising:
-
a picture input for receiving data for a plurality of moving pictures;
a target quality input for receiving a target quality measure for encoded pictures;
an encoder output for supplying encoded picture data;
a bit rate limit input for receiving upper and lower bit rate limits for the encoded picture data;
a bit rate predictor for predicting a current bit rate;
a frequency transform processor for frequency transform encoding picture data from the picture input;
a coefficient quantizer for quantizing the encoded picture data according to a quantization step size;
an encoding quality estimator for measuring an encoding quality of quantized encoded pictures; and
a bit rate controller for dynamically controlling the quantization step size of the coefficient quantizer based on the predicted current bit rate and a comparison of the target quality and the measured quality so that the encoder output remains within the upper and lower bit rate limits. - View Dependent Claims (32, 33, 34, 35, 36, 37, 38, 39, 40, 41)
-
Specification