METHOD OF ENCODING VIDEO IMAGES

Abstract: A method of encoding video images is disclosed, in which different coding methods are applied to different regions of the image. The image is divided into blocks, and the coding method which is optimal in a rate-distortion sense is selected (2) for each block. In an embodiment, transform coding (3), such as DCT or LOT, is applied to all blocks. The block size is selected in accordance with a rate-distortion criterion.

Description: Method of encoding video images. FIELD OF THE INVENTION The invention relates to a method of encoding video images, comprising the steps of dividing said images into blocks selecting one of a plurality of different coding methods for each of said blocks and encoding said blocks using the selected coding method to obtain coded data for each block. The invention also relates to an arrangement for carrying out said encoding method. BACKGROUND OF THE INVENTION A method of encoding Video images as described in the opening paragraph is disclosed in European Patent Application EP-A 0 220 706. In this known method, transform coding is applied to each block, the block size being variable in response to brightness changes. The blocks are subdivided into smaller blocks so that the mean distortion inside each block does not exceed an allowable value. OBJECT AND SUMMARY OF THE INVENTION It is an object of the invention to further improve the video image encoding method. To this end, the method according to the invention is characterized in that the step of selecting the encoding method comprises the determination of that coding method which is optimal in a rate-distortion sense. An optimal compromise between rate and distortion is thereby achieved. In an embodiment of the method, the plurality of different coding methods is applied to pixel blocks of equal size. Examples of different coding methods are transform coding and fractal coding. In a further embodiment, the coding methods are all picture transforms, but they are applied to pixel blocks of different block sizes. Transforms used in transform coding are the Discrete Cosine Transform (DCT), the Hadamard transform, the Lapped Orthogonal Transforms (LOT), in particular the Modified LOT (MLOT), all known in the art. In a preferred embodiment of the method it is assumed that the statistics of the image to be coded are Gaussian, and that the transform coefficients are uncorrelated. In this embodiment, the rate and distortion, on which the selection of the optimal transform type is based, can easily be calculated. BRIEF DESCRIPTION OF THE DRAWINGS Fig.1 shows a diagram of a video encoding and transmitting station employing the method according to the invention. Fig.2 shows examples of rate-distortion curves associated with different coding methods. Fig.3 shows a flow chart of steps carried out by a segmentation circuit which is shown in Fig. l. Fig.4 shows a segmentation map of an image indicating the different coding methods applied to different regions of the image. DESCRIPTION OF PREFERRED EMBODIMENTS Fig. l shows a diagram of a video encoding and transmitting station employing the method according to the invention. The arrangement receives a video input signal X m . In an optional subtracting circuit 1, a predicted video signal X pred is subtracted therefrom. The encoder can thus operate in an intraframe mode or a (possibly motion- compensated) interframe mode. The picture to be coded is applied to a segmentation circuit 2 and a transform circuit 3. The segmentation circuit determines, for example in a pre-analysis phase, which transform for a given block is optimal in a rate-distortion sense. The circuit further merges the contiguous blocks subjected to the same transform so as to form regions with the same transform. A "segmentation map" thus created is encoded for transmission or storage by an encoding circuit 4. The segmentation map is further applied to transform circuit 3 so as to indicate which transform is to be carried out during the actual coding phase. The transform coefficients obtained from transform circuit 3 are quantized and lossless coded by a quantizer and entropy coder 5. Quantization and entropy coding are well-known in the art. For example MPEG2-like coding can be used. The coefficients for each transform block are zigzag-scanned. The DC coefficients are quantized using a fixed step size, and encoded differentially. The AC coefficients are adaptively quantized and entropy-coded using a combination of Huffman coding and run-length coding. An end-of-block code is transmitted after the last non-zero AC coefficient of a block. The coded data thus obtained is multiplexed with the encoded segmentation map by a multiplexer 6 and transmitted to a decoder or stored on a storage medium (not shown). The segmentation circuit 2 determines the optimal coding method in a rate-distortion sense. The rate-distortion curve of a given coding method is the collection of rate-distortion pairs (R,D) for different values of an encoding parameter t, e.g. the quantization step size of a transform coder. Fig.2 shows a rate-distortion curve 201 associated with a first coding method Tl and a second rate-distortion curve 202 associated with a second coding method T2. In the following embodiment, transform coding is applied to pixel blocks of non-equal size. The segmentation circuit 2 determines the optimal block size. In the present example, two assumptions are made to speed up the segmentation process: the statistics of the image to be coded are Gaussian, and the transform coefficients are statistically independent. Under these assumptions, the following applies (see Toby Berger: Rate Distortion Theory, A Mathematical Basis For Data Compression, Prentice-hall, Inc. Englewood Cliffs, New Jersey, 1971 , pp.110-111): 1. For each pixel block k which is processed, the rate R k (t) and distortion D k (t) is: i c 2 * * ( ' ) = Σ maχ(log — - 0) (i) where c i k is the i-th coefficient of transform block k and t is an encoding parameter, e.g. representative of a quantizer step size. 2. The slope s of the rate-distortion curve is: s = -— (3) 2t Fig.3 shows a flow chart of steps carried out by segmentation circuit 2. In a step 21, the circuit calculates the operating value of t in such a way that the global rate R(t) equals a required rate R rcf , i.e. such that: The value of t is found, for example, by using a bi-section algorithm. Table I shows an example of such a bi-section algoritm in a pseudo-programming language. Of course, more efficient algorithms, such as Gradient methods, can be used. Table I In a step 22, the circuit subjects each pixel block k to a given transform so as to obtain transform coefficients c i k , and calculates the rate R^t) and distortion D k (t) for said block in accordance with equations (1) and (2), using the value t which was found in step 21. The step 22 is repeated for different block sizes. In the present example, four different transforms are considered: a 2*2 transform Tl , a 4*4 transform T2, an 8*8 transform T3, or a 16*16 transform T4. In a step 23, it is checked whether or not all these transforms have been processed. If the rate-distortion pair (R,D) has been calculated for each transform type, the best transform is selected in a step 24. The best transform is the transform for which the "Lagrangian cost" L, defined as L=R+s.D, is minimal. Herein, s is the slope of the rate-distortion curve in accordance with equation (3). An adequate way of selecting the best transform is achieved by pair-wise comparing the above transform results, i.e by carrying out the following substeps: 1. Compare, for a 4*4 block, four 2*2 Tl transform blocks with the corresponding 4*4 T2 transform block. 2. Compare, for a 8*8 block, the 8*8 T3 transform with the transform resulting from substep 1 for this block. 3. Compare, for a 16*16 block, the 16*16 T4 transform with the transform resulting from substep 2 for this block. In a step 25, the selected transform type is stored in the segmentation map, which defines a grid determined by the smallest block size. Fig.4 shows an illustrative example of such a segmentation map. Returning now to Fig. l , the segmentation map is applied to transform circuit 3 so as to indicate which transform type is to be used during the phase of really encoding the image. During this encoding process, the rate R k (t) for block k as determined in step 22 may be applied to a bitrate regulation circuit (not shown in Fig. l) so as to actually achieve the rate as determined by the segmentation circuit 2. Bitrate regulation circuits are known in the art. The segmentation map is further applied to encoding circuit 4 for transmission to the decoder or storage on a storage medium. A practical encoding strategy is to assign a unique number to the different transform types. The transform number is lossless encoded, using DPCM. The resultant differences are transmitted by a combination of Huffman coding and run-length coding. An alternative embodiment for calculating the rate-distortion pairs (step 22 above) is to actually encode (transform, quantize, Huffman and run-length coding) each potential image block k. In that case, the above assumptions (the statistics of the image to be coded are Gaussian, and the transform coefficients are uncorrelated) are not applicable. It is also to be noted that different transforms with equal block sizes can be used in the automatic segmentation, for example Discrete Cosine Transforms, Hadamard transforms, or Lapped Transforms such as the Modified Lapped Orthogonal Transform. It is further to be noted that a provision in the coding process is required to switch between the different transforms at the contour between regions, while maintaining (near) perfect reconstruction. For example, using linear phase transforms, this can be accomplished by mirroring at the region boundaries. In summary, a method of encoding video images is disclosed in which different coding methods are applied to different regions of the image. The image is divided into blocks, and for each block the coding method is selected which is optimal in a rate- distortion sense. In an embodiment, transform coding, such as DCT or LOT, is applied to all blocks. The block size is selected in accordance with a rate-distortion criterion.

Claims: Claims 1. A method of encoding video images, comprising the steps of dividing said images into blocks, selecting one of a plurality of different coding methods for each of said blocks, encoding said blocks using the selected coding method to obtain coded data for each block, and transmitting data indicating the selected coding method and said coded data, characterized in that the step of selecting the encoding method comprises the determination of that coding method which is optimal in a rate-distortion sense. 2. A method as claimed in Claim 1 , wherein the plurality of different coding methods is applied to pixel blocks of equal size. 3. A method as claimed in Claim 1 , wherein the plurality of different coding methods are signal transforms applied to pixel blocks of different block sizes. 4. A method as claimed in Claim 3, wherein the step of determining the optimal coding method implies the calculation of the rate R(t) and distortion D(t) in accordance with 1 c 2 *_(') = ∑ max(log-^,0) D k (t) = ∑ min(c 2 „t) where c, k is the i-th coefficient of transform block k and t is a quantization parameter. 5. An arrangement for encoding video images, comprising means for dividing said images into blocks, means for selecting one of a plurality of different coding methods for each of said blocks, means for encoding said blocks using the selected coding method for to obtain coded data for each block, and means for transmitting data indicating the selected coding method and said coded data, characterized in that the means for selecting the encoding method comprise means for determining which coding method is optimal in a rate-distortion sense. 6. An arrangement as claimed in Claim 5, wherein the plurality of different coding methods is applied to pixel blocks of equal size. 7. An arrangement as claimed in Claim 5, wherein the plurality of different coding methods are signal transforms applied to pixel blocks of different block sizes. 8. An arrangement as claimed in Claim 7, wherein means for determining the optimal coding method is adapted to calculate the rate R(t) and distortion D(t) in accordance with R k (r) = ∑ max(log-^,0) I t >* ( ' ) = Σ min(c J ) where c, is the i-th coefficient of transform block k and t is a quantization parameter.

Inventors: BEUKER ROB ANNE, HEUSDENS RICHARD, THEUNIS HENDRIK GEMMUALDUS JAC, BEUKER, ROB, ANNE, HEUSDENS, RICHARD, THEUNIS, HENDRIK, GEMMUALDUS, JACOBUS
Applicants: BEUKER ROB ANNE, HEUSDENS RICHARD, PHILIPS ELECTRONICS NV, PHILIPS NORDEN AB, THEUNIS HENDRIK GEMMUALDUS JAC, BEUKER, ROB, ANNE, HEUSDENS, RICHARD, PHILIPS ELECTRONICS N.V., THEUNIS, HENDRIK, GEMMUALDUS, JACOBUS
Application year: 1996
Main classification: H04N7
IPC codes: G06T9, H04N7