static void init_coef_vlc(VLC *vlc, 

                          uint16_t **prun_table, uint16_t **plevel_table,

                          const CoefVLCTable *vlc_table)

{

    int n = vlc_table->n;

    const uint8_t *table_bits = vlc_table->huffbits;

    const uint32_t *table_codes = vlc_table->huffcodes;

    const uint16_t *levels_table = vlc_table->levels;

    uint16_t *run_table, *level_table;

    const uint16_t *p;

    int i, l, j, level;



    init_vlc(vlc, 9, n, table_bits, 1, 1, table_codes, 4, 4);



    run_table = av_malloc(n * sizeof(uint16_t));

    level_table = av_malloc(n * sizeof(uint16_t));

    p = levels_table;

    i = 2;

    level = 1;

    while (i < n) {

        l = *p++;

        for(j=0;j<l;j++) {

            run_table[i] = j;

            level_table[i] = level;

            i++;

        }

        level++;

    }

    *prun_table = run_table;

    *plevel_table = level_table;

}

static void init_coef_vlc(VLC *vlc, 

                          uint16_t **prun_table, uint16_t **plevel_table,

                          const CoefVLCTable *vlc_table)

{

    int n = vlc_table->n;

    const uint8_t *table_bits = vlc_table->huffbits;

    const uint32_t *table_codes = vlc_table->huffcodes;

    const uint16_t *levels_table = vlc_table->levels;

    uint16_t *run_table, *level_table;

    const uint16_t *p;

    int i, l, j, level;



    init_vlc(vlc, 9, n, table_bits, 1, 1, table_codes, 4, 4);



    run_table = av_malloc(n * sizeof(uint16_t));

    level_table = av_malloc(n * sizeof(uint16_t));

    p = levels_table;

    i = 2;

    level = 1;

    while (i < n) {

        l = *p++;

        for(j=0;j<l;j++) {

            run_table[i] = j;

            level_table[i] = level;

            i++;

        }

        level++;

    }

    *prun_table = run_table;

    *plevel_table = level_table;

}

    init_vlc(vlc, 9, n, table_bits, 1, 1, table_codes, 4, 4);
static void FUNC_0(VLC *VAR_0, 

                          uint16_t **VAR_1, uint16_t **VAR_2,

                          const CoefVLCTable *VAR_3)

{

    int VAR_4 = VAR_3->VAR_4;

    const uint8_t *VAR_5 = VAR_3->huffbits;

    const uint32_t *VAR_6 = VAR_3->huffcodes;

    const uint16_t *VAR_7 = VAR_3->levels;

    uint16_t *run_table, *level_table;

    const uint16_t *VAR_8;

    int VAR_9, VAR_10, VAR_11, VAR_12;



    init_vlc(VAR_0, 9, VAR_4, VAR_5, 1, 1, VAR_6, 4, 4);



    run_table = av_malloc(VAR_4 * sizeof(uint16_t));

    level_table = av_malloc(VAR_4 * sizeof(uint16_t));

    VAR_8 = VAR_7;

    VAR_9 = 2;

    VAR_12 = 1;

    while (VAR_9 < VAR_4) {

        VAR_10 = *VAR_8++;

        for(VAR_11=0;VAR_11<VAR_10;VAR_11++) {

            run_table[VAR_9] = VAR_11;

            level_table[VAR_9] = VAR_12;

            VAR_9++;

        }

        VAR_12++;

    }

    *VAR_1 = run_table;

    *VAR_2 = level_table;

}

static void FUNC_0(VLC *VAR_0,
uint16_t **VAR_1, uint16_t **VAR_2,
const CoefVLCTable *VAR_3)
{ int VAR_4 = VAR_3->VAR_4; const uint8_t *VAR_5 = VAR_3->huffbits; const uint32_t *VAR_6 = VAR_3->huffcodes; const uint16_t *VAR_7 = VAR_3->levels; uint16_t *run_table, *level_table; const uint16_t *VAR_8; int VAR_9, VAR_10, VAR_11, VAR_12; init_vlc(VAR_0, 9, VAR_4, VAR_5, 1, 1, VAR_6, 4, 4); run_table = av_malloc(VAR_4 * sizeof(uint16_t)); level_table = av_malloc(VAR_4 * sizeof(uint16_t)); VAR_8 = VAR_7; VAR_9 = 2; VAR_12 = 1; while (VAR_9 < VAR_4) { VAR_10 = *VAR_8++; for(VAR_11=0;VAR_11<VAR_10;VAR_11++) { run_table[VAR_9] = VAR_11; level_table[VAR_9] = VAR_12; VAR_9++; } VAR_12++; } *VAR_1 = run_table; *VAR_2 = level_table; }