WO1996034495A2 - Device and method for coding video pictures - Google Patents

Device and method for coding video pictures Download PDF

Info

Publication number
WO1996034495A2
WO1996034495A2 PCT/IB1996/000348 IB9600348W WO9634495A2 WO 1996034495 A2 WO1996034495 A2 WO 1996034495A2 IB 9600348 W IB9600348 W IB 9600348W WO 9634495 A2 WO9634495 A2 WO 9634495A2
Authority
WO
WIPO (PCT)
Prior art keywords
die
coefficients
amplitude
bit rate
amplitude distribution
Prior art date
Application number
PCT/IB1996/000348
Other languages
French (fr)
Other versions
WO1996034495A3 (en
Inventor
Gerrit Johan Keesman
Willem Marie Julia Coene
Eduard Willem Salomons
Original Assignee
Philips Electronics N.V.
Philips Norden Ab
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Philips Electronics N.V., Philips Norden Ab filed Critical Philips Electronics N.V.
Priority to AU51608/96A priority Critical patent/AU705914B2/en
Priority to JP8532314A priority patent/JPH10502791A/en
Priority to DE69605523T priority patent/DE69605523T2/en
Priority to EP96908305A priority patent/EP0768007B1/en
Publication of WO1996034495A2 publication Critical patent/WO1996034495A2/en
Publication of WO1996034495A3 publication Critical patent/WO1996034495A3/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/19Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding using optimisation based on Lagrange multipliers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • H04N19/126Details of normalisation or weighting functions, e.g. normalisation matrices or variable uniform quantisers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/152Data rate or code amount at the encoder output by measuring the fullness of the transmission buffer

Definitions

  • the invention relates to a device for coding video pictures, comprising: a picture transformer for transforming blocks of pixels into coefficients; coding means for encoding said coefficients, the bit rate R and distortion D of the encoded picture being determined by a coding parameter; means (3) for selecting one from a series of coding parameter values for which the sum D+ ⁇ R is minimal for an applied value of ⁇ ; and calculation means for calculating the value of ⁇ .
  • the invention also relates to a method of coding video pictures.
  • the article discloses a method of improving the picture quality of an MPEG encoder.
  • MPEG defines an encoder comprising a picture transformer to obtain coefficients, and a quantizer for imaging the coefficients to a proximate quantization level.
  • the quantization level constitutes a coding parameter.
  • the picture quality is improved by tresholding the quantized coefficients, i.e. by selecting the quantization level zero rather than the conventional quantization level if that it is better in a rate vs. distortion sense.
  • the prior art method will briefly be summarized with reference to Fig. 1.
  • the reference numeral 100 denotes a rate-distortion curve (hereinafter abbreviated to RD curve) for a range of quantization step sizes ⁇ .
  • RD curve rate-distortion curve
  • the bitrate will be lower because fewer non-zero coefficients are transmitted, and the distortion will be larger.
  • curve 101 represents an RD curve if the thresholding operation is performed on coefficients which have been quantized with a step size ⁇ l.
  • Curve 102 represents an RD curve if the thresholding operation is performed on coefficients which have been quantized with a larger step size ⁇ 2.
  • the curves 101 and 102 will hereinafter be referred to as thresholding curves.
  • the Lagrangian cost is defined as:
  • b_ represents a set of coefficient values to be encoded.
  • D(b and RQ>) are the distortion and the bitrate, respectively, upon encoding of these coefficients.
  • the Lagrang multiplier ⁇ is a natural number which is larger than or equal to 0.
  • a tresholdin operation can be found which yields a set fe of coefficients for which L(fe, ⁇ ) is minimal.
  • Th distortion DQj) and bitrate R ⁇ ) applying to this set constitutes a point on the thresholding curve.
  • increases, the distortion will be larger and the bitrate lower.
  • a given bitrate Rl can be achieved both by (i) quantizing the coefficients with step size ⁇ 2 and transmitting all quantized coefficients, and by (ii) quantizing the coefficients with a smaller step size ⁇ l and thresholding selected coefficients.
  • option (ii) is more favourable because it yield less distortion.
  • the curves 101 and 102 shown are only two curves of many possible thresholding curves.
  • the envelope thereof, denoted by 103 in the Figure, constitutes the optimal RD curve for a given picture. It is completely below curve 100.
  • thresholding may result in a step size ⁇ and a Lagrange multiplier ⁇ which yields a smaller distortion than when thresholding is not carried out.
  • the way in which the optimal operating point of an encoder is determined is, however, very intensive from a computation point of view. It is an iterative procedure in which the optimal set of coefficients is searched for a large number of values of ⁇ .
  • the invention is based on the recognition that the searched Lagrange multiplier ⁇ for a desired bit rate is equal to the negative value of the derivative of the RD curve, and utilizes the fact that at least a good approximation of the RD curve can be derive from the distribution of coefficient amplitudes for each spatial frequency.
  • Said amplitude distribution can easily be measured by statistic pre-analysis of the picture to be coded. For example, the amplitude distribution can be obtained by counting, for each spatial frequency, the number of times when a coefficient indicative of said spatial frequency assumes the same amplitude.
  • the means for estimating the bit rate R is adapted to cumulatively add, for all spatial frequencies, the product of the number of bits to encode a given amplitude with the number of occurrences when a coefficient assumes said amplitude as defined by the amplitude distribution.
  • the means for estimating the bit rate R is adapted to calculate the entropy from said amplitude distribution, said entropy being indicative for the bit rate R.
  • Fig. 1 already described, shows some rate-distortion curves to explain a prior-art device.
  • Fig. 2 shows a device for coding a video signal according to the invention.
  • Fig. 3 shows the block diagram of a ⁇ calculator shown in Fig. 2.
  • Fig. 4 shows a flow chart to explain the operation of a computing circuit shown in Fig. 3.
  • Fig. 5 shows some entropy-distortion diagrams to explain the operation of the ⁇ calculator shown in Fig. 3.
  • Figs. 6 and 7 show block diagrams of further embodiments of the ⁇ calculator.
  • Fig. 8 shows a quantization diagram to explain the operation of a quantizer shown in Fig. 2.
  • Figs. 9 and 10 show flow charts to explain the operation of the quantizer shown in Fig. 2. DESCRIPTION OF EMBODIMENTS
  • Fig. 2 shows a device for coding a video signal according to die invention.
  • the device comprises a delay 1, a picture transformer 2, a quantizer 3, a variabl length coding circuit 4, a bitrate control circuit 5 and a ⁇ calculator 6.
  • An important aspect of the invention is that the video signal can be encoded in accordance with the MPEG standard.
  • the picture transformer 2, the variable-length coding circuit 4 and th bitrate control circuit 5 in this embodiment are identical to the corresponding elements of th generally known MPEG encoder. Therefore, they are not described in detail.
  • Fig. 2 only shows the elements which are necessary for intraframe coding.
  • the invention is also applicable to interframe coding.
  • the applied picture is then first subtracted from a motion-compensated prediction picture, whereafter the residue thus obtained is code
  • the applied picture is block-sequentially subjected to a picture transform.
  • Discrete Cosine Transform DCT
  • Any suitable frequency transform may, however, be used, including sub-band filterin
  • the DCT transforms each picture block of, for example 8*8 pixels into a block of 8*8 coefficients c in which i 0 ... 63 indicates the order of increasing extent of picture detail.
  • the DCT coefficients c are applied to the quantizer 3 which images eac coefficient c ( at a discrete quantization level.
  • the quantization levels are spaced apart by a step size ⁇ j .
  • the step size ⁇ ( is coefficient-dependent in conformity with weighting factors W t which are stored in a quantization matrix.
  • the quantization step size is controlled per block by the bitrate control circuit 5 which applies a step size ⁇ to the quantizer.
  • the step size ⁇ is calculated in accordance with the expression in which i denotes a spatial frequency, W s is the weighting factor for said spatial frequency, and c is a constant.
  • the quantization matrix is generally different for intra coded (I) picture and inter coded (P,B) pictures.
  • d e quantizer images each coefficient at one of d e two nearest quantization levels.
  • quantizer 3 also receives a Lagrange multiplier ⁇ .
  • the quantizer now images a coefficient C j at a different than the nearest quantization level. More particularly, the quantizer forces a coefficient to assume a different level if ⁇ at is more efficient in a rate- distortion sense.
  • Embodiments of quantizer 3 and ⁇ -calculator 6 will be described in greate detail.
  • the quantized coefficients q are subsequently applied to a variable-length coding circuit 4.
  • This circuit forms a variable-length codeword for each non-zero coefficient and a possibly preceding series of non-zero coefficients in conformity with the MPEG standard.
  • the codewords formed are transmitted after buffering (not shown) via a transmission channel.
  • the codewords are also applied to the bitrate control circuit 5.
  • This circuit controls the step size ⁇ in further known manner in such a way that the number of bits per block is always as much as possible in conformity with a predetermined target R,.
  • the Lagrange multiplier ⁇ is applied to the quantizer by ⁇ -calculator 6.
  • This calculator calculates ⁇ by analysis of the picture to be coded. To this end, d e video signal is directly applied to the ⁇ -calculator, while the actual coding of the signal (transform, quantization, variable-length coding) takes place after it has been delayed by one picture period via delay 1.
  • Fig. 3 shows a block diagram of ⁇ -calculator 6.
  • the calculator comprises a picture transformer 600, a histogram forming circuit 601, an RD estimating circuit 602 and a computing circuit 603.
  • the index i indicates the spatial frequency.
  • the coefficients have an amplitude n in die range [-2047,2048].
  • the histogram forming circuit 601 forms, for each spatial frequency i, a histogram of the coefficient amplitude distribution. For example, the circuit 601 counts the number of times when coefficient C
  • the RD estimating circuit 602 uses the histograms h i n to generate an estimation for the RD curve.
  • computing circuit 603 calculates the Lagrange multiplier ⁇ from the estimated RD curve.
  • the searched Lagrange multiplier ⁇ is constituted by d e derivative -dD/dR of the RD curve at a given target bit rate or a given distortion.
  • RD estimating circuit 602 The operation of RD estimating circuit 602 will be explained with reference to a flow chart of operations shown in Fig. 4.
  • a step 40 a value is assigned to a quantization step size ⁇ .
  • the bit rate R and distortion D for this step size are computed in a step 41.
  • Embodiments of this step 41 will be described below in greater detail. If the step 41 were performed for a large number of step sizes ⁇ , then it would yield an RD curve denoted by 500 in Fig. 5. However, it is not necessary to have the RD curve completely available. Because die Lagrange multiplier ⁇ is die derivative -dD/dR at point P (see Fig.
  • step 4 the part of die RD curve around die point P is to be found.
  • Known numerical algorithms can be used to determine point P, for example a "bi-section algorithm". This is denoted in Fig. 4 by means of a step 42 in whic is checked whedier die bit rate R at the current step size ⁇ is sufficiently equal to die targe number of bits R,. As long as this is not the case, a different step size ⁇ is selected (step 4 and the computing step 41 is performed with the different step size. It is recalled diat (the relevant part of) the RD curve can be computed from the available histogram n . It is not necessary to transform the picture again for each computation of R and D.
  • me step size ⁇ is indicative of the spacing ⁇ , between discrete quantization levels.
  • the RD estimating circuit 602 determines from h ⁇ how often die amplitude n of coefficient c, corresponds to a quantization level r , i.e. how often the amplitude n is withi an interval
  • the number of occurrences of c, wim an amplitude t ⁇ n ⁇ t k+ is:
  • diat ⁇ t may be different for I-pictures and P- or B-pictures.
  • the distortion for the current picture dien is:
  • bit rate R is assum to be equivalent widi d e entropy H of the picture.
  • the entropy H is calculated in die following manner.
  • the probability p k of coefficient c, assuming the quantization level r k is calculated from the histogram h i n as:
  • the entropy H and die distortion D are bodi a function of the current step size ⁇ . It is recalled diat the RD curve 500 in Fig. 5 is obtained by calculating H and D for various stepsizes. The RD curve 500 appears to correspond to a very satisfactory extent to die actual RD curve after encoding die relevant picture.
  • variable-length tables used by variable-length coding circuit denoted 4 in Fig. 2.
  • DC coefficients i.e. coefficients c, for which i— 0
  • This code tables specifies for each DC amplitude n a codeword-length 1 D . Recalling that the number of occurrences of DC coefficients CQ with amplitude n is stored in histogram hu n , the number of bits to encode all DC coefficients is:
  • AC coefficients coefficients Cj for which i ⁇ O
  • the MPEG standard comprises an AC code table specifying die codeword-lengd s of "events", each event having a value (the quantization level r k of a non-zero coefficient) and a run length of zero coefficients preceding said non-zero coefficient.
  • the number of events and d eir values can be derived from d e histograms h . What cannot be derived from d e histograms is the run lengdi for each event. Therefore, an average run length for each value r k is used. The average run length is derived from the AC code table, using die assumption that said table applies to typical pictures.
  • An average codeword lengdi I* corresponding with said average run lengdi is also derived from the code table.
  • the number of bits to encode the AC coefficients can dius be approximated by multiplying the number of occurrences of events with the value r k , i.e. d e number of occurrences of coefficient c, with an amplitude t k ⁇ n ⁇ t k+1 , which is:
  • EOB end-of-block code
  • computing circuit 603 calculates the Lagrange multiplier ⁇ as the derivative -dD/d in d e point P of operation. If (R J .D J ) is die point of operation P and two points (R,,D,) an (R 3 ,D 3 ) are in its proximity, ⁇ follows from:
  • has the same value for all picture blocks of the picture.
  • Fig. 5 illustrates how die encoder reacts to die applied ⁇ .
  • die reference numeral 50 denotes d e RD curve as computed by RD estimation circuit 602.
  • the encoder would operate at the point P because the bitra control circuit 5 (see Fig. 2) generates a step size ( ⁇ 2) which actually leads to die target number of bits.
  • d e coefficients are imaged at different quantization levels under die influence of ⁇ . This causes die number of bits to be reduced.
  • the bitrate control circuit reacts thereto by reducing die step size. More particularly, the bitrate control circuit automatically controls the step size to that value ( ⁇ l) at which the derivative of rate distortion curve 501 at point Q remains equal to the derivative of die RD curve at point P.
  • the RD curve for die image has been estimated using die same step size ⁇ for all blocks constituting said image. It has been found diat die estimated RD curve corresponds to a satisfactory extent to the actual RD curve for the current image. Nevertheless, a yet more accurate RD curve can be estimated if it is realised diat die actual MPEG encoder adaptively varies die quantization step size from (macro-)block to (macro-)block. Generally, the step size depends on die activity of said block. Blocks having a low activity are quantized widi a smaller step size than blocks having a high activity, because high activity (e.g. much image detail) masks the effect of courser quantization. In accordance with ISO-IEC/JTC1/SC29 WG11/N0400 (better known as MPEG2 Test Model 5), April 1993, page 57, an adequate step size ⁇ m for die m-th (macro-)block is:
  • ⁇ _calculator 6 which takes block activity into account for die purpose of estimating the RD curve.
  • the ⁇ -calculator comprises an activity determining circuit 604 which calculates die activity A,,, of each block m from its pixel values, for example in accordance with page 57 of MPEG2 Test Model 5.
  • a correction circuit 605 modifies each DCT coefficient c- into an activity-corrected coefficient c' ⁇ in accordance widi die expression:
  • the circuit elements 600-603 are die same as in Fig. 3. As before, the histogram forming circuit 601 counts the number of occurrences of coefficients having the same amplitude. However, the coefficients originally having an amplitude n now have an amplitude n/f(A .
  • a more accurate RD curve can also be estimated if it is realised diat d actual MPEG encoder may encode selected (macro-)blocks of inter coded (P,B) pictures i the intra coding mode. This implies that an inter quantization matrix with weighting factor W e i is used to quantize d e majority of blocks of the inter coded picture, whereas a differ intra quantization matrix widi weighting factors W is used to quantize intra blocks.
  • Fig. 7 shows a yet further embodiment of ⁇ -calculator 6 which takes t intra coding mode of blocks of P- or B-pictures into account for the purpose of estimating RD curve.
  • the ⁇ -calculator comprises a switch 606 which is activated by a switching sign S when a block to be intra coded is received.
  • the signal S is generated by a pre-analysis circuit 607 which determines whe ier inter of intra coding of a block is more efficient.
  • a multiplier 608 modifies each DCT coefficient c t of intra blocks into a coding-mode-corrected coefficient c', in accordance widi die expression:
  • the circuit elements 600-603 are die same as in Fig. 3. As before, die histogram forming circuit 601 counts d e coefficients having the same amplitude. However, d e coefficients o intra coded blocks originally having an amplitude n now have an amplitude n*(W e i /W a i ). RD estimating circuit 602 calculates a plurality of (R,D) points for different step sizes. Applying step size ⁇ to amplitude n*(W e ,/W lti ) has die same effect as applying d e step si to amplitude n. The effect of applying the overall weighting factor W e , t all blocks of the P- or B-picture is thus cancelled for intra blocks and replaced by applyin d e intra weighting factor W a i .
  • Fig. 8 shows a scale of possible values of DCT coefficients Cj.
  • Said quantization levels are spaced apart by a step size ⁇ ⁇ as described before in response to d e step size ⁇ which is applied by bitrate control circuit 5 (see Fig. 2).
  • Fig. shows a flow chart of operations performed by die quantizer on coefficient c 4 .
  • d e value of c is imaged at me most proximate quantization level r k .
  • the "Lagrangian cost" L is subsequently computed for this quantization level r k in accorda wid the formula:
  • (C j -r 2 is a measure of me distortion which is a result of die approximation of c, by r , and R k is the number of bits required for transmitting .
  • the computed Lagrangian cost L is saved as L ⁇ .
  • Subsequendy, d e coefficient c 4 is imaged at a lower quantization level r k .,.
  • Lagrangian cost L is computed for this new quantization level.
  • diis Lagrangian cost L is smaller than L ⁇ . If diis is die case, then the lower quantization level r k . j is apparently more favourable in terms of rate-distortion d an r k . In other words, die distortion increases but die gain in the number of bits is more important.
  • the quantizer dien performs the steps 72-75 again so as to check whether an even lower quantization level is still more favourable.
  • the search for the minimum Lagrangian cost in this way is discontinued as soon as it has been found in step 75 that L increases again.
  • the quantization level corresponding to L ⁇ is subsequendy selected in a step 76 for quantization of die coefficient c,.
  • the algorithm shown in Fig. 9 is performed for all coefficients c 4 of a picture block.
  • diat die level 0 may be reached when a lower quantization level is chosen (step 73).
  • zero coefficients are not coded diemselves but are included in die code for the next non-zero coefficient.
  • the consequences thereof for the number of bits are included in die term R k of the formula for L (step 74).
  • the quantization process described above is referred to as bitrate- constrained quantization of DCT coefficients. It provides a significant improvement of the picture quality in comparison widi conventional MPEG coding in which die most proximate quantization level is coded and transmitted for each coefficient. A further improvement of die picture quality is obtained by subsequently subjecting die coefficients q s dius obtained to diresholding. As already previously noted, thresholding is understood to mean mat selected coefficients are rendered zero.
  • Fig. 10 shows a flow chart of the operations which are performed for this purpose on each non-zero coefficient O j . In a step 80, die Lagrangian cost LI is computed for this coefficient q ⁇ 0 given die current value of ⁇ . It holds for LI diat:
  • ⁇ Rj is the number of bits which is saved by rendering qj zero (the coding of q—0 i included in die coding of d e next non-zero coefficient).
  • LI > L2 the number of bits which is saved by rendering qj zero (the coding of q—0 i included in die coding of d e next non-zero coefficient).
  • the thresholding algorithm shown in Fig. 10 determines once per coefficient whether it is more favourable to maintain mis coefficient or render it zero. This is considerably simpler and less intensive in computation than the algorithm which is described in the afore-mentioned article "Rate-Distortion Optimal Fast Thresholding widi complete JPEG/MPEG Decoder Compatibility" which computes all possible thresholding options and selects the most favourable of em. Nevertheless, die form of thresholding described yields a considerable improvement of the picture quality. It has particularly been found diat the combination of bitrate- constrained quantization and thresholding significantly improves the picture quality.
  • the calculated value of ⁇ can also be used, inter alia, to select optimal motion vectors, to select between field or frame coding mode, to select one from a plurality of prediction modes (forward, backward), etc.
  • the picture quality of an MPEG-coded video signal can be improved considerably by modifying selected coefficients after conventional quantization, for example by rendering d em zero.
  • the modification is such d at the Lagrangian cost D+ ⁇ R (D is distortion, R is bitrate) is minimal for a given value of a Lagrange multiplier ⁇ .
  • D distortion
  • R bitrate
  • a relatively simple process is disclosed in which the value of ⁇ is calculated by means of statistical analysis (6) of the picture to be coded.
  • the statistical analysis comprises the estimation of the RD curve on die basis of the amplitude distribution of die coefficients.
  • the searched ⁇ is the derivative of diis curve at the desired bitrate.

Abstract

The picture quality of an MPEG-coded video signal can be improved considerably by modifying selected coefficients after conventional quantization, for example by rendering them zero. The modification is such that the Lagrangian cost D+μR (D is distortion, R is bitrate) is minimal for a given value of a Lagrange multiplier μ. A relatively simple process is disclosed in which the value of μ is calculated by means of statistical analysis (6) of the picture to be coded. The statistical analysis comprises the estimation of the RD curve on the basis of the amplitude distribution of the coefficients. The searched μ is the derivative of this curve at the desired bitrate.

Description

Device and method for coding video pictures.
FIELD OF THE INVENTION
The invention relates to a device for coding video pictures, comprising: a picture transformer for transforming blocks of pixels into coefficients; coding means for encoding said coefficients, the bit rate R and distortion D of the encoded picture being determined by a coding parameter; means (3) for selecting one from a series of coding parameter values for which the sum D+λR is minimal for an applied value of λ; and calculation means for calculating the value of λ. The invention also relates to a method of coding video pictures.
BACKGROUND OF THE INVENTION A device as mentioned in the opening paragraph is disclosed in
"Ramchandran and Vetterli: Rate-Distortion Optimal Fast Thresholding with complete JPEG/MPEG Decoder Compatibility", IEEE Transactions on Image Processing, Vol. 3, No. 5, September 1994. The article discloses a method of improving the picture quality of an MPEG encoder. As is generally known in the field of image coding, MPEG defines an encoder comprising a picture transformer to obtain coefficients, and a quantizer for imaging the coefficients to a proximate quantization level. The quantization level constitutes a coding parameter. In accordance with the prior art method, the picture quality is improved by tresholding the quantized coefficients, i.e. by selecting the quantization level zero rather than the conventional quantization level if that it is better in a rate vs. distortion sense. The prior art method will briefly be summarized with reference to Fig. 1.
In this Figure, the reference numeral 100 denotes a rate-distortion curve (hereinafter abbreviated to RD curve) for a range of quantization step sizes Δ. By thresholding, the bitrate will be lower because fewer non-zero coefficients are transmitted, and the distortion will be larger. In Fig. 1, curve 101 represents an RD curve if the thresholding operation is performed on coefficients which have been quantized with a step size Δl. Curve 102 represents an RD curve if the thresholding operation is performed on coefficients which have been quantized with a larger step size Δ2. The curves 101 and 102 will hereinafter be referred to as thresholding curves. They are obtained by determining the minimum value of what is known as the "Lagrangian cost" for different values of the "Lagrange multiplier" λ. The Lagrangian cost is defined as:
Figure imgf000004_0001
In this expression, b_ represents a set of coefficient values to be encoded. D(b and RQ>) are the distortion and the bitrate, respectively, upon encoding of these coefficients. The Lagrang multiplier λ is a natural number which is larger than or equal to 0. For each λ, a tresholdin operation can be found which yields a set fe of coefficients for which L(fe,λ) is minimal. Th distortion DQj) and bitrate Rφ) applying to this set constitutes a point on the thresholding curve. The starting point (λ=0) is always on the curve 100. As λ increases, the distortion will be larger and the bitrate lower. As is apparent from Fig. 1, a given bitrate Rl can be achieved both by (i) quantizing the coefficients with step size Δ2 and transmitting all quantized coefficients, and by (ii) quantizing the coefficients with a smaller step size Δl and thresholding selected coefficients. Apparently, option (ii) is more favourable because it yield less distortion. The curves 101 and 102 shown are only two curves of many possible thresholding curves. The envelope thereof, denoted by 103 in the Figure, constitutes the optimal RD curve for a given picture. It is completely below curve 100. In other words, at any desired bitrate, thresholding may result in a step size Δ and a Lagrange multiplier λ which yields a smaller distortion than when thresholding is not carried out. The way in which the optimal operating point of an encoder is determined is, however, very intensive from a computation point of view. It is an iterative procedure in which the optimal set of coefficients is searched for a large number of values of λ.
OBJECT AND SUMMARY OF THE INVENTION It is an object of the invention to provide an encoder which determines t optimal operating point in a less cumbersome way.
According to the invention, the device is therefore characterized in that the calculation means comprise: means for measuring the amplitude distribution of coefficients; means for estimating the bit rate R and distortion D from said amplitude distribution for a plurality of coding parameter values to obtain an estimated RD curve; and means for computing λ=-dD/dR at a selected point of said RD curve.
The invention is based on the recognition that the searched Lagrange multiplier λ for a desired bit rate is equal to the negative value of the derivative of the RD curve, and utilizes the fact that at least a good approximation of the RD curve can be derive from the distribution of coefficient amplitudes for each spatial frequency. Said amplitude distribution can easily be measured by statistic pre-analysis of the picture to be coded. For example, the amplitude distribution can be obtained by counting, for each spatial frequency, the number of times when a coefficient indicative of said spatial frequency assumes the same amplitude.
In one embodiment of the device in accordance with the invention, the means for estimating the bit rate R is adapted to cumulatively add, for all spatial frequencies, the product of the number of bits to encode a given amplitude with the number of occurrences when a coefficient assumes said amplitude as defined by the amplitude distribution. Alternatively, the means for estimating the bit rate R is adapted to calculate the entropy from said amplitude distribution, said entropy being indicative for the bit rate R.
These and other aspects of the invention will be apparent from and elucidated with reference to the embodiments described hereinafter.
BRIEF DESCRIPTION OF THE DRAWINGS
In the drawings:
Fig. 1, already described, shows some rate-distortion curves to explain a prior-art device.
Fig. 2 shows a device for coding a video signal according to the invention.
Fig. 3 shows the block diagram of a λ calculator shown in Fig. 2. Fig. 4 shows a flow chart to explain the operation of a computing circuit shown in Fig. 3.
Fig. 5 shows some entropy-distortion diagrams to explain the operation of the λ calculator shown in Fig. 3.
Figs. 6 and 7 show block diagrams of further embodiments of the λ calculator.
Fig. 8 shows a quantization diagram to explain the operation of a quantizer shown in Fig. 2. Figs. 9 and 10 show flow charts to explain the operation of the quantizer shown in Fig. 2. DESCRIPTION OF EMBODIMENTS
Fig. 2 shows a device for coding a video signal according to die invention. The device comprises a delay 1, a picture transformer 2, a quantizer 3, a variabl length coding circuit 4, a bitrate control circuit 5 and a λ calculator 6. An important aspect of the invention is that the video signal can be encoded in accordance with the MPEG standard. To this end, the picture transformer 2, the variable-length coding circuit 4 and th bitrate control circuit 5 in this embodiment are identical to the corresponding elements of th generally known MPEG encoder. Therefore, they are not described in detail. For the sake simplicity, Fig. 2 only shows the elements which are necessary for intraframe coding. The invention is also applicable to interframe coding. The applied picture is then first subtracted from a motion-compensated prediction picture, whereafter the residue thus obtained is code
In the picture transformer 2, the applied picture is block-sequentially subjected to a picture transform. In the embodiment, Discrete Cosine Transform (DCT) is used. Any suitable frequency transform may, however, be used, including sub-band filterin The DCT transforms each picture block of, for example 8*8 pixels into a block of 8*8 coefficients c in which i=0 ... 63 indicates the order of increasing extent of picture detail. The DCT coefficients c, are applied to the quantizer 3 which images eac coefficient c( at a discrete quantization level. The quantization levels are spaced apart by a step size Δj. For reasons of compatibility with d e MPEG standard, the step size Δ( is coefficient-dependent in conformity with weighting factors Wt which are stored in a quantization matrix. The quantization step size is controlled per block by the bitrate control circuit 5 which applies a step size Δ to the quantizer. The step size Δ, is calculated in accordance with the expression
Figure imgf000006_0001
in which i denotes a spatial frequency, Ws is the weighting factor for said spatial frequency, and c is a constant. The quantization matrix is generally different for intra coded (I) picture and inter coded (P,B) pictures.
In a conventional MPEG encoder, d e quantizer images each coefficient at one of d e two nearest quantization levels. In accordance witii the invention, quantizer 3 also receives a Lagrange multiplier λ. Dependent on λ, the quantizer now images a coefficient Cj at a different than the nearest quantization level. More particularly, the quantizer forces a coefficient to assume a different level if Λat is more efficient in a rate- distortion sense. Embodiments of quantizer 3 and λ-calculator 6 will be described in greate detail. The quantized coefficients q, are subsequently applied to a variable-length coding circuit 4. This circuit forms a variable-length codeword for each non-zero coefficient and a possibly preceding series of non-zero coefficients in conformity with the MPEG standard. The codewords formed are transmitted after buffering (not shown) via a transmission channel. The codewords are also applied to the bitrate control circuit 5. This circuit controls the step size Δ in further known manner in such a way that the number of bits per block is always as much as possible in conformity with a predetermined target R,. The Lagrange multiplier λ is applied to the quantizer by λ-calculator 6. This calculator calculates λ by analysis of the picture to be coded. To this end, d e video signal is directly applied to the λ-calculator, while the actual coding of the signal (transform, quantization, variable-length coding) takes place after it has been delayed by one picture period via delay 1.
Fig. 3 shows a block diagram of λ-calculator 6. The calculator comprises a picture transformer 600, a histogram forming circuit 601, an RD estimating circuit 602 and a computing circuit 603. The picture transformer 600 is identical to picture transformer 2 in Fig. 2 and supplies 64 coefficients c, (i=0..63) for each block. The index i indicates the spatial frequency. The coefficients have an amplitude n in die range [-2047,2048]. The histogram forming circuit 601 forms, for each spatial frequency i, a histogram of the coefficient amplitude distribution. For example, the circuit 601 counts the number of times when coefficient C| assumes the value n and records d e result in a two-dimensional array i B. More sophisticated embodiments of histogram forming circuit 601 will be described later. Using the histograms hi n, the RD estimating circuit 602 generates an estimation for the RD curve. Finally, computing circuit 603 calculates the Lagrange multiplier λ from the estimated RD curve. In fact, the searched Lagrange multiplier λ is constituted by d e derivative -dD/dR of the RD curve at a given target bit rate or a given distortion.
The operation of RD estimating circuit 602 will be explained with reference to a flow chart of operations shown in Fig. 4. In a step 40, a value is assigned to a quantization step size Δ. Subsequently, the bit rate R and distortion D for this step size are computed in a step 41. Embodiments of this step 41 will be described below in greater detail. If the step 41 were performed for a large number of step sizes Δ, then it would yield an RD curve denoted by 500 in Fig. 5. However, it is not necessary to have the RD curve completely available. Because die Lagrange multiplier λ is die derivative -dD/dR at point P (see Fig. 5) corresponding with a target bit rate R,, only the part of die RD curve around die point P is to be found. Known numerical algorithms can be used to determine point P, for example a "bi-section algorithm". This is denoted in Fig. 4 by means of a step 42 in whic is checked whedier die bit rate R at the current step size Δ is sufficiently equal to die targe number of bits R,. As long as this is not the case, a different step size Δ is selected (step 4 and the computing step 41 is performed with the different step size. It is recalled diat (the relevant part of) the RD curve can be computed from the available histogram n. It is not necessary to transform the picture again for each computation of R and D.
An example of computing the distortion D and two examples of computing e bit rate R (step 41 in Fig. 4) will now be described. As already mentioned previously, me step size Δ is indicative of the spacing Δ, between discrete quantization levels. The RD estimating circuit 602 determines from h^ how often die amplitude n of coefficient c, corresponds to a quantization level r , i.e. how often the amplitude n is withi an interval
Figure imgf000008_0001
The number of occurrences of c, wim an amplitude t ≤n<tk+, is:
Figure imgf000008_0002
It often holds Uiat
Figure imgf000008_0004
and
Figure imgf000008_0003
but diis is not necessary. It is further to be noted diat Δt may be different for I-pictures and P- or B-pictures.
Each occurrence introduces a distortion. A measure for said distortion is (rk-n)2. Thus, die distortion of all N coefficients ck corresponding with a particular spatial frequency i is:
Figure imgf000008_0005
The distortion for the current picture dien is:
63
D ' VA
In a first embodiment of computing me bit rate R, said bit rate is assum to be equivalent widi d e entropy H of the picture. The entropy H is calculated in die following manner. The probability pk of coefficient c, assuming the quantization level rk is calculated from the histogram hi n as:
Figure imgf000009_0001
Subsequently the entropy H, of coefficient c, and d e entropy H of d e picture are calculated as:
Hi . respectively.
Figure imgf000009_0002
The entropy H and die distortion D are bodi a function of the current step size Δ. It is recalled diat the RD curve 500 in Fig. 5 is obtained by calculating H and D for various stepsizes. The RD curve 500 appears to correspond to a very satisfactory extent to die actual RD curve after encoding die relevant picture.
In a second embodiment of computing me bit rate R, account is taken of the variable-length tables used by variable-length coding circuit denoted 4 in Fig. 2. DC coefficients (i.e. coefficients c, for which i— 0) are individually coded, using a DC code table. This code tables specifies for each DC amplitude n a codeword-length 1D. Recalling that the number of occurrences of DC coefficients CQ with amplitude n is stored in histogram hu n, the number of bits to encode all DC coefficients is:
n
AC coefficients (coefficients Cj for which i≠O) are encoded in a different manner. The MPEG standard comprises an AC code table specifying die codeword-lengd s of "events", each event having a value (the quantization level rk of a non-zero coefficient) and a run length of zero coefficients preceding said non-zero coefficient. The number of events and d eir values can be derived from d e histograms h . What cannot be derived from d e histograms is the run lengdi for each event. Therefore, an average run length for each value rk is used. The average run length is derived from the AC code table, using die assumption that said table applies to typical pictures. An average codeword lengdi I* corresponding with said average run lengdi is also derived from the code table. The number of bits to encode the AC coefficients can dius be approximated by multiplying the number of occurrences of events with the value rk, i.e. d e number of occurrences of coefficient c, with an amplitude tk< n< tk+1, which is:
Figure imgf000010_0001
with me average codeword lengdi 1+ and adding up all possible values and spatial frequencies. Hence:
63 tk-ι
I~~l k n-tk
Finally, an end-of-block code EOB is included in each block. Because me EOB is a fixed- length code, a fixed number of bits R^ is required for transmitting the EOB codes. An adequate approximation of the bit rate bits R is mus:
Having estimated the distortion D and bit rate R for a plurality of step sizes Δ, computing circuit 603 calculates the Lagrange multiplier λ as the derivative -dD/d in d e point P of operation. If (RJ.DJ) is die point of operation P and two points (R,,D,) an (R3,D3) are in its proximity, λ follows from:
Figure imgf000010_0002
An alternative is the less complex and also less accurate two-point approach of λ from two points (R,,D,) and (R3,D3) proximate to the point of operation:
Figure imgf000010_0003
The value of λ thus found is applied to quantizer 3 (see Fig. 2). When a picture is being coded, λ has the same value for all picture blocks of the picture. Fig. 5 illustrates how die encoder reacts to die applied λ. In this Figure, die reference numeral 50 denotes d e RD curve as computed by RD estimation circuit 602. For λ=0 (i.e. no modification of the coefficients), the encoder would operate at the point P because the bitra control circuit 5 (see Fig. 2) generates a step size (Δ2) which actually leads to die target number of bits. However, as will be described, d e coefficients are imaged at different quantization levels under die influence of λ. This causes die number of bits to be reduced. The bitrate control circuit reacts thereto by reducing die step size. More particularly, the bitrate control circuit automatically controls the step size to that value (Δl) at which the derivative of rate distortion curve 501 at point Q remains equal to the derivative of die RD curve at point P.
In the above described embodiment of me λ-calculator, the RD curve for die image has been estimated using die same step size Δ for all blocks constituting said image. It has been found diat die estimated RD curve corresponds to a satisfactory extent to the actual RD curve for the current image. Nevertheless, a yet more accurate RD curve can be estimated if it is realised diat die actual MPEG encoder adaptively varies die quantization step size from (macro-)block to (macro-)block. Generally, the step size depends on die activity of said block. Blocks having a low activity are quantized widi a smaller step size than blocks having a high activity, because high activity (e.g. much image detail) masks the effect of courser quantization. In accordance with ISO-IEC/JTC1/SC29 WG11/N0400 (better known as MPEG2 Test Model 5), April 1993, page 57, an adequate step size Δm for die m-th (macro-)block is:
Δ„=Δ.f(A in which Δ is a reference step size, A,,, is the activity of the m-di block, and f(A is an appropriate function defining how Δ,,, depends on said activity. Fig. 6 shows an embodiment of λ-calculator 6, which takes block activity into account for die purpose of estimating the RD curve. The λ-calculator comprises an activity determining circuit 604 which calculates die activity A,,, of each block m from its pixel values, for example in accordance with page 57 of MPEG2 Test Model 5. A correction circuit 605 modifies each DCT coefficient c- into an activity-corrected coefficient c'ι in accordance widi die expression:
C f (An)
The circuit elements 600-603 are die same as in Fig. 3. As before, the histogram forming circuit 601 counts the number of occurrences of coefficients having the same amplitude. However, the coefficients originally having an amplitude n now have an amplitude n/f(A . The RD estimating circuit 602 calculates a plurality of (R,D) points for different step sizes. Applying step size Δ to amplitude n/f(A has the same effect as applying the step size Δm=Δ.f(Am) to amplitude n. Adaptive quantization is thus incorporated in the calculation λ.
A more accurate RD curve can also be estimated if it is realised diat d actual MPEG encoder may encode selected (macro-)blocks of inter coded (P,B) pictures i the intra coding mode. This implies that an inter quantization matrix with weighting factor We i is used to quantize d e majority of blocks of the inter coded picture, whereas a differ intra quantization matrix widi weighting factors W is used to quantize intra blocks.
Fig. 7 shows a yet further embodiment of λ-calculator 6 which takes t intra coding mode of blocks of P- or B-pictures into account for the purpose of estimating RD curve. The λ-calculator comprises a switch 606 which is activated by a switching sign S when a block to be intra coded is received. The signal S is generated by a pre-analysis circuit 607 which determines whe ier inter of intra coding of a block is more efficient. In response to the signal S, a multiplier 608 modifies each DCT coefficient ct of intra blocks into a coding-mode-corrected coefficient c', in accordance widi die expression:
c' - .x^l
W-. i
The circuit elements 600-603 are die same as in Fig. 3. As before, die histogram forming circuit 601 counts d e coefficients having the same amplitude. However, d e coefficients o intra coded blocks originally having an amplitude n now have an amplitude n*(We i/Wa i). RD estimating circuit 602 calculates a plurality of (R,D) points for different step sizes. Applying step size Δ to amplitude n*(We ,/Wlti) has die same effect as applying d e step si
Figure imgf000012_0001
to amplitude n. The effect of applying the overall weighting factor We , t all blocks of the P- or B-picture is thus cancelled for intra blocks and replaced by applyin d e intra weighting factor Wa i.
The operation of quantizer 3 will now be explained wid reference to Figs. 8 and 9. Fig. 8 shows a scale of possible values of DCT coefficients Cj. The referen rn» rk, rk+„ ... denote d e discrete quantization levels which die quantized coefficient q assume. Said quantization levels are spaced apart by a step size Δ{ as described before in response to d e step size Δ which is applied by bitrate control circuit 5 (see Fig. 2). Fig. shows a flow chart of operations performed by die quantizer on coefficient c4. In an initial step 70, d e value of c, is imaged at me most proximate quantization level rk. In a step 71, the "Lagrangian cost" L is subsequently computed for this quantization level rk in accorda wid the formula:
Figure imgf000013_0001
In this formula, (Cj-r 2 is a measure of me distortion which is a result of die approximation of c, by r , and Rk is the number of bits required for transmitting . In a step 72, the computed Lagrangian cost L is saved as L^. Subsequendy, d e coefficient c4 is imaged at a lower quantization level rk.,.
This is shown in d e Figure by decreasing die index k by 1 in a step 73. In a step 74 d e Lagrangian cost L is computed for this new quantization level. In a step 75 it is checked whether diis Lagrangian cost L is smaller than L^. If diis is die case, then the lower quantization level rk.j is apparently more favourable in terms of rate-distortion d an rk. In other words, die distortion increases but die gain in the number of bits is more important. The quantizer dien performs the steps 72-75 again so as to check whether an even lower quantization level is still more favourable. The search for the minimum Lagrangian cost in this way is discontinued as soon as it has been found in step 75 that L increases again. The quantization level corresponding to L^ is subsequendy selected in a step 76 for quantization of die coefficient c,. The algorithm shown in Fig. 9 is performed for all coefficients c4 of a picture block.
It is to be noted diat die level 0 may be reached when a lower quantization level is chosen (step 73). However, zero coefficients are not coded diemselves but are included in die code for the next non-zero coefficient. The consequences thereof for the number of bits are included in die term Rk of the formula for L (step 74).
Practical experiments have proved that d e quantization level found is hardly ever more than one or two steps below die "conventional" level. Therefore it is also possible and simpler to compute the Lagrangian cost L only for some quantization levels (the "conventional" level rk and two levels below this level), and to simply select me level which yields die smallest L.
The quantization process described above is referred to as bitrate- constrained quantization of DCT coefficients. It provides a significant improvement of the picture quality in comparison widi conventional MPEG coding in which die most proximate quantization level is coded and transmitted for each coefficient. A further improvement of die picture quality is obtained by subsequently subjecting die coefficients qs dius obtained to diresholding. As already previously noted, thresholding is understood to mean mat selected coefficients are rendered zero. Fig. 10 shows a flow chart of the operations which are performed for this purpose on each non-zero coefficient Oj. In a step 80, die Lagrangian cost LI is computed for this coefficient q^ 0 given die current value of λ. It holds for LI diat:
l- t c^g J ^+λ.-R,-
in which Rj is die number of bits for transmission of q, and the possibly preceding zero- coefficients. In a step 81, me Lagrangian cost L2 is computed for the case where the value of zero would be enforced on ^. It holds for L2 that:
Figure imgf000014_0001
in which ΔRj is the number of bits which is saved by rendering qj zero (the coding of q—0 i included in die coding of d e next non-zero coefficient). Subsequently it is checked in a step 82 whether LI > L2. If this is not the case, q, will remain unchanged. If d is is die case, Qj will receive die value of zero in a step 83. The procedure is then repeated for a subsequent non-zero coefficient.
The thresholding algorithm shown in Fig. 10 determines once per coefficient whether it is more favourable to maintain mis coefficient or render it zero. This is considerably simpler and less intensive in computation than the algorithm which is described in the afore-mentioned article "Rate-Distortion Optimal Fast Thresholding widi complete JPEG/MPEG Decoder Compatibility" which computes all possible thresholding options and selects the most favourable of em. Nevertheless, die form of thresholding described yields a considerable improvement of the picture quality. It has particularly been found diat the combination of bitrate- constrained quantization and thresholding significantly improves the picture quality.
An even further improvement is obtained by comparing the Lagrangian cost of a picture block widi diat of a picture block all coefficients of which have die value of 0. In fact, blocks all coefficients of which have the value of 0 need not be transmitted. It suffices to indicate such empty blocks in a parameter, in MPEG referred to as coded_block_pattern. Obviously, die number of bits involved in encoding coded J)lock_pattern is taken into account in me λR term of the Lagrangian cost L=D+λR. It should be noted diat od er coding parameters than the quantization level can be controlled. The calculated value of λ can also be used, inter alia, to select optimal motion vectors, to select between field or frame coding mode, to select one from a plurality of prediction modes (forward, backward), etc. In summary, the picture quality of an MPEG-coded video signal can be improved considerably by modifying selected coefficients after conventional quantization, for example by rendering d em zero. The modification is such d at the Lagrangian cost D+λR (D is distortion, R is bitrate) is minimal for a given value of a Lagrange multiplier λ. A relatively simple process is disclosed in which the value of λ is calculated by means of statistical analysis (6) of the picture to be coded. The statistical analysis comprises the estimation of the RD curve on die basis of the amplitude distribution of die coefficients. The searched λ is the derivative of diis curve at the desired bitrate.

Claims

CLAIMS:
1. A device for coding video pictures, comprising: a picture transformer (2) for transforming blocks of pixels into coefficients; coding means (3,4) for encoding said coefficients, the bit rate R and distortion D of d e encoded picture being determined by a coding parameter (r^; means (3) for selecting one from a series of coding parameter values for which d e sum D+λR is minimal for an applied value of λ; and calculation means (6) for calculating die value of λ; characterized in diat die calculation means (6) comprise: means (601) for measuring me amplitude distribution of coefficients; means (602) for estimating the bit rate R and distortion D from said amplitude distribution for a plurality of coding parameter values to obtain an estimated RD curve; and means (603) for computing λ=-dD/dR at a selected point of said RD curve.
2. A device as claimed in Claim 1, further comprising means (603) for determining an amount of activity of each pixel block, and means (604) for modifying die coefficient amplitude in accordance wid said activity prior to measuring die amplitude distribution.
3. A device as claimed in Claim 1 or 2, further comprising means (606) for modifying the coefficient amplitude in accordance wid a coding mode of the block prior to measuring the amplitude distribution.
4. A device as claimed in Claim 1, 2 or 3, wherein me amplitude distribution is obtained by counting, for each spatial frequency (i), the number of times ( t when a coefficient indicative of said spatial frequency assumes the same amplitude (n).
5. A device as claimed in Claim 1, wherein the means (602) for estimating the bit rate R is adapted to calculate the entropy (H) from said amplitude distribution, said entropy being indicative for the bit rate R.
6. A device as claimed in Claim 1 , wherein the means (602) for estimating the bit rate R is adapted to cumulatively add, for all spatial frequencies, the product of the number of bits to encode a given amplitude widi die number of occurrences when a coefficient assumes said amplitude as defmed by die amplitude distribution.
7. A device as claimed in Claim 6, wherein coefficients are variable-lengdi encoded and the number of bits to encode a given amplitude is a predetermined average word lengdi.
8. A memod of coding video pictures, comprising the steps of: transforming blocks of pixels into coefficients; quantizing the coefficients and modifying the quantized coefficients in order diat die sum D+λR, in which D is the distortion and R is die bitrate, is reduced for an applied value of λ; and coding the modified coefficients; characterized in d at the method comprises die step of calculating die value of λ by: measuring the amplitude distribution of coefficients; estimating the bit rate R and distortion D from said amplitude distribution for a plurality of step sizes to obtain an estimated RD curve; and computing λ= -dD/dR at a selected point of said RD curve
8. A memod of coding video pictures, comprising die steps of: transforming blocks of pixels into coefficients; encoding said coefficients, d e bit rate R and distortion D of die encoded picture being determined by a coding parameter; selecting one from a series of coding parameter values for which the sum D+λR is minimal for an applied value of λ; and calculating the value of λ; characterized in diat die step of calculating comprises: measuring die amplitude distribution of coefficients; estimating the bit rate R and distortion D from said amplitude distribution for a plurality of coding parameter values to obtain an estimated RD curve; and computing λ= -dD/dR at a selected point of said RD curve.
9. A memod as claimed in Claim 7, further comprising the step of determining an amount of activity of each pixel block, and modifying die coefficient amplitude in accordance widi said activity prior to measuring me amplitude distribution.
10. A memod as claimed in Claim 8 or 9, further comprising me step of modifying die coefficient amplitude in accordance widi an inter or intra coding mode of di block prior to measuring the amplitude distribution.
11. A memod as claimed in Claim 8, 9 or 10, wherein me amplitude distribution is obtained by counting, for each spatial frequency (i), die number of times (h^ when a coefficient indicative of said spatial frequency assumes me same amplitude (n).
12. A memod as claimed in Claim 8, wherein the step of estimating die bit rate R is adapted to calculate die entropy (H) from said amplitude distribution, said entropy being indicative for die bit rate R.
13. A method as claimed in Claim 8, wherein the step of estimating die bit rate R is adapted to cumulatively add, for all spatial frequencies, die product of die numbe of bits to encode a given amplitude widi the number of occurrences when a coefficient assumes said amplitude as defined by die amplitude distribution.
14. A method as claimed in Claim 13, wherein coefficients are variable-len encoded and die number of bits to encode a given amplitude is a predetermined average w lengdi.
PCT/IB1996/000348 1995-04-25 1996-04-18 Device and method for coding video pictures WO1996034495A2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
AU51608/96A AU705914B2 (en) 1995-04-25 1996-04-18 Device and method for coding video pictures
JP8532314A JPH10502791A (en) 1995-04-25 1996-04-18 Movie image encoding apparatus and method
DE69605523T DE69605523T2 (en) 1995-04-25 1996-04-18 DEVICE AND METHOD FOR ENCODING VIDEO IMAGES.
EP96908305A EP0768007B1 (en) 1995-04-25 1996-04-18 Device and method for coding video pictures

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
EP95201055.1 1995-04-25
EP95201055 1995-04-25

Publications (2)

Publication Number Publication Date
WO1996034495A2 true WO1996034495A2 (en) 1996-10-31
WO1996034495A3 WO1996034495A3 (en) 1997-01-16

Family

ID=8220221

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/IB1996/000348 WO1996034495A2 (en) 1995-04-25 1996-04-18 Device and method for coding video pictures

Country Status (7)

Country Link
US (1) US5691770A (en)
EP (1) EP0768007B1 (en)
JP (1) JPH10502791A (en)
CN (1) CN1157080A (en)
AU (1) AU705914B2 (en)
DE (1) DE69605523T2 (en)
WO (1) WO1996034495A2 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0859520A1 (en) * 1997-02-13 1998-08-19 Rockwell Semiconductor Systems Video signal coding systems and processes using adaptive quantization
EP1708510A2 (en) * 2005-03-29 2006-10-04 Fujitsu Limited Image encoding apparatus
EP1940176A3 (en) * 2006-12-28 2008-07-09 Siemens Aktiengesellschaft Method and device for coding a sequence of digitized images
WO2008080881A1 (en) * 2006-12-28 2008-07-10 Siemens Aktiengesellschaft Method and device for coding a sequence of digitized images
WO2008081461A2 (en) * 2007-01-03 2008-07-10 Human Monitoring Ltd. Entropy deficiency based image compression
WO2009089370A1 (en) * 2008-01-08 2009-07-16 Qualcomm Incorporated Quantization based on rate-distortion modeling for cabac coders
WO2010033565A1 (en) * 2008-09-16 2010-03-25 Dolby Laboratories Licensing Corporation Adaptive video encoder control
US7822118B2 (en) 2002-11-08 2010-10-26 Apple Inc. Method and apparatus for control of rate-distortion tradeoff by mode selection in video encoders
US8208536B2 (en) 2005-04-28 2012-06-26 Apple Inc. Method and apparatus for encoding using single pass rate controller
RU2483468C2 (en) * 2008-02-21 2013-05-27 Квэлкомм Инкорпорейтед Two-pass quantisation for context-based adaptive binary arithmetic coding coders
US8634462B2 (en) 2007-03-13 2014-01-21 Matthias Narroschke Quantization for hybrid video coding
US8781002B2 (en) 2003-01-08 2014-07-15 Apple Inc. Method and apparatus for improved coding mode selection
USRE46777E1 (en) 2007-03-13 2018-04-03 Realtime Adaptive Streaming Llc Quantization for hybrid video coding
US11310505B2 (en) 2018-04-27 2022-04-19 Interdigital Vc Holdings, Inc. Method and apparatus for adaptive context modeling in video encoding and decoding

Families Citing this family (49)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000511366A (en) * 1995-10-25 2000-08-29 サーノフ コーポレイション Apparatus and method for variable block size motion estimation based on quadrant tree
US5778192A (en) * 1995-10-26 1998-07-07 Motorola, Inc. Method and device for optimal bit allocation between different sources of information in digital video compression
US5909513A (en) * 1995-11-09 1999-06-01 Utah State University Bit allocation for sequence image compression
JPH10174103A (en) * 1996-12-13 1998-06-26 Matsushita Electric Ind Co Ltd Image encoder, encoded image recording medium, image decoder, image encoding method and encoded image transmitting method
US6633609B1 (en) * 1996-12-24 2003-10-14 Intel Corporation Method and apparatus for bit rate control in a digital video environment for arbitrary bandwidth
US6263020B1 (en) * 1996-12-24 2001-07-17 Intel Corporation Method and apparatus for bit rate control in a digital video system
EP0956701B1 (en) * 1997-02-03 2005-11-23 Sharp Kabushiki Kaisha An embedded image coder with rate-distortion optimization
KR100249223B1 (en) * 1997-09-12 2000-03-15 구자홍 Method for motion vector coding of mpeg-4
US6118822A (en) * 1997-12-01 2000-09-12 Conexant Systems, Inc. Adaptive entropy coding in adaptive quantization framework for video signal coding systems and processes
US6037987A (en) * 1997-12-31 2000-03-14 Sarnoff Corporation Apparatus and method for selecting a rate and distortion based coding mode for a coding system
US6122321A (en) * 1998-05-12 2000-09-19 Hitachi America, Ltd. Methods and apparatus for reducing the complexity of inverse quantization operations
US6263021B1 (en) * 1998-09-18 2001-07-17 Sarnoff Corporation Treating non-zero quantized transform coefficients as zeros during video compression processing
EP1005233A1 (en) * 1998-10-12 2000-05-31 STMicroelectronics S.r.l. Constant bit-rate coding control in a video coder by way of pre-analysis of the slices of the pictures
US6167162A (en) * 1998-10-23 2000-12-26 Lucent Technologies Inc. Rate-distortion optimized coding mode selection for video coders
EP1063851B1 (en) * 1999-06-22 2007-08-01 Victor Company Of Japan, Ltd. Apparatus and method of encoding moving picture signal
US7096481B1 (en) 2000-01-04 2006-08-22 Emc Corporation Preparation of metadata for splicing of encoded MPEG video and audio
US6600836B1 (en) * 2000-01-28 2003-07-29 Qualcomm, Incorporated Quality based image compression
US6871006B1 (en) 2000-06-30 2005-03-22 Emc Corporation Processing of MPEG encoded video for trick mode operation
US6771703B1 (en) * 2000-06-30 2004-08-03 Emc Corporation Efficient scaling of nonscalable MPEG-2 Video
US7023924B1 (en) 2000-12-28 2006-04-04 Emc Corporation Method of pausing an MPEG coded video stream
US6937770B1 (en) 2000-12-28 2005-08-30 Emc Corporation Adaptive bit rate control for rate reduction of MPEG coded video
US6980594B2 (en) 2001-09-11 2005-12-27 Emc Corporation Generation of MPEG slow motion playout
US6959116B2 (en) * 2001-09-18 2005-10-25 Emc Corporation Largest magnitude indices selection for (run, level) encoding of a block coded picture
US6968091B2 (en) * 2001-09-18 2005-11-22 Emc Corporation Insertion of noise for reduction in the number of bits for variable-length coding of (run, level) pairs
US8406301B2 (en) 2002-07-15 2013-03-26 Thomson Licensing Adaptive weighting of reference pictures in video encoding
AU2003247711A1 (en) * 2002-07-09 2004-01-23 Aware, Inc. Iterative compression parameters control for a sequence of images
US7106907B2 (en) * 2002-10-18 2006-09-12 Mitsubishi Electric Research Laboratories, Inc Adaptive error-resilient video encoding using multiple description motion compensation
EP1933569A3 (en) 2002-11-08 2010-07-07 Apple Inc. Method and apparatus for control of rate-distortion tradeoff by using lagrange multiplier and/or quantizer value
CN101409835B (en) * 2002-11-08 2014-09-17 苹果公司 Method and apparatus for control of rate-distortion tradeoff by mode selection in video encoders
CN100536571C (en) * 2003-01-08 2009-09-02 苹果公司 Method and apparatus for improved coding mode selection
US7672523B2 (en) * 2003-03-03 2010-03-02 The Hong Kong University Of Science And Technology Efficient rate allocation for multi-resolution coding of data
US7327786B2 (en) * 2003-06-02 2008-02-05 Lsi Logic Corporation Method for improving rate-distortion performance of a video compression system through parallel coefficient cancellation in the transform
WO2004109586A1 (en) 2003-06-05 2004-12-16 Aware, Inc. Image quality control techniques
JP2005004866A (en) * 2003-06-11 2005-01-06 Sony Corp Device and method for processing information, recording medium, and program
US7280597B2 (en) * 2003-06-24 2007-10-09 Mitsubishi Electric Research Laboratories, Inc. System and method for determining coding modes, DCT types and quantizers for video coding
KR20050053297A (en) * 2003-12-02 2005-06-08 학교법인 성균관대학 Method and apparatus of video encoding
US7746927B1 (en) * 2004-03-26 2010-06-29 Apple Inc. Robust single-pass variable bit rate encoding
US8005139B2 (en) 2004-06-27 2011-08-23 Apple Inc. Encoding with visual masking
KR100631714B1 (en) 2004-06-30 2006-10-09 엘지전자 주식회사 Apparatus and method for improved video signal rate control of a mobile terminal
US7885979B2 (en) * 2005-05-31 2011-02-08 Sorenson Media, Inc. Method, graphical interface and computer-readable medium for forming a batch job
US8296649B2 (en) * 2005-05-31 2012-10-23 Sorenson Media, Inc. Method, graphical interface and computer-readable medium for generating a preview of a reformatted preview segment
US7975219B2 (en) * 2005-05-31 2011-07-05 Sorenson Media, Inc. Method, graphical interface and computer-readable medium for reformatting data
US7423642B2 (en) * 2005-12-14 2008-09-09 Winbond Electronics Corporation Efficient video frame capturing
US7944965B2 (en) * 2005-12-19 2011-05-17 Seiko Epson Corporation Transform domain based distortion cost estimation
JP5087624B2 (en) 2006-08-30 2012-12-05 トムソン ライセンシング Method and apparatus for analytical and experimental hybrid coding distortion modeling
EP2105029A2 (en) * 2006-12-15 2009-09-30 Thomson Licensing Distortion estimation
US20080273113A1 (en) * 2007-05-02 2008-11-06 Windbond Electronics Corporation Integrated graphics and KVM system
US9338463B2 (en) 2011-10-06 2016-05-10 Synopsys, Inc. Visual quality measure for real-time video processing
US9781449B2 (en) * 2011-10-06 2017-10-03 Synopsys, Inc. Rate distortion optimization in image and video encoding

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR0176474B1 (en) * 1992-12-01 1999-04-15 김광호 Data coding for a digital video tape recorder suitable for high speed picture playback
US5550590A (en) * 1994-03-04 1996-08-27 Kokusai Denshin Denwa Kabushiki Kaisha Bit rate controller for multiplexer of encoded video

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
IEEE TRANSACTIONS ON IMAGE PROCESSING, Volume 3, No. 5, Sept. 1994, KANNAN RAMCHANDRAN et al., "Rate-Distortion Optimal Fast Thresholding with Complete JPEG/MPEG Decoder Compatibility", pages 700-704. *
IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, Volume 1-7, No. 1, 1985, G. STEPHEN ZABELE et al., "Fourier Encoding of Closed Planar Boundaries", pages 98-102. *
INTERNATIONAL CONFERENCE ON IMAGE PROCESSING, Volume III, October 1995, (Washington DC), JUNGWOO LEE, "Optimal Quadtree for Variable Block Size Motion Estimation", pages 480-483. *
PROCEEDINGS OF THE SPIE - THE INTERNATIONAL SOCIETY FOR OPTICAL ENGINEERING CONFERENCE, TITLE: PROC. SPIE INT. SOC. OPT. ENG. (USA), Vol. 2727, Pt. 2. Conference Date: 17-20 March 1996, SCHUSTER G.M., KATSAGGELOS A.K., "Fast and Efficient Mode and Quantizer Selection in Rate Distortion Sense for H. 263", pages 784-95. *

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0859520A1 (en) * 1997-02-13 1998-08-19 Rockwell Semiconductor Systems Video signal coding systems and processes using adaptive quantization
US8355436B2 (en) 2002-11-08 2013-01-15 Apple Inc. Method and apparatus for control of rate-distortion tradeoff by mode selection in video encoders
US7822118B2 (en) 2002-11-08 2010-10-26 Apple Inc. Method and apparatus for control of rate-distortion tradeoff by mode selection in video encoders
US8781002B2 (en) 2003-01-08 2014-07-15 Apple Inc. Method and apparatus for improved coding mode selection
EP1708510A3 (en) * 2005-03-29 2009-09-02 Fujitsu Limited Image encoding apparatus
US7646926B2 (en) 2005-03-29 2010-01-12 Fujitsu Limited Image encoding apparatus
EP1708510A2 (en) * 2005-03-29 2006-10-04 Fujitsu Limited Image encoding apparatus
US8208536B2 (en) 2005-04-28 2012-06-26 Apple Inc. Method and apparatus for encoding using single pass rate controller
WO2008080881A1 (en) * 2006-12-28 2008-07-10 Siemens Aktiengesellschaft Method and device for coding a sequence of digitized images
EP1940176A3 (en) * 2006-12-28 2008-07-09 Siemens Aktiengesellschaft Method and device for coding a sequence of digitized images
WO2008081461A2 (en) * 2007-01-03 2008-07-10 Human Monitoring Ltd. Entropy deficiency based image compression
WO2008081461A3 (en) * 2007-01-03 2009-05-14 Human Monitoring Ltd Entropy deficiency based image compression
US8467617B2 (en) 2007-01-03 2013-06-18 Human Monitoring Ltd. Compressing high resolution images in a low resolution video
US8019167B2 (en) 2007-01-03 2011-09-13 Human Monitoring Ltd. Compressing high resolution images in a low resolution video
US8634462B2 (en) 2007-03-13 2014-01-21 Matthias Narroschke Quantization for hybrid video coding
USRE46777E1 (en) 2007-03-13 2018-04-03 Realtime Adaptive Streaming Llc Quantization for hybrid video coding
RU2475999C2 (en) * 2008-01-08 2013-02-20 Квэлкомм Инкорпорейтед Quantisation based on modelling of transfer speed distortion, for cabac coders
WO2009089370A1 (en) * 2008-01-08 2009-07-16 Qualcomm Incorporated Quantization based on rate-distortion modeling for cabac coders
US8891615B2 (en) 2008-01-08 2014-11-18 Qualcomm Incorporated Quantization based on rate-distortion modeling for CABAC coders
US9008171B2 (en) 2008-01-08 2015-04-14 Qualcomm Incorporated Two pass quantization for CABAC coders
RU2483468C2 (en) * 2008-02-21 2013-05-27 Квэлкомм Инкорпорейтед Two-pass quantisation for context-based adaptive binary arithmetic coding coders
KR101271512B1 (en) * 2008-09-16 2013-06-05 돌비 레버러토리즈 라이쎈싱 코오포레이션 Adaptive video encoder control
WO2010033565A1 (en) * 2008-09-16 2010-03-25 Dolby Laboratories Licensing Corporation Adaptive video encoder control
US8654835B2 (en) 2008-09-16 2014-02-18 Dolby Laboratories Licensing Corporation Adaptive video encoder control
US11310505B2 (en) 2018-04-27 2022-04-19 Interdigital Vc Holdings, Inc. Method and apparatus for adaptive context modeling in video encoding and decoding

Also Published As

Publication number Publication date
AU5160896A (en) 1996-11-18
CN1157080A (en) 1997-08-13
EP0768007A2 (en) 1997-04-16
US5691770A (en) 1997-11-25
JPH10502791A (en) 1998-03-10
EP0768007B1 (en) 1999-12-08
DE69605523T2 (en) 2000-07-06
DE69605523D1 (en) 2000-01-13
AU705914B2 (en) 1999-06-03
WO1996034495A3 (en) 1997-01-16

Similar Documents

Publication Publication Date Title
EP0768007B1 (en) Device and method for coding video pictures
US5768436A (en) Device and method for coding video pictures
US6463100B1 (en) Adaptive quantization control method
US5638126A (en) Method and apparatus for deciding quantization parameter
US5933194A (en) Method and circuit for determining quantization interval in image encoder
EP0857394B1 (en) Apparatus and method for optimizing the rate control in a coding system
US6011864A (en) Digital image coding system having self-adjusting selection criteria for selecting a transform function
EP2130380B1 (en) Controlling the amount of compressed data
US6546049B1 (en) Parameterized quantization matrix adaptation for video encoding
US20020025001A1 (en) Method and apparatus for video coding
US7218674B2 (en) Method and device for controlling quantization scales of a video encoding bit stream
US8259793B2 (en) System and method of fast MPEG-4/AVC quantization
WO1999003279A1 (en) Apparatus and method for object based rate control in a coding system
US6252905B1 (en) Real-time evaluation of compressed picture quality within a digital video encoder
JPH09307904A (en) Quantizer for video signal coding system
KR20030069282A (en) Method for encoding motion image having fixed computational complexity and apparatus thereof
EP1516493B1 (en) A method and system for optimizing image sharpness during coding
US20020009146A1 (en) Adaptively encoding a picture of contrasted complexity having normal video and noisy video portions
WO1997015146A1 (en) Method of encoding video images
JP4295828B2 (en) Encoding with region information
US20100158108A1 (en) System and method for video encoding
Kamaci et al. Frame bit allocation for H. 264 using cauchy-distribution based source modelling
Dai et al. Intraframe bitrate prediction method for H. 264/AVC
Hu Bit rate control for real-time multipoint video conferencing

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 96190638.3

Country of ref document: CN

AK Designated states

Kind code of ref document: A2

Designated state(s): AU CN JP

AL Designated countries for regional patents

Kind code of ref document: A2

Designated state(s): AT BE CH DE DK ES FI FR GB GR IE IT LU MC NL PT SE

WWE Wipo information: entry into national phase

Ref document number: 1996908305

Country of ref document: EP

AK Designated states

Kind code of ref document: A3

Designated state(s): AU CN JP

AL Designated countries for regional patents

Kind code of ref document: A3

Designated state(s): AT BE CH DE DK ES FI FR GB GR IE IT LU MC NL PT SE

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWP Wipo information: published in national office

Ref document number: 1996908305

Country of ref document: EP

WWG Wipo information: grant in national office

Ref document number: 1996908305

Country of ref document: EP