diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2013-01-24 11:42:15 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2013-01-24 11:42:15 +0100 |
commit | cfb62845ec2b164b6e17cdb44c7fe1536527e81d (patch) | |
tree | 7ef6e5ed6110d6a573dab07eb90007c643a5addf | |
parent | 8281be14801ea3feeef358d32ea88ae79d5d12d1 (diff) | |
download | vdr-cfb62845ec2b164b6e17cdb44c7fe1536527e81d.tar.gz vdr-cfb62845ec2b164b6e17cdb44c7fe1536527e81d.tar.bz2 |
Fixed upscaling bitmaps
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | osd.c | 10 |
2 files changed, 8 insertions, 6 deletions
@@ -7534,10 +7534,12 @@ Video Disk Recorder Revision History - Reduced the number of retries in cTransfer::Receive() to avoid blocking recordings in case the primary device can't handle the current live signal. -2013-01-23: Version 1.7.37 +2013-01-24: Version 1.7.37 - Now also using FindHeader() in cMpeg2Fixer::AdjTref() (pointed out by Sören Moch). - Added missing template for DVBDIR to Make.config.template (reported by Derek Kelly). - The LCARS menu now also works if the OSD has only 1bpp (two colors). - Fixed possible garbage in the remaining time of the LCARS replay display in case the hours change from two to one digit. +- Fixed upscaling bitmaps. The last row and column of the scaled bitmap was not filled, + which resulted in empty lines between scaled subtitles. @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.c 2.33 2012/12/15 11:16:41 kls Exp $ + * $Id: osd.c 2.34 2013/01/24 11:37:58 kls Exp $ */ #include "osd.h" @@ -853,12 +853,12 @@ cBitmap *cBitmap::Scaled(double FactorX, double FactorY, bool AntiAlias) b->SetBpp(8); b->Replace(*this); // copy palette (must be done *after* SetBpp()!) int SourceY = 0; - for (int y = 0; y < b->Height() - 1; y++) { + for (int y = 0; y < b->Height(); y++) { int SourceX = 0; - int sy = SourceY >> 16; + int sy = min(SourceY >> 16, Height() - 2); uint8_t BlendY = 0xFF - ((SourceY >> 8) & 0xFF); - for (int x = 0; x < b->Width() - 1; x++) { - int sx = SourceX >> 16; + for (int x = 0; x < b->Width(); x++) { + int sx = min(SourceX >> 16, Width() - 2); uint8_t BlendX = 0xFF - ((SourceX >> 8) & 0xFF); tColor c1 = b->Blend(GetColor(sx, sy), GetColor(sx + 1, sy), BlendX); tColor c2 = b->Blend(GetColor(sx, sy + 1), GetColor(sx + 1, sy + 1), BlendX); |