changeset 31638:e4cab1a16c0d

Simplify alpha conversion code.
author reimar
date Sun, 11 Jul 2010 13:05:45 +0000
parents 43958dd88aa1
children cf048df35b00
files spudec.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/spudec.c	Sun Jul 11 12:56:52 2010 +0000
+++ b/spudec.c	Sun Jul 11 13:05:45 2010 +0000
@@ -732,7 +732,7 @@
 /* transform mplayer's alpha value into an opacity value that is linear */
 static inline int canon_alpha(int alpha)
 {
-  return alpha ? 256 - alpha : 0;
+  return (uint8_t)-alpha;
 }
 
 typedef struct {