Home | History | Annotate | Download | only in src
      1  /**
      2  *
      3  * File Name:  armVCM4P2_Huff_Tables_VLC.c
      4  * OpenMAX DL: v1.0.2
      5  * Revision:   9641
      6  * Date:       Thursday, February 7, 2008
      7  *
      8  * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved.
      9  *
     10  *
     11  *
     12  * File:        armVCM4P2_Huff_Tables_VLC.c
     13  * Description: Contains all the Huffman tables used in MPEG4 codec
     14  *
     15  */
     16 
     17 #include "omxtypes.h"
     18 #include "armOMX.h"
     19 
     20 #include "armCOMM_Bitstream.h"
     21 
     22 /*
     23 *  For Intra
     24 *  last = 0
     25 */
     26 const OMX_U8 armVCM4P2_IntraL0RunIdx[11] =
     27 {
     28     0, 27, 37, 42, 46, 49, 52,
     29     55, 58, 60, 62
     30 };
     31 
     32 /* Entry defined for all values
     33 *  for run = 0 to 14
     34 *  Note: the last entry is to terminate while decoding
     35 */
     36 const ARM_VLC32 armVCM4P2_IntraVlcL0[68] =
     37 {
     38         {2,    2},
     39         {3,    6},
     40         {4,    15},
     41         {5,    13},
     42         {5,    12},
     43         {6,    21},
     44         {6,    19},
     45         {6,    18},
     46         {7,    23},
     47         {8,    31},
     48         {8,    30},
     49         {8,    29},
     50         {9,    37},
     51         {9,    36},
     52         {9,    35},
     53         {9,    33},
     54         {10,   33},
     55         {10,   32},
     56         {10,   15},
     57         {10,   14},
     58         {11,    7},
     59         {11,    6},
     60         {11,   32},
     61         {11,   33},
     62         {12,   80},
     63         {12,   81},
     64         {12,   82},
     65         {4,    14},
     66         {6,    20},
     67         {7,    22},
     68         {8,    28},
     69         {9,    32},
     70         {9,    31},
     71         {10,   13},
     72         {11,   34},
     73         {12,   83},
     74         {12,   85},
     75         {5,    11},
     76         {7,    21},
     77         {9,    30},
     78         {10,   12},
     79         {12,   86},
     80         {6,    17},
     81         {8,    27},
     82         {9,    29},
     83         {10,   11},
     84         {6,    16},
     85         {9,    34},
     86         {10,   10},
     87         {6,    13},
     88         {9,    28},
     89         {10,    8},
     90         {7,    18},
     91         {9,    27},
     92         {12,   84},
     93         {7,    20},
     94         {9,    26},
     95         {12,   87},
     96         {8,    25},
     97         {10,    9},
     98         {8,    24},
     99         {11,   35},
    100         {8,    23},
    101         {9,    25},
    102         {9,    24},
    103         {10,    7},
    104         {12,   88},
    105         {0,     0}
    106 };
    107 
    108 /*
    109 *  For Intra
    110 *  last = 1
    111 */
    112 
    113 const OMX_U8 armVCM4P2_IntraL1RunIdx[8] =
    114 {
    115     0,  8, 11, 13, 15, 17, 19, 21
    116 };
    117 
    118 /* Entry defined for all values
    119 *  for run = 0 to 20
    120 *  *  Note: the last entry is to terminate while decoding
    121 */
    122 const ARM_VLC32 armVCM4P2_IntraVlcL1[36] =
    123 {
    124         {4,     7},
    125         {6,    12},
    126         {8,    22},
    127         {9,    23},
    128         {10,    6},
    129         {11,    5},
    130         {11,    4},
    131         {12,   89},
    132         {6,    15},
    133         {9,    22},
    134         {10,    5},
    135         {6,    14},
    136         {10,    4},
    137         {7,    17},
    138         {11,   36},
    139         {7,    16},
    140         {11,   37},
    141         {7,    19},
    142         {12,   90},
    143         {8,    21},
    144         {12,   91},
    145         {8,    20},
    146         {8,    19},
    147         {8,    26},
    148         {9,    21},
    149         {9,    20},
    150         {9,    19},
    151         {9,    18},
    152         {9,    17},
    153         {11,   38},
    154         {11,   39},
    155         {12,   92},
    156         {12,   93},
    157         {12,   94},
    158         {12,   95},
    159         {0,     0}
    160 };
    161 
    162 /* LMAX table for Intra (Last == 0)*/
    163 const OMX_U8 armVCM4P2_IntraL0LMAX[15] =
    164 {
    165    27, 10,  5,  4,  3,  3,  3,
    166     3,  2,  2,  1,  1,  1,  1,  1
    167 };
    168 
    169 /* LMAX table for Intra (Last == 1)*/
    170 const OMX_U8 armVCM4P2_IntraL1LMAX[21] =
    171 {
    172     8,  3,  2,  2,  2,  2,  2,  1,
    173 	1,  1,  1,  1,  1,  1,  1,  1,
    174 	1,  1,  1,  1,  1
    175 };
    176 
    177 /* RMAX table for Intra (Last == 0)
    178    Level - 1 Indexed
    179 */
    180 const OMX_U8 armVCM4P2_IntraL0RMAX[27] =
    181 {
    182    14,  9,  7,  3,  2,  1,	1,
    183     1,  1,  1,  0,  0,  0, 	0,
    184     0,  0,  0,  0,  0,  0,  0,
    185     0,  0,  0,  0,  0,  0
    186 };
    187 
    188 /* RMAX table for Intra (Last == 1)
    189    Level - 1 Indexed
    190 */
    191 const OMX_U8 armVCM4P2_IntraL1RMAX[8] =
    192 {
    193    20,  6,  1,  0,  0,  0,  0,  0
    194 };
    195 
    196 /*
    197 *  For Inter
    198 *  last = 0
    199 */
    200 const OMX_U8 armVCM4P2_InterL0RunIdx[12] =
    201 {
    202      0,  12,  18,  22,  25,  28,
    203     31,  34,  36,  38,  40,  42
    204 };
    205 
    206 /* Entry defined for all values
    207 *  for run = 0 to 26
    208 *  Note: the last entry is to terminate while decoding
    209 */
    210 const ARM_VLC32 armVCM4P2_InterVlcL0[59] =
    211 {
    212         {2,     2},
    213         {4,    15},
    214         {6,    21},
    215         {7,    23},
    216         {8,    31},
    217         {9,    37},
    218         {9,    36},
    219         {10,   33},
    220         {10,   32},
    221         {11,    7},
    222         {11,    6},
    223         {11,   32},
    224         {3,     6},
    225         {6,    20},
    226         {8,    30},
    227         {10,   15},
    228         {11,   33},
    229         {12,   80},
    230         {4,    14},
    231         {8,    29},
    232         {10,   14},
    233         {12,   81},
    234         {5,    13},
    235         {9,    35},
    236         {10,   13},
    237         {5,    12},
    238         {9,    34},
    239         {12,   82},
    240         {5,    11},
    241         {10,   12},
    242         {12,   83},
    243         {6,    19},
    244         {10,   11},
    245         {12,   84},
    246         {6,    18},
    247         {10,   10},
    248         {6,    17},
    249         {10,    9},
    250         {6,    16},
    251         {10,    8},
    252         {7,    22},
    253         {12,   85},
    254         {7,    21},
    255         {7,    20},
    256         {8,    28},
    257         {8,    27},
    258         {9,    33},
    259         {9,    32},
    260         {9,    31},
    261         {9,    30},
    262         {9,    29},
    263         {9,    28},
    264         {9,    27},
    265         {9,    26},
    266         {11,   34},
    267         {11,   35},
    268         {12,   86},
    269         {12,   87},
    270         {0,     0}
    271 };
    272 
    273 
    274 /*
    275 *  For Intra
    276 *  last = 1
    277 */
    278 
    279 const OMX_U8 armVCM4P2_InterL1RunIdx[3] =
    280 {
    281     0, 3, 5
    282 };
    283 
    284 /* Entry defined for all values
    285 *  for run = 0 to 40
    286 *  Note: the last entry is to terminate while decoding
    287 */
    288 const ARM_VLC32 armVCM4P2_InterVlcL1[45] =
    289 {
    290         {4,     7},
    291         {9,    25},
    292         {11,    5},
    293         {6,    15},
    294         {11,    4},
    295         {6,    14},
    296         {6,    13},
    297         {6,    12},
    298         {7,    19},
    299         {7,    18},
    300         {7,    17},
    301         {7,    16},
    302         {8,    26},
    303         {8,    25},
    304         {8,    24},
    305         {8,    23},
    306         {8,    22},
    307         {8,    21},
    308         {8,    20},
    309         {8,    19},
    310         {9,    24},
    311         {9,    23},
    312         {9,    22},
    313         {9,    21},
    314         {9,    20},
    315         {9,    19},
    316         {9,    18},
    317         {9,    17},
    318         {10,    7},
    319         {10,    6},
    320         {10,    5},
    321         {10,    4},
    322         {11,   36},
    323         {11,   37},
    324         {11,   38},
    325         {11,   39},
    326         {12,   88},
    327         {12,   89},
    328         {12,   90},
    329         {12,   91},
    330         {12,   92},
    331         {12,   93},
    332         {12,   94},
    333         {12,   95},
    334         { 0,    0}
    335 };
    336 
    337 /* LMAX table for Intra (Last == 0)*/
    338 const OMX_U8 armVCM4P2_InterL0LMAX[27] =
    339 {
    340    12,  6,  4,  3,  3,  3,  3,  2,
    341     2,  2,  2,  1,  1,  1,  1,  1,
    342     1,  1,  1,  1,  1,  1,  1,  1,
    343     1,  1,  1,
    344 };
    345 
    346 /* LMAX table for Intra (Last == 1)*/
    347 const OMX_U8 armVCM4P2_InterL1LMAX[41] =
    348 {
    349     3,  2,  1,  1,  1,  1,  1,  1,
    350 	1,  1,  1,  1,  1,  1,  1,  1,
    351 	1,  1,  1,  1,  1,  1,  1,  1,
    352 	1,  1,  1,  1,  1,  1,  1,  1,
    353 	1,  1,  1,  1,  1,  1,  1,  1,
    354 	1,
    355 };
    356 
    357 /* RMAX table for Intra (Last == 0)
    358    Level - 1 Indexed
    359 */
    360 const OMX_U8 armVCM4P2_InterL0RMAX[12] =
    361 {
    362    26, 10,  6,  2,  1,  1,
    363     0,  0,  0,  0,  0,  0
    364 };
    365 
    366 /* RMAX table for Intra (Last == 1)
    367    Level - 1 Indexed
    368 */
    369 const OMX_U8 armVCM4P2_InterL1RMAX[3] =
    370 {
    371    40,  1,  0
    372 };
    373 
    374 /*
    375 *  For Intra - Luminance
    376 */
    377 
    378 const ARM_VLC32 armVCM4P2_aIntraDCLumaIndex[14] =
    379 {
    380         {3,     3},
    381         {2,     3},
    382         {2,     2},
    383         {3,     2},
    384         {3,     1},
    385         {4,     1},
    386         {5,     1},
    387         {6,     1},
    388         {7,     1},
    389         {8,     1},
    390         {9,     1},
    391         {10,    1},
    392         {11,    1},
    393         {0,     0}
    394 };
    395 
    396 /*
    397 *  For Intra - Chrominance
    398 */
    399 
    400 const ARM_VLC32 armVCM4P2_aIntraDCChromaIndex[14] =
    401 {
    402         {2,     3},
    403         {2,     2},
    404         {2,     1},
    405         {3,     1},
    406         {4,     1},
    407         {5,     1},
    408         {6,     1},
    409         {7,     1},
    410         {8,     1},
    411         {9,     1},
    412         {10,    1},
    413         {11,    1},
    414         {12,    1},
    415         {0,     0}
    416 };
    417 
    418 /*
    419  *  Motion vector decoding table
    420  */
    421 
    422 const ARM_VLC32 armVCM4P2_aVlcMVD[66] =
    423 {
    424         {13,     5},
    425         {13,     7},
    426         {12,     5},
    427         {12,     7},
    428         {12,     9},
    429         {12,    11},
    430         {12,    13},
    431         {12,    15},
    432         {11,     9},
    433         {11,    11},
    434         {11,    13},
    435         {11,    15},
    436         {11,    17},
    437         {11,    19},
    438         {11,    21},
    439         {11,    23},
    440         {11,    25},
    441         {11,    27},
    442         {11,    29},
    443         {11,    31},
    444         {11,    33},
    445         {11,    35},
    446         {10,    19},
    447         {10,    21},
    448         {10,    23},
    449         {8,      7},
    450         {8,      9},
    451         {8,     11},
    452         {7,      7},
    453         {5,      3},
    454         {4,      3},
    455         {3,      3},
    456         {1,      1},
    457         {3,      2},
    458         {4,      2},
    459         {5,      2},
    460         {7,      6},
    461         {8,     10},
    462         {8,      8},
    463         {8,      6},
    464         {10,    22},
    465         {10,    20},
    466         {10,    18},
    467         {11,    34},
    468         {11,    32},
    469         {11,    30},
    470         {11,    28},
    471         {11,    26},
    472         {11,    24},
    473         {11,    22},
    474         {11,    20},
    475         {11,    18},
    476         {11,    16},
    477         {11,    14},
    478         {11,    12},
    479         {11,    10},
    480         {11,     8},
    481         {12,    14},
    482         {12,    12},
    483         {12,    10},
    484         {12,     8},
    485         {12,     6},
    486         {12,     4},
    487         {13,     6},
    488         {13,     4},
    489         { 0,     0}
    490 };
    491 
    492 /* End of file */
    493 
    494 
    495 
    496