RGB_FUNCTIONS(rgb565)



#undef RGB_IN

#undef RGB_OUT

#undef BPP



/* bgr24 handling */



#define RGB_IN(r, g, b, s)\

{\

    b = (s)[0];\

    g = (s)[1];\

    r = (s)[2];\

}



#define RGB_OUT(d, r, g, b)\

{\

    (d)[0] = b;\

    (d)[1] = g;\

    (d)[2] = r;\

}



#define BPP 3



RGB_FUNCTIONS(bgr24)



#undef RGB_IN

#undef RGB_OUT

#undef BPP



/* rgb24 handling */



#define RGB_IN(r, g, b, s)\

{\

    r = (s)[0];\

    g = (s)[1];\

    b = (s)[2];\

}



#define RGB_OUT(d, r, g, b)\

{\

    (d)[0] = r;\

    (d)[1] = g;\

    (d)[2] = b;\

}



#define BPP 3



RGB_FUNCTIONS(rgb24)



static void yuv444p_to_rgb24(AVPicture *dst, AVPicture *src,

                             int width, int height)

{

    uint8_t *y1_ptr, *cb_ptr, *cr_ptr, *d, *d1;

    int w, y, cb, cr, r_add, g_add, b_add;

    uint8_t *cm = cropTbl + MAX_NEG_CROP;

    unsigned int r, g, b;



    d = dst->data[0];

    y1_ptr = src->data[0];

    cb_ptr = src->data[1];

    cr_ptr = src->data[2];

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

        d1 = d;

        for(w = width; w > 0; w--) {

            YUV_TO_RGB1_CCIR(cb_ptr[0], cr_ptr[0]);



            YUV_TO_RGB2_CCIR(r, g, b, y1_ptr[0]);

            RGB_OUT(d1, r, g, b);

            d1 += BPP;



            y1_ptr++;

            cb_ptr++;

            cr_ptr++;

        }

        d += dst->linesize[0];

        y1_ptr += src->linesize[0] - width;

        cb_ptr += src->linesize[1] - width;

        cr_ptr += src->linesize[2] - width;

    }

}

RGB_FUNCTIONS(rgb565)



#undef RGB_IN

#undef RGB_OUT

#undef BPP







#define RGB_IN(r, g, b, s)\

{\

    b = (s)[0];\

    g = (s)[1];\

    r = (s)[2];\

}



#define RGB_OUT(d, r, g, b)\

{\

    (d)[0] = b;\

    (d)[1] = g;\

    (d)[2] = r;\

}



#define BPP 3



RGB_FUNCTIONS(bgr24)



#undef RGB_IN

#undef RGB_OUT

#undef BPP







#define RGB_IN(r, g, b, s)\

{\

    r = (s)[0];\

    g = (s)[1];\

    b = (s)[2];\

}



#define RGB_OUT(d, r, g, b)\

{\

    (d)[0] = r;\

    (d)[1] = g;\

    (d)[2] = b;\

}



#define BPP 3



RGB_FUNCTIONS(rgb24)



static void yuv444p_to_rgb24(AVPicture *dst, AVPicture *src,

                             int width, int height)

{

    uint8_t *y1_ptr, *cb_ptr, *cr_ptr, *d, *d1;

    int w, y, cb, cr, r_add, g_add, b_add;

    uint8_t *cm = cropTbl + MAX_NEG_CROP;

    unsigned int r, g, b;



    d = dst->data[0];

    y1_ptr = src->data[0];

    cb_ptr = src->data[1];

    cr_ptr = src->data[2];

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

        d1 = d;

        for(w = width; w > 0; w--) {

            YUV_TO_RGB1_CCIR(cb_ptr[0], cr_ptr[0]);



            YUV_TO_RGB2_CCIR(r, g, b, y1_ptr[0]);

            RGB_OUT(d1, r, g, b);

            d1 += BPP;



            y1_ptr++;

            cb_ptr++;

            cr_ptr++;

        }

        d += dst->linesize[0];

        y1_ptr += src->linesize[0] - width;

        cb_ptr += src->linesize[1] - width;

        cr_ptr += src->linesize[2] - width;

    }

}

FUNC_1(VAR_0)



#undef RGB_IN

#undef RGB_OUT

#undef BPP







#define RGB_IN(VAR_10, VAR_11, VAR_12, s)\

