From d5b786df7a54e2fd585f3376473c1fdae2152aa3 Mon Sep 17 00:00:00 2001 From: scop Date: Thu, 21 Apr 2005 21:46:35 +0000 Subject: OSD region/section optimization, http://article.gmane.org/gmane.linux.vdr/21658 (Thomas Husterer). --- CONTRIBUTORS | 1 + HISTORY | 3 ++- dxr3colormanager.c | 2 +- dxr3colormanager.h | 7 ++----- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 22fb732..b550c18 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -11,6 +11,7 @@ Gavin Hamill Paavo Hartikainen Tobias Haustein Stefan Huelswitt +Thomas Husterer Seppo Ingalsuo Antti Järvinen Atte Manninen diff --git a/HISTORY b/HISTORY index 0507317..8345ef6 100644 --- a/HISTORY +++ b/HISTORY @@ -286,7 +286,8 @@ NOTE: I havent found time to include all of the languages, will be done in pre2 - set aspect ratio and audio mode to unknown when releasing devices, fixes the setup eg. after returning from the MPlayer plugin (Luca Olivetti, Kimmo Vuorinen) -- rework OSD color management, fixes color "bleeding" (Luca Olivetti) +- rework OSD color management, fixes eg. color "bleeding" + (Luca Olivetti, Thomas Husterer) - sync SPU decoder with VDR 1.3.23 (Ville Skyttä) - register only needed ffmpeg codec(s) (Marco Schlüßler) - fix crash at exit (Marco Schlüßler) diff --git a/dxr3colormanager.c b/dxr3colormanager.c index 1e40711..56f38ea 100644 --- a/dxr3colormanager.c +++ b/dxr3colormanager.c @@ -231,7 +231,7 @@ unsigned char cColorManager::AddColor(int x, int y, unsigned char color, if (!curSection->HasColor(color, ColorIndex)) { // this color is new for this section - if (curSection->AllColorsUsed()) + if (curSection->AllColorsUsed(curRegion->Y1==y)) { // no more free colors if (y != curRegion->Y1) diff --git a/dxr3colormanager.h b/dxr3colormanager.h index e21888e..2a2553c 100644 --- a/dxr3colormanager.h +++ b/dxr3colormanager.h @@ -54,12 +54,9 @@ public: xSection(int x); bool HasColor(unsigned int color, unsigned char &ColorIndex); unsigned char AddColor(unsigned int color); - bool AllColorsUsed() { + bool AllColorsUsed(bool FirstLine) { //DIAG("AllColorsUsed: %d\n",NrOfColors); - if(NrOfColors >= 4) - return (true); - else - return (false); + return(NrOfColors >= (FirstLine ? 3 : 4)); }; int X1; int X2; -- cgit v1.2.3