Page 55 - Video Coding for Mobile Communications Efficiency, Complexity, and Resilience
P. 55

32                                   Chapter  2.  Video  Coding:  Fundamentals



                   8   5   5   3   3   2   2   2   16  11  10  16  24  40  51  61
                   5   5   5  3   3   2   2   0   12  12  14  19  26  58  60  55
                   5   5   3   3   3   2   0   0   14  13  16  24  40  57  69  56
                   3   3   3   3   2   2   0   0   14  17  22  29  51  87  80  62
                   3   3   3   2   2   0   0   0   18  22  37  56  68  109  103 77
                   2   2  2  2  0   0   0   0   24  35  55  64  81  104  113 92
                   2   2  0   0   0   0   0   0   49  64  78  87  103  121 120 101
                   2   0   0   0   0   0   0   0   72  92  95  98  112  100 103 99
                  (a) 	Zonal mask with bit   (b)  Quantization matrix   (c)  Zigzag scanning
                       allocation     for threshold coding
                            Figure 2.10:  Transform  coeGcient bit allocation


            use  of  smaller  block  sizes  reduces  computational  complexity. 17  However,  as
            will be discussed later, transform coding su6ers from blocking artefacts at very
            low bit rates. Such artefacts are more disturbing with smaller block sizes [15].
            As  a  compromise  between  computational  complexity  and  blocking  artefacts,
            most transform coding systems employ a block size of 8 × 8or16  × 16. Note
            that both sizes are  powers of  2, which simpli es computations.
               Another  important  factor  in  transform  coding  is  bit  allocation.  This  refers
            to  the  process  of  determining  which  coeGcients  should  be  retained  for  cod-
            ing and how coarsely each retained coeGcient should be quantized. There are
            two main approaches: zonal coding and threshold coding. In zonal coding the
            retained coeGcients are selected on the basis of maximum variance. Thus, the
            locations  of  the  retained  coeGcients  with  the  largest  variances  are  indicated
            by a zonal mask that is the same for all blocks. Once the retained coeGcients
            are  decided,  a  number  of  methods  can  be  used  to  decide  the  number  of  bits
            allocated  to  each.  One  method  is  to  choose  the  number  of  bits  to  be  propor-
            tional  to  the  variance  of  the  coeGcient.  Figure  2.10(a)  shows  a  zonal  mask
            with the allocated bits. Once the number of bits allocated for each coeGcient
            is determined,  a di6erent  quantizer  can be designed  for each coeGcient.
               One  disadvantage  of  zonal  coding  is  that  the  locations  of  the  retained  co-
            eGcients  and  the  bits  allocated  to  them  are   xed  for  all  blocks.  In  threshold
            coding,  however,  the  locations  and  the  bit  allocation  can  be  adapted  to  the
            characteristics of the block. For this reason, this method is employed by most
            video  coding  standards.  In  threshold  coding,  the  retained  coeGcients  are  se-
            lected on the basis of maximum magnitude. Thus, only those coeGcients whose



             17 For example, if a 256 × 256 frame was divided into 256 blocks, each of 16 × 16 pels, then a
                                                               4
                                                       4
            direct implementation of the 2-D DCT will require: blocks × N  =256  × 16 =16; 777; 216 mul-
            tiplications.  If,  however,  the  same  frame  was  divided  into  4096  blocks,  each  of  4 × 4 pels,  then
                  4
            4096 × 4 =1; 048; 576 multiplications will be required.
   50   51   52   53   54   55   56   57   58   59   60