Low-Complexity Predictive Coding of Color Video

14 downloads 0 Views 343KB Size Report
Di erential pulse code modulation (DPCM) and its sig- ... tial pulse code modulation of color video using a set of two-level .... Figure 3: Example PDF P(r1; r2). 5.
Low-Complexity Predictive Coding of Color Video Using Optimum Switched Two-Level Quantizers Frank Hartung and Bernd Girod Telecommunications Institute University of Erlangen-Nuremberg Cauerstrasse 7, 91058 Erlangen, Germany fhartung, [email protected]

ABSTRACT

1. ADAPTIVE DIFFERENTIAL PULSE CODE MODULATION (ADPCM) The principle of DPCM (Di erential Pulse Code Modulation) of images is that pixels to be coded are predicted from previously coded neighbouring pixels, and only the quantized prediction error is transmitted for each pixel. Coder and decoder use the same reconstructed pixel amplitudes for prediction and are thus conform to each other. Usually predictor and quantizer are xed. Adaptive DPCM has the additional feature of several predictors and/or several quantizers that can be chosen adaptively. If the choice of the predictor and/or quantizer is based on previously transmitted pixels, no side information has to be signaled. If the choice of the predictor and/or quantizer is based on future pixels to be coded and transmitted, side information has to be transmitted in order to notify the decoder which predictor/quantizer to use.

We employ an ADPCM scheme with adaptive one-bit (i.e., two-level) quantizers for the prediction error. The choice of a quantizer is based on pixels to be coded, thus side information has to be transmitted (Figure 1). Each pixel to be coded is predicted from already transside information

s -

+

e

eq

Adaptive Quantization

Inverse Quantization

sr

+

+ Predictor

Predictor

Coder

Decoder

Figure 1: Principle of ADPCM with adaptive quantizers and signaling of side information. mitted pixels with a linear predictor. The predictor we used in our simulations has three non-zero coecients that can be realized by arithmetic shifts (Figure 2). The predictor has been optimized for a pleasant visual 0

Di erential pulse code modulation (DPCM) and its signal-adaptive derivative, the adaptive di erential pulse code modulation (ADPCM), are well-known schemes for coding of images and video [1, 2]. We present a novel low-complexity scheme for adaptive di erential pulse code modulation of color video using a set of two-level quantizers which are switched adaptively on a block-by-block basis. The quantizers are designed by statistical optimization with a new design criterion that borrows from DPCM, block truncation coding (BTC) and vector quantization (VQ). Coding results show that our scheme has a better performance than other lowcomplexity schemes. At 2 bit/pixel, it performs more than 2.0 dB better in peak signal-to-noise ratio than DPCM and up to 3.5 dB better than BTC. Possible applications include VLSI implementations and real-time compression for video transmission over local area networks.

2. ADPCM WITH SWITCHED TWO-LEVEL QUANTIZERS

1 4

1 2

X

1 4

previous line current line

Figure 2: The used predictor. appearance [3, 4]. The prediction error signal is divided into blocks, e.g. of size 1  4, and the quantizer is switched on a block-by-block basis. For each block, the index of the quantizer has to be transmitted, and for each pixel within a block one bit has to be transmitted which indicates the representative level for the pixel. e

The number of bits spent for each sample depends on the number = 2k of available quantizers and the blocksize  : b

representative levels [5]

1 0 X @ iA 1 8 x x X !

K

N

b

= + (  ) k

M

M

N

N

(1)

The choice of the quantizer can be tackled with di erent approaches: 1. \Quantizer control with backward prediction": the block is coded with every available quantizer, and the quantizer with the smallest overall distortion is chosen. This approach is optimal, since it accounts for quantization in the block, but is computationally most expensive. However, for VLSI implementations, it can be done in parallel for all available quantizers. 2. \Quantizer control with mixed forward-backward prediction": for all pixels in the block, the prediction error based on the quantized pixels in the line above and to the left and the unquantized pixels in the block itself is calculated. For the resulting block of prediction errors, the quantizer with the smallest overall distortion is chosen. This technique does not take into account the prediction error made by quantization in the block itself and is thus suboptimal. However, it is computational less expensive and performs almost as good as backward prediction, as can be seen in section 4.

