static void toright(unsigned char *dst[3], unsigned char *src[3],

                    int dststride[3], int srcstride[3],

                    int w, int h, struct vf_priv_s* p)

{

        int k;



        for (k = 0; k < 3; k++) {

                unsigned char* fromL = src[k];

                unsigned char* fromR = src[k];

                unsigned char* to = dst[k];

                int src = srcstride[k];

                int dst = dststride[k];

                int ss;

                unsigned int dd;

                int i;



                if (k > 0) {

                        i = h / 4 - p->skipline / 2;

                        ss = src * (h / 4 + p->skipline / 2);

                        dd = w / 4;

                } else {

                        i = h / 2 - p->skipline;

                        ss = src * (h / 2 + p->skipline);

                        dd = w / 2;

                }

                fromR += ss;

                for ( ; i > 0; i--) {

                        int j;

                        unsigned char* t = to;

                        unsigned char* sL = fromL;

                        unsigned char* sR = fromR;



                        if (p->scalew == 1) {

                                for (j = dd; j > 0; j--) {

                                        *t++ = (sL[0] + sL[1]) / 2;

                                        sL+=2;

                                }

                                for (j = dd ; j > 0; j--) {

                                        *t++ = (sR[0] + sR[1]) / 2;

                                        sR+=2;

                                }

                        } else {

                                for (j = dd * 2 ; j > 0; j--)

                                        *t++ = *sL++;

                                for (j = dd * 2 ; j > 0; j--)

                                        *t++ = *sR++;

                        }

                        if (p->scaleh == 1) {

                                fast_memcpy(to + dst, to, dst);

                                to += dst;

                        }

                        to += dst;

                        fromL += src;

                        fromR += src;

                }

                //printf("K %d  %d   %d   %d  %d \n", k, w, h,  src, dst);

        }

}

static void toright(unsigned char *dst[3], unsigned char *src[3],

                    int dststride[3], int srcstride[3],

                    int w, int h, struct vf_priv_s* p)

{

        int k;



        for (k = 0; k < 3; k++) {

                unsigned char* fromL = src[k];

                unsigned char* fromR = src[k];

                unsigned char* to = dst[k];

                int src = srcstride[k];

                int dst = dststride[k];

                int ss;

                unsigned int dd;

                int i;



                if (k > 0) {

                        i = h / 4 - p->skipline / 2;

                        ss = src * (h / 4 + p->skipline / 2);

                        dd = w / 4;

                } else {

                        i = h / 2 - p->skipline;

                        ss = src * (h / 2 + p->skipline);

                        dd = w / 2;

                }

                fromR += ss;

                for ( ; i > 0; i--) {

                        int j;

                        unsigned char* t = to;

                        unsigned char* sL = fromL;

                        unsigned char* sR = fromR;



                        if (p->scalew == 1) {

                                for (j = dd; j > 0; j--) {

                                        *t++ = (sL[0] + sL[1]) / 2;

                                        sL+=2;

                                }

                                for (j = dd ; j > 0; j--) {

                                        *t++ = (sR[0] + sR[1]) / 2;

                                        sR+=2;

                                }

                        } else {

                                for (j = dd * 2 ; j > 0; j--)

                                        *t++ = *sL++;

                                for (j = dd * 2 ; j > 0; j--)

                                        *t++ = *sR++;

                        }

                        if (p->scaleh == 1) {

                                fast_memcpy(to + dst, to, dst);

                                to += dst;

                        }

                        to += dst;

                        fromL += src;

                        fromR += src;

                }

                

        }

}

