yuv2rgb_full_X_c_template(SwsContext *c, const int16_t *lumFilter,

                          const int16_t **lumSrc, int lumFilterSize,

                          const int16_t *chrFilter, const int16_t **chrUSrc,

                          const int16_t **chrVSrc, int chrFilterSize,

                          const int16_t **alpSrc, uint8_t *dest,

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

{

    int i;

    int step = (target == AV_PIX_FMT_RGB24 || target == AV_PIX_FMT_BGR24) ? 3 : 4;

    int err[4] = {0};



    if(   target == AV_PIX_FMT_BGR4_BYTE || target == AV_PIX_FMT_RGB4_BYTE

       || target == AV_PIX_FMT_BGR8      || target == AV_PIX_FMT_RGB8)

        step = 1;



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

        int j;

        int Y = 1<<9;

        int U = (1<<9)-(128 << 19);

        int V = (1<<9)-(128 << 19);

        int A;



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

            Y += lumSrc[j][i] * lumFilter[j];

        }

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

            U += chrUSrc[j][i] * chrFilter[j];

            V += chrVSrc[j][i] * chrFilter[j];

        }

        Y >>= 10;

        U >>= 10;

        V >>= 10;

        if (hasAlpha) {

            A = 1 << 18;

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

                A += alpSrc[j][i] * lumFilter[j];

            }

            A >>= 19;

            if (A & 0x100)

                A = av_clip_uint8(A);

        }

        yuv2rgb_write_full(c, dest, i, Y, A, U, V, y, target, hasAlpha, err);

        dest += step;

    }

    c->dither_error[0][i] = err[0];

    c->dither_error[1][i] = err[1];

    c->dither_error[2][i] = err[2];

}

yuv2rgb_full_X_c_template(SwsContext *c, const int16_t *lumFilter,

                          const int16_t **lumSrc, int lumFilterSize,

                          const int16_t *chrFilter, const int16_t **chrUSrc,

                          const int16_t **chrVSrc, int chrFilterSize,

                          const int16_t **alpSrc, uint8_t *dest,

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

{

    int i;

    int step = (target == AV_PIX_FMT_RGB24 || target == AV_PIX_FMT_BGR24) ? 3 : 4;

    int err[4] = {0};



    if(   target == AV_PIX_FMT_BGR4_BYTE || target == AV_PIX_FMT_RGB4_BYTE

       || target == AV_PIX_FMT_BGR8      || target == AV_PIX_FMT_RGB8)

        step = 1;



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

        int j;

        int Y = 1<<9;

        int U = (1<<9)-(128 << 19);

        int V = (1<<9)-(128 << 19);

        int A;



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

            Y += lumSrc[j][i] * lumFilter[j];

        }

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

            U += chrUSrc[j][i] * chrFilter[j];

            V += chrVSrc[j][i] * chrFilter[j];

        }

        Y >>= 10;

        U >>= 10;

        V >>= 10;

        if (hasAlpha) {

            A = 1 << 18;

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

                A += alpSrc[j][i] * lumFilter[j];

            }

            A >>= 19;

            if (A & 0x100)

                A = av_clip_uint8(A);

        }

        yuv2rgb_write_full(c, dest, i, Y, A, U, V, y, target, hasAlpha, err);

        dest += step;

    }

    c->dither_error[0][i] = err[0];

    c->dither_error[1][i] = err[1];

    c->dither_error[2][i] = err[2];

}

        int A;         int A;
