NON-LINEAR QUANTIZER FOR VIDEO CODING

Abstract: A quantizer and dequantizer for use in a video coding system that applies non linear, piece-wise linear scaling functions to video information signals based on a value of a variable quantization parameter. The quantizer and dequantizer apply different non linear, piece-wise linear scaling functions to a DC luminance signal, a DC chrominance signal and an AC chrominance signal. A code for reporting updates of the value of the quantization parameter is interpreted to require larger changes when the quantization parameter initially is large and smaller changes when the quantization parameter initially is small.

Description: NON-LINEAR QUANTIZER FOR VIDEO CODING RELATED APPLICATION This application claims the benefit of priority afforded by provisional application no. 60/038,016 filed February 14, 1997, the disclosure of which is incorporated herein. BACKGROUND OF THE INVENTION The present invention related to a quantizer for use in image coding. It is known to scale discrete cosine transformation coefficients in video coding applications to conserve bandwidth. Known systems either scale by a small constant, such as divide by 8, or scale by a linear scaling factor that is twice a quantization parameter (2 x Q p ) . Scaling by the small constant does not achieve significant bandwidth savings. Scaling by the 2*Q p linear scaling function achieves significant bit savings, but results in poor image quality at lower and mid-level Q p values particularly in the chrominance video signals. Accordingly, there is a need in the art. for a quantizer characterized by a scaling function that achieves good signal quality, and- achieves bit rate savings for all values of Q p particularly for chrominance. An encoder and decoder must use the same quantization parameter to encode and decode video information intelligibly. Known systems report changes to the quantization parameter with codes that cause changes in Q p with a uniform step size, regardless of the value of Q p . Experience teaches that, at low values of Q p , changes in Q p are relatively small. However, for large values of Q p , changes in Q p values are relatively large. Systems that allocate additional bits to report the larger Q p changes waste bandwidth at the lower Q p values where the large changes do not occur. However, systems that limit the number of bits available to coding Q p changes may become saturated if larger changes must be coded. Accordingly, there is a need in the art for a quantizer that reports both large and small changes in Q p with a minimum number of bits. SUMMARY OF THE INVENTION The disadvantages of the art are alleviated to a great extent by a quantizer that applies a non-linear scaling function based on the quantization parameter. A different scaling function applies for luminance data than chrominance data. Both scaling functions at low Q p values approximate constant scaling functions. At large Q p values, the luminance scaling function approximates a 2*Q P scaling function and the chrominance scaling function approximates a 1*Q P scaling function. The quantizer may include a non-linear scaling function for AC coefficients. The present invention may include a way to update values of Q p . Changes in Q p are reported in a fixed length code, but each code means different things based on the previous values of Q p ' . If the previous Q p value is large, the code represents a larger change than if the previous value of Q p were small. BRIEF DESCRIPTION OF THE FIGURES Fig. 1(a) is a block diagram of a first embodiment of an encoder 100 of the present invention; Fig. 1(b) is a block diagram of a first embodiment of a decoder 200 of the present invention. Fig. 2 is a block diagram of a portion of ^ the quantizer of Fig. 1. Fig. 3 is a block diagram of a portion of the scaling circuit of Fig. 1. DETAILED DESCRIPTION Fig. 1 shows an encoder 100 constructed in accordance with a first embodiment of the present invention. An analog image signal is presented to the encoder 100. The image signal is sampled and converted to a digital signal by an analog to digital ("A/D") converter 110 using techniques known in the art. The A/D converter 110 generates a digital image signal for a plurality of pixels of the image. Alternatively, the image signal may be presented to the encoder 100 as a digital image signal; in this case, the A/D converter 110 is omitted. The digital image signal is input to a processing circuit 120. The processing circuit 120 may perform a host of functions. Typically, the processing circuit 120 filters the image data and breaks the image data into a luminance signal component and two chrominance signal components. Additionally, the processing circuit 120 groups image data into blocks of data. Where the digital input signal represents information for a plurality of pixels in a scanning direction, the digital output of the processing circuit 120 represents a block of pixels, for example an 8 pixel by 8 pixel array of image data. The processing circuit 120 outputs image data on a macro block basis. A macro block typically consists of up to four blocks of luminance data and up to two blocks of chrominance data. The processing circuit 120 may also perform additional functions, such as filtering, to suit individual design criteria. The output of the processing circuit 120 is input to a transform circuit 130. The transform circuit 130 performs a transformation of the image data, such as discrete cosine transform ("DCT") coding, from the pixel domain to a domain of coefficients. A block of 64 pixels is transformed to a block of 64 coefficients. Coefficients output by DCT coding include a single DC coefficient and 63 AC coefficients, few of which are nonzero. The transform circuit 130 outputs blocks of coefficients organized into macro blocks. A quantizer 140 scales the DC and AC coefficients generated by the prediction circuit 150 according to a non-linear scaling function governed by a variable quantization parameter (Q p ) . The quantization parameter is a value determined by the bit rate of the channel, the resolution of the image being coded, the type of image coding (intra or inter) and other factors that affect a number of bits that may be allocated to coding of the macro block. Q p is updated on a macro block by macro block basis; changes in Q p are reported in an output bitstream. In MPEG coding, Q p takes on values between 1 and 31. The quantizer 140 reduces bandwidth of the image signal by reducing a number of quantization levels available to encoding the signals. Many small coefficients input to the quantizer 140 are divided down and truncated to zero. The scaled signals are output from the quantizer 140. The output of the quantizer 140 is input to a prediction circuit 150. The prediction circuit 150 performs gradient prediction analysis to predict the DC coefficient of the block. The prediction circuit 150 may pass the AC coefficients generated by the transform circuit 130 or, alternatively, may predict AC coefficients of the block. In a preferred mode of operation, the prediction circuit 150 selects between modes of predicting or passing AC coefficients; in this case, the prediction circuit 150 generates an AC prediction flag to identify a mode of operation. The prediction circuit 150 outputs DC coefficient signals and AC coefficient signals (representing either AC coefficients or AC residuals) on a macro block basis and, on a macro block basis optionally, an AC prediction flag. A variable length coder 160 encodes the output of the quantizer 140. The variable length coder 160 typically is a Huffman encoder that performs run length coding on the scaled signals. A bitstream output from the variable length coder 160 may be transmitted, stored, or put to other uses as are known in the art. A decoder 200 performs operations that undo the encoding operation described above. A variable length decoder 260 analyzes the bitstream using a complementary process to recover a scaled signal. If a Huffman encoder were used by the encoder 160, a Huffman decoder 260 is used. A reconstruction circuit 250 performs the identical gradient analysis performed in the prediction circuit 150. The DC residual signal is identified and added to a predicted coefficient to obtain a DC coefficient. Optionally, the reconstruction circuit 250 may identify the AC prediction flag and, based on the status of that flag, interprets the AC information as either AC coefficient information or AC residual information. In the event that AC residual information is present, the reconstruction circuit 250 adds the residual signals to corresponding predicted signals to obtain AC coefficients. The reconstruction circuit 250 outputs coefficient signals . A dequantization circuit 240 multiplies the recovered signals by the same sealer values used at the quantizer 140. Of course, those coefficients divided down to zero are not recovered. An inverse transformation circuit 230 performs the inverse transformation applied by the transform circuit 130 of encoder 100. If DCT transformation were performed, an inverse DCT transformation is applied. So, too, with sub-band coding. The inverse transformation circuit 230 transforms the coefficient information back to the pixel domain. A processing circuit 220 combines luminance and chrominance signals and may perform such optional ' features as are desired in particular application. The processing circuit 220 outputs digital signals of pixels ready to be displayed. At this point the signals are fit for display on a digital monitor. If necessary to fit a particular application, the signals may be converted by a digital to analog converter 210 for display on an analog display. The present invention achieves bit rate savings by applying a non-linear sealer function at the quantizer 140 to obtain bit rate savings at high Q p levels but ensure high video quality at low Q p levels. The quantizer 140 applies different sealer functions depending upon the type of data being quantized (luminance or chrominance), the type of coefficient being quantized (DC or AC) and the type of coding (inter or intra) being performed. NON-LINEAR QUANTIZATION OF DC COEFFICIENTS FOR LUMINANCE AND CHROMINANCE For DC coefficient information, the sealer functions vary with Q p . Different piece-wise linear sealer functions are applied to DC luminance and DC chrominance signals. To minimize objectionable artifacts within the chrominance signal, the DC chrominance sealer is smaller than the DC luminance sealer for all Q p values. The DC luminance sealer function for low Q p values is a constant. For large Q p levels, the DC luminance sealer function approximates a 2*Q p function. The inventors obtained through experimentation the DC sealer function shown in Table 1 below, used in an embodiment of the invention. The DC chrominance sealer function is also at a constant at low values Q p . At high Q p values, the DC chrominance sealer function approximates a linear sealer function in Q p . The inventors obtained through experimentation the DC sealer function for chrominance signals shown in Table 1 below, used in a preferred embodiment . Table 1 Rather than compute the DC sealer for each value of Q p , further efficiencies may be obtained by storing the DC sealer functions for luminance and chrominance for all values of Q p in a memory table at the quantizer 140. In this event, the quantizer 140 includes a small memory of DC scales for luminance and chrominance that may be indexed by Q p as shown in Table 2 below. Table 2 In operation, the transform circuit 130 outputs macro blocks of data to the quantizer 140. Each macro block contains as many as four blocks of luminance data and two blocks of chrominance data. A single Q p value is used for the macro block. Q p is updated on a macro block by macro block basis. Based on the value of Q p , the quantizer 140 recalls a DC scaling factor for luminance and a DC scaling factor for chrominance determined by the scaling functions at the value of Q p . For each luminance block, the quantizer 140 generates a DC lum level signal according to: DC lum level = DC lum coefficient/DC Sealer for Luminance. For each chrominance block, the quantizer 140 generates a DC chrom level signal according to: Chrom DC level = Chrom DC coefficient/DC Sealer for Chrominance . The quantizer 140 outputs each DC lum level signal and each DC chrom level signal. The non-linear DC scaling functions of the quantizer 140 may be implemented in hardware as shown in Fig. 2. The Q p signal is input to a memory 300 that stores the sealer factors defined by the DC luminance and DC chrominance sealer functions. The sealer table 300 may be substituted by a processor (not shown) that computes the sealer factors according to the Q p value. DC luminance and DC chrominance signals- from the transform circuit 130 are isolated by a demultiplexer 310 and routed to respective luminance and chrominance division circuits 320 and 330. The DC lum level and DC chrom level signals are generated by these division circuits. At the decoder 200, the dequantization circuit 240 performs an inverse quantization operation with the same piece-wise linear scaling functions. Based on the Q p value of the immediately preceding macro block and any Q p update reported in the incoming bitstream, the dequantization circuit 240 recalls appropriate scaling factors for DC luminance and DC chrominance signals. For each luminance block, the dequantization circuit 240 generates a luminance DC coefficient according to: Lum DC coefficient = DC Lum Level * DC Sealer for Luminance. For each chrominance block, the scaling circuit 240 generates a DC coefficient according to: Chrom DC coefficient = Chrom DC Level * DC Sealer for Chrominance. The dequantization circuit 240 outputs the reconstructed luminance and chrominance coefficients. The non-linear DC scaling functions of the dequantization circuit 240 may be implemented in hardware as shown in Fig. 3. The Q p signal is input to a memory 400 that stores the sealer factors defined by the DC luminance and DC chrominance sealer functions. The sealer table 400 may be substituted by a processor (not shown) that computes the sealer factors according to the Q p signal. DC lum level and DC chrom level signals from the variable length encoder 260 are isolated by a demultiplexer 410 and routed to respective luminance and chrominance multiplication circuits 420 and 430. DC luminance coefficients and DC chrominance coefficients are generated by these multiplication circuits. The non-linear DC scaling factors described above are appropriate to both intra and inter coding operations. However, experience teaches that DC coefficients obtained from inter coding often are near zero. When quantized even by a constant scaling factor, the DC coefficients obtained from inter coding often are truncated to zero. Accordingly, to reduce complexity in a preferred embodiment, the non-linear scaling function may be disabled during inter coding operations. The DC coefficients obtained from inter coding may be quantized in a manner similar to the quantization of AC coefficients, discussed below. The non-linear DC scaling functions maintain high coding quality at low Q p values and achieve significant bit rate savings at high Q p values. The quantizer 140 and dequantization circuit 240 of the present invention may find use in applications where image quality is a more significant consideration than bit rate savings. Accordingly, in a preferred embodiment, the quantizer 140 and sealer circuit 240 may have two modes of operation: A first mode applying non-linear scaling functions based on values of Q p as described above, and a second mode applying a constant scaling factor (such as divide by 8) or even one of a plurality of constant scaling ' factors (such as divide by 8, 4, 2 or 1) . In this embodiment, the quantizer 140 generates a sealer flag signal identifying which mode of operation is being used. The dequantization circuit 240, upon receipt of the sealer flag signal, invokes an appropriate mode of operation to generate coefficients. The sealer flag signal may be a one bit signal when discriminating among the two modes, but may be larger when discriminating among the two modes and additionally identifying which of constant scaling factors is invoked. NON-LINEAR QUANTIZATION OF CHROMINANCE COEFFICIENTS FOR INTER CODED BLOCKS In inter coding, both DC and AC coefficients of chrominance blocks may be close to zero. Coding of such coefficients with non-linear scaling functions may improve coding quality of the chrominance signal. Additionally, the non-linear scaling functions of this section may be applied to AC coefficients of chrominance blocks in intra coding to achieve coding efficiencies. The non-linear scaling function for AC chrominance coefficients is piece-wise linear and based on Q p values. At low values for Q p , the non-linear scaling function for AC is a constant value, almost half of the level of the scaling function for DC chrominance signals. At high levels for Q p , the AC scaling function approximates a Q p /2 line. At intermediate levels, the AC scaling function approximates a Q p /4 line. In one preferred embodiment, the AC scaling function for chrominance was derived experimentally as shown in Table 3 below: Table 3 The AC scaling factors for chrominance also may be stored in the quantizer 140 in a memory table indexed by Q p . During coding, the quantizer 140 recalls or computes a scaling factor for AC coefficients based on the value of Q p . For each chrominance AC coefficient, the quantizer 140 generates a corresponding chrominance AC level signal according to: Chrom AC level = Chrom AC coefficient / Quantizer for Chrominance . The quantizer 140 outputs the Chrom AC level signals for the AC coefficients. The non-linear scaling functions for AC chrominance coefficients may be implemented in hardware, also shown in Fig. 2. The sealer table 300 stores the AC chrominance sealer values indexed by Q p . If sealer table 300 is substituted by a processor, the processor computes the AC chrominance sealer values according to the Q p value. AC chrominance signals from the transform circuit 140 are isolated by a demultiplexer 310 and routed to an AC division circuit 340. The AC chrom level signals are generated by the division circuit 340. During decoding, the dequantization circuit 240 recalls the AC scaling factor for chrominance based on the value of Q p used for the immediately previous macro block and any Q p update provided in the incoming bitstream. For each AC chrominance level signal, the scaling circuit 240 reconstructs a corresponding AC chrominance coefficient according to: Chrom AC coefficient = Chrom AC Level * Quantizer for Chrominance. The scaling circuit 240 outputs the reconstructed chrominance AC coefficients. The scaling circuit's non-linear AC scaling functions may be implemented in hardware, also shown in Fig. 3. The sealer table 400 stores the AC chrominance sealer values indexed by Q p . If sealer table 400 is substituted by a processor, the processor computes the AC sealer value according to the Q p signal. AC chrom level signals from the variable length encoder 160 are isolated by a demultiplexer 410 and routed to an AC multiplication circuit 440. The AC coefficients are generated by the multiplication circuit 440. QUHTISEfr upATE The encoder 100 and decoder 200 each must use the same Q p value for video signals to be encoded and decoded intelligibly. The encoder 100 may change a value of Q p as frequently as every macro block. When the encoder 100 changes Q p/ it reports the change in a Q p update signal in the output bitstream. The present invention provides for an improved method of reporting updated Q p values to the decoder 200. For each Q p update, the magnitude of the Q p adjustment depends not only on the update signal but also the previous value of Q p . A given Q p update signal at a large value of Q p results in a relatively large change in Q p . The same Q p update signal at a small value of Q p results in a smaller change in Q p . The following Table 4 demonstrates Q p adjustments made based on the Q p update signal and the value of Q p in one preferred embodiment of the invention. Table 4 Providing variable step sizes for Q p updates based on the value of Q p provides resistance to saturation for large changes of Q p at the encoder 100. The variable step sizes provide increased flexibility without requiring additional overhead because the previous value of Q p is known at the decoder 200 and need not be reported in the bitstream.

