static av_cold void init_coef_vlc(VLC *vlc, uint16_t **prun_table,

                                  float **plevel_table, uint16_t **pint_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, *int_table;

    float *flevel_table;

    int i, l, j, k, level;



    init_vlc(vlc, VLCBITS, n, table_bits, 1, 1, table_codes, 4, 4, 0);



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

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

    flevel_table = av_malloc(n * sizeof(*flevel_table));

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

    i            = 2;

    level        = 1;

    k            = 0;

    while (i < n) {

        int_table[k] = i;

        l            = levels_table[k++];

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

            run_table[i]    = j;

            level_table[i]  = level;

            flevel_table[i] = level;

            i++;

        }

        level++;

    }

    *prun_table   = run_table;

    *plevel_table = flevel_table;

    *pint_table   = int_table;

    av_free(level_table);

}

static av_cold void init_coef_vlc(VLC *vlc, uint16_t **prun_table,

                                  float **plevel_table, uint16_t **pint_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, *int_table;

    float *flevel_table;

    int i, l, j, k, level;



    init_vlc(vlc, VLCBITS, n, table_bits, 1, 1, table_codes, 4, 4, 0);



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

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

    flevel_table = av_malloc(n * sizeof(*flevel_table));

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

    i            = 2;

    level        = 1;

    k            = 0;

    while (i < n) {

        int_table[k] = i;

        l            = levels_table[k++];

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

            run_table[i]    = j;

            level_table[i]  = level;

            flevel_table[i] = level;

            i++;

        }

        level++;

    }

    *prun_table   = run_table;

    *plevel_table = flevel_table;

    *pint_table   = int_table;

    av_free(level_table);

}

static av_cold void FUNC_0(VLC *vlc, uint16_t **prun_table,

                                  float **plevel_table, uint16_t **pint_table,

                                  const CoefVLCTable *vlc_table)

{

    int VAR_0                        = vlc_table->VAR_0;

    const uint8_t  *VAR_1   = vlc_table->huffbits;

    const uint32_t *VAR_2  = vlc_table->huffcodes;

    const uint16_t *VAR_3 = vlc_table->levels;

    uint16_t *run_table, *level_table, *int_table;

    float *VAR_4;

    int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;



    init_vlc(vlc, VLCBITS, VAR_0, VAR_1, 1, 1, VAR_2, 4, 4, 0);



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

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

    VAR_4 = av_malloc(VAR_0 * sizeof(*VAR_4));

    int_table    = av_malloc(VAR_0 * sizeof(uint16_t));

    VAR_5            = 2;

    VAR_9        = 1;

    VAR_8            = 0;

    while (VAR_5 < VAR_0) {

        int_table[VAR_8] = VAR_5;

        VAR_6            = VAR_3[VAR_8++];

        for (VAR_7 = 0; VAR_7 < VAR_6; VAR_7++) {

            run_table[VAR_5]    = VAR_7;

            level_table[VAR_5]  = VAR_9;

            VAR_4[VAR_5] = VAR_9;

            VAR_5++;

        }

        VAR_9++;

    }

    *prun_table   = run_table;

    *plevel_table = VAR_4;

    *pint_table   = int_table;

    av_free(level_table);

}

static av_cold void FUNC_0(VLC *vlc, uint16_t **prun_table,
float **plevel_table, uint16_t **pint_table,
const CoefVLCTable *vlc_table)
{ int VAR_0                        = vlc_table->VAR_0; const uint8_t  *VAR_1   = vlc_table->huffbits; const uint32_t *VAR_2  = vlc_table->huffcodes; const uint16_t *VAR_3 = vlc_table->levels; uint16_t *run_table, *level_table, *int_table; float *VAR_4; int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9; init_vlc(vlc, VLCBITS, VAR_0, VAR_1, 1, 1, VAR_2, 4, 4, 0); run_table    = av_malloc(VAR_0 * sizeof(uint16_t)); level_table  = av_malloc(VAR_0 * sizeof(uint16_t)); VAR_4 = av_malloc(VAR_0 * sizeof(*VAR_4)); int_table    = av_malloc(VAR_0 * sizeof(uint16_t)); VAR_5            = 2; VAR_9        = 1; VAR_8            = 0; while (VAR_5 < VAR_0) { int_table[VAR_8] = VAR_5; VAR_6            = VAR_3[VAR_8++]; for (VAR_7 = 0; VAR_7 < VAR_6; VAR_7++) { run_table[VAR_5]    = VAR_7; level_table[VAR_5]  = VAR_9; VAR_4[VAR_5] = VAR_9; VAR_5++; } VAR_9++; } *prun_table   = run_table; *plevel_table = VAR_4; *pint_table   = int_table; av_free(level_table); }