yuv2mono_2_c_template(SwsContext *c, const uint16_t *buf0,

                      const uint16_t *buf1, const uint16_t *ubuf0,

                      const uint16_t *ubuf1, const uint16_t *vbuf0,

                      const uint16_t *vbuf1, const uint16_t *abuf0,

                      const uint16_t *abuf1, uint8_t *dest, int dstW,

                      int yalpha, int uvalpha, int y,

                      enum PixelFormat target)

{

    const uint8_t * const d128 = dither_8x8_220[y & 7];

    uint8_t *g = c->table_gU[128] + c->table_gV[128];

    int  yalpha1 = 4095 - yalpha;

    int i;



    for (i = 0; i < dstW - 7; i += 8) {

        int acc =    g[((buf0[i    ] * yalpha1 + buf1[i    ] * yalpha) >> 19) + d128[0]];

        acc += acc + g[((buf0[i + 1] * yalpha1 + buf1[i + 1] * yalpha) >> 19) + d128[1]];

        acc += acc + g[((buf0[i + 2] * yalpha1 + buf1[i + 2] * yalpha) >> 19) + d128[2]];

        acc += acc + g[((buf0[i + 3] * yalpha1 + buf1[i + 3] * yalpha) >> 19) + d128[3]];

        acc += acc + g[((buf0[i + 4] * yalpha1 + buf1[i + 4] * yalpha) >> 19) + d128[4]];

        acc += acc + g[((buf0[i + 5] * yalpha1 + buf1[i + 5] * yalpha) >> 19) + d128[5]];

        acc += acc + g[((buf0[i + 6] * yalpha1 + buf1[i + 6] * yalpha) >> 19) + d128[6]];

        acc += acc + g[((buf0[i + 7] * yalpha1 + buf1[i + 7] * yalpha) >> 19) + d128[7]];

        output_pixel(*dest++, acc);

    }

}

yuv2mono_2_c_template(SwsContext *c, const uint16_t *buf0,

                      const uint16_t *buf1, const uint16_t *ubuf0,

                      const uint16_t *ubuf1, const uint16_t *vbuf0,

                      const uint16_t *vbuf1, const uint16_t *abuf0,

                      const uint16_t *abuf1, uint8_t *dest, int dstW,

                      int yalpha, int uvalpha, int y,

                      enum PixelFormat target)

{

    const uint8_t * const d128 = dither_8x8_220[y & 7];

    uint8_t *g = c->table_gU[128] + c->table_gV[128];

    int  yalpha1 = 4095 - yalpha;

    int i;



    for (i = 0; i < dstW - 7; i += 8) {

        int acc =    g[((buf0[i    ] * yalpha1 + buf1[i    ] * yalpha) >> 19) + d128[0]];

        acc += acc + g[((buf0[i + 1] * yalpha1 + buf1[i + 1] * yalpha) >> 19) + d128[1]];

        acc += acc + g[((buf0[i + 2] * yalpha1 + buf1[i + 2] * yalpha) >> 19) + d128[2]];

        acc += acc + g[((buf0[i + 3] * yalpha1 + buf1[i + 3] * yalpha) >> 19) + d128[3]];

        acc += acc + g[((buf0[i + 4] * yalpha1 + buf1[i + 4] * yalpha) >> 19) + d128[4]];

        acc += acc + g[((buf0[i + 5] * yalpha1 + buf1[i + 5] * yalpha) >> 19) + d128[5]];

        acc += acc + g[((buf0[i + 6] * yalpha1 + buf1[i + 6] * yalpha) >> 19) + d128[6]];

        acc += acc + g[((buf0[i + 7] * yalpha1 + buf1[i + 7] * yalpha) >> 19) + d128[7]];

        output_pixel(*dest++, acc);

    }

}

