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

Section 3.5.  The MPEG-4 Standard                              83


               2.	AC  prediction:  Depending  on  the  direction  of  prediction,  the  AC  co-
                 e,cients  of  the  /rst  row  of  the  current  block  X  are  predicted  from
                 the  AC  coe,cients  of  the  /rst  row  of  block  C,  or  the  AC  coe,cients
                 of  the  /rst  column  of  the  current  block  X  are  predicted  from  the  AC
                 coe,cients  of  the  /rst  column  of  block  A.  To  compensate  for  di1er-
                 ences  in  the  quantization  parameters  of  adjacent  blocks  used  in  AC
                 prediction,  the  prediction  process  is  modi/ed  so  that  the  predictor  is
                 scaled  by  the  ratio  of  the  current  quantization  parameter,  QP ,  and  the
                                                                    X
                 quantization  parameter  of  the  predictor  block,  QP or  QP .  For  exam-
                                                           A
                                                                  C
                 ple,  when  the  horizontal  direction  is  chosen,  the  prediction  is  given  by
                 PQF (0;j)=QF (0;j) −   QF A (0;j)QP A  .  The  use  of  AC  prediction  can  be
                     X
                               X
                                          QP X
                 enabled=disabled  at the macroblock  level.
               If  any  of  the  neighboring  blocks  are  outside  of  the  VOP  boundary  or  the
            video  packet  boundary,  or  if  they  do  not  belong  to  an  INTRA  coded  mac-
            roblock,  their  DC  values  are  assumed  to  take  a  value  of  2 bits=pel+2   and  their
            AC  values  are  assumed  to  take  a  value  of  0.  DC  and  AC  predictions  are
            performed  similarly for the luma and each of  the two chroma  components.
            3.5.4.5  Scanning
            To prepare the coe,cients for variable-length encoding, a scanning process is
            used to convert the 2-D  matrix  of  coe,cients  into a 1-D vector.
               There  are  three  possible  scanning  patterns:  zigzag,  alternate-vertical,  and
            alternate-horizontal. All non-INTRA blocks use the conventional zigzag scan-
            ning pattern. For INTRA blocks, however, the choice of the scanning pattern
            depends on the prediction  process:
               1.  If AC prediction is not employed, then the conventional zigzag scanning
                 pattern is used  for all blocks  within the macroblock.
               2.  If,  however,  AC  prediction  is  employed,  then  the  direction  of  the  DC
                 prediction is used to select a suitable scanning pattern on a block basis,
                 as  follows:
                  (a)  If  the  DC  prediction  employs  the  horizontal  direction,  then  the
                     alternate-vertical  scanning  pattern  is  used.
                  (b)  If, however, the DC prediction employs the vertical direction, then
                     the  alternate-horizontal  scanning  pattern is used.

            3.5.4.6  Variable-Length Coding
            The  di1erential  (predicted)  DC  coe,cients  in  INTRA  macroblocks  are  en-
            coded  using  a  concatenation  of  a  VLC  codeword  and  a  FLC  codeword.  The
            possible range of encoded di1erential DC coe,cients is divided into subranges
   101   102   103   104   105   106   107   108   109   110   111