FIELD OF THE INVENTION
[0001] The present invention relates generally video encoders and, more particularly, to
an video encoder with adaptive rate control.
BACKGROUND OF THE INVENTION
[0002] Rate control is necessary in a Joint Video Team (JVT) video encoder to achieve particular
constant bitrates, when needed for fixed channel bandwidth applications with limited
buffer sizes. Avoiding buffer overflow and underflow is more challenging on video
content that includes sections with different complexity characteristics, for example,
sections with scene changes and dissolves.
[0003] Rate control has been studied for previous video compression standards. TMN8 was
proposed for H.263+. The TMN8 rate control uses a frame-layer rate control to select
the target number of bits for the current frame and a macroblock-layer rate control
to select the value of the quantization parameter (QP) for the macroblocks.
[0004] In the frame-layer rate control, the target number of bits for the current frame
is determined by

where
B is the target number of bits for a frame,
R is the channel rate in bits per second,
F is the frame rate in frames per second,
W is the number of bits in the encoder buffer,
M is the maximum buffer size,
Wprev is the previous number of bits in the buffer,
B' is the actual number of bits used for encoding the previous frame, and
Z =
0.1 is set by default to achieve the low delay.
[0005] The macroblock-layer rate control selects the value of the quantization step size
for all the macroblocks in a frame, so that the sum of the macroblock bits is close
to the frame target number of bits
B. The optimal quantization step size

for macroblock
i in a frame can be determined by