FUNC_0(SwsContext *VAR_0, const uint16_t *VAR_1,

                      const uint16_t *VAR_2, const uint16_t *VAR_3,

                      const uint16_t *VAR_4, const uint16_t *VAR_5,

                      const uint16_t *VAR_6, const uint16_t *VAR_7,

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

                      int VAR_11, int VAR_12, int VAR_13,

                      enum PixelFormat VAR_14)

{

    const uint8_t * const VAR_15 = dither_8x8_220[VAR_13 & 7];

    uint8_t *g = VAR_0->table_gU[128] + VAR_0->table_gV[128];

    int  VAR_16 = 4095 - VAR_11;

    int VAR_17;



    for (VAR_17 = 0; VAR_17 < VAR_10 - 7; VAR_17 += 8) {

        int VAR_18 =    g[((VAR_1[VAR_17    ] * VAR_16 + VAR_2[VAR_17    ] * VAR_11) >> 19) + VAR_15[0]];

        VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 1] * VAR_16 + VAR_2[VAR_17 + 1] * VAR_11) >> 19) + VAR_15[1]];

        VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 2] * VAR_16 + VAR_2[VAR_17 + 2] * VAR_11) >> 19) + VAR_15[2]];

        VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 3] * VAR_16 + VAR_2[VAR_17 + 3] * VAR_11) >> 19) + VAR_15[3]];

        VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 4] * VAR_16 + VAR_2[VAR_17 + 4] * VAR_11) >> 19) + VAR_15[4]];

        VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 5] * VAR_16 + VAR_2[VAR_17 + 5] * VAR_11) >> 19) + VAR_15[5]];

        VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 6] * VAR_16 + VAR_2[VAR_17 + 6] * VAR_11) >> 19) + VAR_15[6]];

        VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 7] * VAR_16 + VAR_2[VAR_17 + 7] * VAR_11) >> 19) + VAR_15[7]];

        output_pixel(*VAR_9++, VAR_18);

    }

}

FUNC_0(SwsContext *VAR_0, const uint16_t *VAR_1,
const uint16_t *VAR_2, const uint16_t *VAR_3,
const uint16_t *VAR_4, const uint16_t *VAR_5,
const uint16_t *VAR_6, const uint16_t *VAR_7,
const uint16_t *VAR_8, uint8_t *VAR_9, int VAR_10,
int VAR_11, int VAR_12, int VAR_13,
enum PixelFormat VAR_14)
{ const uint8_t * const VAR_15 = dither_8x8_220[VAR_13 & 7]; uint8_t *g = VAR_0->table_gU[128] + VAR_0->table_gV[128]; int  VAR_16 = 4095 - VAR_11; int VAR_17; for (VAR_17 = 0; VAR_17 < VAR_10 - 7; VAR_17 += 8) { int VAR_18 =    g[((VAR_1[VAR_17    ] * VAR_16 + VAR_2[VAR_17    ] * VAR_11) >> 19) + VAR_15[0]]; VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 1] * VAR_16 + VAR_2[VAR_17 + 1] * VAR_11) >> 19) + VAR_15[1]]; VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 2] * VAR_16 + VAR_2[VAR_17 + 2] * VAR_11) >> 19) + VAR_15[2]]; VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 3] * VAR_16 + VAR_2[VAR_17 + 3] * VAR_11) >> 19) + VAR_15[3]]; VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 4] * VAR_16 + VAR_2[VAR_17 + 4] * VAR_11) >> 19) + VAR_15[4]]; VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 5] * VAR_16 + VAR_2[VAR_17 + 5] * VAR_11) >> 19) + VAR_15[5]]; VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 6] * VAR_16 + VAR_2[VAR_17 + 6] * VAR_11) >> 19) + VAR_15[6]]; VAR_18 += VAR_18 + g[((VAR_1[VAR_17 + 7] * VAR_16 + VAR_2[VAR_17 + 7] * VAR_11) >> 19) + VAR_15[7]]; output_pixel(*VAR_9++, VAR_18); } }