Cavlc Decoder Final

download Cavlc Decoder Final

of 12

Transcript of Cavlc Decoder Final

  • 8/13/2019 Cavlc Decoder Final

    1/12

    PATEL GAURAV M (11EC65RO4)

    SANDIKA BISWAS (11EC65R11)

    RAWOCHAN KASOMWOSHI (11EC65R17)

  • 8/13/2019 Cavlc Decoder Final

    2/12

    CAVLC DECODING STEPS

    Coeff_token (TotalCoeffs &Trailing_ones)

    Sign of Trailing ones

    Level Decoding

    Total Zeros Decoding

    Run Before Decoding

  • 8/13/2019 Cavlc Decoder Final

    3/12

    Decoding Coeff_token

    ( TotalCoeffs & Trailing_ones)

    The total number of nonzero coefficients and the

    number of trailing ones without sign are decoded Parameter N ((Nu+Nl)/2) decides VLC table to be

    referred

    Nu & Nl are nonzero coefficients in upper & left

    Macroblocks respectively The code segment is searched into the table to find the

    values of TotalCoeffs and TrailingOnes

  • 8/13/2019 Cavlc Decoder Final

    4/12

    Selection of table

    N Table

    0,1 Num_VLC02,3 Num_VLC1

    4,5,6,7 Num_VLC2

    8 and above Num_FLC

  • 8/13/2019 Cavlc Decoder Final

    5/12

    Example Input :

    '000000011010001001000010111001100

    N=0 Num_VLC0 Code found :

    0000000110

    TotalCoeffs = 5

    Trailing_ones = 1

    Code remaining :

    10001001000010111001100

  • 8/13/2019 Cavlc Decoder Final

    6/12

    Decoding Sign of TrailingOnes Each TrailingOnes decoded in reverse order

    0 +1 1 -1

    Example:

    input: 10001001000010111001100

    code found: 1

    Trailing one : -1

    Code remaining : 0001001000010111001100

  • 8/13/2019 Cavlc Decoder Final

    7/12

    Decoding Level

    Each level decoded using Level_VLC table

    For the first coefficient Level_VLC0 is used

    For further coefficients next tables are used basedon the thresholds as given below

    Current VLC table Threshold to incrementtable

    VLC0 0

    VLC1 3

    VLC2 6

    VLC3 12

    VLC4 24

    VLC5 48

    VLC6 N/A (Highest table)

  • 8/13/2019 Cavlc Decoder Final

    8/12

    Special case:If number of trailing 1s are less than 3 the first decoded

    nonzero level is decremented if negative and incrementedif positive.

    Example : Input :

    '0001001000010111001100 Code found

    0001 (VLC0) -2 -3 (special case)0010 (VLC1) 3

    00010(VLC1) 4111 (VLC2) -2

    Code remaining :

    001100

  • 8/13/2019 Cavlc Decoder Final

    9/12

    Decoding TotalZeros TotalZeros is the sum of all zeros preceding the highest

    non-zero coefficient in the reordered array

    TotalZeros are decoded from TotalZeros_VLC table

    using already encoded TotalCoeffs

    Example:

    input: 001100

    code found: 0011

    TotalZeros : 2

    Code remaining : 00

  • 8/13/2019 Cavlc Decoder Final

    10/12

    Decoding run_before run_before is the number of zeros which leads every

    nonzero coefficient

    For decoding a run_before_VLC table is used Table is determined by zeroleft

    zeroleft is initialised with TotalZeros

    zeroleft is updated by subtracting previous runbefore

    from zeroleft

  • 8/13/2019 Cavlc Decoder Final

    11/12

    Special cases:1. [run_before] = TotalZeros

    2. run_before for the final (lowest frequency) non-zero coefficient

    Example: Input:

    00Run_before:

    2

    Final Output:-2 ,4, 3, -3, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0

    Rearranged coefficients

    0 3 -1 00 -1 1 01 0 0 00 0 0 0

  • 8/13/2019 Cavlc Decoder Final

    12/12

    References[1]. Iain E.G. Richardson, H.264 and MPEG-4 Video

    Compression video coding for next generationmultimedia, John Wiley & Sons, 2003, pp.187-207.

    [2]. Venkata Rao. Kakani, Implementation of VLSIArchitecture for the H.264/AVC Video codec , IITKharagpur, May 2009.

    [3]. Joint Video Team (JVT) of ISO/IEC MPEG and ITU-T

    VCEG, Draft ITU-T Recommendation and Final DraftInternational Standard of Joint Video Specification(ITU-T Rec. H.264 | ISO/IEC 14496-10 AVC),March2003