where
K is the model parameter,
A is the number of pixels in a macroblock,
Ni is the number of macroblocks that remain to be encoded in the frame,
σi is the standard deviation of the residue in the
ith macroblock,
αi is the distortion weight of the
ith macroblock,
C is the overhead rate, and
βi is the number of bits left for encoding the frame by setting
β1 =
B at the initialization stage.
[0006] The TMN8 scheme is simple and is known to be able to achieve both high quality and
an accurate bit rate, but is not well suited to H.264. Rate-distortion optimization
(RDO) (e.g., rate-constrained motion estimation and mode decision) is a widely accepted
approach in H.264 for mode decision and motion estimation, where the quantization
parameter (QP) (used to decide
λ in the Lagrangian optimization) needs to be decided before RDO is performed. But
the TMN8 model requires the statistics of the prediction error signal (residue) to
estimate the QP, which means that motion estimation and mode decision needs to be
performed before the QP is determined, thus resulting in a dilemma of which dependent
parameter must be calculated first, each value requiring knowledge about the other
uncalculated value on which to base the determination.
[0007] To overcome the dilemma mentioned above, a method (hereinafter the "first conventional
method") proposed for H.264 rate control and incorporated into the JVT JM reference
software release JM7.4 uses the residue of the collocated macroblock in the most recently
coded picture with the same type to predict that of the current macroblock. Moreover,
to also overcome the dilemma, another method (hereinafter the "second conventional
method") proposed for H.264 rate control employs a two-step encoding, where the QP
of the previous picture (
QPprev) is first used to generate the residue, and then the QP of the current macroblock
is estimated based on the residue. The former approach (i.e., the first conventional
method) is simple, but it lacks precision. The latter approach (i.e., the second conventional
method) is more accurate, but it requires multiple encoding, thus adding much complexity.
In
ZHENGGUO LI, WEN GAO, FENG PAN, SIWEI MA, KENG PANG LIM, GENAN FENG, XIAO LIN, SUSANTO
RAHARDJA, HANQIN LU, YAN LU: "Adaptive rate control with HRD consideration" ISO/IEC
JTC1/SC29/WG11 & ITU-T SG16 Q.6-JVT-H014, 26 May 2003 (2003-05-26), pages 1-18, a basic unit layer rate control is discussed, wherein quantization parameters of
a previous frame are used to estimate a quantization parameter of the current frame.
SUMMARY OF THE INVENTION
[0008] These and other drawbacks and disadvantages of the prior art are addressed by the
present invention, which is directed to an encoder with adaptive rate control. Accordingly,
a video encoder and a method for encoding according to the invention are described
in claims 1 and 6, respectively. Preferred embodiments of the invention are the subject
matter of the dependent claims.
[0009] These and other aspects, features and advantages of the present invention will become
apparent from the following detailed description of exemplary embodiments, which is
to be read in connection with the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The present invention may be better understood in accordance with the following exemplary
figures, in which:
FIG. 1 shows a block diagram for a video encoder; and
FIG. 2 shows a flowchart for an encoding process with rate control in accordance with
the principles of the present invention.
DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS
[0011] The present invention is directed to an encoder with adaptive rate control. Advantageously,
the present invention avoids buffer overflow and underflow in a video encoder, particularly
in the case of video content that includes sections with different complexity characteristics.
[0012] The present description illustrates the principles of the present invention.
[0013] All examples and conditional language recited herein are intended for pedagogical
purposes to aid the reader in understanding the principles of the invention and the
concepts contributed by the inventor to furthering the art, and are to be construed
as being without limitation to such specifically recited examples and conditions.
[0014] Moreover, all statements herein reciting principles, aspects, and embodiments of
the invention, as well as specific examples thereof, are intended to encompass both
structural and functional equivalents thereof. Additionally, it is intended that such
equivalents include both currently known equivalents as well as equivalents developed
in the future, i.e., any elements developed that perform the same function, regardless
of structure.
[0015] Thus, for example, it will be appreciated by those skilled in the art that the block
diagrams presented herein represent conceptual views of illustrative circuitry embodying
the principles of the invention. Similarly, it will be appreciated that any flow charts,
flow diagrams, state transition diagrams, pseudocode, and the like represent various
processes which may be substantially represented in computer readable media and so
executed by a computer or processor, whether or not such computer or processor is
explicitly shown.
[0016] The functions of the various elements shown in the figures may be provided through
the use of dedicated hardware as well as hardware capable of executing software in
association with appropriate software. When provided by a processor, the functions
may be provided by a single dedicated processor, by a single shared processor, or
by a plurality of individual processors, some of which may be shared. Moreover, explicit
use of the term "processor" or "controller" should not be construed to refer exclusively
to hardware capable of executing software, and may implicitly include, without limitation,
digital signal processor ("DSP") hardware, read-only memory ("ROM") for storing software,
random access memory ("RAM"), and non-volatile storage.
[0017] Other hardware, conventional and/or custom, may also be included. Similarly, any
switches shown in the figures are conceptual only. Their function may be carried out
through the operation of program logic, through dedicated logic, through the interaction
of program control and dedicated logic, or even manually, the particular technique
being selectable by the implementer as more specifically understood from the context.
[0018] In the claims hereof, any element expressed as a means for performing a specified
function is intended to encompass any way of performing that function including, for
example, a) a combination of circuit elements that performs that function or b) software
in any form, including, therefore, firmware, microcode or the like, combined with
appropriate circuitry for executing that software to perform the function. The invention
as defined by such claims resides in the fact that the functionalities provided by
the various recited means are combined and brought together in the manner which the
claims call for. Applicants thus regard any means that can provide those functionalities
as equivalent to those shown herein.
[0019] In FIG. 1, a video encoder is shown with an encoder 100 input connected in signal
communication with a non-inverting input of a summing junction 110. The output of
the summing junction 110 is connected in signal communication with a block transformer
120. The transformer 120 is connected in signal communication with a first input of
a quantizer 130. The output of the quantizer 130 is connected in signal communication
with a variable length coder ("VLC") 140, where the output of the VLC 140 is an externally
available output of the encoder 100. A first input of a rate controller 177 is connected
in signal communication with the output of the summing junction 110, a second input
of the rate controller 177 is connected in signal communication with the output of
the VLC 140, and an output of the rate controller 177 is connected in signal communication
with a second input of the quantizer 130.
[0020] The output of the quantizer 130 is further connected in signal communication with
an inverse quantizer 150. The inverse quantizer 150 is connected in signal communication
with an inverse block transformer 160, which, in turn, is connected in signal communication
with a reference picture store 170. A first output of the reference picture store
170 is connected in signal communication with a first input of a motion estimator
180. The input to the encoder 100 is further connected in signal communication with
a second input of the motion estimator 180. The output of the motion estimator 180
is connected in signal communication with a first input of a motion compensator 190.
A second output of the reference picture store 170 is connected in signal communication
with a second input of the motion compensator 190. The output of the motion compensator
190 is connected in signal communication with an inverting input of the summing junction
110.
[0021] Turning now to FIG. 2, an exemplary process for encoding image blocks with rate control
is generally indicated by the reference numeral 200. The process includes an initialization
block 205 which initializes a buffer, calculates the average target frame bits or
average target Group Of Pictures (GOP) bits, sets the initial value of all the rate
control related parameters, and so forth. The initialization block 205 passes control
to a loop limit block 210 which begins a first loop and sets i=0 (range 0 to frame_number-1),
and passes control to a decision block 215.
[0022] In decision block 215, it is determined (for the current frame) whether the buffer
fullness (buffer_fullness) is greater than a first threshold T1 and whether the available
bits to code the frame (bit_budget) are less than a second threshold T2.
[0023] If buffer_fullness is greater than T1 and/or bit_budget is less than T2, then control
passes to function block 220, which performs virtual frame skipping, and passes control
to an end loop block 275 for next frame (i<frame_number) or ends the first loop (i==frame_number).
Otherwise, if buffer_fullness is less than or equal to T1 and bit_budget is greater
than or equal to T2, then control passes to a function block 225.
[0024] The function block 225 performs a pre-processing of the frame depending on the picture
type to obtain an estimation of the prediction residual, and passes control to a function
block 230. The pre-processing performed by function block 225 for I pictures may include
intra coding using a subset of allowable intra prediction modes to form predictions,
and may use mean square error with respect to prediction residuals of the predictions
formed using the subset to determine a best mode from among the subset of allowable
intra prediction modes. The pre-processing performed by function block 225 for P pictures
may include performing motion estimation with only the 16x16 block type and 1 reference
picture. It is to be appreciated that as used herein, the phrase "best mode" refers
to a prediction mode that results in the most accurate prediction for a given frame
and/or image block.
[0025] The function block 230 performs frame quantization parameter (QP) estimation based
on statistics generated by the pre-processing block 225, and passes control to a loop
limit block 235. The loop limit block 235 begins a second loop, sets j=0 (range 0
to MB_number-1), and passes control to a decision block 240.
[0026] The decision block 240 determines whether macroblock-level rate control is allowed.
If macroblock-level rate control is not allowed, then control is passed to a function
block 260, which codes every macroblock of the frame with the frame QP, and passes
control to an end loop block 265 that ends the second loop. If macroblock-level rate
control is allowed, then control passes to a function block 245, which estimates a
QP for each macroblock according to the RD (rate-distortion) model and frame QP, and
passes control to a function block 250.
[0027] Function block 250 encodes a current macroblock, and passes control to a function
block 255. Function block 255, which is performed after one macroblock is coded, updates
the RD model along with other statistics, and passes control to end loop block 265.
[0028] End loop block 265 passes control to a function block 270, which updates the buffer
fullness and other statistics (e.g., the target bits for next frame and the parameters
in the RD model) when a frame coding is finished, and passes control to the end loop
block 275, which passes control to an end block 280 after all the frames are coded.
[0029] A description will now be given of some of the many issues addressed by the present
invention in providing adaptive rate control for encoding video data. The present
invention builds upon the model used in TMN8 of H.263+. This model uses Lagrangian
optimization to minimize distortion subject to the target bitrate constraint. To adapt
the model into the International Telecommunication Union, Telecommunication Sector
(ITU-T) H.264 standard and to further improve the performance, several issues have
to be considered. First, rate-distortion optimization (RDO) (e.g., rate-constrained
motion estimation and mode decision) is a widely accepted approach in H.264 for mode
decision and motion estimation, where the quantization parameter (QP) (used to decide
λ in the Lagrangian optimization) needs to be decided before RDO is performed. But
the TMN8 model requires the statistics of prediction error signal (residue) to estimate
the QP, which means that motion estimation and mode decision needs to be performed
before the QP is made, thus resulting in a dilemma of which dependent parameter must
be calculated first, each value requiring knowledge about the other uncalculated value
on which to base the determination.
[0030] Second, TMN8 is targeted at low delay applications, but H.264 can be used for various
applications. Therefore a new bit allocation and buffer management scheme is needed
for various content. Third, TMN8 adapts the QP at the macroblock level. Although a
constraint is made on the QP difference (DQUANT) between the current macroblock and
the last coded macroblock, subjective effects of large QP variations within the same
picture can be observed and has a negative subjective effect. In addition, it is known
that using a constant QP for the whole image may save additional bits for coding DQUANT,
thus achieving higher PSNR for very low bit rate. Finally, H.264 uses 4x4 integer
transform and if the codec uses some thresholding techniques such as in JM reference
software, details may be lost. Therefore, it is useful to adopt the perceptual model
in the rate control to maintain the details.
Preprocessing Stage
[0031] From equation (4), it can be see that the TMN8 model requires the knowledge of standard
deviation of the residue to estimate QP. However, RDO requires knowledge of the QP
to perform motion estimation and mode decision to thus produce the residue. To overcome
this dilemma, the first conventional method mentioned above uses the residue of the
collocated macroblock in the most recently coded picture with the same type to predict
that of the current macroblock, and the second conventional method mentioned above
employs a two-step encoding, where the QP of the previous picture (
QPprev) is first used to generate the residue, and then the QP of current macroblock is
estimated based on the residue. The former approach (i.e., the first conventional
method) is simple, but it lacks precision. The latter approach (i.e., the second conventional
method) is more accurate, but it requires multiple encoding, thus adding too much
complexity.
[0032] According to the present invention, a different approach is adopted to estimate the
residue, which is simpler than the second convention method mentioned above, but more
accurate than the first conventional method mentioned above. Experiments show that
a simple preprocessing stage can give a good estimation of the residue. For an
I picture, only the 3 most probable intra16x16 modes (vertical, horizontal and Discrete
Cosine (DC) mode) are tested and the MSE (Mean Square Error) of the prediction residual
is used to select the best mode. Only three modes are tested in order to reduce complexity.
However, in other embodiments of the present invention, more or fewer modes can be
tested. The spatial residue is then generated using the best mode. It should be noted
that the original pixel values are used for intra prediction instead of reconstructed
pixels, simply because the reconstructed pixels are not available.
[0033] For P pictures, a rate-constrained motion search is performed using only the 16x16
block type and 1 reference picture. The temporal residue is generated using the best
motion vector in this mode. The average QP of the previously coded picture is used
to decide
λ on a rate-constrained motion search. The experiment shows that by constraining the
difference of the QP between the previous coded picture and the current picture, the
λ based on
QPprev has a minor impact on motion estimation. The side advantage of this approach is that
the resultant motion vectors in the preprocessing step can be used as initial motion
vectors in the motion estimation during the encoding.
Frame-layer rate control
[0034] TMN8 is targeted to low-delay and low bit rate applications, which is assumed to
encode only
P pictures after the first
I picture, hence the bit allocation model as shown in equation (1) should be re-defined
to adapt to the various applications which use more frequent
I pictures. The QP estimation model by equation (4) can result in large QP variation
within one image, thus a frame-level QP is better first estimated to place a constraint
on the variation of the macroblock (MB) QP. In addition, for very low bit rate, due
to the overhead of coding the DQUANT, it may be more efficient to use a constant picture
QP. Thus, a good rate control scheme should allow rate control at both the frame-level
and the MB-level.
[0035] A description will first be provided of a new bit allocation scheme in accordance
with the principles of the present invention. Then, a description will be provided
of a simple scheme to decide a frame-level QP in accordance with the principles of
the present invention.
[0036] In many applications, e.g., in real-time encoders, the encoder does not know the
total number of frames that need to be coded beforehand, or when scene changes will
occur. Thus, a Group of Pictures (GOP) layer rate control is adopted to allocate target
bits for each picture. The H.264 standard does not actually include Group of Pictures,
but the terminology is used here to represent the distance between
I pictures. The length of the GOP is indicated by
NGOP. If
NGOP → ∞, then the following is set
NGOP =
F, which corresponds to one second's length of frames. Notation
BGi,j is used to indicate the remaining bits in the GOP
i after coding picture
j-1, equal to