Claims: WE CLAIM : 1. A quantizer for scaling a video information signal comprising: a scaling factor generator employing a non-linear scaling function, and a divider for dividing the video information signal by a scaling factor provided by the scaling factor generator. 2. The quantizer of claim 1, wherein the scaling factor generator includes a memory in which scale factors are stored. 3. The quantizer of claim 1, wherein the scaling factor generator is a processor that computes the scaling factors. 4. The quantizer of claim 1, wherein: the video information contains luminance information, the scaling factor generator generates a luminance scaling factor, and the divider divides the luminance information by the luminance scaling factor and generates a luminance level signal therefrom. 5. The quantizer of claim 4, wherein the luminance scaling factor is generated from a luminance scaling function based on a quantization parameter, and wherein the luminance scaling function approximates a constant level for low values of the quantization parameter and approximates a line representing twice the quantization parameter for large values of the quantization parameter. 6. The quantizer of claim 4, wherein the luminance scaling factor is generated from a piece-wise luminance scaling function based on a quantization parameter. 7. The quantizer of claim 1, wherein: the video information contains DC chrominance information, the scaling factor generator generates a chrominance scaling factor, and the divider divides the DC chrominance information by the chrominance scaling factor and generates a chrominance level signal therefrom. 8. The quantizer of claim 7, wherein the chrominance scaling factor is generated from a non-linear chrominance scaling function based on a quantization parameter, and wherein the chrominance scaling function approximates a constant level for low values of the quantization parameter and approximates a line representing the quantization parameter for large values of the quantization parameter. 9. The quantizer of claim 7, wherein the chrominance scaling factor is generated from a piece-wise chrominance scaling function based on a quantization parameter. 10. The quantizer of claim 1, wherein: the video information contains luminance and chrominance information, the scaling factor generator generates a luminance scaling factor and a chrominance scaling factor, and the divider comprises: a first divider that divides the luminance information by the luminance scaling factor and generates a luminance level signal therefrom, and a second divider that divides the chrominance information by the chrominance scaling factor and generates a chrominance level signal therefrom. 11. The quantizer of claim 10, wherein * the luminance scaling factor is generated from a piece-wise luminance scaling function based on a quantization parameter, the chrominance scaling factor is generated from a piecewise chrominance scaling function based on the quantization parameter, and for all values of the quantization parameter, the chrominance scaling function is less than the luminance scaling function. 12. The quantizer of claim 1, wherein: the video information contains AC chrominance information, the scaling factor generator generates an AC chrominance scaling factor, and the divider divides the AC chrominance information by the AC chrominance scaling factor and generates an AC chrominance level signal therefrom. 13. The quantizer of claim 12, wherein the AC chrominance scaling factor is generated from an AC chrominance scaling function based on a quantization parameter, and wherein the AC chrominance scaling function approximates a constant level for low values of the quantization parameter and approximates a line representing one half the quantization parameter for large values of the quantization parameter. 14. The quantizer of claim 12, wherein the AC chrominance scaling factor is generated from a piece-wise AC chrominance scaling function based on a quantization parameter. 15. A dequantizer for scaling a signal containing a quantized video information signal comprising: a scaling factor generator generating a scaling factor generator based on a non-linear scaling function, and a multiplier for multiplying the quantized video information signal by the scaling factor. 16. The dequantizer of claim 15, wherein the scaling factor generator is a memory stored with scale factors. 17. The dequantizer of claim 15, wherein the scaling factor generator is a processor that computes the scaling factors. 18. The dequantizer of claim 15, wherein: the quantized video information contains a luminance level signal, the scaling factor generator generates a luminance scaling factor, and the multiplier multiplies the luminance level signal by the luminance scaling factor and generates a luminance information signal therefrom. 19. The dequantizer of claim 18, wherein the luminance scaling factor is generated from a luminance scaling function based on a quantization parameter, and wherein the luminance scaling function approximates a constant level for low values of the quantization parameter and approximates a line representing twice the quantization parameter for large values of the quantization parameter. 20. The dequantizer of claim 18, wherein the luminance scaling factor is generated from a piece-wise luminance scaling function based on a quantization parameter. 21. The dequantizer of claim 15, wherein: the quantizer video information contains DC chrominance level signal, the scaling factor generator generates a chrominance scaling factor, and the multiplier multiplies the DC chrominance level signal by the chrominance scaling factor and generates a DC chrominance information signal therefrom. 22. The dequantizer of claim 21, wherein the chrominance scaling factor is generated from a non-linear chrominance scaling function based on a quantization parameter, and wherein the chrominance scaling function approximates a constant level for low values of the quantization parameter and approximates a line representing the quantization parameter for large values of the quantization parameter. 23. The dequantizer of claim 21, wherein the chrominance scaling factor is generated from a piece-wise chrominance scaling function based on a quantization parameter. 24. The dequantizer of claim 15, wherein: the video information contains a luminance level signal and chrominance level signal; the scaling factor generator generates a luminance scaling factor and a chrominance scaling factor; and the multiplier comprises: a first multiplier that multiplies the luminance level signal with by the luminance scaling factor and generates a luminance information signal therefrom, and a second multiplier that multiplies the chrominance level signal by the chrominance scaling factor and generates a chrominance information signal therefrom. 25. The dequantizer of claim 24, wherein the luminance scaling factor is generated from a piece-wise luminance scaling function based on a quantization parameter, the chrominance scaling factor is generated from a piecewise chrominance scaling function based on the quantization parameter, and for all values of the quantization parameter, the chrominance scaling function is less than the luminance scaling function. 26. The dequantizer of claim 15, wherein: the quantized video information contains an AC chrominance level signal, the scaling factor generator generates an AC chrominance scaling factor, and the multiplier multiples the AC chrominance level signal by the AC chrominance scaling factor and generates an AC chrominance information signal therefrom. 27. The dequantizer of claim 26, wherein the AC chrominance scaling factor is generated from an AC chrominance scaling function based on a quantization parameter, and the AC chrominance scaling function approximates a constant level for low values of the quantization parameter and further approximates a line representing one half the quantization parameter for large values of the quantization parameter. 28. The dequantizer of claim 26, wherein the AC chrominance scaling factor is generated from a piece-wise AC chrominance scaling function based on a quantization parameter. 29. A method of quantizing a video information signal, comprising the steps of: generating a scaling factor based on a non-linear scaling function, dividing the video information signal by the non- linear scaling function, and outputting the divided video information signal. 30. A method of dequantizing a quantized video information signal, said video information signal characterized by a plurality of macro blocks, each macro block quantized according to a plurality of quantization parameter, the method comprising the steps of: receiving the quantized video information signal identifying the macro blocks, identifying a quantization parameter update from the quantized video information signal, generating a quantization parameter change based on the quantization parameter and the quantization parameter update, generating a scaling factor for the macro block based on the quantization parameter and the quantization parameter change, and multiplying quantized video information of the macro block by the scaling factor to obtain dequantized video information. 31. An encoder for encoding video signals, comprising: a processing circuit that generates blocks of video data from the video information signal, a transform circuit that generates video coefficients representative of the blocks of video data, a quantizer circuit that quantizes the video coefficients according to a non-linear sealer function, and a variable length coder that generates a variable length code based on the quantized video coefficients. 32. The encoder of claim 31, wherein the non-linear sealer function is piece-wise linear. 33. A decoder for decoding encoded video signals, comprising: a variable length decoder that generates quantized video coefficients from variable length coded contained within the encoded video signals, a dequantizer circuit that dequantizes the video coefficients according to a non-linear scalar function, an inverse transform circuit that transforms the video coefficients into blocks of video data, and a processing circuit that generates a video signal from the blocks of video data. 34. The decoder of claim 33, wherein the non-linear sealer function is piece-wise linear.

Inventors: HASKELL BARIN GEOFFRY, PURI ATUL, SCHMIDT ROBERT LEWIS, HASKELL, BARIN, GEOFFRY, PURI, ATUL, SCHMIDT, ROBERT, LEWIS
Applicants: AT & T CORP, AT & T CORPORATION
Application year: 1998
Main classification: H04N7
IPC codes: G06T9, H04N7