1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed upscaling bitmaps

This commit is contained in:
Klaus Schmidinger 2013-01-24 11:42:15 +01:00
parent 8281be1480
commit cfb62845ec
2 changed files with 8 additions and 6 deletions

View File

@ -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.

10
osd.c
View File

@ -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);