[0037] In the above equation,
RGi-1 is the number of remaining bits after GOP
i-1 is coded, given by
RGi-1 =
R/
F*Ncoded - Bcoded, where
Bcoded is the used bits and
Ncoded is the number of coded pictures after GOP
i is finished.
Bi,j and
B'i,j are the target bits and actual used bits for frame
j of GOP
i, respectively. In equation (5), one constraint is added on the total number of bits
allocated for the GOP
i to prevent buffer overflow when the complexity level of the content varies dramatically
from one GOP to another. For example, consider a scenario where the previous GOP was
of very low complexity, e.g., all black, so the buffer fullness level would go quite
low. Instead of allocating all of the unused bits from the previous GOP to the current
GOP, the unused bits are distributed over several following GOPs by not allowing more
than 0.2M additional bits to an individual GOP. The target frame bit
Bi,j is then allocated according to picture type. If the
jth picture is
P, then the target bits is

where
KI is the bit ratio between
I pictures and
P pictures, which can be estimated using a sliding window approach,
NI is the remaining number of
I pictures in GOP
i and
NP is that of
P pictures; otherwise,

Since
P pictures are used as the references by subsequent
P pictures in the same GOP, more target bits are allocated for
P pictures that are at the beginning of the GOP to ensure the later
P pictures can be predicted from the references of better quality and the coding quality
can be improved. A linear weighted
P picture target bit allocation is used as follows:

