Prev ver could work only on x86

Originally committed as revision 2509 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
This commit is contained in:
Nick Kurshev 2001-10-28 11:00:40 +00:00
parent b238eb2e77
commit fde33ab52e
2 changed files with 10 additions and 10 deletions

View File

@ -7,16 +7,16 @@
void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size) void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size)
{ {
uint32_t *dest = (uint32_t *)dst; uint8_t *dest = dst;
uint8_t *s = src; uint8_t *s = src;
uint8_t *end; uint8_t *end;
end = s + src_size; end = s + src_size;
while(s < end) while(s < end)
{ {
uint32_t rgb0; *dest++ = *s++;
rgb0 = *(uint32_t *)s; *dest++ = *s++;
*dest++ = rgb0 & 0xFFFFFFUL; *dest++ = *s++;
s += 3; *dest++ = 0;
} }
} }

View File

@ -7,16 +7,16 @@
void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size) void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size)
{ {
uint32_t *dest = (uint32_t *)dst; uint8_t *dest = dst;
uint8_t *s = src; uint8_t *s = src;
uint8_t *end; uint8_t *end;
end = s + src_size; end = s + src_size;
while(s < end) while(s < end)
{ {
uint32_t rgb0; *dest++ = *s++;
rgb0 = *(uint32_t *)s; *dest++ = *s++;
*dest++ = rgb0 & 0xFFFFFFUL; *dest++ = *s++;
s += 3; *dest++ = 0;
} }
} }