3. STATISTICAL DESIGN OF SWITCHED TWO-LEVEL QUANTIZERS The main new idea of our scheme is the design of a set of two-level (one-bit) quantizers for the prediction error. The design is based on statistical optimization and does not assume a special signal model. Thus, the design is very exible and applicable to an arbitrary signal. The design procedure consists of the following steps: 1. For every pixel of a representative set of video frames, the prediction error (without quantization) is calculated. 2. The prediction errors are grouped into blocks using the same blocksize  (in our simulations, 1  4) that shall be used in the actual ADPCM coder. M

r1

N

3. For each block, the minimum mean squared error (MMSE) two-level quantizer is given by the two

r2

1

=

i

1

=

n2

(2)

x

n

8 xi >x

(3)

i

x

where  is the mean value of the block, 1 the number of pixels in the block with an amplitude that is equal or greater than  and 2 the number of pixels with an amplitude that is lower than . It is certainly clear that 2 =  ? 1 . If 2 = 0 (all pixels have the same amplitude), 2 is de ned as 2 := 1 . x

n

x

n

x

n

M

N

n

n

r

r

r

4. The pairs ( 1 2 ) are calculated for all blocks and collected in a (discrete) two-dimensional probability density function ( 1 2 ). Figure 3 shows an example. The distribution is peaky around 1 = 2 = 0, as one would expect for a prediction error signal. r ;r

P r ;r

r

r

max

log(P(r1,r2))

M

255

−255 255 r2

−255 r1

Figure 3: Example PDF (

P r 1 ; r2

).

5. For ( 1 2 ), an optimal set of two-level quantizers (representative vectors) is determined using the iterative Linde-Buzo-Gray (LBG) vector quantization algorithm [6] for two dimensions. The number of quantizers (the size of the set) can be chosen according to the desired bitrate (1). In our simulations, we found 16 or 32 to be a reasonable number for the luminance signal, and 4 or 8 for the chrominance signal. Figure 4 shows a typical set of 16 two-level quantizers ( = 16) for the PDF in Figure 3. The codebook generation can be enhanced by fast algorithms [7] or sophisticated codebook initialization rules [8]. P r ;r

K

The design procedure can be understood as an extension of block truncation coding [5], with the di erence

One−bit luminance quantizers for K=16

PSNR, sequence Flowergarden (CIF format) 29

250 200

x coded with our scheme at 2 bit/pel (backward prediction) 28

150 100

27

PSNR [dB]

r2

50 0 −50

(mixed forward−backward prediction) 26

25

−100

+ coded with our scheme at 2 bit/pel

* DPCM coded at 2 bit/pel

−150

24 −200 −250 −250

o AMBTC coded at 2 bit/pel

−200

−150

−100

−50

0 r1

50

100

150

200

250

23 0

1

2

3

4 Frame number

5

6

7

8

Figure 4: Example set of 16 two-level quantizers. Xaxis: lower representative of the quantizer, y-axis: greater representative of the quantizer.

Figure 5: PSNR of luminance signal for CIF sequence \Flowergarden" coded with di erent low-complexity schemes.

that the prediction error is coded instead of the signal itself, and the two representative levels are vector quantized.

in the block is performed), we gain another 0.5 dB. Figures 6 to 8 show a comparison between the di erent schemes in terms of visual impression. The results in terms of PSNR correspond to the subjective quality. DPCM with scalar quantization exhibits granular noise and slope overload e ects. AMBTC shows the typical blockiness and ragged edges. The most annoying coding artifacts that our scheme introduces are slope overload e ects at vertical high contrast edges (this is due to the chosen blocksize 1  4). See for example the lamp in Figure 8.

