Fixed rgb32(24)to15 stuff
authorNick Kurshev <nickols_k@mail.ru>
Mon, 5 Nov 2001 17:56:11 +0000 (17:56 +0000)
committerNick Kurshev <nickols_k@mail.ru>
Mon, 5 Nov 2001 17:56:11 +0000 (17:56 +0000)
Originally committed as revision 2721 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc

postproc/rgb2rgb.c
postproc/rgb2rgb_template.c

index 5779bf5..ddb805b 100644 (file)
@@ -238,7 +238,7 @@ void rgb32to15(const uint8_t *src, uint8_t *dst, unsigned src_size)
                const int g= src[i+1];
                const int r= src[i+2];
 
-               d[j]= (b>>3) | ((g&0xF8)<<3) | ((r&0xF8)<<7);
+               d[j]= (b>>3) | ((g&0xF8)<<2) | ((r&0xF8)<<7);
        }
 }
 
@@ -266,7 +266,7 @@ void rgb24to15(const uint8_t *src, uint8_t *dst, unsigned src_size)
                const int g= src[i+1];
                const int r= src[i+2];
 
-               d[j]= (b>>3) | ((g&0xF8)<<3) | ((r&0xF8)<<7);
+               d[j]= (b>>3) | ((g&0xF8)<<2) | ((r&0xF8)<<7);
        }
 }
 
index 5779bf5..ddb805b 100644 (file)
@@ -238,7 +238,7 @@ void rgb32to15(const uint8_t *src, uint8_t *dst, unsigned src_size)
                const int g= src[i+1];
                const int r= src[i+2];
 
-               d[j]= (b>>3) | ((g&0xF8)<<3) | ((r&0xF8)<<7);
+               d[j]= (b>>3) | ((g&0xF8)<<2) | ((r&0xF8)<<7);
        }
 }
 
@@ -266,7 +266,7 @@ void rgb24to15(const uint8_t *src, uint8_t *dst, unsigned src_size)
                const int g= src[i+1];
                const int r= src[i+2];
 
-               d[j]= (b>>3) | ((g&0xF8)<<3) | ((r&0xF8)<<7);
+               d[j]= (b>>3) | ((g&0xF8)<<2) | ((r&0xF8)<<7);
        }
 }