diff options
author | pacman <pacman@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-24 09:52:59 +0000 |
---|---|---|
committer | pacman <pacman@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-24 09:52:59 +0000 |
commit | 34164ab349ed23aba15fe5bfa606b97728d3d94b (patch) | |
tree | e549a3b856f1aa7148a42d1c952edccb84facf37 /postproc | |
parent | 37cf77372adda77b7a1ad3fedcad6f6bb3d2e2eb (diff) | |
download | mpv-34164ab349ed23aba15fe5bfa606b97728d3d94b.tar.bz2 mpv-34164ab349ed23aba15fe5bfa606b97728d3d94b.tar.xz |
Fix rgb32tobgr16, rgb32to15, and rgb32tobgr15. All had the same problem that
was fixed in rgb32to16 about a year ago: using only the first 8 bits of the
32-bit pixel.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17671 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc')
-rw-r--r-- | postproc/rgb2rgb_template.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/postproc/rgb2rgb_template.c b/postproc/rgb2rgb_template.c index fbb4021011..d611debca2 100644 --- a/postproc/rgb2rgb_template.c +++ b/postproc/rgb2rgb_template.c @@ -468,8 +468,8 @@ static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long s #endif while(s < end) { - const int src= *s; s += 4; - *d++ = ((src&0xF8)<<8) + ((src&0xFC00)>>5) + ((src&0xF80000)>>19); + register int rgb = *(uint32_t*)s; s += 4; + *d++ = ((rgb&0xF8)<<8) + ((rgb&0xFC00)>>5) + ((rgb&0xF80000)>>19); } } @@ -564,8 +564,8 @@ static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_ #endif while(s < end) { - const int src= *s; s += 4; - *d++ = ((src&0xFF)>>3) + ((src&0xF800)>>6) + ((src&0xF80000)>>9); + register int rgb = *(uint32_t*)s; s += 4; + *d++ = ((rgb&0xFF)>>3) + ((rgb&0xF800)>>6) + ((rgb&0xF80000)>>9); } } @@ -625,8 +625,8 @@ static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, long s #endif while(s < end) { - const int src= *s; s += 4; - *d++ = ((src&0xF8)<<7) + ((src&0xF800)>>6) + ((src&0xF80000)>>19); + register int rgb = *(uint32_t*)s; s += 4; + *d++ = ((rgb&0xF8)<<7) + ((rgb&0xF800)>>6) + ((rgb&0xF80000)>>19); } } |