From patchwork Sun Nov 4 11:43:52 2007 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ville Aakko X-Patchwork-Id: 12542 Received: from rv-out-0910.google.com ([209.85.198.190]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1IodtS-0000vh-IR for vdr@linuxtv.org; Sun, 04 Nov 2007 12:43:54 +0100 Received: by rv-out-0910.google.com with SMTP id b22so1310870rvf for ; Sun, 04 Nov 2007 03:43:53 -0800 (PST) Received: by 10.142.187.2 with SMTP id k2mr829574wff.1194176632852; Sun, 04 Nov 2007 03:43:52 -0800 (PST) Received: by 10.142.242.8 with HTTP; Sun, 4 Nov 2007 03:43:52 -0800 (PST) Message-ID: Date: Sun, 4 Nov 2007 13:43:52 +0200 From: "Ville Aakko" To: "VDR Mailing List" In-Reply-To: <472C8535.9040300@cadsoft.de> MIME-Version: 1.0 References: <472C8535.9040300@cadsoft.de> Subject: Re: [vdr] vdr-1.5.10, dxr3 and subtitles X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2007 11:43:55 -0000 Status: O X-Status: X-Keywords: X-UID: 14440 2007/11/3, Klaus Schmidinger : > VDR reduces the colors if the output device can't display all of them. > > Maybe the dxr3 device doesn't correctly respond to the CanHandleAreas() > call? > > See cDvbSubtitleConverter::FinishPage(), the calls to sr->ReduceBpp() > and sr->ShrinkBpp(). Yes, I think you are probably right. I looked at the code and modified it so that bpp ís always reduced to 2 (I think) - hack included. I'm not a programmer and know nothing about C++, really. But it works for me (kind of - see below). Of course, this is not a proper fix. But, I think from previous the discussion here, that the color depth dxr3 can handle isn't that straightforward for. It can handle 8bpp but in a limited way; so just reducing bpp would not use the dxr3 hardware to the full potential. Some additional checking and processing is needed? Though I'm just an end user really, I don't know really, I'm kind of guessing =). Anyways, the subtitles look really good even with 2bpp, so in this case I think just reducing is sufficient. There's still problem even after reducing the bpp; I think the OSD levels isn't properly implemented in the CVS (dxr3-0-2 branch). I'll post about this in the dxr3plugin-users list. (Symptoms: No other OSD is shown while subtitles are shown, previous subtitles aren't "cleared"). - Ville diff -Naur vdr-1.5.10/dvbsubtitle.c vdr-1.5.10.old/dvbsubtitle.c --- vdr-1.5.10/dvbsubtitle.c 2007-11-04 13:01:35.000000000 +0200 +++ vdr-1.5.10.old/dvbsubtitle.c 2007-11-04 12:59:42.000000000 +0200 @@ -984,10 +984,10 @@ int NumAreas = Page->regions.Count(); int Bpp = 8; bool Reduced = false; -// while (osd->CanHandleAreas(Areas, NumAreas) != oeOk) { + while (osd->CanHandleAreas(Areas, NumAreas) != oeOk) { int HalfBpp = Bpp / 2; if (HalfBpp >= 2) { - while (int i = 0; i < NumAreas; i++) { + for (int i = 0; i < NumAreas; i++) { if (Areas[i].bpp >= Bpp) { Areas[i].bpp = HalfBpp; Reduced = true; @@ -997,7 +997,7 @@ } else return; // unable to draw bitmaps -// } + } if (Reduced) { for (int i = 0; i < NumAreas; i++) { cSubtitleRegion *sr = Page->regions.Get(i);