static void svq3_add_idct_c(uint8_t *dst, int16_t *block,

                            int stride, int qp, int dc)

{

    const int qmul = svq3_dequant_coeff[qp];

    int i;



    if (dc) {

        dc       = 13 * 13 * (dc == 1 ? 1538U* block[0]

                                      : qmul * (block[0] >> 3) / 2);

        block[0] = 0;

    }



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

        const int z0 = 13 * (block[0 + 4 * i] +      block[2 + 4 * i]);

        const int z1 = 13 * (block[0 + 4 * i] -      block[2 + 4 * i]);

        const int z2 =  7 *  block[1 + 4 * i] - 17 * block[3 + 4 * i];

        const int z3 = 17 *  block[1 + 4 * i] +  7 * block[3 + 4 * i];



        block[0 + 4 * i] = z0 + z3;

        block[1 + 4 * i] = z1 + z2;

        block[2 + 4 * i] = z1 - z2;

        block[3 + 4 * i] = z0 - z3;

    }



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

        const unsigned z0 = 13 * (block[i + 4 * 0] +      block[i + 4 * 2]);

        const unsigned z1 = 13 * (block[i + 4 * 0] -      block[i + 4 * 2]);

        const unsigned z2 =  7 *  block[i + 4 * 1] - 17 * block[i + 4 * 3];

        const unsigned z3 = 17 *  block[i + 4 * 1] +  7 * block[i + 4 * 3];

        const int rr = (dc + 0x80000);



        dst[i + stride * 0] = av_clip_uint8(dst[i + stride * 0] + ((int)((z0 + z3) * qmul + rr) >> 20));

        dst[i + stride * 1] = av_clip_uint8(dst[i + stride * 1] + ((int)((z1 + z2) * qmul + rr) >> 20));

        dst[i + stride * 2] = av_clip_uint8(dst[i + stride * 2] + ((int)((z1 - z2) * qmul + rr) >> 20));

        dst[i + stride * 3] = av_clip_uint8(dst[i + stride * 3] + ((int)((z0 - z3) * qmul + rr) >> 20));

    }



    memset(block, 0, 16 * sizeof(int16_t));

}

static void svq3_add_idct_c(uint8_t *dst, int16_t *block,

                            int stride, int qp, int dc)

{

    const int qmul = svq3_dequant_coeff[qp];

    int i;



    if (dc) {

        dc       = 13 * 13 * (dc == 1 ? 1538U* block[0]

                                      : qmul * (block[0] >> 3) / 2);

        block[0] = 0;

    }



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

        const int z0 = 13 * (block[0 + 4 * i] +      block[2 + 4 * i]);

        const int z1 = 13 * (block[0 + 4 * i] -      block[2 + 4 * i]);

        const int z2 =  7 *  block[1 + 4 * i] - 17 * block[3 + 4 * i];

        const int z3 = 17 *  block[1 + 4 * i] +  7 * block[3 + 4 * i];



        block[0 + 4 * i] = z0 + z3;

        block[1 + 4 * i] = z1 + z2;

        block[2 + 4 * i] = z1 - z2;

        block[3 + 4 * i] = z0 - z3;

    }



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

        const unsigned z0 = 13 * (block[i + 4 * 0] +      block[i + 4 * 2]);

        const unsigned z1 = 13 * (block[i + 4 * 0] -      block[i + 4 * 2]);

        const unsigned z2 =  7 *  block[i + 4 * 1] - 17 * block[i + 4 * 3];

        const unsigned z3 = 17 *  block[i + 4 * 1] +  7 * block[i + 4 * 3];

        const int rr = (dc + 0x80000);



        dst[i + stride * 0] = av_clip_uint8(dst[i + stride * 0] + ((int)((z0 + z3) * qmul + rr) >> 20));

        dst[i + stride * 1] = av_clip_uint8(dst[i + stride * 1] + ((int)((z1 + z2) * qmul + rr) >> 20));

        dst[i + stride * 2] = av_clip_uint8(dst[i + stride * 2] + ((int)((z1 - z2) * qmul + rr) >> 20));

        dst[i + stride * 3] = av_clip_uint8(dst[i + stride * 3] + ((int)((z0 - z3) * qmul + rr) >> 20));

    }



    memset(block, 0, 16 * sizeof(int16_t));

}

        const int rr = (dc + 0x80000);
static void FUNC_0(uint8_t *VAR_0, int16_t *VAR_1,

                            int VAR_2, int VAR_3, int VAR_4)

