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

                            int width, int height)

{

    const unsigned char *p;

    unsigned char *q;

    int r, g, b, dst_wrap, src_wrap;

    int x, y;



    p = src->data[0];

    src_wrap = src->linesize[0] - 3 * width;



    q = dst->data[0];

    dst_wrap = dst->linesize[0] - 2 * width;



    for(y=0;y<height;y++) {

        for(x=0;x<width;x++) {

            r = p[0];

            g = p[1];

            b = p[2];



            ((unsigned short *)q)[0] = 

                ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3) | 0x8000;

            q += 2;

            p += 3;

        }

        p += src_wrap;

        q += dst_wrap;

    }

}

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

                            int width, int height)

{

    const unsigned char *p;

    unsigned char *q;

    int r, g, b, dst_wrap, src_wrap;

    int x, y;



    p = src->data[0];

    src_wrap = src->linesize[0] - 3 * width;



    q = dst->data[0];

    dst_wrap = dst->linesize[0] - 2 * width;



    for(y=0;y<height;y++) {

        for(x=0;x<width;x++) {

            r = p[0];

            g = p[1];

            b = p[2];



            ((unsigned short *)q)[0] = 

                ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3) | 0x8000;

            q += 2;

            p += 3;

        }

        p += src_wrap;

        q += dst_wrap;

    }

}

static void FUNC_0(AVPicture *VAR_0, AVPicture *VAR_1,

                            int VAR_2, int VAR_3)

{

    const unsigned char *VAR_4;

    unsigned char *VAR_5;

    int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;

    int VAR_11, VAR_12;



    VAR_4 = VAR_1->data[0];

    VAR_10 = VAR_1->linesize[0] - 3 * VAR_2;



    VAR_5 = VAR_0->data[0];

    VAR_9 = VAR_0->linesize[0] - 2 * VAR_2;



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

        for(VAR_11=0;VAR_11<VAR_2;VAR_11++) {

            VAR_6 = VAR_4[0];

            VAR_7 = VAR_4[1];

            VAR_8 = VAR_4[2];



            ((unsigned short *)VAR_5)[0] = 

                ((VAR_6 >> 3) << 10) | ((VAR_7 >> 3) << 5) | (VAR_8 >> 3) | 0x8000;

            VAR_5 += 2;

            VAR_4 += 3;

        }

        VAR_4 += VAR_10;

        VAR_5 += VAR_9;

    }

}

static void FUNC_0(AVPicture *VAR_0, AVPicture *VAR_1,
int VAR_2, int VAR_3)
{ const unsigned char *VAR_4; unsigned char *VAR_5; int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10; int VAR_11, VAR_12; VAR_4 = VAR_1->data[0]; VAR_10 = VAR_1->linesize[0] - 3 * VAR_2; VAR_5 = VAR_0->data[0]; VAR_9 = VAR_0->linesize[0] - 2 * VAR_2; for(VAR_12=0;VAR_12<VAR_3;VAR_12++) { for(VAR_11=0;VAR_11<VAR_2;VAR_11++) { VAR_6 = VAR_4[0]; VAR_7 = VAR_4[1]; VAR_8 = VAR_4[2]; ((unsigned short *)VAR_5)[0] =
((VAR_6 >> 3) << 10) | ((VAR_7 >> 3) << 5) | (VAR_8 >> 3) | 0x8000; VAR_5 += 2; VAR_4 += 3; } VAR_4 += VAR_10; VAR_5 += VAR_9; } }