[0038] Another constraint is added to better meet that target bits for a GOP as

where
Bdiff,j-1 =
Bi,j-1-
B'i,j-1, and
Bdiff,j-1 =
sign(
Bdiff,j-1)min(|
Bdiff,j-1 |,
R/
F).
[0039] As an exemplary rate control according to the present invention, a 50% buffer occupancy
is sought. To prevent buffer overflow or underflow, the target bits need to be jointly
adapted with buffer level. The buffer level
W is updated at the end of coding each picture by equation (3). According to the principles
of the present invention, instead of using the real buffer level to adjust the target
bits, a virtual buffer level
W' given by
w' = max(
w,0.4
M) is proposed. This helps prevent the scenario that if the previously coded pictures
are of very low complexity such as black scenes and consume very few bits, then the
buffer level will become very low. If the real buffer level is used to adjust target
frame bits as in equation (7), too many bits may be allocated, which will cause the
QP to decrease very quickly. After a while, when the scene returns to normal, the
low QP will easily cause the buffer to overflow. Hence, it is needed to either increase
QP dramatically or skip the frames. This causes the temporal quality to vary significantly.
Then, the bits are adjusted by buffer control as follows:

[0040] To guarantee a minimum level of quality, the following is set
Bi,j = max(0.6*
R/
F,Bi.j). To further avoid the buffer overflow and underflow, the buffer safety top margin
WT and bottom margin
WB for an
I picture are set as