{

    const int VAR_5 = svq3_dequant_coeff[VAR_3];

    int VAR_6;



    if (VAR_4) {

        VAR_4       = 13 * 13 * (VAR_4 == 1 ? 1538U* VAR_1[0]

                                      : VAR_5 * (VAR_1[0] >> 3) / 2);

        VAR_1[0] = 0;

    }



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

        const int VAR_11 = 13 * (VAR_1[0 + 4 * VAR_6] +      VAR_1[2 + 4 * VAR_6]);

        const int VAR_11 = 13 * (VAR_1[0 + 4 * VAR_6] -      VAR_1[2 + 4 * VAR_6]);

        const int VAR_11 =  7 *  VAR_1[1 + 4 * VAR_6] - 17 * VAR_1[3 + 4 * VAR_6];

        const int VAR_11 = 17 *  VAR_1[1 + 4 * VAR_6] +  7 * VAR_1[3 + 4 * VAR_6];



        VAR_1[0 + 4 * VAR_6] = VAR_11 + VAR_11;

        VAR_1[1 + 4 * VAR_6] = VAR_11 + VAR_11;

        VAR_1[2 + 4 * VAR_6] = VAR_11 - VAR_11;

        VAR_1[3 + 4 * VAR_6] = VAR_11 - VAR_11;

    }



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

        const unsigned VAR_11 = 13 * (VAR_1[VAR_6 + 4 * 0] +      VAR_1[VAR_6 + 4 * 2]);

        const unsigned VAR_11 = 13 * (VAR_1[VAR_6 + 4 * 0] -      VAR_1[VAR_6 + 4 * 2]);

        const unsigned VAR_11 =  7 *  VAR_1[VAR_6 + 4 * 1] - 17 * VAR_1[VAR_6 + 4 * 3];

        const unsigned VAR_11 = 17 *  VAR_1[VAR_6 + 4 * 1] +  7 * VAR_1[VAR_6 + 4 * 3];

        const int VAR_11 = (VAR_4 + 0x80000);



        VAR_0[VAR_6 + VAR_2 * 0] = av_clip_uint8(VAR_0[VAR_6 + VAR_2 * 0] + ((int)((VAR_11 + VAR_11) * VAR_5 + VAR_11) >> 20));

        VAR_0[VAR_6 + VAR_2 * 1] = av_clip_uint8(VAR_0[VAR_6 + VAR_2 * 1] + ((int)((VAR_11 + VAR_11) * VAR_5 + VAR_11) >> 20));

        VAR_0[VAR_6 + VAR_2 * 2] = av_clip_uint8(VAR_0[VAR_6 + VAR_2 * 2] + ((int)((VAR_11 - VAR_11) * VAR_5 + VAR_11) >> 20));

        VAR_0[VAR_6 + VAR_2 * 3] = av_clip_uint8(VAR_0[VAR_6 + VAR_2 * 3] + ((int)((VAR_11 - VAR_11) * VAR_5 + VAR_11) >> 20));

    }



    memset(VAR_1, 0, 16 * sizeof(int16_t));

}

static void FUNC_0(uint8_t *VAR_0, int16_t *VAR_1,
int VAR_2, int VAR_3, int VAR_4)
{ const int VAR_5 = svq3_dequant_coeff[VAR_3]; int VAR_6; if (VAR_4) { VAR_4       = 13 * 13 * (VAR_4 == 1 ? 1538U* VAR_1[0]
: VAR_5 * (VAR_1[0] >> 3) / 2); VAR_1[0] = 0; } for (VAR_6 = 0; VAR_6 < 4; VAR_6++) { const int VAR_11 = 13 * (VAR_1[0 + 4 * VAR_6] +      VAR_1[2 + 4 * VAR_6]); const int VAR_11 = 13 * (VAR_1[0 + 4 * VAR_6] -      VAR_1[2 + 4 * VAR_6]); const int VAR_11 =  7 *  VAR_1[1 + 4 * VAR_6] - 17 * VAR_1[3 + 4 * VAR_6]; const int VAR_11 = 17 *  VAR_1[1 + 4 * VAR_6] +  7 * VAR_1[3 + 4 * VAR_6]; VAR_1[0 + 4 * VAR_6] = VAR_11 + VAR_11; VAR_1[1 + 4 * VAR_6] = VAR_11 + VAR_11; VAR_1[2 + 4 * VAR_6] = VAR_11 - VAR_11; VAR_1[3 + 4 * VAR_6] = VAR_11 - VAR_11; } for (VAR_6 = 0; VAR_6 < 4; VAR_6++) { const unsigned VAR_11 = 13 * (VAR_1[VAR_6 + 4 * 0] +      VAR_1[VAR_6 + 4 * 2]); const unsigned VAR_11 = 13 * (VAR_1[VAR_6 + 4 * 0] -      VAR_1[VAR_6 + 4 * 2]); const unsigned VAR_11 =  7 *  VAR_1[VAR_6 + 4 * 1] - 17 * VAR_1[VAR_6 + 4 * 3]; const unsigned VAR_11 = 17 *  VAR_1[VAR_6 + 4 * 1] +  7 * VAR_1[VAR_6 + 4 * 3]; const int VAR_11 = (VAR_4 + 0x80000); VAR_0[VAR_6 + VAR_2 * 0] = av_clip_uint8(VAR_0[VAR_6 + VAR_2 * 0] + ((int)((VAR_11 + VAR_11) * VAR_5 + VAR_11) >> 20)); VAR_0[VAR_6 + VAR_2 * 1] = av_clip_uint8(VAR_0[VAR_6 + VAR_2 * 1] + ((int)((VAR_11 + VAR_11) * VAR_5 + VAR_11) >> 20)); VAR_0[VAR_6 + VAR_2 * 2] = av_clip_uint8(VAR_0[VAR_6 + VAR_2 * 2] + ((int)((VAR_11 - VAR_11) * VAR_5 + VAR_11) >> 20)); VAR_0[VAR_6 + VAR_2 * 3] = av_clip_uint8(VAR_0[VAR_6 + VAR_2 * 3] + ((int)((VAR_11 - VAR_11) * VAR_5 + VAR_11) >> 20)); } memset(VAR_1, 0, 16 * sizeof(int16_t)); }