summaryrefslogtreecommitdiff
path: root/dvbspu.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-05-31 08:53:30 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-05-31 08:53:30 +0200
commitbe5931e699caf232f0fcc74d7c1f1f4522267d0a (patch)
tree8fd625e07735d4fafaae33b6309e35ffc2138a93 /dvbspu.h
parent246a1c99bb390aded81257082b935bd222f2d8c6 (diff)
downloadvdr-be5931e699caf232f0fcc74d7c1f1f4522267d0a.tar.gz
vdr-be5931e699caf232f0fcc74d7c1f1f4522267d0a.tar.bz2
Fixed handling colors in cDvbSpuPalette::yuv2rgb()
Diffstat (limited to 'dvbspu.h')
-rw-r--r--dvbspu.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/dvbspu.h b/dvbspu.h
index 4c926df3..df717c1b 100644
--- a/dvbspu.h
+++ b/dvbspu.h
@@ -8,7 +8,7 @@
*
* parts of this file are derived from the OMS program.
*
- * $Id: dvbspu.h 1.3 2004/04/30 13:44:41 kls Exp $
+ * $Id: dvbspu.h 1.4 2004/05/31 08:49:20 kls Exp $
*/
#ifndef __DVBSPU_H
@@ -157,7 +157,6 @@ inline uint32_t cDvbSpuPalette::yuv2rgb(uint32_t yuv_color)
int Y, Cb, Cr;
int Ey, Epb, Epr;
int Eg, Eb, Er;
- uint32_t result;
Y = (yuv_color >> 16) & 0xff;
Cb = (yuv_color) & 0xff;
@@ -191,9 +190,7 @@ inline uint32_t cDvbSpuPalette::yuv2rgb(uint32_t yuv_color)
if (Er < 0)
Er = 0;
- result = (Eb << 16) | (Eg << 8) | Er;
-
- return result;
+ return Eb | (Eg << 8) | (Er << 16);
}
inline uint32_t cDvbSpuPalette::getColor(uint8_t idx, uint8_t trans) const