yuv2rgba64_full_X_c_template(SwsContext *c, const int16_t *lumFilter,

                       const int32_t **lumSrc, int lumFilterSize,

                       const int16_t *chrFilter, const int32_t **chrUSrc,

                       const int32_t **chrVSrc, int chrFilterSize,

                       const int32_t **alpSrc, uint16_t *dest, int dstW,

                       int y, enum AVPixelFormat target, int hasAlpha, int eightbytes)

{

    int i;

    int A = 0xffff<<14;



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

        int j;

        int Y  = -0x40000000;

        int U  = -128 << 23; // 19

        int V  = -128 << 23;

        int R, G, B;



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

            Y += lumSrc[j][i]  * (unsigned)lumFilter[j];

        }

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

            U += chrUSrc[j][i] * (unsigned)chrFilter[j];

            V += chrVSrc[j][i] * (unsigned)chrFilter[j];

        }



        if (hasAlpha) {

            A = -0x40000000;

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

                A += alpSrc[j][i] * (unsigned)lumFilter[j];

            }

            A >>= 1;

            A += 0x20002000;

        }



        // 8bit: 12+15=27; 16-bit: 12+19=31

        Y  >>= 14; // 10

        Y += 0x10000;

        U  >>= 14;

        V  >>= 14;



        // 8bit: 27 -> 17bit, 16bit: 31 - 14 = 17bit

        Y -= c->yuv2rgb_y_offset;

        Y *= c->yuv2rgb_y_coeff;

        Y += 1 << 13; // 21

        // 8bit: 17 + 13bit = 30bit, 16bit: 17 + 13bit = 30bit



        R = V * c->yuv2rgb_v2r_coeff;

        G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;

        B =                            U * c->yuv2rgb_u2b_coeff;



        // 8bit: 30 - 22 = 8bit, 16bit: 30bit - 14 = 16bit

        output_pixel(&dest[0], av_clip_uintp2(R_B + Y, 30) >> 14);

        output_pixel(&dest[1], av_clip_uintp2(  G + Y, 30) >> 14);

        output_pixel(&dest[2], av_clip_uintp2(B_R + Y, 30) >> 14);

        if (eightbytes) {

            output_pixel(&dest[3], av_clip_uintp2(A, 30) >> 14);

            dest += 4;

        } else {

            dest += 3;

        }

    }

}

yuv2rgba64_full_X_c_template(SwsContext *c, const int16_t *lumFilter,

                       const int32_t **lumSrc, int lumFilterSize,

                       const int16_t *chrFilter, const int32_t **chrUSrc,

                       const int32_t **chrVSrc, int chrFilterSize,

                       const int32_t **alpSrc, uint16_t *dest, int dstW,

                       int y, enum AVPixelFormat target, int hasAlpha, int eightbytes)

{

    int i;

    int A = 0xffff<<14;



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

        int j;

        int Y  = -0x40000000;

        int U  = -128 << 23; 

        int V  = -128 << 23;

        int R, G, B;



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

            Y += lumSrc[j][i]  * (unsigned)lumFilter[j];

        }

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

            U += chrUSrc[j][i] * (unsigned)chrFilter[j];

            V += chrVSrc[j][i] * (unsigned)chrFilter[j];

        }



        if (hasAlpha) {

            A = -0x40000000;

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

                A += alpSrc[j][i] * (unsigned)lumFilter[j];

            }

            A >>= 1;

            A += 0x20002000;

        }



        

        Y  >>= 14; 

        Y += 0x10000;

        U  >>= 14;

        V  >>= 14;



        

        Y -= c->yuv2rgb_y_offset;

        Y *= c->yuv2rgb_y_coeff;

        Y += 1 << 13; 

        



        R = V * c->yuv2rgb_v2r_coeff;

        G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;

        B =                            U * c->yuv2rgb_u2b_coeff;



        

        output_pixel(&dest[0], av_clip_uintp2(R_B + Y, 30) >> 14);

        output_pixel(&dest[1], av_clip_uintp2(  G + Y, 30) >> 14);

        output_pixel(&dest[2], av_clip_uintp2(B_R + Y, 30) >> 14);

        if (eightbytes) {

            output_pixel(&dest[3], av_clip_uintp2(A, 30) >> 14);

            dest += 4;

        } else {

            dest += 3;

        }

    }

}

FUNC_0(SwsContext *VAR_0, const int16_t *VAR_1,

                       const int32_t **VAR_2, int VAR_3,

                       const int16_t *VAR_4, const int32_t **VAR_5,

                       const int32_t **VAR_6, int VAR_7,

                       const int32_t **VAR_8, uint16_t *VAR_9, int VAR_10,

                       int VAR_11, enum AVPixelFormat VAR_12, int VAR_13, int VAR_14)