4. CODING RESULTS We have used the described ADPCM scheme with statistically optimized quantizers (as described in section 3, separately for luminance and chrominance) for encoding of color video in CIF 4 : 2 : 0 format. Chrominance signals were vertically subsampled by a factor of 2. The used predictor was the predictor depicted in Fig. 2, the blocksize for luminance and chrominance was 1  4, respectively, and the number of two-level quantizers was 16 for chrominance and 16 for luminance. The bitrate for chrominance and luminance is 2 bit/pixel. We have also coded the same sequence with DPCM employing 2-bit Lloyd-Max quantizers [9] for luminance and chrominance, and with absolute moment block truncation coding (AMBTC) [5] with blocksize 4  4 and 8 bit PCM encoding of the representative values. Thus, all schemes operate at the same bitrate of 2 bit/pixel. In all cases, the code words were of xed length. Figure 5 shows the coding results in terms of luminance peak signal-to-noise ratio (PSNR) for sequence \Flowergarden". Our scheme performs about 2 dB better than DPCM and up to 3.5 dB better than AMBTC, if mixed forward-backward prediction is used in the quantizer control. If the (computational more expensive) quantizer control with backward prediction is used (i.e., a full search over all available quantizers with consideration of the prediction error made

5. CONCLUSIONS We have presented a new variation of color video coding with ADPCM using switched two-level quantizers. The quantizer design is based on statistical optimization and can be understood as an extension of the quantizer design for block truncation coding. Our scheme is more complex than DPCM and BTC, but still of low complexity. At 2 bit/pixel, our new scheme performs more than 2.0 dB better in PSNR than DPCM and even up to 3.5 dB better than BTC. The visual impression corresponds to the superiority in PSNR. Applications for our scheme arise where video coding with low complexity is required, e.g. for VLSI applications, where the core part of the encoding can be done in parallel, or real-time applications like video transmission over local area networks. Storage capacity for only one line of video is needed.

6. REFERENCES [1] N.S. Jayant and P. Noll. Digital Coding of Waveforms. Prentice Hall, Englewood Cli s, New Jersey, 1984. [2] M. Rabbani and Paul W. Jones. Digital Image Compression Techniques. SPIE Optical Engineering Press, 1991. [3] B. Girod, H. Almer, L. Bengtsson, B. Christensson, and P. Weiss. A subjective evaluation of noiseshaping quantization for adaptive intra-/interframe DPCM coding of color television signals. IEEE Transactions on Communications, 36(3):332{346, March 1988. [4] Bernd Girod. Psychovisual aspects of image communication. Signal Processing, 28:239{251, 1992. [5] M. Lema and O.R. Mitchell. Absolute moment block truncation coding and its application to image coding. IEEE Trans. Communications, 32(10):1148, October 1984. [6] Y. Linde, A. Buzo, and R.M. Gray. An algorithm for vector quantizer design. IEEE Trans. on Communications, COM-28(1):84{95, January 1980. [7] K.-S. Wu and J.-C. Lin. Fast LBG codebook generator for BTC image compression. Electronics Letters, 31(17):1427{1428, August 1995. [8] S.-M. Cheng, K.-T. Lo, and K.-C. Li. Ecient LBG initialisation method for image vector quantisation. Electronics Letters, 31(19):1654{1656, September 1995. [9] S.P. Lloyd. Least squares quantization in PCM. Institute of Mathematical Statistics Meeting, Atlantic City, N.J., September 1957.

Original

ADPCM with switched two-level quantizers

DPCM with scalar Lloyd-Max quantizer

AMBTC Figure 6: Example frame of CIF sequence \Flowergarden", from top to bottom: original - coded with our scheme - coded with DPCM - coded with AMBTC. All schemes operate at 2 bit/pixel.

Original

Original

ADPCM with switched two-level quantizers

ADPCM with switched two-level quantizers

DPCM with scalar Lloyd-Max quantizer

DPCM with scalar Lloyd-Max quantizer

AMBTC

AMBTC

Figure 7: Detail of CIF sequence \Flowergarden", from top to bottom: original - coded with our scheme - coded with DPCM - coded with AMBTC. All schemes operate at 2 bit/pixel.

Figure 8: Detail of CIF sequence \Flowergarden", from top to bottom: original - coded with our scheme - coded with DPCM - coded with AMBTC. All schemes operate at 2 bit/pixel.