Fixed handling colors in cDvbSpuPalette::yuv2rgb()

This commit is contained in:
Klaus Schmidinger 2004-05-31 08:53:30 +02:00
parent 246a1c99bb
commit be5931e699
3 changed files with 6 additions and 5 deletions

View File

@ -1003,3 +1003,6 @@ Miko Wohlgemuth <weak@chello.at>
Michal Dobrzynski <michal_dobrzynski@mac.com> Michal Dobrzynski <michal_dobrzynski@mac.com>
for reporting a freezing picture when a recording starts on a system that always for reporting a freezing picture when a recording starts on a system that always
uses 'Transfer Mode' uses 'Transfer Mode'
Marco Schlüßler <marco@lordzodiac.de>
for fixing handling colors in cDvbSpuPalette::yuv2rgb()

View File

@ -2862,3 +2862,4 @@ Video Disk Recorder Revision History
- Fixed the height of the channel display in the "Classic VDR" skin. - Fixed the height of the channel display in the "Classic VDR" skin.
- Fixed handling descriptor loops in 'libsi', which had sometimes caused invalid - Fixed handling descriptor loops in 'libsi', which had sometimes caused invalid
CA ids to be added to the channel definitions (thanks to Marcel Wiesweg). CA ids to be added to the channel definitions (thanks to Marcel Wiesweg).
- Fixed handling colors in cDvbSpuPalette::yuv2rgb() (thanks to Marco Schlüßler).

View File

@ -8,7 +8,7 @@
* *
* parts of this file are derived from the OMS program. * 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 #ifndef __DVBSPU_H
@ -157,7 +157,6 @@ inline uint32_t cDvbSpuPalette::yuv2rgb(uint32_t yuv_color)
int Y, Cb, Cr; int Y, Cb, Cr;
int Ey, Epb, Epr; int Ey, Epb, Epr;
int Eg, Eb, Er; int Eg, Eb, Er;
uint32_t result;
Y = (yuv_color >> 16) & 0xff; Y = (yuv_color >> 16) & 0xff;
Cb = (yuv_color) & 0xff; Cb = (yuv_color) & 0xff;
@ -191,9 +190,7 @@ inline uint32_t cDvbSpuPalette::yuv2rgb(uint32_t yuv_color)
if (Er < 0) if (Er < 0)
Er = 0; Er = 0;
result = (Eb << 16) | (Eg << 8) | Er; return Eb | (Eg << 8) | (Er << 16);
return result;
} }
inline uint32_t cDvbSpuPalette::getColor(uint8_t idx, uint8_t trans) const inline uint32_t cDvbSpuPalette::getColor(uint8_t idx, uint8_t trans) const