{

    int VAR_15;

    int VAR_16 = 0xffff<<14;



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

        int VAR_17;

        int VAR_18  = -0x40000000;

        int VAR_19  = -128 << 23; 

        int VAR_20  = -128 << 23;

        int VAR_21, VAR_22, VAR_23;



        for (VAR_17 = 0; VAR_17 < VAR_3; VAR_17++) {

            VAR_18 += VAR_2[VAR_17][VAR_15]  * (unsigned)VAR_1[VAR_17];

        }

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

            VAR_19 += VAR_5[VAR_17][VAR_15] * (unsigned)VAR_4[VAR_17];

            VAR_20 += VAR_6[VAR_17][VAR_15] * (unsigned)VAR_4[VAR_17];

        }



        if (VAR_13) {

            VAR_16 = -0x40000000;

            for (VAR_17 = 0; VAR_17 < VAR_3; VAR_17++) {

                VAR_16 += VAR_8[VAR_17][VAR_15] * (unsigned)VAR_1[VAR_17];

            }

            VAR_16 >>= 1;

            VAR_16 += 0x20002000;

        }



        

        VAR_18  >>= 14; 

        VAR_18 += 0x10000;

        VAR_19  >>= 14;

        VAR_20  >>= 14;



        

        VAR_18 -= VAR_0->yuv2rgb_y_offset;

        VAR_18 *= VAR_0->yuv2rgb_y_coeff;

        VAR_18 += 1 << 13; 

        



        VAR_21 = VAR_20 * VAR_0->yuv2rgb_v2r_coeff;

        VAR_22 = VAR_20 * VAR_0->yuv2rgb_v2g_coeff + VAR_19 * VAR_0->yuv2rgb_u2g_coeff;

        VAR_23 =                            VAR_19 * VAR_0->yuv2rgb_u2b_coeff;



        

        output_pixel(&VAR_9[0], av_clip_uintp2(R_B + VAR_18, 30) >> 14);

        output_pixel(&VAR_9[1], av_clip_uintp2(  VAR_22 + VAR_18, 30) >> 14);

        output_pixel(&VAR_9[2], av_clip_uintp2(B_R + VAR_18, 30) >> 14);

        if (VAR_14) {

            output_pixel(&VAR_9[3], av_clip_uintp2(VAR_16, 30) >> 14);

            VAR_9 += 4;

        } else {

            VAR_9 += 3;

        }

    }

}

FUNC_0(SwsContext *VAR_0, const int16_t *VAR_1,
const int32_t **VAR_2, int VAR_3,
const int16_t *VAR_4, const int32_t **VAR_5,
const int32_t **VAR_6, int VAR_7,
const int32_t **VAR_8, uint16_t *VAR_9, int VAR_10,
int VAR_11, enum AVPixelFormat VAR_12, int VAR_13, int VAR_14)
{ int VAR_15; int VAR_16 = 0xffff<<14; for (VAR_15 = 0; VAR_15 < VAR_10; VAR_15++) { int VAR_17; int VAR_18  = -0x40000000; int VAR_19  = -128 << 23; int VAR_20  = -128 << 23; int VAR_21, VAR_22, VAR_23; for (VAR_17 = 0; VAR_17 < VAR_3; VAR_17++) { VAR_18 += VAR_2[VAR_17][VAR_15]  * (unsigned)VAR_1[VAR_17]; } for (VAR_17 = 0; VAR_17 < VAR_7; VAR_17++) {; VAR_19 += VAR_5[VAR_17][VAR_15] * (unsigned)VAR_4[VAR_17]; VAR_20 += VAR_6[VAR_17][VAR_15] * (unsigned)VAR_4[VAR_17]; } if (VAR_13) { VAR_16 = -0x40000000; for (VAR_17 = 0; VAR_17 < VAR_3; VAR_17++) { VAR_16 += VAR_8[VAR_17][VAR_15] * (unsigned)VAR_1[VAR_17]; } VAR_16 >>= 1; VAR_16 += 0x20002000; } VAR_18  >>= 14; VAR_18 += 0x10000; VAR_19  >>= 14; VAR_20  >>= 14; VAR_18 -= VAR_0->yuv2rgb_y_offset; VAR_18 *= VAR_0->yuv2rgb_y_coeff; VAR_18 += 1 << 13; VAR_21 = VAR_20 * VAR_0->yuv2rgb_v2r_coeff; VAR_22 = VAR_20 * VAR_0->yuv2rgb_v2g_coeff + VAR_19 * VAR_0->yuv2rgb_u2g_coeff; VAR_23 =                            VAR_19 * VAR_0->yuv2rgb_u2b_coeff; output_pixel(&VAR_9[0], av_clip_uintp2(R_B + VAR_18, 30) >> 14); output_pixel(&VAR_9[1], av_clip_uintp2(  VAR_22 + VAR_18, 30) >> 14); output_pixel(&VAR_9[2], av_clip_uintp2(B_R + VAR_18, 30) >> 14); if (VAR_14) { output_pixel(&VAR_9[3], av_clip_uintp2(VAR_16, 30) >> 14); VAR_9 += 4; } else { VAR_9 += 3; } } }