and

As for P pictures, compliant with equation (5) and to allow enough buffer for the
next
I picture in the next GOP, the following is set

and

The final target bits are determined as follows. The following is set
WVT =
W+
Bi,j, WVB =
WVT - R/
F. If
WVT<WT, B- =
WVT -
WT, else if
WVB < WB, B+ =
WB - WVB.
[0041] It is to be noted that if a scene change detector is employed, the picture at the
scene change is encoded to be an
I picture and a new GOP starts from this
I picture. The above scheme can still be employed.
[0042] A new approach in accordance with the principles of the present invention is proposed
to decide frame-level QP based on the macroblock-level QPs found in equation (4).
Equation (4) is modified as follows:

where
ĉ is the overhead from the last coded picture with the same type,
σi is estimated in the preprocessing stage as described above. Two approaches in accordance
with the principles of the present invention can be used to get frame-level constant
QP, denoted as
QPf. The first approach is to set
αi =
σi, so that all the MB QPs are equal. The second approach is to use the same
αi as that of the MB level, as defined hereinafter, then use the mean, median or mode
of the histogram of the
Q̂i values to find the
QPf.
[0043] In a preferred embodiment of the present invention, the second approach to get
QPf is used to better match the MB QP. The frame-level quantization step size is decided
by the mean of the
Q̂i values,

It is noted that there is a conversion between the quantization parameter QP and
quantization step size Q by
Q = 2
(QP-6)/6. To reduce the temporal quality variation between adjacent pictures, the following
is set
QPf =
max(
QPf'-Df, min(
QPf,QPf'+
Df))
, where
QPf' is the frame QP of last coded frame, and

Since scene changes usually cause higher buffer levels, advantage is taken of temporal
masking effect and
Df is set to be a higher value when a scene change occurs.
MB-layer rate control
[0044] A first key feature in MB-layer rate control pertains to the adaptive selection of
weighted distortion
αi to get a better perceptual quality. A second key feature is to reduce the variation
of the MB QPs in the same picture.
[0045] For low detail content, such as an ocean wave, a lower QP is required to keep the
details. However, from an RDO point of view, a higher QP is preferred because the
lower detail content tends to give a higher PSNR. To keep a balance, different settings
of
αi are adopted for
I and
P pictures, respectively. For an
I picture, a higher distortion weight is given to the MBs with less detail, so that
the detail can be better retained. Accordingly, the following is set:

[0046] For a
P picture, a higher distortion weight is given to the MBs with more residue errors.
Accordingly,

