yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0,

                     const int16_t *ubuf[2], const int16_t *vbuf[2],

                     const int16_t *abuf0, uint8_t *dest, int dstW,

                     int uvalpha, int y, enum PixelFormat target,

                     int hasAlpha)

{

    const int16_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0];

    int i;



    if (uvalpha < 2048) {

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

            int Y1 = (buf0[i * 2    ] + 64) >> 7;

            int Y2 = (buf0[i * 2 + 1] + 64) >> 7;

            int U  = (ubuf0[i]        + 64) >> 7;

            int V  = (vbuf0[i]        + 64) >> 7;

            int A1, A2;

            const void *r =  c->table_rV[V + YUVRGB_TABLE_HEADROOM],

                       *g = (c->table_gU[U + YUVRGB_TABLE_HEADROOM] + c->table_gV[V + YUVRGB_TABLE_HEADROOM]),

                       *b =  c->table_bU[U + YUVRGB_TABLE_HEADROOM];



            if (hasAlpha) {

                A1 = (abuf0[i * 2    ] + 64) >> 7;

                A2 = (abuf0[i * 2 + 1] + 64) >> 7;

            }



            yuv2rgb_write(dest, i, Y1, Y2, hasAlpha ? A1 : 0, hasAlpha ? A2 : 0,

                          r, g, b, y, target, hasAlpha);

        }

    } else {

        const int16_t *ubuf1 = ubuf[1], *vbuf1 = vbuf[1];

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

            int Y1 = (buf0[i * 2    ]     +  64) >> 7;

            int Y2 = (buf0[i * 2 + 1]     +  64) >> 7;

            int U  = (ubuf0[i] + ubuf1[i] + 128) >> 8;

            int V  = (vbuf0[i] + vbuf1[i] + 128) >> 8;

            int A1, A2;

            const void *r =  c->table_rV[V + YUVRGB_TABLE_HEADROOM],

                       *g = (c->table_gU[U + YUVRGB_TABLE_HEADROOM] + c->table_gV[V + YUVRGB_TABLE_HEADROOM]),

                       *b =  c->table_bU[U + YUVRGB_TABLE_HEADROOM];



            if (hasAlpha) {

                A1 = (abuf0[i * 2    ] + 64) >> 7;

                A2 = (abuf0[i * 2 + 1] + 64) >> 7;

            }



            yuv2rgb_write(dest, i, Y1, Y2, hasAlpha ? A1 : 0, hasAlpha ? A2 : 0,

                          r, g, b, y, target, hasAlpha);

        }

    }

}

yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0,

                     const int16_t *ubuf[2], const int16_t *vbuf[2],

                     const int16_t *abuf0, uint8_t *dest, int dstW,

                     int uvalpha, int y, enum PixelFormat target,

                     int hasAlpha)

{

    const int16_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0];

    int i;



    if (uvalpha < 2048) {

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

            int Y1 = (buf0[i * 2    ] + 64) >> 7;

            int Y2 = (buf0[i * 2 + 1] + 64) >> 7;

            int U  = (ubuf0[i]        + 64) >> 7;

            int V  = (vbuf0[i]        + 64) >> 7;

            int A1, A2;

            const void *r =  c->table_rV[V + YUVRGB_TABLE_HEADROOM],

                       *g = (c->table_gU[U + YUVRGB_TABLE_HEADROOM] + c->table_gV[V + YUVRGB_TABLE_HEADROOM]),

                       *b =  c->table_bU[U + YUVRGB_TABLE_HEADROOM];



            if (hasAlpha) {

                A1 = (abuf0[i * 2    ] + 64) >> 7;

                A2 = (abuf0[i * 2 + 1] + 64) >> 7;

            }



            yuv2rgb_write(dest, i, Y1, Y2, hasAlpha ? A1 : 0, hasAlpha ? A2 : 0,

                          r, g, b, y, target, hasAlpha);

        }

    } else {

        const int16_t *ubuf1 = ubuf[1], *vbuf1 = vbuf[1];

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

            int Y1 = (buf0[i * 2    ]     +  64) >> 7;

            int Y2 = (buf0[i * 2 + 1]     +  64) >> 7;

            int U  = (ubuf0[i] + ubuf1[i] + 128) >> 8;

            int V  = (vbuf0[i] + vbuf1[i] + 128) >> 8;

            int A1, A2;

            const void *r =  c->table_rV[V + YUVRGB_TABLE_HEADROOM],

                       *g = (c->table_gU[U + YUVRGB_TABLE_HEADROOM] + c->table_gV[V + YUVRGB_TABLE_HEADROOM]),

                       *b =  c->table_bU[U + YUVRGB_TABLE_HEADROOM];



            if (hasAlpha) {

                A1 = (abuf0[i * 2    ] + 64) >> 7;

                A2 = (abuf0[i * 2 + 1] + 64) >> 7;

            }



            yuv2rgb_write(dest, i, Y1, Y2, hasAlpha ? A1 : 0, hasAlpha ? A2 : 0,

                          r, g, b, y, target, hasAlpha);

        }

    }

}

                A1 = (abuf0[i * 2    ] + 64) >> 7;                 A2 = (abuf0[i * 2 + 1] + 64) >> 7;
