static void decode_scaling_list(GetBitContext *gb, uint8_t *factors, int size,

                                const uint8_t *jvt_list,

                                const uint8_t *fallback_list)

{

    int i, last = 8, next = 8;

    const uint8_t *scan = size == 16 ? ff_zigzag_scan : ff_zigzag_direct;

    if (!get_bits1(gb)) /* matrix not written, we use the predicted one */

        memcpy(factors, fallback_list, size * sizeof(uint8_t));

    else

        for (i = 0; i < size; i++) {

            if (next)

                next = (last + get_se_golomb(gb)) & 0xff;

            if (!i && !next) { /* matrix not written, we use the preset one */

                memcpy(factors, jvt_list, size * sizeof(uint8_t));

                break;

            }

            last = factors[scan[i]] = next ? next : last;

        }

}

static void decode_scaling_list(GetBitContext *gb, uint8_t *factors, int size,

                                const uint8_t *jvt_list,

                                const uint8_t *fallback_list)

{

    int i, last = 8, next = 8;

    const uint8_t *scan = size == 16 ? ff_zigzag_scan : ff_zigzag_direct;

    if (!get_bits1(gb)) 

        memcpy(factors, fallback_list, size * sizeof(uint8_t));

    else

        for (i = 0; i < size; i++) {

            if (next)

                next = (last + get_se_golomb(gb)) & 0xff;

            if (!i && !next) { 

                memcpy(factors, jvt_list, size * sizeof(uint8_t));

                break;

            }

            last = factors[scan[i]] = next ? next : last;

        }

}

            if (next)                 next = (last + get_se_golomb(gb)) & 0xff;
static void FUNC_0(GetBitContext *VAR_0, uint8_t *VAR_1, int VAR_2,

                                const uint8_t *VAR_3,

                                const uint8_t *VAR_4)

{

    int VAR_5, VAR_6 = 8, VAR_7 = 8;

    const uint8_t *VAR_8 = VAR_2 == 16 ? ff_zigzag_scan : ff_zigzag_direct;

    if (!get_bits1(VAR_0)) 

        memcpy(VAR_1, VAR_4, VAR_2 * sizeof(uint8_t));

    else

        for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++) {

            if (VAR_7)

                VAR_7 = (VAR_6 + get_se_golomb(VAR_0)) & 0xff;

            if (!VAR_5 && !VAR_7) { 

                memcpy(VAR_1, VAR_3, VAR_2 * sizeof(uint8_t));

                break;

            }

            VAR_6 = VAR_1[VAR_8[VAR_5]] = VAR_7 ? VAR_7 : VAR_6;

        }

}

static void FUNC_0(GetBitContext *VAR_0, uint8_t *VAR_1, int VAR_2,
const uint8_t *VAR_3,
const uint8_t *VAR_4)
{ int VAR_5, VAR_6 = 8, VAR_7 = 8; const uint8_t *VAR_8 = VAR_2 == 16 ? ff_zigzag_scan : ff_zigzag_direct; if (!get_bits1(VAR_0))
memcpy(VAR_1, VAR_4, VAR_2 * sizeof(uint8_t)); else
for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++) { if (VAR_7)
VAR_7 = (VAR_6 + get_se_golomb(VAR_0)) & 0xff; if (!VAR_5 && !VAR_7) { memcpy(VAR_1, VAR_3, VAR_2 * sizeof(uint8_t)); break; } VAR_6 = VAR_1[VAR_8[VAR_5]] = VAR_7 ? VAR_7 : VAR_6; } }