[0047] In this way, better perceptual quality is maintained for an
I picture and can be propagated to the following
P pictures, while higher objective quality is still maintained. To prevent large variation
of the quality inside one picture, the following is set
QPi = max(
QPf-2,min(
QPi,QPf+2)). If a frame level rate control is used, then
QPi =
QPf.
Virtual frame skipping
[0048] After encoding one picture,
W is updated by equation (3). If
W > 0.9
M, the next frame is virtually skipped until the buffer level is below
0.9M. Virtual frame skipping is to code every MB in the P picture to be SKIP mode. In this
way, a constant frame rate can be syntactically maintained. If the current frame is
determined to be a virtual skipped frame, then the following is set
QPf =
QP'f + 2.
[0049] In summary, the rate control scheme according to the present invention includes the
following steps: preprocessing, frame target bits allocation and frame-level constant
QP estimation, MB-level QP estimation, buffer updates and virtual frame skipping control.
Advantageously, the present invention can allow both frame-level and MB-level rate
control.
[0050] A description will now be given of some of the many attendant advantages/features
of the present invention, according to various illustrative embodiments of the present
invention. For example, one advantage/feature is the use of mean/median/mode of initial
macroblock QP estimates to select frame level QP. Another advantage/feature is when
the selected frame level QP is used in the calculation of the individual macroblock
QPs. Yet another advantage/feature is when performing intra prediction, using a subset
of the allowable intra-prediction modes to form the residue that is used in the QP
selection process. Moreover, another advantage/feature is the use of a small number
of intra-prediction modes (three (3), for example). Also, another advantage/feature
is when a previous GOP was coded with a large number of unused bits, limiting the
additional bits allocated to the current GOP to a predetermined threshold. Still another
advantage/feature is when a virtual buffer level instead of an actual buffer level
is used for buffer control.
[0051] These and other features and advantages of the present invention may be readily ascertained
by one of ordinary skill in the pertinent art based on the teachings herein. It is
to be understood that the teachings of the present invention may be implemented in
various forms of hardware, software, firmware, special purpose processors, or combinations
thereof.
[0052] Most preferably, the teachings of the present invention are implemented as a combination
of hardware and software. Moreover, the software is preferably implemented as an application
program tangibly embodied on a program storage unit. The application program may be
uploaded to, and executed by, a machine comprising any suitable architecture. Preferably,
the machine is implemented on a computer platform having hardware such as one or more
central processing units ("CPU"), a random access memory ("RAM"), and input/output
("I/O") interfaces. The computer platform may also include an operating system and
microinstruction code. The various processes and functions described herein may be
either part of the microinstruction code or part of the application program, or any
combination thereof, which may be executed by a CPU. In addition, various other peripheral
units may be connected to the computer platform such as an additional data storage
unit and a printing unit.
[0053] It is to be further understood that, because some of the constituent system components
and methods depicted in the accompanying drawings are preferably implemented in software,
the actual connections between the system components or the process function blocks
may differ depending upon the manner in which the present invention is programmed.
Given the teachings herein, one of ordinary skill in the pertinent art will be able
to contemplate these and similar implementations or configurations of the present
invention.
1. A video encoder for encoding image frames that are divisible into macroblocks, comprising:
macroblock QP estimation means (130) for generating quantization parameter, QP, estimates
for the macroblocks of an image frame wherein a QP estimate for a macroblock is a
QP estimate derived from a prediction residue for said macroblock, wherein said prediction
residue is obtained from pre-processing means for:
generating, for I type image frame, intra prediction macroblocks of the image frame
using only a subset of allowable intra prediction modes and,
generating, for P type image frame, motion vector for macroblocks of the image frame
using only a 16x16 block type, only one reference image, and the average QP of the
previously coded picture; and
means (130) for calculation of a frame level QP for the image frame, using one of
mean, median, and mode of the histogram of QP estimates for the macroblocks,
wherein the frame level QP of the image frame is used for constraining individual
macroblock QPs when encoding the macroblocks of the image frame.
2. The video encoder as defined in Claim 1, wherein the image frames comprise video data
in compliance with the International Telecommunication Union, Telecommunication Sector,
ITU-T, H.264 standard.
3. The video encoder as defined in Claim 1, further comprising a macroblock QP calculator
(130) in signal communication with said frame level QP selection means for calculating
the individual macroblock QPs using the calculated frame level QP.
4. The video encoder as defined in Claim 3, wherein said macroblock QP calculator (130)
adjusts the individual macroblock QPs based on picture type.
5. The video encoder as defined in Claim 4, wherein said macroblock QP calculator (130)
performs one of:
for Intra-coded pictures, assigning lower QPs to macroblocks with less details to
maintain details for the Intra-coded pictures, and
for Inter-coded pictures, assigning higher QPs to macroblocks with less details to
achieve lower mean square errors for the Inter-coded pictures.
6. A method for encoding image frames that are divisible into macroblocks, comprising
the steps of:
generating (225) quantization parameter, QP, estimates for the macroblocks of an image
frame wherein a QP estimate for a macroblock is derived from a prediction residue
for said macroblock, wherein said prediction residue is obtained from a pre-processing
step:
generating, for I type image frame, intra prediction macroblocks of the image frame
using only a subset of allowable intra prediction modes and,
generating, for P type image frame, motion vector for macroblocks of the image frame
using only a 16x16 block type, only one reference image, and the average QP of the
previously coded picture; and
calculating (230) a frame level QP for the image frame, using one of mean, median,
and mode of the histogram of QP estimates for the macroblocks,
wherein the frame level QP of the image frame is used for constraining individual
macroblock QPs when encoding the macroblocks of the image frame.
7. The method as defined in Claim 6, wherein the image frames comprise video data in
compliance with the International Telecommunication Union, Telecommunication Sector,
ITU-T, H.264 standard.
8. The method as defined in Claim 6, further comprising the step of calculating (245)
the individual macroblock QPs using the selected frame level QP.
9. The method as defined in Claim 8, further comprising the step of adjusting the individual
macroblock QPs based on picture type.
10. The method as defined in Claim 9, wherein the step of adjusting the individual macroblock
QPs performs one of:
for Intra-coded pictures, assigning lower QPs to macroblocks with less details to
maintain details for the Intra-coded pictures, and
for Inter-coded pictures, assigning higher QPs to macroblocks with less details to
achieve lower mean square errors for the Inter-coded pictures.
1. Videocodierer zum Codieren von Vollbildern, die in Makroblöcke unterteilbar sind,
wobei der Videocodierer umfasst:
Makroblock-QP-Schätzmittel (130) zum Erzeugen von Quantisierungsparameterschätzwerten,
QP-Schätzwerten, für die Makroblöcke eines Vollbilds, wobei ein QP-Schätzwert für
einen Makroblock ein QP-Schätzwert ist, der von einem Vorhersagerest für den Makroblock
abgeleitet ist, wobei der Vorhersagerest von Vorverarbeitungsmitteln erhalten wird,
zum:
Erzeugen von Intra-Vorhersage-Makroblöcken des Vollbilds unter Verwendung nur einer
Teilmenge zulässiger Intra-Vorhersage-Modi für ein I-Vollbild, und
Erzeugen eines Bewegungsvektors für Makroblöcke des Vollbilds nur unter Verwendung
eines 16 × 16-Block-Typs nur eines Referenzbilds und des Durchschnitts-QP des zuvor
codierten Bilds für ein P-Vollbild; und
Mittel (130) zum Berechnen einer Vollbildebenen-QP für das Vollbild unter Verwendung
eines Mittelwerts oder eines Medians oder eines Modus des Histogramms von QP-Schätzwerten
für die Makroblöcke, wobei der Vollbildebenen-QP des Vollbilds zum Beschränken einzelner
Makroblock-QPs verwendet wird, wenn die Makroblöcke des Vollbilds codiert werden.
2. Videocodierer nach Anspruch 1, wobei die Vollbilder Videodaten in Übereinstimmung
mit der Norm H.264 der International Telecommunication Union, Telecommunication Sector,
ITU-T, umfassen.
3. Videocodierer nach Anspruch 1, der ferner eine Makroblock-QP-Berechnungseinrichtung
(130) in Signalkommunikation mit den Vollbildebenen-QP-Auswahlmitteln umfasst, um
unter Verwendung des berechneten Vollbildebenen-QP die einzelnen Makroblock-QPs zu
berechnen.
4. Videocodierer nach Anspruch 3, wobei die Makroblock-QP-Berechnungseinrichtung (130)
die einzelnen Makroblock-QPs auf der Grundlage des Bildtyps einstellt.
5. Videocodierer nach Anspruch 4, wobei die Makroblock-QP-Berechnungseinrichtung (130)
eines der Folgenden ausführt:
Zuweisen niedrigerer QPs zu Makroblöcken mit weniger Details, um für die intra-codierten
Bilder Details zu erhalten, für intra-codierte Bilder, und
Zuweisen höherer QPs zu Makroblöcken mit weniger Details, um für die inter-codierten
Bilder niedrigere mittlere quadratische Fehler zu erzielen, für inter-codierte Bilder.
6. Verfahren zum Codieren von Vollbildern, die in Makroblöcke unterteilbar sind, wobei
das Verfahren die folgenden Schritte umfasst:
Erzeugen (255) von Quantisierungsparameterschätzwerten, QP-Schätzwerten, für die Makroblöcke
eines Vollbilds, wobei ein QP-Schätzwert für einen Makroblock von einem Vorhersagerest
für den Makroblock abgeleitet ist, wobei der Vorhersagerest aus einem Vorverarbeitungsschritt
erhalten wird:
Erzeugen von Intra-Vorhersage-Makroblöcken des Vollbilds unter Verwendung nur einer
Teilmenge zulässiger Intra-Vorhersage-Modi für ein I-Vollbild, und
Erzeugen eines Bewegungsvektors für Makroblöcke des Vollbilds nur unter Verwendung
eines 16 × 16-Block-Typs nur eines Referenzbilds und des Durchschnitts-QP des zuvor
codierten Bilds für ein P-Vollbild; und
Berechnen (230) einer Vollbildebenen-QP für das Vollbild unter Verwendung eines Mittelwerts
oder eines Medians oder eines Modus des Histogramms von QP-Schätzwerten für die Makroblöcke,
wobei der Vollbildebenen-QP des Vollbilds zum Beschränken einzelner Makroblock-QPs
verwendet wird, wenn die Makroblöcke des Vollbilds codiert werden.
7. Verfahren nach Anspruch 6, wobei die Vollbilder Videodaten in Übereinstimmung mit
der Norm H.264 der International Telecommunication Union, Telecommunication Sector,
ITU-T, umfassen.
8. Verfahren nach Anspruch 6, das ferner den Schritt des Berechnens (245) der einzelnen
Makroblock-QPs unter Verwendung des ausgewählten Vollbildebenen-QP umfasst.
9. Verfahren nach Anspruch 8, das ferner den Schritt des Einstellens der einzelnen Makroblock-QPs
auf der Grundlage des Bildtyps umfasst.
10. Verfahren nach Anspruch 9, wobei der Schritt des Einstellens der einzelnen Makroblock-QPs
eines der Folgenden ausführt:
Zuweisen niedrigerer QPs zu Makroblöcken mit weniger Details, um für die intra-codierten
Bilder Details zu erhalten, für intra-codierte Bilder, und
Zuweisen höherer QPs zu Makroblöcken mit weniger Details, um für die inter-codierten
Bilder niedrigere mittlere quadratische Fehler zu erzielen, für inter-codierte Bilder.
1. Codeur vidéo pour coder des trames d'image divisibles en macroblocs, comprenant :
un moyen d'estimation de QP de macrobloc (130) pour générer des estimations de paramètre
de quantification QP pour les macroblocs d'une trame d'image dans lequel une estimation
de QP pour un macrobloc est une estimation de QP dérivée d'un résidu de prédiction
pour ledit macrobloc, dans laquelle ledit résidu de prédiction est obtenu à partir
d'un moyen de pré-traitement pour :
générer, pour une trame d'image de type I, des macroblocs de prédiction intra de la
trame d'image à l'aide uniquement d'un sous-ensemble de modes de prédiction intra
admissibles, et
générer, pour une trame d'image de type P, un vecteur de mouvement pour les macroblocs
de la trame d'image à l'aide d'un type de bloc 16x16 uniquement,
d'une référence d'image uniquement et du QP moyen de l'image précédemment codée ;
et
un moyen (130) pour calculer un QP de trame pour la trame d'image, à l'aide d'une
moyenne, d'une médiane ou d'un mode de l'histogramme des estimations de QP pour les
macroblocs, dans lequel le PQ de trame de la trame d'image est utilisé pour limiter
les QP de macroblocs individuels lors du codage des macroblocs de la trame d'image.
2. Codeur vidéo selon la revendication 1, dans lequel les trames d'image comprennent
des données vidéo conformément à la norme H.264 du secteur de la normalisation des
télécommunications de l'Union internationale des télécommunications, UIT-T.
3. Codeur vidéo selon la revendication 1, comprenant en outre un calculateur de QP de
macrobloc (130) en communication de signal avec ledit moyen de sélection de QP de
trame pour calculer les QP de macroblocs individuels à l'aide du QP de trame calculé.
4. Codeur vidéo selon la revendication 3, dans lequel ledit calculateur de QP de macrobloc
(130) ajuste les QP de macroblocs individuels en fonction du type d'image.
5. Codeur vidéo selon la revendication 4, dans lequel ledit calculateur de QP de macrobloc
(130) effectue l'une des opérations suivantes :
pour les images intra-codées, attribution de QP inférieurs aux macroblocs ayant moins
de détails pour conserver les détails des images intra-codées, et
pour les images inter-codées, attribution de QP supérieurs aux macroblocs ayant moins
de détails pour obtenir des erreurs quadratiques moyennes inférieures pour les images
inter-codées.
6. Procédé pour coder des trames d'images divisibles en macroblocs, comprenant les étapes
suivantes :
génération (225) d'estimations de paramètre de quantification, QP, pour les macroblocs
d'une trame d'image, dans laquelle une estimation de QP pour un macrobloc est dérivée
d'un résidu de prédiction pour ledit macrobloc, dans laquelle ledit résidu de prédiction
est obtenu à partir d'une étape de pré-traitement :
génération, pour une trame d'image de type I, de macroblocs de prédiction intra de
la trame d'image à l'aide d'un sous-ensemble de modes de prédiction intra admissibles
uniquement, et
génération, pour une trame d'image de type P, d'un vecteur de mouvement pour les macroblocs
de la trame d'image à l'aide d'un type de bloc 16x16 uniquement, d'une référence d'image
uniquement et du QP moyen de l'image précédemment codée ; et
calcul (230) d'un QP de trame pour la trame d'image, à l'aide d'une moyenne, d'une
médiane ou d'un mode de l'histogramme des estimations de QP pour les macroblocs, dans
lequel le QP de trame de la trame d'image est utilisé pour limiter les QP de macroblocs
individuels lors du codage des macroblocs de la trame d'image.
7. Procédé selon la revendication 6, dans lequel les trames d'image comprennent des données
vidéo conformes à la norme H.264 du secteur de la normalisation des télécommunications
de l'Union internationale des télécommunications, UIT-T.
8. Procédé selon la revendication 6, comprenant en outre l'étape de calcul (245) des
QP de macroblocs individuels à l'aide du QP de trame sélectionné.
9. Procédé selon la revendication 8, comprenant en outre l'étape d'ajustement des QP
de macroblocs individuels en fonction du type d'image.
10. Procédé selon la revendication 9, dans lequel l'étape d'ajustement des QP de macroblocs
individuels effectue l'une des opérations suivantes :
pour les images intra-codées, attribution de QP inférieurs aux macroblocs ayant moins
de détails pour conserver les détails des images intra-codées, et
pour les images inter-codées, attribution de QP supérieurs aux macroblocs ayant moins
de détails pour obtenir des erreurs quadratiques moyennes inférieures pour les images
inter-codées.