FUNC_0(SwsContext *VAR_0, const int16_t *VAR_1,

                     const int16_t *VAR_2[2], const int16_t *VAR_3[2],

                     const int16_t *VAR_4, uint8_t *VAR_5, int VAR_6,

                     int VAR_7, int VAR_8, enum PixelFormat VAR_9,

                     int VAR_10)

{

    const int16_t *VAR_11 = VAR_2[0], *vbuf0 = VAR_3[0];

    int VAR_12;



    if (VAR_7 < 2048) {

        for (VAR_12 = 0; VAR_12 < (VAR_6 >> 1); VAR_12++) {

            int VAR_23 = (VAR_1[VAR_12 * 2    ] + 64) >> 7;

            int VAR_23 = (VAR_1[VAR_12 * 2 + 1] + 64) >> 7;

            int VAR_23  = (VAR_11[VAR_12]        + 64) >> 7;

            int VAR_23  = (vbuf0[VAR_12]        + 64) >> 7;

            int VAR_23, VAR_23;

            const void *VAR_23 =  VAR_0->table_rV[VAR_23 + YUVRGB_TABLE_HEADROOM],

                       *VAR_23 = (VAR_0->table_gU[VAR_23 + YUVRGB_TABLE_HEADROOM] + VAR_0->table_gV[VAR_23 + YUVRGB_TABLE_HEADROOM]),

                       *VAR_23 =  VAR_0->table_bU[VAR_23 + YUVRGB_TABLE_HEADROOM];



            if (VAR_10) {

                VAR_23 = (VAR_4[VAR_12 * 2    ] + 64) >> 7;

                VAR_23 = (VAR_4[VAR_12 * 2 + 1] + 64) >> 7;

            }



            yuv2rgb_write(VAR_5, VAR_12, VAR_23, VAR_23, VAR_10 ? VAR_23 : 0, VAR_10 ? VAR_23 : 0,

                          VAR_23, VAR_23, VAR_23, VAR_8, VAR_9, VAR_10);

        }

    } else {

        const int16_t *VAR_22 = VAR_2[1], *vbuf1 = VAR_3[1];

        for (VAR_12 = 0; VAR_12 < (VAR_6 >> 1); VAR_12++) {

            int VAR_23 = (VAR_1[VAR_12 * 2    ]     +  64) >> 7;

            int VAR_23 = (VAR_1[VAR_12 * 2 + 1]     +  64) >> 7;

            int VAR_23  = (VAR_11[VAR_12] + VAR_22[VAR_12] + 128) >> 8;

            int VAR_23  = (vbuf0[VAR_12] + vbuf1[VAR_12] + 128) >> 8;

            int VAR_23, VAR_23;

            const void *VAR_23 =  VAR_0->table_rV[VAR_23 + YUVRGB_TABLE_HEADROOM],

                       *VAR_23 = (VAR_0->table_gU[VAR_23 + YUVRGB_TABLE_HEADROOM] + VAR_0->table_gV[VAR_23 + YUVRGB_TABLE_HEADROOM]),

                       *VAR_23 =  VAR_0->table_bU[VAR_23 + YUVRGB_TABLE_HEADROOM];



            if (VAR_10) {

                VAR_23 = (VAR_4[VAR_12 * 2    ] + 64) >> 7;

                VAR_23 = (VAR_4[VAR_12 * 2 + 1] + 64) >> 7;

            }



            yuv2rgb_write(VAR_5, VAR_12, VAR_23, VAR_23, VAR_10 ? VAR_23 : 0, VAR_10 ? VAR_23 : 0,

                          VAR_23, VAR_23, VAR_23, VAR_8, VAR_9, VAR_10);

        }

    }

}