{\

    VAR_12 = (s)[0];\

    VAR_11 = (s)[1];\

    VAR_10 = (s)[2];\

}



#define RGB_OUT(d, VAR_10, VAR_11, VAR_12)\

{\

    (d)[0] = VAR_12;\

    (d)[1] = VAR_11;\

    (d)[2] = VAR_10;\

}



#define BPP 3



FUNC_1(VAR_1)



#undef RGB_IN

#undef RGB_OUT

#undef BPP







#define RGB_IN(VAR_10, VAR_11, VAR_12, s)\

{\

    VAR_10 = (s)[0];\

    VAR_11 = (s)[1];\

    VAR_12 = (s)[2];\

}



#define RGB_OUT(d, VAR_10, VAR_11, VAR_12)\

{\

    (d)[0] = VAR_10;\

    (d)[1] = VAR_11;\

    (d)[2] = VAR_12;\

}



#define BPP 3



FUNC_1(VAR_2)



static void yuv444p_to_rgb24(AVPicture *dst, AVPicture *src,

                             int width, int height)

{

    uint8_t *y1_ptr, *cb_ptr, *cr_ptr, *d, *d1;

    int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;

    uint8_t *cm = cropTbl + MAX_NEG_CROP;

    unsigned int VAR_10, VAR_11, VAR_12;



    d = dst->data[0];

    y1_ptr = src->data[0];

    cb_ptr = src->data[1];

    cr_ptr = src->data[2];

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

        d1 = d;

        for(VAR_3 = width; VAR_3 > 0; VAR_3--) {

            YUV_TO_RGB1_CCIR(cb_ptr[0], cr_ptr[0]);



            YUV_TO_RGB2_CCIR(VAR_10, VAR_11, VAR_12, y1_ptr[0]);

            RGB_OUT(d1, VAR_10, VAR_11, VAR_12);

            d1 += BPP;



            y1_ptr++;

            cb_ptr++;

            cr_ptr++;

        }

        d += dst->linesize[0];

        y1_ptr += src->linesize[0] - width;

        cb_ptr += src->linesize[1] - width;

        cr_ptr += src->linesize[2] - width;

    }

}

FUNC_1(VAR_0)
#undef RGB_IN
#undef RGB_OUT
#undef BPP
#define RGB_IN(VAR_10, VAR_11, VAR_12, s)\
{\ VAR_12 = (s)[0];\ VAR_11 = (s)[1];\ VAR_10 = (s)[2];\ } #define RGB_OUT(d, VAR_10, VAR_11, VAR_12)\
{\ (d)[0] = VAR_12;\ (d)[1] = VAR_11;\ (d)[2] = VAR_10;\ } #define BPP 3
FUNC_1(VAR_1)
#undef RGB_IN
#undef RGB_OUT
#undef BPP
#define RGB_IN(VAR_10, VAR_11, VAR_12, s)\
{\ VAR_10 = (s)[0];\ VAR_11 = (s)[1];\ VAR_12 = (s)[2];\ } #define RGB_OUT(d, VAR_10, VAR_11, VAR_12)\
{\ (d)[0] = VAR_10;\ (d)[1] = VAR_11;\ (d)[2] = VAR_12;\ } #define BPP 3
FUNC_1(VAR_2)
static void yuv444p_to_rgb24(AVPicture *dst, AVPicture *src,
int width, int height)
{ uint8_t *y1_ptr, *cb_ptr, *cr_ptr, *d, *d1; int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9; uint8_t *cm = cropTbl + MAX_NEG_CROP; unsigned int VAR_10, VAR_11, VAR_12; d = dst->data[0]; y1_ptr = src->data[0]; cb_ptr = src->data[1]; cr_ptr = src->data[2]; for(;height > 0; height --) { d1 = d; for(VAR_3 = width; VAR_3 > 0; VAR_3--) { YUV_TO_RGB1_CCIR(cb_ptr[0], cr_ptr[0]); YUV_TO_RGB2_CCIR(VAR_10, VAR_11, VAR_12, y1_ptr[0]); RGB_OUT(d1, VAR_10, VAR_11, VAR_12); d1 += BPP; y1_ptr++; cb_ptr++; cr_ptr++; } d += dst->linesize[0]; y1_ptr += src->linesize[0] - width; cb_ptr += src->linesize[1] - width; cr_ptr += src->linesize[2] - width; } }