PageRenderTime 150ms CodeModel.GetById 22ms app.highlight 115ms RepoModel.GetById 1ms app.codeStats 1ms

/libavcodec/vp3data.h

http://github.com/FFmpeg/FFmpeg
C Header | 3180 lines | 3095 code | 53 blank | 32 comment | 0 complexity | 0485457cadf2a819b8681a64b3372c6a MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1/*
   2 * Copyright (C) 2003 The FFmpeg project
   3 *
   4 * This file is part of FFmpeg.
   5 *
   6 * FFmpeg is free software; you can redistribute it and/or
   7 * modify it under the terms of the GNU Lesser General Public
   8 * License as published by the Free Software Foundation; either
   9 * version 2.1 of the License, or (at your option) any later version.
  10 *
  11 * FFmpeg is distributed in the hope that it will be useful,
  12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14 * Lesser General Public License for more details.
  15 *
  16 * You should have received a copy of the GNU Lesser General Public
  17 * License along with FFmpeg; if not, write to the Free Software
  18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19 */
  20
  21#ifndef AVCODEC_VP3DATA_H
  22#define AVCODEC_VP3DATA_H
  23
  24#include <stdint.h>
  25#include <stdlib.h>
  26
  27/* these coefficients dequantize intraframe Y plane coefficients
  28 * (note: same as JPEG) */
  29static const uint8_t vp31_intra_y_dequant[64] = {
  30    16, 11, 10, 16,  24,  40,  51,  61,
  31    12, 12, 14, 19,  26,  58,  60,  55,
  32    14, 13, 16, 24,  40,  57,  69,  56,
  33    14, 17, 22, 29,  51,  87,  80,  62,
  34    18, 22, 37, 58,  68, 109, 103,  77,
  35    24, 35, 55, 64,  81, 104, 113,  92,
  36    49, 64, 78, 87, 103, 121, 120, 101,
  37    72, 92, 95, 98, 112, 100, 103,  99
  38};
  39
  40/* these coefficients dequantize intraframe C plane coefficients
  41 * (note: same as JPEG) */
  42static const uint8_t vp31_intra_c_dequant[64] = {
  43    17, 18, 24, 47, 99, 99, 99, 99,
  44    18, 21, 26, 66, 99, 99, 99, 99,
  45    24, 26, 56, 99, 99, 99, 99, 99,
  46    47, 66, 99, 99, 99, 99, 99, 99,
  47    99, 99, 99, 99, 99, 99, 99, 99,
  48    99, 99, 99, 99, 99, 99, 99, 99,
  49    99, 99, 99, 99, 99, 99, 99, 99,
  50    99, 99, 99, 99, 99, 99, 99, 99
  51};
  52
  53/* these coefficients dequantize interframe coefficients (all planes) */
  54static const uint8_t vp31_inter_dequant[64] = {
  55    16, 16, 16, 20, 24, 28,  32,  40,
  56    16, 16, 20, 24, 28, 32,  40,  48,
  57    16, 20, 24, 28, 32, 40,  48,  64,
  58    20, 24, 28, 32, 40, 48,  64,  64,
  59    24, 28, 32, 40, 48, 64,  64,  64,
  60    28, 32, 40, 48, 64, 64,  64,  96,
  61    32, 40, 48, 64, 64, 64,  96, 128,
  62    40, 48, 64, 64, 64, 96, 128, 128
  63};
  64
  65static const uint8_t vp31_dc_scale_factor[64] = {
  66    220, 200, 190, 180, 170, 170, 160, 160,
  67    150, 150, 140, 140, 130, 130, 120, 120,
  68    110, 110, 100, 100,  90,  90,  90,  80,
  69     80,  80,  70,  70,  70,  60,  60,  60,
  70     60,  50,  50,  50,  50,  40,  40,  40,
  71     40,  40,  30,  30,  30,  30,  30,  30,
  72     30,  20,  20,  20,  20,  20,  20,  20,
  73     20,  10,  10,  10,  10,  10,  10,  10
  74};
  75
  76static const uint16_t vp31_ac_scale_factor[64] = {
  77    500, 450, 400, 370, 340, 310, 285, 265,
  78    245, 225, 210, 195, 185, 180, 170, 160,
  79    150, 145, 135, 130, 125, 115, 110, 107,
  80    100,  96,  93,  89,  85,  82,  75,  74,
  81     70,  68,  64,  60,  57,  56,  52,  50,
  82     49,  45,  44,  43,  40,  38,  37,  35,
  83     33,  32,  30,  29,  28,  25,  24,  22,
  84     21,  19,  18,  17,  15,  13,  12,  10
  85};
  86
  87static const uint8_t vp31_filter_limit_values[64] = {
  88    30, 25, 20, 20, 15, 15, 14, 14,
  89    13, 13, 12, 12, 11, 11, 10, 10,
  90     9,  9,  8,  8,  7,  7,  7,  7,
  91     6,  6,  6,  6,  5,  5,  5,  5,
  92     4,  4,  4,  4,  3,  3,  3,  3,
  93     2,  2,  2,  2,  2,  2,  2,  2,
  94     0,  0,  0,  0,  0,  0,  0,  0,
  95     0,  0,  0,  0,  0,  0,  0,  0
  96};
  97
  98static const uint16_t superblock_run_length_vlc_table[34][2] = {
  99    {     0,  1 },
 100
 101    {     4,  3 }, {     5,  3 },
 102
 103    {   0xC,  4 }, {   0xD,  4 },
 104
 105    {  0x38,  6 }, {  0x39,  6 }, {  0x3A,  6 }, {  0x3B,  6 },
 106
 107    {  0xF0,  8 }, {  0xF1,  8 }, {  0xF2,  8 }, {  0xF3,  8 },
 108    {  0xF4,  8 }, {  0xF5,  8 }, {  0xF6,  8 }, {  0xF7,  8 },
 109
 110    { 0x3E0, 10 }, { 0x3E1, 10 }, { 0x3E2, 10 }, { 0x3E3, 10 },
 111    { 0x3E4, 10 }, { 0x3E5, 10 }, { 0x3E6, 10 }, { 0x3E7, 10 },
 112    { 0x3E8, 10 }, { 0x3E9, 10 }, { 0x3EA, 10 }, { 0x3EB, 10 },
 113    { 0x3EC, 10 }, { 0x3ED, 10 }, { 0x3EE, 10 }, { 0x3EF, 10 },
 114
 115    {  0x3F,  6 } /* this last VLC is a special case for reading 12 more
 116                   * bits from stream and adding the value 34 */
 117};
 118
 119static const uint16_t fragment_run_length_vlc_table[30][2] = {
 120    /* 1 -> 2 */
 121    {   0x0, 2 }, {   0x1, 2 },
 122
 123    /* 3 -> 4 */
 124    {   0x4, 3 }, {   0x5, 3 },
 125
 126    /* 5 -> 6 */
 127    {   0xC, 4 }, {   0xD, 4 },
 128
 129    /* 7 -> 10 */
 130    {  0x38, 6 }, {  0x39, 6 },
 131    {  0x3A, 6 }, {  0x3B, 6 },
 132
 133    /* 11 -> 14 */
 134    {  0x78, 7 }, {  0x79, 7 },
 135    {  0x7A, 7 }, {  0x7B, 7 },
 136
 137    /* 15 -> 30 */
 138    { 0x1F0, 9 }, { 0x1F1, 9 }, { 0x1F2, 9 }, { 0x1F3, 9 },
 139    { 0x1F4, 9 }, { 0x1F5, 9 }, { 0x1F6, 9 }, { 0x1F7, 9 },
 140    { 0x1F8, 9 }, { 0x1F9, 9 }, { 0x1FA, 9 }, { 0x1FB, 9 },
 141    { 0x1FC, 9 }, { 0x1FD, 9 }, { 0x1FE, 9 }, { 0x1FF, 9 }
 142};
 143
 144static const uint8_t mode_code_vlc_table[8][2] = {
 145    {   0, 1 }, {   2, 2 },
 146    {   6, 3 }, {  14, 4 },
 147    {  30, 5 }, {  62, 6 },
 148    { 126, 7 }, { 127, 7 }
 149};
 150
 151static const uint8_t motion_vector_vlc_table[63][2] = {
 152    {    0, 3 },
 153    {    1, 3 },
 154    {    2, 3 },
 155
 156    {    6, 4 }, {    7, 4 },
 157
 158    {    8, 4 }, {    9, 4 },
 159
 160    {   40, 6 }, {   41, 6 }, {   42, 6 }, {   43, 6 },
 161    {   44, 6 }, {   45, 6 }, {   46, 6 }, {   47, 6 },
 162
 163    {   96, 7 }, {   97, 7 }, {   98, 7 }, {   99, 7 },
 164    {  100, 7 }, {  101, 7 }, {  102, 7 }, {  103, 7 },
 165    {  104, 7 }, {  105, 7 }, {  106, 7 }, {  107, 7 },
 166    {  108, 7 }, {  109, 7 }, {  110, 7 }, {  111, 7 },
 167
 168    { 0xE0, 8 }, { 0xE1, 8 }, { 0xE2, 8 }, { 0xE3, 8 },
 169    { 0xE4, 8 }, { 0xE5, 8 }, { 0xE6, 8 }, { 0xE7, 8 },
 170    { 0xE8, 8 }, { 0xE9, 8 }, { 0xEA, 8 }, { 0xEB, 8 },
 171    { 0xEC, 8 }, { 0xED, 8 }, { 0xEE, 8 }, { 0xEF, 8 },
 172
 173    { 0xF0, 8 }, { 0xF1, 8 }, { 0xF2, 8 }, { 0xF3, 8 },
 174    { 0xF4, 8 }, { 0xF5, 8 }, { 0xF6, 8 }, { 0xF7, 8 },
 175    { 0xF8, 8 }, { 0xF9, 8 }, { 0xFA, 8 }, { 0xFB, 8 },
 176    { 0xFC, 8 }, { 0xFD, 8 }, { 0xFE, 8 }, { 0xFF, 8 }
 177};
 178
 179static const int8_t motion_vector_table[63] = {
 180     0,   1, -1,
 181     2,  -2,
 182     3,  -3,
 183     4,  -4,  5,  -5,  6,  -6,  7,  -7,
 184     8,  -8,  9,  -9, 10, -10, 11, -11, 12, -12, 13, -13, 14, -14, 15, -15,
 185    16, -16, 17, -17, 18, -18, 19, -19, 20, -20, 21, -21, 22, -22, 23, -23,
 186    24, -24, 25, -25, 26, -26, 27, -27, 28, -28, 29, -29, 30, -30, 31, -31
 187};
 188
 189static const int8_t fixed_motion_vector_table[64] = {
 190     0,   0,  1,  -1,  2,  -2,  3,  -3,
 191     4,  -4,  5,  -5,  6,  -6,  7,  -7,
 192     8,  -8,  9,  -9, 10, -10, 11, -11,
 193    12, -12, 13, -13, 14, -14, 15, -15,
 194    16, -16, 17, -17, 18, -18, 19, -19,
 195    20, -20, 21, -21, 22, -22, 23, -23,
 196    24, -24, 25, -25, 26, -26, 27, -27,
 197    28, -28, 29, -29, 30, -30, 31, -31
 198};
 199
 200/* only tokens 0..6 indicate eob runs */
 201static const struct {
 202    uint8_t base, bits;
 203} eob_run_table[7] = {
 204    {1, 0}, {2, 0}, {3, 0}, {4, 2}, {8, 3}, {16, 4}, {0, 12}
 205};
 206
 207static const uint8_t zero_run_base[32] = {
 208    0,  0, 0, 0, 0, 0, 0,   /* 0..6 are never used */
 209    0,  0,                  /* 7..8 */
 210    0,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 9..22 */
 211    1,  2, 3, 4, 5,         /* 23..27 */
 212    6, 10, 1, 2             /* 28..31 */
 213};
 214static const uint8_t zero_run_get_bits[32] = {
 215    0, 0, 0, 0, 0, 0, 0,    /* 0..6 are never used */
 216    3, 6,                   /* 7..8 */
 217    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 9..22 */
 218    0, 0, 0, 0, 0,          /* 23..27 */
 219    2, 3, 0, 1              /* 28..31 */
 220};
 221
 222static const uint8_t coeff_get_bits[32] = {
 223    0, 0, 0, 0, 0, 0, 0,    /* 0..6 are never used */
 224    0, 0, 0, 0, 0, 0,       /* 7..12 use constant coeffs */
 225    1, 1, 1, 1,             /* 13..16 are constants but still need sign bit */
 226    2, 3, 4, 5, 6,10,       /* 17..22, for reading large coeffs */
 227    1, 1, 1, 1, 1, 1, 1,    /* 23..29 are constants but still need sign bit */
 228    2, 2                    /* 30..31 */
 229};
 230
 231static const int16_t coeff_table_token_7_8[1] = { 0 };
 232static const int16_t coeff_table_token_9[1] = { 1 };
 233static const int16_t coeff_table_token_10[1] = { -1 };
 234static const int16_t coeff_table_token_11[1] = { 2 };
 235static const int16_t coeff_table_token_12[1] = { -2 };
 236
 237static const int16_t coeff_table_token_13[2] = { 3, -3 };
 238static const int16_t coeff_table_token_14[2] = { 4, -4 };
 239static const int16_t coeff_table_token_15[2] = { 5, -5 };
 240static const int16_t coeff_table_token_16[2] = { 6, -6 };
 241
 242static const int16_t coeff_table_token_23_24_25_26_27_28_29[2] = { 1, -1 };
 243static const int16_t coeff_table_token_30[4] = { 2, 3, -2, -3 };
 244static const int16_t coeff_table_token_31[4] = { 2, 3, -2, -3 };
 245
 246static const int16_t coeff_table_token_17[4] = {
 247    7, 8, -7, -8
 248};
 249
 250static const int16_t coeff_table_token_18[8] = {
 251    9, 10, 11, 12, -9, -10, -11, -12
 252};
 253
 254static const int16_t coeff_table_token_19[16] = {
 255    13, 14, 15, 16, 17, 18, 19, 20, -13, -14, -15, -16, -17, -18, -19, -20
 256};
 257
 258static const int16_t coeff_table_token_20[32] = {
 259     21,  22,  23,  24,  25,  26,  27,  28,
 260     29,  30,  31,  32,  33,  34,  35,  36,
 261    -21, -22, -23, -24, -25, -26, -27, -28,
 262    -29, -30, -31, -32, -33, -34, -35, -36
 263};
 264
 265static const int16_t coeff_table_token_21[64] = {
 266     37,  38,  39,  40,  41,  42,  43,  44,
 267     45,  46,  47,  48,  49,  50,  51,  52,
 268     53,  54,  55,  56,  57,  58,  59,  60,
 269     61,  62,  63,  64,  65,  66,  67,  68,
 270    -37, -38, -39, -40, -41, -42, -43, -44,
 271    -45, -46, -47, -48, -49, -50, -51, -52,
 272    -53, -54, -55, -56, -57, -58, -59, -60,
 273    -61, -62, -63, -64, -65, -66, -67, -68
 274};
 275
 276static const int16_t coeff_table_token_22[1024] = {
 277      69,   70,   71,   72,   73,   74,   75,   76,
 278      77,   78,   79,   80,   81,   82,   83,   84,
 279      85,   86,   87,   88,   89,   90,   91,   92,
 280      93,   94,   95,   96,   97,   98,   99,  100,
 281     101,  102,  103,  104,  105,  106,  107,  108,
 282     109,  110,  111,  112,  113,  114,  115,  116,
 283     117,  118,  119,  120,  121,  122,  123,  124,
 284     125,  126,  127,  128,  129,  130,  131,  132,
 285     133,  134,  135,  136,  137,  138,  139,  140,
 286     141,  142,  143,  144,  145,  146,  147,  148,
 287     149,  150,  151,  152,  153,  154,  155,  156,
 288     157,  158,  159,  160,  161,  162,  163,  164,
 289     165,  166,  167,  168,  169,  170,  171,  172,
 290     173,  174,  175,  176,  177,  178,  179,  180,
 291     181,  182,  183,  184,  185,  186,  187,  188,
 292     189,  190,  191,  192,  193,  194,  195,  196,
 293     197,  198,  199,  200,  201,  202,  203,  204,
 294     205,  206,  207,  208,  209,  210,  211,  212,
 295     213,  214,  215,  216,  217,  218,  219,  220,
 296     221,  222,  223,  224,  225,  226,  227,  228,
 297     229,  230,  231,  232,  233,  234,  235,  236,
 298     237,  238,  239,  240,  241,  242,  243,  244,
 299     245,  246,  247,  248,  249,  250,  251,  252,
 300     253,  254,  255,  256,  257,  258,  259,  260,
 301     261,  262,  263,  264,  265,  266,  267,  268,
 302     269,  270,  271,  272,  273,  274,  275,  276,
 303     277,  278,  279,  280,  281,  282,  283,  284,
 304     285,  286,  287,  288,  289,  290,  291,  292,
 305     293,  294,  295,  296,  297,  298,  299,  300,
 306     301,  302,  303,  304,  305,  306,  307,  308,
 307     309,  310,  311,  312,  313,  314,  315,  316,
 308     317,  318,  319,  320,  321,  322,  323,  324,
 309     325,  326,  327,  328,  329,  330,  331,  332,
 310     333,  334,  335,  336,  337,  338,  339,  340,
 311     341,  342,  343,  344,  345,  346,  347,  348,
 312     349,  350,  351,  352,  353,  354,  355,  356,
 313     357,  358,  359,  360,  361,  362,  363,  364,
 314     365,  366,  367,  368,  369,  370,  371,  372,
 315     373,  374,  375,  376,  377,  378,  379,  380,
 316     381,  382,  383,  384,  385,  386,  387,  388,
 317     389,  390,  391,  392,  393,  394,  395,  396,
 318     397,  398,  399,  400,  401,  402,  403,  404,
 319     405,  406,  407,  408,  409,  410,  411,  412,
 320     413,  414,  415,  416,  417,  418,  419,  420,
 321     421,  422,  423,  424,  425,  426,  427,  428,
 322     429,  430,  431,  432,  433,  434,  435,  436,
 323     437,  438,  439,  440,  441,  442,  443,  444,
 324     445,  446,  447,  448,  449,  450,  451,  452,
 325     453,  454,  455,  456,  457,  458,  459,  460,
 326     461,  462,  463,  464,  465,  466,  467,  468,
 327     469,  470,  471,  472,  473,  474,  475,  476,
 328     477,  478,  479,  480,  481,  482,  483,  484,
 329     485,  486,  487,  488,  489,  490,  491,  492,
 330     493,  494,  495,  496,  497,  498,  499,  500,
 331     501,  502,  503,  504,  505,  506,  507,  508,
 332     509,  510,  511,  512,  513,  514,  515,  516,
 333     517,  518,  519,  520,  521,  522,  523,  524,
 334     525,  526,  527,  528,  529,  530,  531,  532,
 335     533,  534,  535,  536,  537,  538,  539,  540,
 336     541,  542,  543,  544,  545,  546,  547,  548,
 337     549,  550,  551,  552,  553,  554,  555,  556,
 338     557,  558,  559,  560,  561,  562,  563,  564,
 339     565,  566,  567,  568,  569,  570,  571,  572,
 340     573,  574,  575,  576,  577,  578,  579,  580,
 341     -69,  -70,  -71,  -72,  -73,  -74,  -75,  -76,
 342     -77,  -78,  -79,  -80,  -81,  -82,  -83,  -84,
 343     -85,  -86,  -87,  -88,  -89,  -90,  -91,  -92,
 344     -93,  -94,  -95,  -96,  -97,  -98,  -99, -100,
 345    -101, -102, -103, -104, -105, -106, -107, -108,
 346    -109, -110, -111, -112, -113, -114, -115, -116,
 347    -117, -118, -119, -120, -121, -122, -123, -124,
 348    -125, -126, -127, -128, -129, -130, -131, -132,
 349    -133, -134, -135, -136, -137, -138, -139, -140,
 350    -141, -142, -143, -144, -145, -146, -147, -148,
 351    -149, -150, -151, -152, -153, -154, -155, -156,
 352    -157, -158, -159, -160, -161, -162, -163, -164,
 353    -165, -166, -167, -168, -169, -170, -171, -172,
 354    -173, -174, -175, -176, -177, -178, -179, -180,
 355    -181, -182, -183, -184, -185, -186, -187, -188,
 356    -189, -190, -191, -192, -193, -194, -195, -196,
 357    -197, -198, -199, -200, -201, -202, -203, -204,
 358    -205, -206, -207, -208, -209, -210, -211, -212,
 359    -213, -214, -215, -216, -217, -218, -219, -220,
 360    -221, -222, -223, -224, -225, -226, -227, -228,
 361    -229, -230, -231, -232, -233, -234, -235, -236,
 362    -237, -238, -239, -240, -241, -242, -243, -244,
 363    -245, -246, -247, -248, -249, -250, -251, -252,
 364    -253, -254, -255, -256, -257, -258, -259, -260,
 365    -261, -262, -263, -264, -265, -266, -267, -268,
 366    -269, -270, -271, -272, -273, -274, -275, -276,
 367    -277, -278, -279, -280, -281, -282, -283, -284,
 368    -285, -286, -287, -288, -289, -290, -291, -292,
 369    -293, -294, -295, -296, -297, -298, -299, -300,
 370    -301, -302, -303, -304, -305, -306, -307, -308,
 371    -309, -310, -311, -312, -313, -314, -315, -316,
 372    -317, -318, -319, -320, -321, -322, -323, -324,
 373    -325, -326, -327, -328, -329, -330, -331, -332,
 374    -333, -334, -335, -336, -337, -338, -339, -340,
 375    -341, -342, -343, -344, -345, -346, -347, -348,
 376    -349, -350, -351, -352, -353, -354, -355, -356,
 377    -357, -358, -359, -360, -361, -362, -363, -364,
 378    -365, -366, -367, -368, -369, -370, -371, -372,
 379    -373, -374, -375, -376, -377, -378, -379, -380,
 380    -381, -382, -383, -384, -385, -386, -387, -388,
 381    -389, -390, -391, -392, -393, -394, -395, -396,
 382    -397, -398, -399, -400, -401, -402, -403, -404,
 383    -405, -406, -407, -408, -409, -410, -411, -412,
 384    -413, -414, -415, -416, -417, -418, -419, -420,
 385    -421, -422, -423, -424, -425, -426, -427, -428,
 386    -429, -430, -431, -432, -433, -434, -435, -436,
 387    -437, -438, -439, -440, -441, -442, -443, -444,
 388    -445, -446, -447, -448, -449, -450, -451, -452,
 389    -453, -454, -455, -456, -457, -458, -459, -460,
 390    -461, -462, -463, -464, -465, -466, -467, -468,
 391    -469, -470, -471, -472, -473, -474, -475, -476,
 392    -477, -478, -479, -480, -481, -482, -483, -484,
 393    -485, -486, -487, -488, -489, -490, -491, -492,
 394    -493, -494, -495, -496, -497, -498, -499, -500,
 395    -501, -502, -503, -504, -505, -506, -507, -508,
 396    -509, -510, -511, -512, -513, -514, -515, -516,
 397    -517, -518, -519, -520, -521, -522, -523, -524,
 398    -525, -526, -527, -528, -529, -530, -531, -532,
 399    -533, -534, -535, -536, -537, -538, -539, -540,
 400    -541, -542, -543, -544, -545, -546, -547, -548,
 401    -549, -550, -551, -552, -553, -554, -555, -556,
 402    -557, -558, -559, -560, -561, -562, -563, -564,
 403    -565, -566, -567, -568, -569, -570, -571, -572,
 404    -573, -574, -575, -576, -577, -578, -579, -580
 405};
 406
 407static const int16_t *const coeff_tables[32] = {
 408    NULL,
 409    NULL,
 410    NULL,
 411    NULL,
 412    NULL,
 413    NULL,
 414    NULL,
 415    coeff_table_token_7_8,
 416
 417    coeff_table_token_7_8,
 418    coeff_table_token_9,
 419    coeff_table_token_10,
 420    coeff_table_token_11,
 421    coeff_table_token_12,
 422    coeff_table_token_13,
 423    coeff_table_token_14,
 424    coeff_table_token_15,
 425
 426    coeff_table_token_16,
 427    coeff_table_token_17,
 428    coeff_table_token_18,
 429    coeff_table_token_19,
 430    coeff_table_token_20,
 431    coeff_table_token_21,
 432    coeff_table_token_22,
 433    coeff_table_token_23_24_25_26_27_28_29,
 434
 435    coeff_table_token_23_24_25_26_27_28_29,
 436    coeff_table_token_23_24_25_26_27_28_29,
 437    coeff_table_token_23_24_25_26_27_28_29,
 438    coeff_table_token_23_24_25_26_27_28_29,
 439    coeff_table_token_23_24_25_26_27_28_29,
 440    coeff_table_token_23_24_25_26_27_28_29,
 441    coeff_table_token_30,
 442    coeff_table_token_31
 443};
 444
 445static const uint16_t dc_bias[16][32][2] = {
 446    { /* DC bias table 0 */
 447        {   0x2D,  6 },
 448        {   0x26,  7 },
 449        {  0x166,  9 },
 450        {   0x4E,  8 },
 451        {  0x2CE, 10 },
 452        {  0x59E, 11 },
 453        {  0x27D, 11 },
 454        {    0x8,  5 },
 455        {  0x4F9, 12 },
 456        {    0xF,  4 },
 457        {    0xE,  4 },
 458        {   0x1B,  5 },
 459        {    0x6,  4 },
 460        {    0x8,  4 },
 461        {    0x5,  4 },
 462        {   0x1A,  5 },
 463        {   0x15,  5 },
 464        {    0x7,  4 },
 465        {    0xC,  4 },
 466        {    0x1,  3 },
 467        {    0x0,  3 },
 468        {    0x9,  4 },
 469        {   0x17,  5 },
 470        {   0x29,  6 },
 471        {   0x28,  6 },
 472        {   0xB2,  8 },
 473        {  0x4F8, 12 },
 474        {  0x59F, 11 },
 475        {   0x9E,  9 },
 476        {  0x13F, 10 },
 477        {   0x12,  6 },
 478        {   0x58,  7 }
 479    },
 480    { /* DC bias table 1 */
 481        {   0x10,  5 },
 482        {   0x47,  7 },
 483        {  0x1FF,  9 },
 484        {   0x8C,  8 },
 485        {  0x3FC, 10 },
 486        {  0x46A, 11 },
 487        {  0x469, 11 },
 488        {   0x22,  6 },
 489        { 0x11A1, 13 },
 490        {    0xE,  4 },
 491        {    0xD,  4 },
 492        {    0x4,  4 },
 493        {    0x5,  4 },
 494        {    0x9,  4 },
 495        {    0x6,  4 },
 496        {   0x1E,  5 },
 497        {   0x16,  5 },
 498        {    0x7,  4 },
 499        {    0xC,  4 },
 500        {    0x1,  3 },
 501        {    0x0,  3 },
 502        {    0xA,  4 },
 503        {   0x17,  5 },
 504        {   0x7D,  7 },
 505        {   0x7E,  7 },
 506        {  0x11B,  9 },
 507        {  0x8D1, 12 },
 508        {  0x3FD, 10 },
 509        {  0x46B, 11 },
 510        { 0x11A0, 13 },
 511        {   0x7C,  7 },
 512        {   0xFE,  8 }
 513    },
 514    { /* DC bias table 2 */
 515        {   0x16,  5 },
 516        {   0x20,  6 },
 517        {   0x86,  8 },
 518        {   0x87,  8 },
 519        {  0x367, 10 },
 520        {  0x6CC, 11 },
 521        {  0x6CB, 11 },
 522        {   0x6E,  7 },
 523        { 0x366D, 14 },
 524        {    0xF,  4 },
 525        {    0xE,  4 },
 526        {    0x4,  4 },
 527        {    0x5,  4 },
 528        {    0xA,  4 },
 529        {    0x6,  4 },
 530        {   0x1A,  5 },
 531        {   0x11,  5 },
 532        {    0x7,  4 },
 533        {    0xC,  4 },
 534        {    0x1,  3 },
 535        {    0x0,  3 },
 536        {    0x9,  4 },
 537        {   0x17,  5 },
 538        {   0x6F,  7 },
 539        {   0x6D,  7 },
 540        {  0x364, 10 },
 541        {  0xD9A, 12 },
 542        {  0x6CA, 11 },
 543        { 0x1B37, 13 },
 544        { 0x366C, 14 },
 545        {   0x42,  7 },
 546        {   0xD8,  8 }
 547    },
 548    { /* DC bias table 3 */
 549        {    0x0,  4 },
 550        {   0x2D,  6 },
 551        {   0xF7,  8 },
 552        {   0x58,  7 },
 553        {  0x167,  9 },
 554        {  0x2CB, 10 },
 555        {  0x2CA, 10 },
 556        {    0xE,  6 },
 557        { 0x1661, 13 },
 558        {    0x3,  3 },
 559        {    0x2,  3 },
 560        {    0x8,  4 },
 561        {    0x9,  4 },
 562        {    0xD,  4 },
 563        {    0x2,  4 },
 564        {   0x1F,  5 },
 565        {   0x17,  5 },
 566        {    0x1,  4 },
 567        {    0xC,  4 },
 568        {    0xE,  4 },
 569        {    0xA,  4 },
 570        {    0x6,  5 },
 571        {   0x78,  7 },
 572        {    0xF,  6 },
 573        {   0x7A,  7 },
 574        {  0x164,  9 },
 575        {  0x599, 11 },
 576        {  0x2CD, 10 },
 577        {  0xB31, 12 },
 578        { 0x1660, 13 },
 579        {   0x79,  7 },
 580        {   0xF6,  8 }
 581    },
 582    { /* DC bias table 4 */
 583        {    0x3,  4 },
 584        {   0x3C,  6 },
 585        {    0xF,  7 },
 586        {   0x7A,  7 },
 587        {   0x1D,  8 },
 588        {   0x20,  9 },
 589        {   0x72, 10 },
 590        {    0x6,  6 },
 591        {  0x399, 13 },
 592        {    0x4,  3 },
 593        {    0x5,  3 },
 594        {    0x5,  4 },
 595        {    0x6,  4 },
 596        {    0xE,  4 },
 597        {    0x4,  4 },
 598        {    0x0,  4 },
 599        {   0x19,  5 },
 600        {    0x2,  4 },
 601        {    0xD,  4 },
 602        {    0x7,  4 },
 603        {   0x1F,  5 },
 604        {   0x30,  6 },
 605        {   0x11,  8 },
 606        {   0x31,  6 },
 607        {    0x5,  6 },
 608        {   0x21,  9 },
 609        {   0xE7, 11 },
 610        {   0x38,  9 },
 611        {  0x1CD, 12 },
 612        {  0x398, 13 },
 613        {   0x7B,  7 },
 614        {    0x9,  7 }
 615    },
 616    { /* DC bias table 5 */
 617        {    0x9,  4 },
 618        {    0x2,  5 },
 619        {   0x74,  7 },
 620        {    0x7,  6 },
 621        {   0xEC,  8 },
 622        {   0xD1,  9 },
 623        {  0x1A6, 10 },
 624        {    0x6,  6 },
 625        {  0xD21, 13 },
 626        {    0x5,  3 },
 627        {    0x6,  3 },
 628        {    0x8,  4 },
 629        {    0x7,  4 },
 630        {    0xF,  4 },
 631        {    0x4,  4 },
 632        {    0x0,  4 },
 633        {   0x1C,  5 },
 634        {    0x2,  4 },
 635        {    0x5,  4 },
 636        {    0x3,  4 },
 637        {    0xC,  5 },
 638        {   0x35,  7 },
 639        {  0x1A7, 10 },
 640        {   0x1B,  6 },
 641        {   0x77,  7 },
 642        {  0x1A5, 10 },
 643        {  0x349, 11 },
 644        {   0xD0,  9 },
 645        {  0x691, 12 },
 646        {  0xD20, 13 },
 647        {   0x75,  7 },
 648        {   0xED,  8 }
 649    },
 650    { /* DC bias table 6 */
 651        {    0xA,  4 },
 652        {    0xC,  5 },
 653        {   0x12,  6 },
 654        {   0x1B,  6 },
 655        {   0xB7,  8 },
 656        {  0x16C,  9 },
 657        {   0x99,  9 },
 658        {   0x5A,  7 },
 659        { 0x16D8, 13 },
 660        {    0x7,  3 },
 661        {    0x6,  3 },
 662        {    0x9,  4 },
 663        {    0x8,  4 },
 664        {    0x0,  3 },
 665        {    0x5,  4 },
 666        {   0x17,  5 },
 667        {    0xE,  5 },
 668        {    0x2,  4 },
 669        {    0x3,  4 },
 670        {    0xF,  5 },
 671        {   0x1A,  6 },
 672        {   0x4D,  8 },
 673        { 0x2DB3, 14 },
 674        {   0x2C,  6 },
 675        {   0x11,  6 },
 676        {  0x2DA, 10 },
 677        {  0x5B7, 11 },
 678        {   0x98,  9 },
 679        {  0xB6D, 12 },
 680        { 0x2DB2, 14 },
 681        {   0x10,  6 },
 682        {   0x27,  7 }
 683    },
 684    { /* DC bias table 7 */
 685        {    0xD,  4 },
 686        {    0xF,  5 },
 687        {   0x1D,  6 },
 688        {    0x8,  5 },
 689        {   0x51,  7 },
 690        {   0x56,  8 },
 691        {   0xAF,  9 },
 692        {   0x2A,  7 },
 693        { 0x148A, 13 },
 694        {    0x7,  3 },
 695        {    0x0,  2 },
 696        {    0x8,  4 },
 697        {    0x9,  4 },
 698        {    0xC,  4 },
 699        {    0x6,  4 },
 700        {   0x17,  5 },
 701        {    0xB,  5 },
 702        {   0x16,  5 },
 703        {   0x15,  5 },
 704        {    0x9,  5 },
 705        {   0x50,  7 },
 706        {   0xAE,  9 },
 707        { 0x2917, 14 },
 708        {   0x1C,  6 },
 709        {   0x14,  6 },
 710        {  0x290, 10 },
 711        {  0x523, 11 },
 712        {  0x149,  9 },
 713        {  0xA44, 12 },
 714        { 0x2916, 14 },
 715        {   0x53,  7 },
 716        {   0xA5,  8 }
 717    },
 718    { /* DC bias table 8 */
 719        {    0x1,  4 },
 720        {   0x1D,  6 },
 721        {   0xF5,  8 },
 722        {   0xF4,  8 },
 723        {  0x24D, 10 },
 724        {  0x499, 11 },
 725        {  0x498, 11 },
 726        {    0x1,  5 },
 727        {   0x21,  6 },
 728        {    0x6,  3 },
 729        {    0x5,  3 },
 730        {    0x6,  4 },
 731        {    0x5,  4 },
 732        {    0x2,  4 },
 733        {    0x7,  5 },
 734        {   0x25,  6 },
 735        {   0x7B,  7 },
 736        {   0x1C,  6 },
 737        {   0x20,  6 },
 738        {    0xD,  6 },
 739        {   0x48,  7 },
 740        {   0x92,  8 },
 741        {  0x127,  9 },
 742        {    0xE,  4 },
 743        {    0x4,  4 },
 744        {   0x11,  5 },
 745        {    0xC,  6 },
 746        {   0x3C,  6 },
 747        {    0xF,  5 },
 748        {    0x0,  5 },
 749        {   0x1F,  5 },
 750        {   0x13,  5 }
 751    },
 752    { /* DC bias table 9 */
 753        {    0x5,  4 },
 754        {   0x3C,  6 },
 755        {   0x40,  7 },
 756        {    0xD,  7 },
 757        {   0x31,  9 },
 758        {   0x61, 10 },
 759        {   0x60, 10 },
 760        {    0x2,  5 },
 761        {   0xF5,  8 },
 762        {    0x6,  3 },
 763        {    0x5,  3 },
 764        {    0x7,  4 },
 765        {    0x6,  4 },
 766        {    0x2,  4 },
 767        {    0x9,  5 },
 768        {   0x25,  6 },
 769        {    0x7,  6 },
 770        {   0x21,  6 },
 771        {   0x24,  6 },
 772        {   0x10,  6 },
 773        {   0x41,  7 },
 774        {   0xF4,  8 },
 775        {   0x19,  8 },
 776        {    0xE,  4 },
 777        {    0x3,  4 },
 778        {   0x11,  5 },
 779        {   0x11,  6 },
 780        {   0x3F,  6 },
 781        {   0x3E,  6 },
 782        {   0x7B,  7 },
 783        {    0x0,  4 },
 784        {   0x13,  5 }
 785    },
 786    { /* DC bias table 10 */
 787        {    0xA,  4 },
 788        {    0x7,  5 },
 789        {    0x1,  6 },
 790        {    0x9,  6 },
 791        {  0x131,  9 },
 792        {  0x261, 10 },
 793        {  0x260, 10 },
 794        {   0x15,  6 },
 795        {    0x1,  7 },
 796        {    0x7,  3 },
 797        {    0x6,  3 },
 798        {    0x8,  4 },
 799        {    0x7,  4 },
 800        {    0x6,  4 },
 801        {   0x12,  5 },
 802        {   0x2F,  6 },
 803        {   0x14,  6 },
 804        {   0x27,  6 },
 805        {   0x2D,  6 },
 806        {   0x16,  6 },
 807        {   0x4D,  7 },
 808        {   0x99,  8 },
 809        {    0x0,  7 },
 810        {    0x4,  4 },
 811        {    0x1,  4 },
 812        {    0x5,  5 },
 813        {   0x17,  6 },
 814        {   0x2E,  6 },
 815        {   0x2C,  6 },
 816        {    0x8,  6 },
 817        {    0x6,  5 },
 818        {    0x1,  5 }
 819    },
 820    { /* DC bias table 11 */
 821        {    0x0,  3 },
 822        {    0xE,  5 },
 823        {   0x17,  6 },
 824        {   0x2A,  6 },
 825        {   0x10,  7 },
 826        {   0xF9, 10 },
 827        {   0xF8, 10 },
 828        {   0x1E,  7 },
 829        {   0x3F,  8 },
 830        {    0x7,  3 },
 831        {    0x6,  3 },
 832        {    0x9,  4 },
 833        {    0x8,  4 },
 834        {    0x6,  4 },
 835        {    0xF,  5 },
 836        {    0x5,  5 },
 837        {   0x16,  6 },
 838        {   0x29,  6 },
 839        {   0x2B,  6 },
 840        {   0x15,  6 },
 841        {   0x50,  7 },
 842        {   0x11,  7 },
 843        {   0x7D,  9 },
 844        {    0x4,  4 },
 845        {   0x17,  5 },
 846        {    0x6,  5 },
 847        {   0x14,  6 },
 848        {   0x2C,  6 },
 849        {   0x2D,  6 },
 850        {    0xE,  6 },
 851        {    0x9,  6 },
 852        {   0x51,  7 }
 853    },
 854    { /* DC bias table 12 */
 855        {    0x2,  3 },
 856        {   0x18,  5 },
 857        {   0x2F,  6 },
 858        {    0xD,  5 },
 859        {   0x53,  7 },
 860        {  0x295, 10 },
 861        {  0x294, 10 },
 862        {   0xA4,  8 },
 863        {   0x7C,  8 },
 864        {    0x0,  2 },
 865        {    0x7,  3 },
 866        {    0x9,  4 },
 867        {    0x8,  4 },
 868        {   0x1B,  5 },
 869        {    0xC,  5 },
 870        {   0x28,  6 },
 871        {   0x6A,  7 },
 872        {   0x1E,  6 },
 873        {   0x1D,  6 },
 874        {   0x69,  7 },
 875        {   0xD7,  8 },
 876        {   0x7D,  8 },
 877        {  0x14B,  9 },
 878        {   0x19,  5 },
 879        {   0x16,  5 },
 880        {   0x2E,  6 },
 881        {   0x1C,  6 },
 882        {   0x2B,  6 },
 883        {   0x2A,  6 },
 884        {   0x68,  7 },
 885        {   0x3F,  7 },
 886        {   0xD6,  8 }
 887    },
 888    { /* DC bias table 13 */
 889        {    0x2,  3 },
 890        {   0x1B,  5 },
 891        {    0xC,  5 },
 892        {   0x18,  5 },
 893        {   0x29,  6 },
 894        {   0x7F,  8 },
 895        {  0x2F0, 10 },
 896        {  0x198,  9 },
 897        {  0x179,  9 },
 898        {    0x0,  2 },
 899        {    0x7,  3 },
 900        {    0x9,  4 },
 901        {    0x8,  4 },
 902        {   0x1A,  5 },
 903        {    0xD,  5 },
 904        {   0x2A,  6 },
 905        {   0x64,  7 },
 906        {   0x1E,  6 },
 907        {   0x67,  7 },
 908        {   0x5F,  7 },
 909        {   0xCD,  8 },
 910        {   0x7E,  8 },
 911        {  0x2F1, 10 },
 912        {   0x16,  5 },
 913        {    0xE,  5 },
 914        {   0x2E,  6 },
 915        {   0x65,  7 },
 916        {   0x2B,  6 },
 917        {   0x28,  6 },
 918        {   0x3E,  7 },
 919        {   0xBD,  8 },
 920        {  0x199,  9 }
 921    },
 922    { /* DC bias table 14 */
 923        {    0x2,  3 },
 924        {    0x7,  4 },
 925        {   0x16,  5 },
 926        {    0x6,  4 },
 927        {   0x36,  6 },
 928        {   0x5C,  7 },
 929        {  0x15D,  9 },
 930        {  0x15C,  9 },
 931        {  0x2BF, 10 },
 932        {    0x0,  2 },
 933        {    0x7,  3 },
 934        {    0x9,  4 },
 935        {    0x8,  4 },
 936        {   0x18,  5 },
 937        {   0x34,  6 },
 938        {   0x2A,  6 },
 939        {   0x5E,  7 },
 940        {   0x6A,  7 },
 941        {   0x64,  7 },
 942        {   0x5D,  7 },
 943        {   0xCB,  8 },
 944        {   0xAD,  8 },
 945        {  0x2BE, 10 },
 946        {   0x14,  5 },
 947        {   0x33,  6 },
 948        {   0x6E,  7 },
 949        {   0x5F,  7 },
 950        {   0x6F,  7 },
 951        {   0x6B,  7 },
 952        {   0xCA,  8 },
 953        {   0xAC,  8 },
 954        {  0x15E,  9 }
 955    },
 956    { /* DC bias table 15 */
 957        {    0xF,  4 },
 958        {   0x1D,  5 },
 959        {   0x18,  5 },
 960        {    0xB,  4 },
 961        {   0x19,  5 },
 962        {   0x29,  6 },
 963        {   0xD6,  8 },
 964        {  0x551, 11 },
 965        {  0xAA1, 12 },
 966        {    0x1,  2 },
 967        {    0x0,  2 },
 968        {    0x9,  4 },
 969        {    0x8,  4 },
 970        {   0x1B,  5 },
 971        {   0x38,  6 },
 972        {   0x28,  6 },
 973        {   0x57,  7 },
 974        {   0x6A,  7 },
 975        {   0x68,  7 },
 976        {   0x56,  7 },
 977        {   0xE5,  8 },
 978        {  0x155,  9 },
 979        {  0xAA0, 12 },
 980        {   0x73,  7 },
 981        {   0x69,  7 },
 982        {   0xD7,  8 },
 983        {   0xAB,  8 },
 984        {   0xE4,  8 },
 985        {   0xA9,  8 },
 986        {  0x151,  9 },
 987        {  0x150,  9 },
 988        {  0x2A9, 10 }
 989    }
 990};
 991
 992static const uint16_t ac_bias_0[16][32][2] = {
 993    { /* AC bias group 1, table 0 */
 994        {    0x8,  5 },
 995        {   0x25,  7 },
 996        {  0x17A,  9 },
 997        {  0x2F7, 10 },
 998        {  0xBDB, 12 },
 999        { 0x17B4, 13 },
1000        { 0x2F6B, 14 },
1001        {   0x1D,  5 },
1002        { 0x2F6A, 14 },
1003        {    0x8,  4 },
1004        {    0x7,  4 },
1005        {    0x1,  4 },
1006        {    0x2,  4 },
1007        {    0xA,  4 },
1008        {    0x6,  4 },
1009        {    0x0,  4 },
1010        {   0x1C,  5 },
1011        {    0x9,  4 },
1012        {    0xD,  4 },
1013        {    0xF,  4 },
1014        {    0xC,  4 },
1015        {    0x3,  4 },
1016        {    0xA,  5 },
1017        {   0x16,  5 },
1018        {   0x13,  6 },
1019        {   0x5D,  7 },
1020        {   0x24,  7 },
1021        {   0xBC,  8 },
1022        {   0x5C,  7 },
1023        {  0x5EC, 11 },
1024        {    0xB,  5 },
1025        {   0x5F,  7 }
1026    },
1027    { /* AC bias group 1, table 1 */
1028        {    0xF,  5 },
1029        {   0x10,  6 },
1030        {   0x4B,  8 },
1031        {   0xC6,  8 },
1032        {  0x31D, 10 },
1033        {  0xC71, 12 },
1034        {  0xC70, 12 },
1035        {    0x1,  4 },
1036        {  0xC73, 12 },
1037        {    0x8,  4 },
1038        {    0x9,  4 },
1039        {    0x2,  4 },
1040        {    0x3,  4 },
1041        {    0xB,  4 },
1042        {    0x6,  4 },
1043        {    0x0,  4 },
1044        {   0x1C,  5 },
1045        {    0x5,  4 },
1046        {    0xD,  4 },
1047        {    0xF,  4 },
1048        {    0xA,  4 },
1049        {   0x19,  5 },
1050        {   0x13,  6 },
1051        {   0x1D,  5 },
1052        {   0x30,  6 },
1053        {   0x62,  7 },
1054        {   0x24,  7 },
1055        {   0x4A,  8 },
1056        {  0x18F,  9 },
1057        {  0xC72, 12 },
1058        {    0xE,  5 },
1059        {   0x11,  6 }
1060    },
1061    { /* AC bias group 1, table 2 */
1062        {   0x1B,  5 },
1063        {    0x3,  6 },
1064        {   0x8D,  8 },
1065        {   0x40,  7 },
1066        {  0x239, 10 },
1067        {  0x471, 11 },
1068        {  0x8E0, 12 },
1069        {    0x3,  4 },
1070        { 0x11C3, 13 },
1071        {    0xA,  4 },
1072        {    0x9,  4 },
1073        {    0x4,  4 },
1074        {    0x5,  4 },
1075        {    0xE,  4 },
1076        {    0x7,  4 },
1077        {    0x1,  4 },
1078        {   0x1E,  5 },
1079        {    0x6,  4 },
1080        {    0xC,  4 },
1081        {    0xB,  4 },
1082        {    0x2,  4 },
1083        {    0x0,  5 },
1084        {   0x41,  7 },
1085        {   0x1F,  5 },
1086        {   0x22,  6 },
1087        {    0x2,  6 },
1088        {   0x8F,  8 },
1089        {   0x8C,  8 },
1090        {  0x11D,  9 },
1091        { 0x11C2, 13 },
1092        {   0x1A,  5 },
1093        {   0x21,  6 }
1094    },
1095    { /* AC bias group 1, table 3 */
1096        {   0x1F,  5 },
1097        {    0x3,  6 },
1098        {    0x3,  7 },
1099        {   0x43,  7 },
1100        {    0xB,  9 },
1101        {   0x15, 10 },
1102        {   0x51, 12 },
1103        {    0x3,  4 },
1104        {   0x50, 12 },
1105        {    0xD,  4 },
1106        {    0xC,  4 },
1107        {    0x4,  4 },
1108        {    0x6,  4 },
1109        {    0xE,  4 },
1110        {    0xA,  4 },
1111        {    0x1,  4 },
1112        {   0x1E,  5 },
1113        {    0x5,  4 },
1114        {    0x9,  4 },
1115        {    0x7,  4 },
1116        {   0x11,  5 },
1117        {    0x2,  6 },
1118        {    0x4,  8 },
1119        {    0x2,  4 },
1120        {   0x2D,  6 },
1121        {   0x20,  6 },
1122        {   0x42,  7 },
1123        {    0x1,  7 },
1124        {    0x0,  7 },
1125        {   0x29, 11 },
1126        {   0x17,  5 },
1127        {   0x2C,  6 }
1128    },
1129    { /* AC bias group 1, table 4 */
1130        {    0x3,  4 },
1131        {   0x1F,  6 },
1132        {   0x3A,  7 },
1133        {   0x5D,  7 },
1134        {  0x173,  9 },
1135        {  0x2E4, 10 },
1136        { 0x172D, 13 },
1137        {    0x4,  4 },
1138        { 0x172C, 13 },
1139        {    0xF,  4 },
1140        {    0xE,  4 },
1141        {    0x9,  4 },
1142        {    0x8,  4 },
1143        {    0xC,  4 },
1144        {    0xA,  4 },
1145        {    0x1,  4 },
1146        {   0x16,  5 },
1147        {    0x2,  4 },
1148        {    0x5,  4 },
1149        {   0x1A,  5 },
1150        {   0x2F,  6 },
1151        {   0x38,  7 },
1152        {  0x5CA, 11 },
1153        {    0x6,  4 },
1154        {   0x37,  6 },
1155        {   0x1E,  6 },
1156        {   0x3B,  7 },
1157        {   0x39,  7 },
1158        {   0xB8,  8 },
1159        {  0xB97, 12 },
1160        {    0x0,  4 },
1161        {   0x36,  6 }
1162    },
1163    { /* AC bias group 1, table 5 */
1164        {    0x6,  4 },
1165        {   0x37,  6 },
1166        {   0x5D,  7 },
1167        {    0xC,  6 },
1168        {   0xB9,  8 },
1169        {  0x2E3, 10 },
1170        {  0x5C4, 11 },
1171        {    0x4,  4 },
1172        { 0x1715, 13 },
1173        {    0x0,  3 },
1174        {    0xF,  4 },
1175        {    0x8,  4 },
1176        {    0x7,  4 },
1177        {    0xC,  4 },
1178        {    0x9,  4 },
1179        {   0x1D,  5 },
1180        {   0x16,  5 },
1181        {   0x1C,  5 },
1182        {   0x1A,  5 },
1183        {    0xB,  5 },
1184        {   0x5E,  7 },
1185        {  0x170,  9 },
1186        { 0x1714, 13 },
1187        {    0xA,  4 },
1188        {    0xA,  5 },
1189        {   0x36,  6 },
1190        {   0x5F,  7 },
1191        {   0x1B,  7 },
1192        {   0x1A,  7 },
1193        {  0xB8B, 12 },
1194        {    0x2,  4 },
1195        {    0x7,  5 }
1196    },
1197    { /* AC bias group 1, table 6 */
1198        {    0xC,  4 },
1199        {    0xB,  5 },
1200        {   0x79,  7 },
1201        {   0x22,  6 },
1202        {   0xF0,  8 },
1203        {  0x119,  9 },
1204        {  0x230, 10 },
1205        {   0x1D,  5 },
1206        {  0x8C4, 12 },
1207        {    0x1,  3 },
1208        {    0x0,  3 },
1209        {    0xA,  4 },
1210        {    0x9,  4 },
1211        {    0xB,  4 },
1212        {    0x7,  4 },
1213        {   0x1C,  5 },
1214        {   0x3D,  6 },
1215        {    0xD,  5 },
1216        {    0x8,  5 },
1217        {   0x15,  6 },
1218        {   0x8D,  8 },
1219        { 0x118B, 13 },
1220        { 0x118A, 13 },
1221        {    0xD,  4 },
1222        {   0x10,  5 },
1223        {    0x9,  5 },
1224        {   0x14,  6 },
1225        {   0x47,  7 },
1226        {   0xF1,  8 },
1227        {  0x463, 11 },
1228        {   0x1F,  5 },
1229        {    0xC,  5 }
1230    },
1231    { /* AC bias group 1, table 7 */
1232        {    0x0,  3 },
1233        {   0x1A,  5 },
1234        {   0x33,  6 },
1235        {    0xC,  5 },
1236        {   0x46,  7 },
1237        {  0x1E3,  9 },
1238        {  0x3C5, 10 },
1239        {   0x17,  5 },
1240        { 0x1E21, 13 },
1241        {    0x2,  3 },
1242        {    0x1,  3 },
1243        {    0x9,  4 },
1244        {    0xA,  4 },
1245        {    0x7,  4 },
1246        {   0x1B,  5 },
1247        {   0x3D,  6 },
1248        {   0x1B,  6 },
1249        {   0x22,  6 },
1250        {   0x79,  7 },
1251        {   0xF0,  8 },
1252        { 0x1E20, 13 },
1253        { 0x1E23, 13 },
1254        { 0x1E22, 13 },
1255        {    0xE,  4 },
1256        {   0x16,  5 },
1257        {   0x18,  5 },
1258        {   0x32,  6 },
1259        {   0x1A,  6 },
1260        {   0x47,  7 },
1261        {  0x789, 11 },
1262        {   0x1F,  5 },
1263        {   0x10,  5 }
1264    },
1265    { /* AC bias group 1, table 8 */
1266        {   0x1D,  5 },
1267        {   0x61,  7 },
1268        {   0x4E,  8 },
1269        {   0x9E,  9 },
1270        {  0x27C, 11 },
1271        {  0x9F5, 13 },
1272        {  0x9F4, 13 },
1273        {    0x3,  4 },
1274        {   0x60,  7 },
1275        {    0x0,  3 },
1276        {    0xF,  4 },
1277        {    0xB,  4 },
1278        {    0xA,  4 },
1279        {    0x9,  4 },
1280        {    0x5,  4 },
1281        {    0xD,  5 },
1282        {   0x31,  6 },
1283        {    0x8,  5 },
1284        {   0x38,  6 },
1285        {   0x12,  6 },
1286        {   0x26,  7 },
1287        {  0x13F, 10 },
1288        {  0x4FB, 12 },
1289        {    0xD,  4 },
1290        {    0x2,  4 },
1291        {    0xC,  5 },
1292        {   0x39,  6 },
1293        {   0x1C,  6 },
1294        {    0xF,  5 },
1295        {   0x1D,  6 },
1296        {    0x8,  4 },
1297        {   0x19,  5 }
1298    },
1299    { /* AC bias group 1, table 9 */
1300        {    0x7,  4 },
1301        {   0x19,  6 },
1302        {   0xAB,  8 },
1303        {   0xAA,  8 },
1304        {  0x119, 10 },
1305        {  0x461, 12 },
1306        {  0x460, 12 },
1307        {   0x1B,  5 },
1308        {   0x47,  8 },
1309        {    0x1,  3 },
1310        {    0x0,  3 },
1311        {    0xC,  4 },
1312        {    0xB,  4 },
1313        {    0x9,  4 },
1314        {    0x5,  4 },
1315        {    0xD,  5 },
1316        {   0x35,  6 },
1317        {   0x3D,  6 },
1318        {   0x3C,  6 },
1319        {   0x18,  6 },
1320        {   0x22,  7 },
1321        {   0x8D,  9 },
1322        {  0x231, 11 },
1323        {    0xE,  4 },
1324        {   0x1F,  5 },
1325        {    0x9,  5 },
1326        {   0x2B,  6 },
1327        {   0x10,  6 },
1328        {   0x34,  6 },
1329        {   0x54,  7 },
1330        {    0x8,  4 },
1331        {   0x14,  5 }
1332    },
1333    { /* AC bias group 1, table 10 */
1334        {    0xC,  4 },
1335        {    0x5,  5 },
1336        {    0x8,  6 },
1337        {   0x5B,  7 },
1338        {   0x4D,  9 },
1339        {  0x131, 11 },
1340        {  0x261, 12 },
1341        {   0x1A,  5 },
1342        {   0x12,  7 },
1343        {    0x0,  3 },
1344        {    0xF,  4 },
1345        {    0xA,  4 },
1346        {    0x9,  4 },
1347        {    0x6,  4 },
1348        {   0x1B,  5 },
1349        {    0x6,  5 },
1350        {   0x1C,  6 },
1351        {   0x2C,  6 },
1352        {   0x15,  6 },
1353        {   0x5A,  7 },
1354        {   0x27,  8 },
1355        {   0x99, 10 },
1356        {  0x260, 12 },
1357        {    0xE,  4 },
1358        {    0x4,  4 },
1359        {    0xF,  5 },
1360        {    0x7,  5 },
1361        {   0x1D,  6 },
1362        {    0xB,  5 },
1363        {   0x14,  6 },
1364        {    0x8,  4 },
1365        {   0x17,  5 }
1366    },
1367    { /* AC bias group 1, table 11 */
1368        {    0xF,  4 },
1369        {   0x13,  5 },
1370        {   0x75,  7 },
1371        {   0x24,  6 },
1372        {   0x95,  8 },
1373        {  0x251, 10 },
1374        {  0x4A0, 11 },
1375        {   0x10,  5 },
1376        {   0xC8,  8 },
1377        {    0x2,  3 },
1378        {    0x1,  3 },
1379        {    0x1,  4 },
1380        {    0x0,  4 },
1381        {   0x1A,  5 },
1382        {   0x11,  5 },
1383        {   0x2C,  6 },
1384        {   0x65,  7 },
1385        {   0x74,  7 },
1386        {   0x4B,  7 },
1387        {   0xC9,  8 },
1388        {  0x129,  9 },
1389        {  0x943, 12 },
1390        {  0x942, 12 },
1391        {    0x3,  3 },
1392        {    0xA,  4 },
1393        {   0x1C,  5 },
1394        {   0x18,  5 },
1395        {   0x33,  6 },
1396        {   0x17,  5 },
1397        {   0x2D,  6 },
1398        {   0x1B,  5 },
1399        {   0x3B,  6 }
1400    },
1401    { /* AC bias group 1, table 12 */
1402        {    0x3,  3 },
1403        {   0x1A,  5 },
1404        {   0x2D,  6 },
1405        {   0x38,  6 },
1406        {   0x28,  7 },
1407        {  0x395, 10 },
1408        {  0xE51, 12 },
1409        {   0x37,  6 },
1410        {   0xE4,  8 },
1411        {    0x1,  3 },
1412        {    0x0,  3 },
1413        {   0x1F,  5 },
1414        {   0x1E,  5 },
1415        {   0x17,  5 },
1416        {   0x3A,  6 },
1417        {   0x73,  7 },
1418        {   0x2A,  7 },
1419        {   0x2B,  7 },
1420        {   0x29,  7 },
1421        {  0x1CB,  9 },
1422        {  0x729, 11 },
1423        { 0x1CA1, 13 },
1424        { 0x1CA0, 13 },
1425        {    0x4,  3 },
1426        {    0xA,  4 },
1427        {    0x4,  4 },
1428        {   0x18,  5 },
1429        {   0x36,  6 },
1430        {    0xB,  5 },
1431        {   0x2C,  6 },
1432        {   0x19,  5 },
1433        {   0x3B,  6 }
1434    },
1435    { /* AC bias group 1, table 13 */
1436        {    0x4,  3 },
1437        {    0x4,  4 },
1438        {   0x3F,  6 },
1439        {   0x17,  5 },
1440        {   0x75,  7 },
1441        {  0x1F5,  9 },
1442        {  0x7D1, 11 },
1443        {   0x17,  6 },
1444        {  0x1F6,  9 },
1445        {    0x1,  3 },
1446        {    0x0,  3 },
1447        {   0x1B,  5 },
1448        {   0x1A,  5 },
1449        {    0xA,  5 },
1450        {   0x32,  6 },
1451        {   0x74,  7 },
1452        {   0xF8,  8 },
1453        {   0xF9,  8 },
1454        {  0x1F7,  9 },
1455        {  0x3E9, 10 },
1456        {  0xFA0, 12 },
1457        { 0x1F43, 13 },
1458        { 0x1F42, 13 },
1459        {    0x3,  3 },
1460        {    0xA,  4 },
1461        {   0x1E,  5 },
1462        {   0x1C,  5 },
1463        {   0x3B,  6 },
1464        {   0x18,  5 },
1465        {   0x16,  6 },
1466        {   0x16,  5 },
1467        {   0x33,  6 }
1468    },
1469    { /* AC bias group 1, table 14 */
1470        {    0x4,  3 },
1471        {    0x7,  4 },
1472        {   0x18,  5 },
1473        {   0x1E,  5 },
1474        {   0x36,  6 },
1475        {   0x31,  7 },
1476        {  0x177,  9 },
1477        {   0x77,  7 },
1478        {  0x176,  9 },
1479        {    0x1,  3 },
1480        {    0x0,  3 },
1481        {   0x1A,  5 },
1482        {   0x19,  5 },
1483        {   0x3A,  6 },
1484        {   0x19,  6 },
1485        {   0x5C,  7 },
1486        {   0xBA,  8 },
1487        {   0x61,  8 },
1488        {   0xC1,  9 },
1489        {  0x180, 10 },
1490        {  0x302, 11 },
1491        {  0x607, 12 },
1492        {  0x606, 12 },
1493        {    0x2,  3 },
1494        {    0xA,  4 },
1495        {   0x1F,  5 },
1496        {   0x1C,  5 },
1497        {   0x37,  6 },
1498        {   0x16,  5 },
1499        {   0x76,  7 },
1500        {    0xD,  5 },
1501        {   0x2F,  6 }
1502    },
1503    { /* AC bias group 1, table 15 */
1504        {    0x0,  3 },
1505        {    0xA,  4 },
1506        {   0x1A,  5 },
1507        {    0xC,  4 },
1508        {   0x1D,  5 },
1509        {   0x39,  6 },
1510        {   0x78,  7 },
1511        {   0x5E,  7 },
1512        {  0x393, 11 },
1513        {    0x2,  3 },
1514        {    0x1,  3 },
1515        {   0x16,  5 },
1516        {    0xF,  5 },
1517        {   0x2E,  6 },
1518        {   0x5F,  7 },
1519        {   0x73,  8 },
1520        {   0xE5,  9 },
1521        {  0x1C8, 10 },
1522        {  0xE4A, 13 },
1523        { 0x1C97, 14 },
1524        { 0x1C96, 14 },
1525        {  0xE49, 13 },
1526        {  0xE48, 13 },
1527        {    0x4,  3 },
1528        {    0x6,  4 },
1529        {   0x1F,  5 },
1530        {   0x1B,  5 },
1531        {   0x1D,  6 },
1532        {   0x38,  6 },
1533        {   0x38,  7 },
1534        {   0x3D,  6 },
1535        {   0x79,  7 }
1536    }
1537};
1538
1539static const uint16_t ac_bias_1[16][32][2] = {
1540    { /* AC bias group 2, table 0 */
1541        {    0xB,  5 },
1542        {   0x2B,  7 },
1543        {   0x54,  8 },
1544        {  0x1B7,  9 },
1545        {  0x6D9, 11 },
1546        {  0xDB1, 12 },
1547        {  0xDB0, 12 },
1548        {    0x2,  4 },
1549        {   0xAB,  9 },
1550        {    0x9,  4 },
1551        {    0xA,  4 },
1552        {    0x7,  4 },
1553        {    0x8,  4 },
1554        {    0xF,  4 },
1555        {    0xC,  4 },
1556        {    0x3,  4 },
1557        {   0x1D,  5 },
1558        {    0x4,  4 },
1559        {    0xB,  4 },
1560        {    0x6,  4 },
1561        {   0x1A,  5 },
1562        {    0x3,  6 },
1563        {   0xAA,  9 },
1564        {    0x1,  4 },
1565        {    0x0,  5 },
1566        {   0x14,  6 },
1567        {   0x6C,  7 },
1568        {   0xDA,  8 },
1569        {    0x2,  6 },
1570        {  0x36D, 10 },
1571        {   0x1C,  5 },
1572        {   0x37,  6 }
1573    },
1574    { /* AC bias group 2, table 1 */
1575        {   0x1D,  5 },
1576        {    0x4,  6 },
1577        {   0xB6,  8 },
1578        {   0x6A,  8 },
1579        {  0x5B9, 11 },
1580        { 0x16E1, 13 },
1581        { 0x16E0, 13 },
1582        {    0x7,  4 },
1583        {  0x16F,  9 },
1584        {    0xC,  4 },
1585        {    0xD,  4 },
1586        {    0x9,  4 },
1587        {    0x8,  4 },
1588        {    0xF,  4 },
1589        {    0xA,  4 },
1590        {    0x3,  4 },
1591        {   0x17,  5 },
1592        {    0x2,  4 },
1593        {    0x4,  4 },
1594        {   0x1C,  5 },
1595        {   0x2C,  6 },
1596        {   0x6B,  8 },
1597        {  0xB71, 12 },
1598        {    0x5,  4 },
1599        {    0x3,  5 },
1600        {   0x1B,  6 },
1601        {   0x5A,  7 },
1602        {   0x34,  7 },
1603        {    0x5,  6 },
1604        {  0x2DD, 10 },
1605        {    0x0,  4 },
1606        {    0xC,  5 }
1607    },
1608    { /* AC bias group 2, table 2 */
1609        {    0x3,  4 },
1610        {   0x7F,  7 },
1611        {   0xA1,  8 },
1612        {   0xA0,  8 },
1613        {  0x20C, 10 },
1614        {  0x834, 12 },
1615        { 0x106B, 13 },
1616        {    0x7,  4 },
1617        {   0x82,  8 },
1618        {    0xE,  4 },
1619        {    0xD,  4 },
1620        {    0xB,  4 },
1621        {    0xC,  4 },
1622        {    0x0,  3 },
1623        {    0x9,  4 },
1624        {    0x2,  4 },
1625        {   0x11,  5 },
1626        {   0x1E,  5 },
1627        {   0x15,  5 },
1628        {   0x3E,  6 },
1629        {   0x40,  7 },
1630        {  0x41B, 11 },
1631        { 0x106A, 13 },
1632        {    0x6,  4 },
1633        {    0xA,  5 },
1634        {   0x29,  6 },
1635        {   0x7E,  7 },
1636        {   0x51,  7 },
1637        {   0x21,  6 },
1638        {  0x107,  9 },
1639        {    0x4,  4 },
1640        {    0xB,  5 }
1641    },
1642    { /* AC bias group 2, table 3 */
1643        {    0x7,  4 },
1644        {   0x1B,  6 },
1645        {   0xF6,  8 },
1646        {   0xE9,  8 },
1647        {  0x3A1, 10 },
1648        {  0x740, 11 },
1649        {  0xE82, 12 },
1650        {   0x1F,  5 },
1651        {  0x1EF,  9 },
1652        {    0x1,  3 },
1653        {    0x2,  3 },
1654        {    0xB,  4 },
1655        {    0xC,  4 },
1656        {    0xD,  4 },
1657        {    0x8,  4 },
1658        {   0x1C,  5 },
1659        {    0x3,  5 },
1660        {   0x12,  5 },
1661        {    0x2,  5 },
1662        {   0x75,  7 },
1663        {  0x1D1,  9 },
1664        { 0x1D07, 13 },
1665        { 0x1D06, 13 },
1666        {    0xA,  4 },
1667        {   0x13,  5 },
1668        {   0x3B,  6 },
1669        {   0x1A,  6 },
1670        {   0x7A,  7 },
1671        {   0x3C,  6 },
1672        {  0x1EE,  9 },
1673        {    0x0,  4 },
1674        {    0xC,  5 }
1675    },
1676    { /* AC bias group 2, table 4 */
1677        {    0xD,  4 },
1678        {   0x3D,  6 },
1679        {   0x42,  7 },
1680        {   0x37,  7 },
1681        {   0xD9,  9 },
1682        {  0x362, 11 },
1683        {  0x6C6, 12 },
1684        {   0x1F,  5 },
1685        {   0x86,  8 },
1686        {    0x1,  3 },
1687        {    0x2,  3 },
1688        {    0xC,  4 },
1689        {    0xB,  4 },
1690        {    0xA,  4 },
1691        {    0x1,  4 },
1692        {    0xF,  5 },
1693        {   0x25,  6 },
1694        {   0x3C,  6 },
1695        {   0x1A,  6 },
1696        {   0x87,  8 },
1697        {  0x1B0, 10 },
1698        {  0xD8F, 13 },
1699        {  0xD8E, 13 },
1700        {    0xE,  4 },
1701        {   0x13,  5 },
1702        {    0xC,  5 },
1703        {   0x24,  6 },
1704        {   0x20,  6 },
1705        {   0x11,  5 },
1706        {   0x6D,  8 },
1707        {    0x0,  4 },
1708        {    0xE,  5 }
1709    },
1710    { /* AC bias group 2, table 5 */
1711        {    0x0,  3 },
1712        {   0x12,  5 },
1713        {   0x76,  7 },
1714        {   0x77,  7 },
1715        {  0x14D,  9 },
1716        {  0x533, 11 },
1717        { 0x14C9, 13 },
1718        {   0x13,  5 },
1719        {   0xA5,  8 },
1720        {    0x2,  3 },
1721        {    0x3,  3 },
1722        {    0xB,  4 },
1723        {    0xC,  4 },
1724        {    0x8,  4 },
1725        {   0x1A,  5 },
1726        {   0x2B,  6 },
1727        {   0x75,  7 },
1728        {   0x74,  7 },
1729        {   0xA7,  8 },
1730        {  0x298, 10 },
1731        { 0x14C8, 13 },
1732        { 0x14CB, 13 },
1733        { 0x14CA, 13 },
1734        {    0xF,  4 },
1735        {   0x1C,  5 },
1736        {    0x7,  5 },
1737        {   0x2A,  6 },
1738        {   0x28,  6 },
1739        {   0x1B,  5 },
1740        {   0xA4,  8 },
1741        {    0x2,  4 },
1742        {    0x6,  5 }
1743    },
1744    { /* AC bias group 2, table 6 */
1745        {    0x2,  3 },
1746        {   0x1A,  5 },
1747        {   0x2B,  6 },
1748        {   0x3A,  6 },
1749        {   0xED,  8 },
1750        {  0x283, 10 },
1751        {  0xA0A, 12 },
1752        {    0x4,  5 },
1753        {   0xA1,  8 },
1754        {    0x4,  3 },
1755        {    0x3,  3 },
1756        {    0xB,  4 },
1757        {    0xC,  4 },
1758        {   0x1F,  5 },
1759        {    0x6,  5 },
1760        {   0x77,  7 },
1761        {   0xA3,  8 },
1762        {   0xA2,  8 },
1763        {  0x140,  9 },
1764        { 0x1417, 13 },
1765        { 0x1416, 13 },
1766        {  0xA09, 12 },
1767        {  0xA08, 12 },
1768        {    0x0,  3 },
1769        {   0x1E,  5 },
1770        {    0x7,  5 },
1771        {   0x2A,  6 },
1772        {   0x29,  6 },
1773        {   0x1C,  5 },
1774        {   0xEC,  8 },
1775        {   0x1B,  5 },
1776        {    0x5,  5 }
1777    },
1778    { /* AC bias group 2, table 7 */
1779        {    0x2,  3 },
1780        {    0x2,  4 },
1781        {   0x18,  5 },
1782        {   0x1D,  5 },
1783        {   0x35,  6 },
1784        {   0xE4,  8 },
1785        {  0x1CF, 11 },
1786        {   0x1D,  7 },
1787        {   0x72,  9 },
1788        {    0x4,  3 },
1789        {    0x5,  3 },
1790        {    0x6,  4 },
1791        {    0x7,  4 },
1792        {    0x6,  5 },
1793        {   0x73,  7 },
1794        {   0x38,  8 },
1795        {  0x1CE, 11 },
1796        {  0x39B, 12 },
1797        {  0x398, 12 },
1798        {  0x733, 13 },
1799        {  0x732, 13 },
1800        {  0x735, 13 },
1801        {  0x734, 13 },
1802        {    0x0,  3 },
1803        {   0x1F,  5 },
1804        {   0x1B,  5 },
1805        {   0x34,  6 },
1806        {    0xF,  6 },
1807        {   0x1E,  5 },
1808        {   0xE5,  8 },
1809        {   0x19,  5 },
1810        {   0x38,  6 }
1811    },
1812    { /* AC bias group 2, table 8 */
1813        {   0x16,  5 },
1814        {   0x50,  7 },
1815        {  0x172,  9 },
1816        {  0x2E7, 10 },
1817        { 0x1732, 13 },
1818        { 0x2E67, 14 },
1819        { 0x2E66, 14 },
1820        {    0x6,  4 },
1821        {   0x51,  7 },
1822        {    0x1,  3 },
1823        {    0x0,  3 },
1824        {    0xD,  4 },
1825        {    0xC,  4 },
1826        {    0x9,  4 },
1827        {   0x1C,  5 },
1828        {    0x9,  5 },
1829        {   0x1C,  6 },
1830        {   0x1D,  6 },
1831        {   0x5D,  7 },

Large files files are truncated, but you can click here to view the full file