From patchwork Mon Apr 4 16:08:52 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Olivetti X-Patchwork-Id: 11844 Received: from 232.red-213-97-27.pooles.rima-tde.net ([213.97.27.232]) by www.linuxtv.org with esmtp (Exim 4.34) id 1DIU8Z-0006vg-IH for vdr@linuxtv.org; Mon, 04 Apr 2005 18:09:16 +0200 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by 232.Red-213-97-27.pooles.rima-tde.net (Postfix) with ESMTP id 3E26918ABA2F for ; Mon, 4 Apr 2005 18:08:59 +0200 (CEST) Message-ID: <42516694.9070900@ventoso.org> Date: Mon, 04 Apr 2005 18:08:52 +0200 From: Luca Olivetti User-Agent: Mozilla Thunderbird 0.9 (X11/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Klaus Schmidinger's VDR Subject: Re: [vdr] Patch: dxr3plugin OSD don't turn pink References: <424A9224.4000608@compuserve.de> <1112217417.31596.17.camel@bobcat.mine.nu> <424E66B0.1030901@ventoso.org> <424E6E6E.9000307@compuserve.de> <424E72B6.8000903@ventoso.org> <424E757F.2040804@ventoso.org> <424E7743.8060801@ventoso.org> <424E7852.60808@ventoso.org> <424E793E.9040202@ventoso.org> <1112448795.23456.48.camel@bobcat.mine.nu> <424ECCA5.1030309@ventoso.org> <1112461894.12964.1.camel@bobcat.mine.nu> <424FD272.2050808@ventoso.org> <424FEA9E.1050207@ventoso.org> <42501BA4.8070902@compuserve.de> <42502096.7030109@ventoso.org> <425022ED.7060008@compuserve.de> <1112556049.24368.75.camel@bobcat.mine.nu> <42505F40.90201@ventoso.org> In-Reply-To: <42505F40.90201@ventoso.org> X-Enigmail-Version: 0.89.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2005 16:09:16 -0000 Status: O X-Status: X-Keywords: X-UID: 1412 Luca Olivetti wrote: >>>> @@ -449,7 +441,7 @@ >>>> >>>> // This should be done in cSPUEncoder::cSPUEncoder >>>> >>>> - m_palManager.Clear(); >>>> + m_palManager.Reset(); >>>> return 0; >>>> break; > > > I'm not sure this hunk is correct, the display is cleared various times > throughout the osd life, the palette should be freed only upon close, > shouldn't it? well, it doesn't harm (it was in Martin's source withot me realizing it) but it works well even without it. I also set the palette to 16 colors now (not that it changes much, but...). Bye --- dxr3interface_spu_encoder.c.orig 2005-04-04 17:53:35.966868390 +0200 +++ dxr3interface_spu_encoder.c 2005-04-04 17:57:36.107254910 +0200 @@ -270,6 +270,8 @@ // set active area to 0 //m_x0 = m_x1 = m_y0 = m_y1 = 0; + //16 Colors max. + m_palManager.SetBpp(4); } // ================================== @@ -383,19 +385,7 @@ case OSD_Close: // clear colors from palettemanager - - #if VDRVERSNUM >= 10307 - if ((col = (tColor*)m_windows[m_lastwindow].colors) != NULL) - #else - if ((col = (eDvbColor*)m_windows[m_lastwindow].colors) != NULL) - #endif - { - /*-for (size_t i = 0; i < m_windows[m_lastwindow].NumColors; ++i) - { - m_palManager.RemoveColor((int)(col[i]) & 0xFFFFFF); - }*/ - m_palManager.Reset(); - } + m_palManager.Reset(); // clear osd for (size_t i = m_windows[m_lastwindow].y0; i <= m_windows[m_lastwindow].y1; ++i) @@ -443,9 +433,6 @@ // returns 0 on success // This should be done in cSPUEncoder::cSPUEncoder - - ///-m_palManager.Clear(); - m_palManager.Reset(); return 0; break;