yuv2422_2_c_template(SwsContext *c, const int16_t *buf[2],
                     const int16_t *ubuf[2], const int16_t *vbuf[2],
                     const int16_t *abuf[2], uint8_t *dest, int dstW,
                     int yalpha, int uvalpha, int y,
                     enum PixelFormat target)
{
    const int16_t *buf0  = buf[0],  *buf1  = buf[1],
                  *ubuf0 = ubuf[0], *ubuf1 = ubuf[1],
                  *vbuf0 = vbuf[0], *vbuf1 = vbuf[1];
    int  yalpha1 = 4095 - yalpha;
    int uvalpha1 = 4095 - uvalpha;
    int i;
    for (i = 0; i < (dstW >> 1); i++) {
        int Y1 = (buf0[i * 2]     * yalpha1  + buf1[i * 2]     * yalpha)  >> 19;
        int Y2 = (buf0[i * 2 + 1] * yalpha1  + buf1[i * 2 + 1] * yalpha)  >> 19;
        int U  = (ubuf0[i]        * uvalpha1 + ubuf1[i]        * uvalpha) >> 19;
        int V  = (vbuf0[i]        * uvalpha1 + vbuf1[i]        * uvalpha) >> 19;
        output_pixels(i * 4, Y1, U, Y2, V);
    }
}
yuv2422_2_c_template(SwsContext *c, const int16_t *buf[2],
                     const int16_t *ubuf[2], const int16_t *vbuf[2],
                     const int16_t *abuf[2], uint8_t *dest, int dstW,
                     int yalpha, int uvalpha, int y,
                     enum PixelFormat target)
{
    const int16_t *buf0  = buf[0],  *buf1  = buf[1],
                  *ubuf0 = ubuf[0], *ubuf1 = ubuf[1],
                  *vbuf0 = vbuf[0], *vbuf1 = vbuf[1];
    int  yalpha1 = 4095 - yalpha;
    int uvalpha1 = 4095 - uvalpha;
    int i;
    for (i = 0; i < (dstW >> 1); i++) {
        int Y1 = (buf0[i * 2]     * yalpha1  + buf1[i * 2]     * yalpha)  >> 19;
        int Y2 = (buf0[i * 2 + 1] * yalpha1  + buf1[i * 2 + 1] * yalpha)  >> 19;
        int U  = (ubuf0[i]        * uvalpha1 + ubuf1[i]        * uvalpha) >> 19;
        int V  = (vbuf0[i]        * uvalpha1 + vbuf1[i]        * uvalpha) >> 19;
        output_pixels(i * 4, Y1, U, Y2, V);
    }
}
FUNC_0(SwsContext *VAR_0, const int16_t *VAR_1[2],
                     const int16_t *VAR_2[2], const int16_t *VAR_3[2],
                     const int16_t *VAR_4[2], uint8_t *VAR_5, int VAR_6,
                     int VAR_7, int VAR_8, int VAR_9,
                     enum PixelFormat VAR_10)
{
    const int16_t *VAR_11  = VAR_1[0],  *buf1  = VAR_1[1],
                  *ubuf0 = VAR_2[0], *ubuf1 = VAR_2[1],
                  *vbuf0 = VAR_3[0], *vbuf1 = VAR_3[1];
    int  VAR_12 = 4095 - VAR_7;
    int VAR_13 = 4095 - VAR_8;
    int VAR_14;
    for (VAR_14 = 0; VAR_14 < (VAR_6 >> 1); VAR_14++) {
        int VAR_15 = (VAR_11[VAR_14 * 2]     * VAR_12  + buf1[VAR_14 * 2]     * VAR_7)  >> 19;
        int VAR_16 = (VAR_11[VAR_14 * 2 + 1] * VAR_12  + buf1[VAR_14 * 2 + 1] * VAR_7)  >> 19;
        int VAR_17  = (ubuf0[VAR_14]        * VAR_13 + ubuf1[VAR_14]        * VAR_8) >> 19;
        int VAR_18  = (vbuf0[VAR_14]        * VAR_13 + vbuf1[VAR_14]        * VAR_8) >> 19;
        output_pixels(VAR_14 * 4, VAR_15, VAR_17, VAR_16, VAR_18);
    }
}
FUNC_0(SwsContext *VAR_0, const int16_t *VAR_1[2],
const int16_t *VAR_2[2], const int16_t *VAR_3[2],
const int16_t *VAR_4[2], uint8_t *VAR_5, int VAR_6,
int VAR_7, int VAR_8, int VAR_9,
enum PixelFormat VAR_10)
{ const int16_t *VAR_11  = VAR_1[0],  *buf1  = VAR_1[1],
*ubuf0 = VAR_2[0], *ubuf1 = VAR_2[1],
*vbuf0 = VAR_3[0], *vbuf1 = VAR_3[1]; int  VAR_12 = 4095 - VAR_7; int VAR_13 = 4095 - VAR_8; int VAR_14; for (VAR_14 = 0; VAR_14 < (VAR_6 >> 1); VAR_14++) { int VAR_15 = (VAR_11[VAR_14 * 2]     * VAR_12  + buf1[VAR_14 * 2]     * VAR_7)  >> 19; int VAR_16 = (VAR_11[VAR_14 * 2 + 1] * VAR_12  + buf1[VAR_14 * 2 + 1] * VAR_7)  >> 19; int VAR_17  = (ubuf0[VAR_14]        * VAR_13 + ubuf1[VAR_14]        * VAR_8) >> 19; int VAR_18  = (vbuf0[VAR_14]        * VAR_13 + vbuf1[VAR_14]        * VAR_8) >> 19; output_pixels(VAR_14 * 4, VAR_15, VAR_17, VAR_16, VAR_18); } }