summaryrefslogtreecommitdiffstats
path: root/postproc
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-03-22 10:11:42 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-03-22 10:11:42 +0000
commit99e20d343fe9b18461277232f14b41216e980341 (patch)
treec4f4ef0c2b4b2853763924cdafcfb7f4d984e4bc /postproc
parentf0fc50f974ef0fd1d2608bf4d3f5184e2cbbc5ad (diff)
downloadmpv-99e20d343fe9b18461277232f14b41216e980341.tar.bz2
mpv-99e20d343fe9b18461277232f14b41216e980341.tar.xz
Fixes rgb32to16 conversion for I think all platforms since the int8
cast should never have worked. Tested on PowerPC and fixes the black GUI to show the content. patch by Rene Rebe <rene at exactcode dot de> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14983 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc')
-rw-r--r--postproc/rgb2rgb_template.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/postproc/rgb2rgb_template.c b/postproc/rgb2rgb_template.c
index 8993178d08..e7571b40c1 100644
--- a/postproc/rgb2rgb_template.c
+++ b/postproc/rgb2rgb_template.c
@@ -403,10 +403,8 @@ static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, unsigned
#endif
while(s < end)
{
- // FIXME on bigendian
- const int src= *s; s += 4;
- *d++ = ((src&0xFF)>>3) + ((src&0xFC00)>>5) + ((src&0xF80000)>>8);
-// *d++ = ((src>>3)&0x1F) + ((src>>5)&0x7E0) + ((src>>8)&0xF800);
+ register int rgb = *(uint32_t*)s; s += 4;
+ *d++ = ((rgb&0xFF)>>3) + ((rgb&0xFC00)>>5) + ((rgb&0xF80000)>>8);
}
}