Fixed reduced bpp support for DVB subtitles

This commit is contained in:
Klaus Schmidinger 2012-03-16 12:01:31 +01:00
parent c8b0ee3289
commit 6504e55b76
3 changed files with 13 additions and 13 deletions

View File

@ -1139,6 +1139,7 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
texts of its own texts of its own
for suggesting to change the Green button in the "Edit timer" menu from "Once" for suggesting to change the Green button in the "Edit timer" menu from "Once"
to "Single" to "Single"
for fixing reduced bpp support for DVB subtitles
Ralf Klueber <ralf.klueber@vodafone.com> Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark for reporting a bug in cutting a recording if there is only a single editing mark

View File

@ -7046,3 +7046,4 @@ Video Disk Recorder Revision History
- Moved setting LC_NUMERIC further up to make sure any floating point numbers use a - Moved setting LC_NUMERIC further up to make sure any floating point numbers use a
decimal point (suggested by Tobias Grimm). decimal point (suggested by Tobias Grimm).
- Added missing channel locking to cEIT. - Added missing channel locking to cEIT.
- Fixed reduced bpp support for DVB subtitles (thanks to Rolf Ahrenberg).

View File

@ -7,7 +7,7 @@
* Original author: Marco Schluessler <marco@lordzodiac.de> * Original author: Marco Schluessler <marco@lordzodiac.de>
* With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi> * With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
* *
* $Id: dvbsubtitle.c 2.30 2012/03/13 15:37:03 kls Exp $ * $Id: dvbsubtitle.c 2.31 2012/03/16 11:56:56 kls Exp $
*/ */
@ -1281,9 +1281,16 @@ void cDvbSubtitleConverter::FinishPage(cDvbSubtitlePage *Page)
else else
return; // unable to draw bitmaps return; // unable to draw bitmaps
} }
if (Reduced) { cDvbSubtitleBitmaps *Bitmaps = new cDvbSubtitleBitmaps(Page->Pts(), Page->Timeout(), Areas, NumAreas, osdFactorX, osdFactorY);
bitmaps->Add(Bitmaps);
for (int i = 0; i < NumAreas; i++) { for (int i = 0; i < NumAreas; i++) {
cSubtitleRegion *sr = Page->regions.Get(i); cSubtitleRegion *sr = Page->regions.Get(i);
cSubtitleClut *clut = Page->GetClutById(sr->ClutId());
if (!clut)
continue;
sr->Replace(*clut->GetPalette(sr->Bpp()));
sr->UpdateTextData(clut);
if (Reduced) {
if (sr->Bpp() != Areas[i].bpp) { if (sr->Bpp() != Areas[i].bpp) {
if (sr->Level() <= Areas[i].bpp) { if (sr->Level() <= Areas[i].bpp) {
//TODO this is untested - didn't have any such subtitle stream //TODO this is untested - didn't have any such subtitle stream
@ -1299,15 +1306,6 @@ void cDvbSubtitleConverter::FinishPage(cDvbSubtitlePage *Page)
} }
} }
} }
}
cDvbSubtitleBitmaps *Bitmaps = new cDvbSubtitleBitmaps(Page->Pts(), Page->Timeout(), Areas, NumAreas, osdFactorX, osdFactorY);
bitmaps->Add(Bitmaps);
for (cSubtitleRegion *sr = Page->regions.First(); sr; sr = Page->regions.Next(sr)) {
cSubtitleClut *clut = Page->GetClutById(sr->ClutId());
if (!clut)
continue;
sr->Replace(*clut->GetPalette(sr->Bpp()));
sr->UpdateTextData(clut);
int posX = sr->HorizontalAddress(); int posX = sr->HorizontalAddress();
int posY = sr->VerticalAddress(); int posY = sr->VerticalAddress();
if (sr->Width() > 0 && sr->Height() > 0) { if (sr->Width() > 0 && sr->Height() > 0) {