changeset 2508:94f9825a3736

Prev ver could work only on x86
author nick
date Sun, 28 Oct 2001 11:00:40 +0000
parents ad6424619117
children 22ee3be96a7f
files postproc/rgb2rgb.c postproc/rgb2rgb_template.c
diffstat 2 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/postproc/rgb2rgb.c	Sun Oct 28 10:47:06 2001 +0000
+++ b/postproc/rgb2rgb.c	Sun Oct 28 11:00:40 2001 +0000
@@ -7,16 +7,16 @@
 
 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 *end;
   end = s + src_size;
   while(s < end)
   {
-    uint32_t rgb0;
-    rgb0 = *(uint32_t *)s;
-    *dest++ = rgb0 & 0xFFFFFFUL;
-    s += 3;
+    *dest++ = *s++;
+    *dest++ = *s++;
+    *dest++ = *s++;
+    *dest++ = 0;
   }
 }
 
--- a/postproc/rgb2rgb_template.c	Sun Oct 28 10:47:06 2001 +0000
+++ b/postproc/rgb2rgb_template.c	Sun Oct 28 11:00:40 2001 +0000
@@ -7,16 +7,16 @@
 
 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 *end;
   end = s + src_size;
   while(s < end)
   {
-    uint32_t rgb0;
-    rgb0 = *(uint32_t *)s;
-    *dest++ = rgb0 & 0xFFFFFFUL;
-    s += 3;
+    *dest++ = *s++;
+    *dest++ = *s++;
+    *dest++ = *s++;
+    *dest++ = 0;
   }
 }