A METHOD IN COMPRESSION CODING

Abstract: In a method in compression coding of digitalized image or video information, especially for effective bit representation of parameters for side information in the forms of classification tables or motion vectors, wherein the parameter to be coded is represented by a vector with integer components, the vector is enumerated hierarchically in two or more levels by partitioning the vector in subvectors and/or vector elements on each level, binary code words are generated for each subvector and/or each vector element on a given level, said binary code word for a subvector and/or a vector element on one level being formed by the binary code words for the subvectors and/or the vector elements on a lower level, and a binary code word with fixed length for the vector is generated from the binary code words for the subvector or the vector elements of the immediately underlying level of the hierarchy.

Description: A method in compression coding The present invention concerns a method in compression coding of digitalised image or video information, especially for effective bit representation of parameters for side information in the form of a classification table or motion vectors, wherein the parameter to be coded is represented by a vector with integer components. More particularly the invention concerns a method based on hierarchical enumeration in order to represent parameters in algorithms for compression coding of image and video information. A system or algorithm for video data compression is shown schematically in fig. 1. A system of this kind which may be implemented on computers or on a dedicated processing device, comprises four stages. The video signals or generally image signals are input to a first stage 1, called transform, which transforms the video signals (or a video sequence) into a set of parameters suited for compression. The ouput from stage 1 is transferred to stage 2, called parameter selection, which reduces the total number of parameters. Only the most important parameters are selected in stage 2 for further processing and output to stage 3, called quantization, which converts the input parameters from real numbers with infinitely many values into integers with finitely many values. In stage 4, called effective bit representation, the input parameters are represented with a least possible number of bits. Two methods for doing this are known, namely variable length coding (VLC) and fixed length coding (FLC). A main problem with variable length coding is synchronization due to transmission errors in mobile transmission channels. Fixed length coding avoids this problem, but is generally much less effective than variable length coding. The present invention discloses a novel method for stage 4 of the compression coding, i.e. the effective bit representation of some of the integer parameters in an algorithm for image or video compression. These parameters are the so- called side information parameters, of which the most important are 1. Motion vectors These parameters are found in most algorithms for video data compressions including the standards MPEG-1 and MPEG-2. 2. Classification table (Bit allocation table") The use of these parameters is uncommon in video data compression, but is known in the art. Generally it can be regarded as known using Huffman coding, arithmetic coding or differential coding for representing the side information parameters. As instances of prior art concerning bit representation using variable length coding reference may be made to US patent No. 5 428 396 (Yagasaki & al.) and US patent No. 5 487 119 (Kimura & al.). Yagasaki & al. discloses a method of assigning a variable length code value to a motion vector, based on providing a reference table for associating with a respective variable length code value each possible value of motion vectors and comprising forming an output bit stream which includes variable length code values. Kimura & al. discloses an image coding method by which accurate code amount control can be performed without the necessity of recursive processing. The method is applied to an image coding apparatus which i.a. comprises a code allocation section for allocating the quantization index from a quantization section as a code word generated by variable length coding. All the prior art methods are suffering from a number of deficiencies and problems. Traditional fixed length coding is, in so far it is used, ineffective, while methods based on variable length coding as mentioned are sensitive to transmission errors in noisy channels. As already stated, this is due to the parameters being represented with binary code words of variable length. Additionally, prior art methods are sensitive to variations in the image and video sources. The prior art methods are usually based on statistical parameters for the image or video source material and these parameters may vary. Hence the main object of the present invention is to obviate the above- mentioned deficiencies and disadvantages of the prior art. More particularly the object of the present invention is to avoid synchronization problems in a receiver due to transmission errors and further to provide an efficient method for coding side information independently of particular properties of the side information such as statistical fluctuations. It is a specific object of the present invention to provide a more effective representation of the side information parameters compared with the methods according to the prior art. The above objects and advantages are achieved according to the invention with a method which is characterized by enumerating the vector hierarchically in two or more levels by partitioning the vector in subvectors and/or vector elements on each level, generating binary code words for each subvector and/or each vector element on a given level, said binary code word for a subvector and/or a vector element on one level being formed by the binary code words for the subvectors and/or the vector elements on a lower level, and generating a binary code word with fixed length for the vector from the binary code words for the subvector or the vector elements of the immediately underlying level of the hierarchy. Where the parameter is classification table, it is according to the invention preferred using unsigned hierarchical enumeration. Where the parameters are motion vectors, it is according to the invention preferred using a combination of signed and unsigned hierarchical enumeration. If the parameter is a classification table, it is according to the invention preferred using three levels for the hierarchical enumeration, and if the parameters are motion vectors, it is according to the invention preferred using two levels for the hierarchical enumeration. The invention shall now be explained in more detail by means of exemplary embodiments and with reference to the accompanying drawing, wherein fig. 1 shows a diagram of a system for video compression, as known in the art and discussed in the introduction of the application, fig. 2 schematically hierarchical partitioning for coding of a classification table, and fig. 3 schematically hierarchical partitioning for coding of motion vectors. The method according to the present invention is based on the fact that the parameters for the side information to be represented only can be present in a finite number of combinations. Each separate combination can be represented by a unique binary codeword. As the number of combinations is large, the binary codeword must be computed by means of a mathematical algorithm, a so-called enumeration algorithm. In order to simplify the mathematical computation the enumeration takes place in several levels, so-called hierarchical enumeration, wherein a limited number of parameters is processed as a unit. First, the coding of the side information shall be briefly discussed. In this connection a general reference to the inventor's doctoral dissertation is appropriate, viz. "Robust Subband Video Compression for Noisy Channels with Multilevel Signaling" by Arild Fuldseth, Dissertation 1997:87, Department of Telecommunications, Norwegian University of Science and Technology, Trondheim, Norway (Report 429708, ISBN 82-471-0123-8). Particularly reference is made to Sections 5.4, pp.120-123 thereof concerning a blockwise classification of subband samples by dividing each subband in blocks of B x B adjacent samples, the blocks being classified in J classes; and Section 5.6, pp. 126-130 thereof concerning a motion compensated prediction used in two basic video coder structures (ibid., pp. 115-118). Both structures use a block- based motion compensation to improve the efficiency of an interframe differential pulse code modulation (DPCM) scheme. The side information consists of the following parameters: • Classification table • Motion vectors • Class standard deviations. Of these standard parameters, only the classification table and the. motion vectors contribute significantly to the overall bit rate. A straightforward way to the code classification table is by using a fixed-length code with [log 2 (J)] bits per block. With B = 4, and J = 8, this corresponds to 0.1875 bits per pixel. Alternatively, a variable-length code(e.g. Huffman code or arithmetic code) optimized for the 0'th order entropy of the classification table can be used to code each integer number individually. This would improve the performance compared to the fixed-length code, but would still be quite inefficient for the higher frequency subbands where the classification table can be expected to contain a large number of zeros. This approach can be further improved by designing a variable-length code based on the conditional entropy between neighbour entries in the classification table. Alternatively, one might use run-length coding similar to the method used for coding of the discrete cosine transform (DCT) coefficients (see ITU- T(CCITT) Draft Recommendation H. 263, "Video Coding for Low Bitrate Communication", May 1996). The motion vectors can be coded by using variable-length coding of each motion vector component individually, or in terms of differences between motion vector components of adjacent motion blocks (ibid.). The present invention proposes a new strategy for fixed-length lossless coding of the classification table and the motion vectors. The method is derived from the enumeration techniques used for pyramid vector quantization (PVQ) to enumerate lattice points on a pyramid surface, (see T.R. Fischer, "A pyramide vector quantizer", IEEE Trans. Inform. Theory, IT-32:568-583, July 1986) and can be used to encode any vector of integers. Thus, it is suitable for encoding of the classification table and the motion vectors. Note that although fractional motion vectors might be used, they can be converted to integer vectors by proper scaling. The proposed method shall be referred to as hierarchical enumeration. In addition to being efficient in terms of the required number of bits, hierarchical enumeration is suitable for noisy channels due to the use of fixed-length codewords. A general description of hierarchical enumeration is given below, followed by a discussion of the coding of the classification table and the motion vectors according to the present invention by using the method of the hierarchical enumeration. In the following, the basic hierarchical enumeration technique for coding of vectors with integer valued components will be described. It is distinguished between unsigned enumeration, where all vector elements are non-negative, and signed enumeration, where the vector elements can be both positive and negative. For coding of the classification table, only unsigned enumeration will be used. For coding of the motion vectors, however, a combination of signed and unsigned enumeration will be used. Let the integer vector to be coded for transmission be given as n = [no, n ..., n Lp .,], n, e 2. (1) Assume that the sum is known at the decoder side. In some cases, Kp is a constant which can be stored permanently at the decoder side. In other cases, Kp can be transmitted to the decoder in advance using [log 2 (K max )] bits, where the maximum value of Kp, K max , is known at the decoder side. For coding of the classification table, K max can be derived from the total bit rate since there is a one-to-one relationship between an entry in the table and the number of bits used to quantize the subband samples in the corresponding block. Let N s (Lp, Kp) be the number of Lp-dimensional integer vectors n satisfying Equation 2 for signed enumeration, and let N U (L P , K P ) be the corresponding number of vectors for unsigned enumeration. Thus, the number of bits needed to specify a given vector b is given by b, = ϊl g 2 (N s (L P , Kp)) } (3) and b u = ϊ\og 2 (N u (L P , Kp)) ] (4) for signed and unsigned enumeration, respectively. For signed enumeration, it is shown (P.F. Swaszek, "A vector quantizer for the Laplace source", IEEE Trans. Inform. Theory IT 37 (5) 1353-1365, September 1991) that the number of vectors satisfying Equation 2 is given by where m = πάn[Lp, Kp]. For unsigned enumeration, the number of vectors satisfying Equation 2 is given as (R.P. Grimaldi, "Discrete and Combinational Mathematics", Addison-Wesley Publ. Co., New York, N.Y. USA, 1989) Furthermore, N S (L P , Kp) can be calculated recursively as (T.R. Fischer, Op. cit.) NJLp, K P ) = N s (Lp -1, Kp) + N S (L P , K P -1) + N S (L P -1, K P -1), Kp, L P ≥ 1 (7) with the initial conditions N S (L P , 0) = 1, L P ≥ 0 and N s ( , K P ) = 0, K P ≥ 1. Similarly, for unsigned integers, it is straightforward to show that the following recursive relationship holds N υ (L P , Kp) = NJLLr -1, Kp) + N U {L P , K P -1), K P , L P ≥ 1 (8) with the same initial conditions as above. Furthermore, an encoding algorithm which assigns a unique integer to each possible vector n is needed. For transmission over a binary channel, the resulting integer is converted to a binary codeword having b s or b υ bits for signed and unsigned enumeration, respectively. Since N S (L , K P ) is identical to N(L P , K ) which is the number of lattice points on the surface of an L P - dimensional pyramid with radius r (Fuldseth, Op.cit., Section 5, p.124), signed enumeration can be performed using the PVQ enumeration algorithm in (T.R. Fischer, Op.cit.). For unsigned enumeration, an algorithm derived from the signed algorithm is given in the Appendix appended at the end of the present application. This method of coding the classification table is very efficient for coding of vectors with many zeros which are characteristic for the classification table in low bit rate video coding. To realize this, consider as a simple example the case where L P = 20 and K P = 5. By substitution into Equation 4 and Equation 6, one obtains JV„(20,5) = 42504 and b u = 16 corresponding to 0.8 bits per vector element. Assuming that each vector element corresponds to a block of 4 x 4 pixels, the vector is coded with only 0.8/16 = 0.05 bits per pixel. Unfortunately, the complexity of the enumeration algorithm grows rapidly as the values of Lp and Kp are increased. In practical implementations, typical values are limited to 10 - 100 and 100 - 1000 for L P and K P respectively. Assuming a frame size of 352 x 288 (Common Interchange Format (CIF)) and 5 = 4, one gets L P = 6336 while K P might be in the order of 10000 - 100000 depending on the bit rate. Thus, coding of the entire classification table as a single vector is prohibitive for complexity reasons and simplifications need to be used. This is achieved by hierarchical enumeration which is performed by dividing the vector n into p sub-vectors «j of length / = L P /p according to «; = [««, ..., «// + /-i] T , i e {0, ..., p - l}, (9) where the sum of each sub-vector is given as In the first stage of the hierarchical procedure, the vector [k 0 , k ..., is coded using [log 2 (JV„(p, K P ))] bits. In the second stage, each of the vectors n„ j : e {0, ..., p - 1} are coded using [log 2 (7v r s (/, &,))] bits for signed enumeration, and [log 2 (N u (/, k t ))] bits for unsigned enumeration. The hierarchical enumeration technique can be extended to include as many stages as desired to achieve a given complexity. Note, however, that the coding efficiency decreases as the number of stages increases. The classification table consists of an integer number n e {0, 1, ..., J- 1 } for each block of size B x B in a subband frame. The number n, associated with a given block indicates to which class this particular block belongs. The classification table is coded by use of hierarchical enumeration in three stages as illustrated in figure 2. In the first stage, each subband corresponds to one vector element, while in the second stage each row of blocks in one subband corresponds to one vector element. Finally in the third stage, one row of blocks is coded as one vector. The hierarchical enumeration for the classification table can be described mathematically as follows. Assume a video frame with N r rows and N c columns, Kf K subbands, and a classification block size of B x B. Let n iJ:k be the class of the fc'th block of the th row of blocks in subband number / ' . Furthermore, define 3, ,. - 1), (11) N J U-I * : , = Σ * 3 ,. ; . € {θ,l,..., N β; - l}, j=0 (12) and where N BK = N c = K f 2 . Now, the classification table can be coded hierarchically as follows: Initial coding: Code K \ with b 0 = [log 2 (-^ι , wβx )] bits. K ϊtmax can be determined from the total bit rate. The natural binary code (NBC) is used to generate the corresponding codeword. First stage: Code the vector [κ 2t0 ,K i ,...,K 2fNa - with b, = [log 2 (N u (N B ,K ] ))] bits. Second stage: For each value of; e {0,1,..., N B ι - 1}, code the vector its. Third stage: For each value of; e {0,1,..., N BI - 1}, and; e {0,1,..., N B j- 1}, code the vector [ n .j.o.». J .ι » -"' -ι] ^ 5 3...; =| 1 o 2 (^(^,^.;)) bits. For stages 1-3, unsigned enumeration as described above is the default coding method. However, in order to reduce the computational and memory requirements, the ΝBC is used for each vector element if the length L P and the sum Kp of the vector to be coded satisfy • £ ? >1000or • L P > 16 and £ / >> 500 or • I >32and^>250or • L P > 64. The values of L at a given stage will depend on the frame size, the number of subbands, and the classification block size. The values of K P will depend on the statistics of the input signal and the given bit rate. The motion vectors are coded considering the vertical and the horizontal vector components independently. Thus, the information to be coded consists of two integer vectors, one containing all the vertical motion vector components, and one containing all the horizontal motion vector components. The motion vectors are coded using hierarchical enumeration in two stages as illustrated in figure 3. In the first stage, each row of motion blocks corresponds to one vector element, while in the second stage, each row of motion blocks is coded as one vector. Note that since the motion vector components can be negative, signed enumeration needs to be used for the second stage of the hierarchical enumeration. The hierarchical enumeration for the motion vectors can be described mathematically as follows. Assume a video frame with N r rows, N c columns, a motion block size of Mx M, and a motion vector search range < -W, W >. Let m t = rv iJt (14) where ^ is the vertical or the horizontal motion vector component of the th motion block in the z'th row of motion blocks, and r is the spatial motion estimation resolution (i.e. r = 1 for integer pixel resolution, r = 2 for half pixel resolution, etc.) Thus, m ;j are integers in the interval <-Wr, Wr>. Next define *2,, = ∑lm, ,i ≡ {θX...,N MI - l}, (15) ;=0 and *, = ! 1=0*,„ (16) where NMJ = N M and N M j = NJM. Now, the motion vectors can be coded hierarchically as follows: Initial coding: Code K λ with b x = bits. The NBC is used to generate the corresponding binary codeword. First stage: Code the vector vήth b 2 = bits. Second stage: For each value of e {0, 1,..., NM I - 1}, code the vector bits. The default coding method is to use unsigned enumeration for the first stage, and signed enumeration for the second stage as described above. However, in order to reduce the computational and memory requirements, the ΝBC is used for each vector element if the length L P and the sum K P of the vector to be coded satisfy • K P > 1000 or • L P > 16 and K P > 500 or • L P > 32 and K P > 250 or • L P > 64. The values of L P at a given stage will depend on the frame size, while the values of K P will depend on the statistics of the input signal. Persons skilled in the art will easily realize that the method according to the invention may be implemented in somewhat different variants without departing from the scope and the spirit of the invention as given by the appended claims. For instance, if the parameter values each are constrained, this may be used to simplify the hierarchical enumeration. Instead of coding each parameter value directly, it may be used a differential coding, e.g. by taking in regard neighbour values in the classification table, neighbour vectors etc. A differential coding may, of course, be combined with a direct coding. Finally, it should be noted that hierarchical enumeration as disclosed herein may also be used in a video compression system or algorithm different from the one shown in fig. 1 and with different parameters, for instance of a fractal kind. Appendix: - Unsigned enumeration In this appendix, the unsigned enumeration algorithm used for hierarchical enumeration is described in detail. The unsigned algorithm is derived directly from the signed enumeration algorithm given in T.R. Fischer, "A Pyramid Vector Quantizer", IEEE Trans. Inform. Theory, IT-32:568-583, July 1986. Let the I -dimensional unsigned integer vector to be coded be given as F = [v 0 , ',,- , - .]', .V, e {0,l,...}. (A.1) and let The encoding and decoding algorithms are given below. Fncnftii The purpose of the encoding algorithm is to determine a unique integer number b s{0,l,..., where N u (Lp,K P ) is the number of Lp-dimensional imsigned vectors satisfying Equation A.2. The value of N(Lp,Kp) is given by Equation 6 of the description. Set = 0, ; = 0, k = K P , l = L P . l lf ^ O then b = b + ∑ y N u (l- \,k -j). 2. k = k -y h / = / - l, / = + l. 3. If (k = 0), then stop, otherwise, go to 1. Decoding The purpose of the decoding algorithm is to determine a unique vector y, associated with the number b s {0, l,...,N u (L P , K P ) - 1 } . Szty = 0, ; = 0, yb = 0, K P , I = L P . 1. If (b =yb), thenjμ, = 0; go to 5. 2. If (b <yb + N u (l - 1, )), then , = 0; go to 4 Otherwise, yb = yb + N u (/ - l,k); set; = 1. 3. If (b <yb + N υ (l - 1, k -j )), then j ; , =;. Otherwise, yb = yb + N u (/ - 1, k -; " ); set; =; " + 1, go to 3. 4.k = k-y,, l = l-l,i = i +1. If (k > 0), go to 1. 5. If (k > 0), then j = k - y t .

Claims: PATENT CLAIMS 1. A method in compression coding of digitalised image or video information, especially for effective bit representation of parameters for side information in the form of classification tables or motion vectors, wherein the parameter to be coded is represented by a vector with integer components, characterized by enumerating the vector hierarchically in two or more levels by partitioning the vector in subvectors and/or vector elements on each level, generating binary code words for each subvector and/or each vector element on a given level, said binary code word for a subvector and/or a vector element on one level being formed by the binary code words for the subvectors and/or the vector elements on a lower level, and generating a binary code word with fixed length for the vector from the binary code words for the subvectors or the vector elements of the immediately underlying level of the hierarchy. 2. A method according to claim 1, wherein the parameter is a classification table, characterized by using unsigned hierarchical enumeration. 3. A method according to claim 2, characterized by using three levels for the hierarchical enumeration. 4. A method according to claim 1, wherein the parameters are motion vectors, characterized by using a combination of signed and unsigned hierarchical enumeration. 5. A method according to claim 4, characterized by using two levels for the hierarchical enumeration.

Inventors: FULDSETH ARILD, FULDSETH, ARILD
Applicants: FAST SEARCH & TRANSFER ASA, FULDSETH ARILD, FULDSETH, ARILD
Application year: 1998
Main classification: H04N5
IPC codes: H04N5, H04N7