Whoops, here goes addendum1:
On Tue, 2002-11-26 at 19:03, Ronald Bultje wrote:
> static void
> bgr16_to_rgb16 (unsigned char *src,
> unsigned char *dest,
> unsigned int size)
> {
> guint16 temp;
> while (size > 3) {
> temp = ((*((guint16*)src))&0xf800)>>11 |
> ((*((guint16*)src))&0x0770) |
> ((*((guint16*)src))&0x008f)<<11;
> src += 2;
> *((guint32*)dest) = dest<<16 |
^^^^
That should have been 'temp' instead of 'dest', I'm just noticing. These
4-char variable names are all just too much alike. ;-).
> ((*((guint16*)src))&0xf800)>>11 |
> ((*((guint16*)src))&0x0770) |
> ((*((guint16*)src))&0x008f)<<11;
> src += 2; dest += 4; size -= 4;
> }
>
> if (size > 1)
> *((guint16*)dest) = ((*((guint16*)src))&0xf800)>>11 |
> ((*((guint16*)src))&0x0770) |
> ((*((guint16*)src))&0x008f)<<11;
> }
Still untested though. ;-).
--
Ronald Bultje <[EMAIL PROTECTED]>
Linux Video/Multimedia developer
--
video4linux-list mailing list
Unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/video4linux-list