static void toright(unsigned char *dst[3], unsigned char *src[3],                     int dststride[3], int srcstride[3],                     int w, int h, struct vf_priv_s* p)         int k;         for (k = 0; k < 3; k++) {                 unsigned char* fromL = src[k];                 unsigned char* fromR = src[k];                 unsigned char* to = dst[k];                 int src = srcstride[k];                 int dst = dststride[k];                 int ss;                 unsigned int dd;                 int i;                 if (k > 0) {                         i = h / 4 - p->skipline / 2;                         ss = src * (h / 4 + p->skipline / 2);                         dd = w / 4;                 } else {                         i = h / 2 - p->skipline;                         ss = src * (h / 2 + p->skipline);                         dd = w / 2;                 fromR += ss;                 for ( ; i > 0; i--) {                         int j;                         unsigned char* t = to;                         unsigned char* sL = fromL;                         unsigned char* sR = fromR;                         if (p->scalew == 1) {                                 for (j = dd; j > 0; j--) {                                         *t++ = (sL[0] + sL[1]) / 2;                                         sL+=2;                                 for (j = dd ; j > 0; j--) {                                         *t++ = (sR[0] + sR[1]) / 2;                                         sR+=2;                         } else {                                 for (j = dd * 2 ; j > 0; j--)                                         *t++ = *sL++;                                 for (j = dd * 2 ; j > 0; j--)                                         *t++ = *sR++;                         if (p->scaleh == 1) {                                 fast_memcpy(to + dst, to, dst);                                 to += dst;                         to += dst;                         fromL += src;                         fromR += src;
static void FUNC_0(unsigned char *VAR_11[3], unsigned char *VAR_11[3],

                    int VAR_2[3], int VAR_3[3],

                    int VAR_4, int VAR_5, struct vf_priv_s* VAR_6)

{

        int VAR_7;



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

                unsigned char* VAR_8 = VAR_11[VAR_7];

                unsigned char* VAR_9 = VAR_11[VAR_7];

                unsigned char* VAR_10 = VAR_11[VAR_7];

                int VAR_11 = VAR_3[VAR_7];

                int VAR_11 = VAR_2[VAR_7];

                int VAR_11;

                unsigned int VAR_12;

                int VAR_13;



                if (VAR_7 > 0) {

                        VAR_13 = VAR_5 / 4 - VAR_6->skipline / 2;

                        VAR_11 = VAR_11 * (VAR_5 / 4 + VAR_6->skipline / 2);

                        VAR_12 = VAR_4 / 4;

                } else {

                        VAR_13 = VAR_5 / 2 - VAR_6->skipline;

                        VAR_11 = VAR_11 * (VAR_5 / 2 + VAR_6->skipline);

                        VAR_12 = VAR_4 / 2;

                }

                VAR_9 += VAR_11;

                for ( ; VAR_13 > 0; VAR_13--) {

                        int VAR_14;

                        unsigned char* VAR_15 = VAR_10;

                        unsigned char* VAR_16 = VAR_8;

                        unsigned char* VAR_17 = VAR_9;



                        if (VAR_6->scalew == 1) {

                                for (VAR_14 = VAR_12; VAR_14 > 0; VAR_14--) {

                                        *VAR_15++ = (VAR_16[0] + VAR_16[1]) / 2;

                                        VAR_16+=2;

                                }

                                for (VAR_14 = VAR_12 ; VAR_14 > 0; VAR_14--) {

                                        *VAR_15++ = (VAR_17[0] + VAR_17[1]) / 2;

                                        VAR_17+=2;

                                }

                        } else {

                                for (VAR_14 = VAR_12 * 2 ; VAR_14 > 0; VAR_14--)

                                        *VAR_15++ = *VAR_16++;

                                for (VAR_14 = VAR_12 * 2 ; VAR_14 > 0; VAR_14--)

                                        *VAR_15++ = *VAR_17++;

                        }

                        if (VAR_6->scaleh == 1) {

                                fast_memcpy(VAR_10 + VAR_11, VAR_10, VAR_11);

                                VAR_10 += VAR_11;

                        }

                        VAR_10 += VAR_11;

                        VAR_8 += VAR_11;

                        VAR_9 += VAR_11;

                }

                

        }

}

static void FUNC_0(unsigned char *VAR_11[3], unsigned char *VAR_11[3],
int VAR_2[3], int VAR_3[3],
int VAR_4, int VAR_5, struct vf_priv_s* VAR_6)
{ int VAR_7; for (VAR_7 = 0; VAR_7 < 3; VAR_7++) { unsigned char* VAR_8 = VAR_11[VAR_7]; unsigned char* VAR_9 = VAR_11[VAR_7]; unsigned char* VAR_10 = VAR_11[VAR_7]; int VAR_11 = VAR_3[VAR_7]; int VAR_11 = VAR_2[VAR_7]; int VAR_11; unsigned int VAR_12; int VAR_13; if (VAR_7 > 0) { VAR_13 = VAR_5 / 4 - VAR_6->skipline / 2; VAR_11 = VAR_11 * (VAR_5 / 4 + VAR_6->skipline / 2); VAR_12 = VAR_4 / 4; } else { VAR_13 = VAR_5 / 2 - VAR_6->skipline; VAR_11 = VAR_11 * (VAR_5 / 2 + VAR_6->skipline); VAR_12 = VAR_4 / 2; } VAR_9 += VAR_11; for ( ; VAR_13 > 0; VAR_13--) { int VAR_14; unsigned char* VAR_15 = VAR_10; unsigned char* VAR_16 = VAR_8; unsigned char* VAR_17 = VAR_9; if (VAR_6->scalew == 1) { for (VAR_14 = VAR_12; VAR_14 > 0; VAR_14--) { *VAR_15++ = (VAR_16[0] + VAR_16[1]) / 2; VAR_16+=2; } for (VAR_14 = VAR_12 ; VAR_14 > 0; VAR_14--) { *VAR_15++ = (VAR_17[0] + VAR_17[1]) / 2; VAR_17+=2; } } else { for (VAR_14 = VAR_12 * 2 ; VAR_14 > 0; VAR_14--) *VAR_15++ = *VAR_16++; for (VAR_14 = VAR_12 * 2 ; VAR_14 > 0; VAR_14--) *VAR_15++ = *VAR_17++; } if (VAR_6->scaleh == 1) { fast_memcpy(VAR_10 + VAR_11, VAR_10, VAR_11); VAR_10 += VAR_11; } VAR_10 += VAR_11; VAR_8 += VAR_11; VAR_9 += VAR_11; } } }