FUNC_0(SwsContext *VAR_0, const int16_t *VAR_1,
const int16_t *VAR_2[2], const int16_t *VAR_3[2],
const int16_t *VAR_4, uint8_t *VAR_5, int VAR_6,
int VAR_7, int VAR_8, enum PixelFormat VAR_9,
int VAR_10)
{ const int16_t *VAR_11 = VAR_2[0], *vbuf0 = VAR_3[0]; int VAR_12; if (VAR_7 < 2048) { for (VAR_12 = 0; VAR_12 < (VAR_6 >> 1); VAR_12++) { int VAR_23 = (VAR_1[VAR_12 * 2    ] + 64) >> 7; int VAR_23 = (VAR_1[VAR_12 * 2 + 1] + 64) >> 7; int VAR_23  = (VAR_11[VAR_12]        + 64) >> 7; int VAR_23  = (vbuf0[VAR_12]        + 64) >> 7; int VAR_23, VAR_23; const void *VAR_23 =  VAR_0->table_rV[VAR_23 + YUVRGB_TABLE_HEADROOM],
*VAR_23 = (VAR_0->table_gU[VAR_23 + YUVRGB_TABLE_HEADROOM] + VAR_0->table_gV[VAR_23 + YUVRGB_TABLE_HEADROOM]),
*VAR_23 =  VAR_0->table_bU[VAR_23 + YUVRGB_TABLE_HEADROOM]; if (VAR_10) { VAR_23 = (VAR_4[VAR_12 * 2    ] + 64) >> 7; VAR_23 = (VAR_4[VAR_12 * 2 + 1] + 64) >> 7; } yuv2rgb_write(VAR_5, VAR_12, VAR_23, VAR_23, VAR_10 ? VAR_23 : 0, VAR_10 ? VAR_23 : 0,
VAR_23, VAR_23, VAR_23, VAR_8, VAR_9, VAR_10); } } else { const int16_t *VAR_22 = VAR_2[1], *vbuf1 = VAR_3[1]; for (VAR_12 = 0; VAR_12 < (VAR_6 >> 1); VAR_12++) { int VAR_23 = (VAR_1[VAR_12 * 2    ]     +  64) >> 7; int VAR_23 = (VAR_1[VAR_12 * 2 + 1]     +  64) >> 7; int VAR_23  = (VAR_11[VAR_12] + VAR_22[VAR_12] + 128) >> 8; int VAR_23  = (vbuf0[VAR_12] + vbuf1[VAR_12] + 128) >> 8; int VAR_23, VAR_23; const void *VAR_23 =  VAR_0->table_rV[VAR_23 + YUVRGB_TABLE_HEADROOM],
*VAR_23 = (VAR_0->table_gU[VAR_23 + YUVRGB_TABLE_HEADROOM] + VAR_0->table_gV[VAR_23 + YUVRGB_TABLE_HEADROOM]),
*VAR_23 =  VAR_0->table_bU[VAR_23 + YUVRGB_TABLE_HEADROOM]; if (VAR_10) { VAR_23 = (VAR_4[VAR_12 * 2    ] + 64) >> 7; VAR_23 = (VAR_4[VAR_12 * 2 + 1] + 64) >> 7; } yuv2rgb_write(VAR_5, VAR_12, VAR_23, VAR_23, VAR_10 ? VAR_23 : 0, VAR_10 ? VAR_23 : 0,
VAR_23, VAR_23, VAR_23, VAR_8, VAR_9, VAR_10); } } }