FUNC_0(SwsContext *VAR_0, const int16_t *VAR_1,

                          const int16_t **VAR_2, int VAR_3,

                          const int16_t *VAR_4, const int16_t **VAR_5,

                          const int16_t **VAR_6, int VAR_7,

                          const int16_t **VAR_8, uint8_t *VAR_9,

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

{

    int VAR_14;

    int VAR_15 = (VAR_12 == AV_PIX_FMT_RGB24 || VAR_12 == AV_PIX_FMT_BGR24) ? 3 : 4;

    int VAR_16[4] = {0};



    if(   VAR_12 == AV_PIX_FMT_BGR4_BYTE || VAR_12 == AV_PIX_FMT_RGB4_BYTE

       || VAR_12 == AV_PIX_FMT_BGR8      || VAR_12 == AV_PIX_FMT_RGB8)

        VAR_15 = 1;



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

        int VAR_17;

        int VAR_18 = 1<<9;

        int VAR_19 = (1<<9)-(128 << 19);

        int VAR_20 = (1<<9)-(128 << 19);

        int VAR_21;



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

            VAR_18 += VAR_2[VAR_17][VAR_14] * VAR_1[VAR_17];

        }

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

            VAR_19 += VAR_5[VAR_17][VAR_14] * VAR_4[VAR_17];

            VAR_20 += VAR_6[VAR_17][VAR_14] * VAR_4[VAR_17];

        }

        VAR_18 >>= 10;

        VAR_19 >>= 10;

        VAR_20 >>= 10;

        if (VAR_13) {

            VAR_21 = 1 << 18;

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

                VAR_21 += VAR_8[VAR_17][VAR_14] * VAR_1[VAR_17];

            }

            VAR_21 >>= 19;

            if (VAR_21 & 0x100)

                VAR_21 = av_clip_uint8(VAR_21);

        }

        yuv2rgb_write_full(VAR_0, VAR_9, VAR_14, VAR_18, VAR_21, VAR_19, VAR_20, VAR_11, VAR_12, VAR_13, VAR_16);

        VAR_9 += VAR_15;

    }

    VAR_0->dither_error[0][VAR_14] = VAR_16[0];

    VAR_0->dither_error[1][VAR_14] = VAR_16[1];

    VAR_0->dither_error[2][VAR_14] = VAR_16[2];

}

FUNC_0(SwsContext *VAR_0, const int16_t *VAR_1,
const int16_t **VAR_2, int VAR_3,
const int16_t *VAR_4, const int16_t **VAR_5,
const int16_t **VAR_6, int VAR_7,
const int16_t **VAR_8, uint8_t *VAR_9,
int VAR_10, int VAR_11, enum AVPixelFormat VAR_12, int VAR_13)
{ int VAR_14; int VAR_15 = (VAR_12 == AV_PIX_FMT_RGB24 || VAR_12 == AV_PIX_FMT_BGR24) ? 3 : 4; int VAR_16[4] = {0}; if(   VAR_12 == AV_PIX_FMT_BGR4_BYTE || VAR_12 == AV_PIX_FMT_RGB4_BYTE
|| VAR_12 == AV_PIX_FMT_BGR8      || VAR_12 == AV_PIX_FMT_RGB8)
VAR_15 = 1; for (VAR_14 = 0; VAR_14 < VAR_10; VAR_14++) { int VAR_17; int VAR_18 = 1<<9; int VAR_19 = (1<<9)-(128 << 19); int VAR_20 = (1<<9)-(128 << 19); int VAR_21; for (VAR_17 = 0; VAR_17 < VAR_3; VAR_17++) { VAR_18 += VAR_2[VAR_17][VAR_14] * VAR_1[VAR_17]; } for (VAR_17 = 0; VAR_17 < VAR_7; VAR_17++) { VAR_19 += VAR_5[VAR_17][VAR_14] * VAR_4[VAR_17]; VAR_20 += VAR_6[VAR_17][VAR_14] * VAR_4[VAR_17]; } VAR_18 >>= 10; VAR_19 >>= 10; VAR_20 >>= 10; if (VAR_13) { VAR_21 = 1 << 18; for (VAR_17 = 0; VAR_17 < VAR_3; VAR_17++) { VAR_21 += VAR_8[VAR_17][VAR_14] * VAR_1[VAR_17]; } VAR_21 >>= 19; if (VAR_21 & 0x100)
VAR_21 = av_clip_uint8(VAR_21); } yuv2rgb_write_full(VAR_0, VAR_9, VAR_14, VAR_18, VAR_21, VAR_19, VAR_20, VAR_11, VAR_12, VAR_13, VAR_16); VAR_9 += VAR_15; } VAR_0->dither_error[0][VAR_14] = VAR_16[0]; VAR_0->dither_error[1][VAR_14] = VAR_16[1]; VAR_0->dither_error[2][VAR_14] = VAR_16[2]; }