mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed displaying DVB subtitles (cont'd)
This commit is contained in:
parent
d6c10fec7b
commit
e8fb500819
11
HISTORY
11
HISTORY
@ -7920,7 +7920,7 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed cleaning up old EPG events in case no epg data file is given (reported by
|
- Fixed cleaning up old EPG events in case no epg data file is given (reported by
|
||||||
Dave Pickles).
|
Dave Pickles).
|
||||||
|
|
||||||
2013-08-31: Version 2.1.2
|
2013-09-06: Version 2.1.2
|
||||||
|
|
||||||
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
||||||
- Fixed displaying DVB subtitles (thanks to Rolf Ahrenberg for helping to debug and
|
- Fixed displaying DVB subtitles (thanks to Rolf Ahrenberg for helping to debug and
|
||||||
@ -7928,10 +7928,11 @@ Video Disk Recorder Revision History
|
|||||||
+ Fixed handling DVB subtitle fill region codes for 2 and 8 bpp.
|
+ Fixed handling DVB subtitle fill region codes for 2 and 8 bpp.
|
||||||
+ Fixed handling pages without an explicit END_OF_DISPLAY_SET_SEGMENT.
|
+ Fixed handling pages without an explicit END_OF_DISPLAY_SET_SEGMENT.
|
||||||
The FINISHPAGE_HACK is no longer necessary.
|
The FINISHPAGE_HACK is no longer necessary.
|
||||||
+ Fixed handling "page refreshes".
|
+ Fixed handling "page refreshes". The data is now parsed and stored closer to the
|
||||||
+ Added DebugBitmaps, which, if set to true, generates an HTML page with a sequence
|
DVB standard specs, introducing "object refs" and "region refs".
|
||||||
of images, showing the subtitle data as it is processed.
|
+ The debug output now goes into an HTML file named dbg-log.htm and shows the actual
|
||||||
+ The debug output now uses some indentation for better structuring.
|
bitmaps (dbg-nnn.jpg) used to display the subtitles. That way it is much easier to
|
||||||
|
see what's actually going on.
|
||||||
+ Fixed handling subtitles encoded as a string of characters (the very first
|
+ Fixed handling subtitles encoded as a string of characters (the very first
|
||||||
character was always skipped).
|
character was always skipped).
|
||||||
- Fixed wrong initialization of Setup.PositionerSwing (reported by Arthur Konovalov).
|
- Fixed wrong initialization of Setup.PositionerSwing (reported by Arthur Konovalov).
|
||||||
|
1142
dvbsubtitle.c
1142
dvbsubtitle.c
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Original author: Marco Schluessler <marco@lordzodiac.de>
|
* Original author: Marco Schluessler <marco@lordzodiac.de>
|
||||||
*
|
*
|
||||||
* $Id: dvbsubtitle.h 2.7 2012/03/11 13:34:12 kls Exp $
|
* $Id: dvbsubtitle.h 3.1 2013/09/06 10:53:30 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DVBSUBTITLE_H
|
#ifndef __DVBSUBTITLE_H
|
||||||
@ -39,7 +39,7 @@ private:
|
|||||||
double osdFactorY;
|
double osdFactorY;
|
||||||
cList<cDvbSubtitlePage> *pages;
|
cList<cDvbSubtitlePage> *pages;
|
||||||
cList<cDvbSubtitleBitmaps> *bitmaps;
|
cList<cDvbSubtitleBitmaps> *bitmaps;
|
||||||
tColor yuv2rgb(int Y, int Cb, int Cr);
|
cDvbSubtitlePage *GetPageById(int PageId, bool New = false);
|
||||||
void SetOsdData(void);
|
void SetOsdData(void);
|
||||||
bool AssertOsd(void);
|
bool AssertOsd(void);
|
||||||
int ExtractSegment(const uchar *Data, int Length, int64_t Pts);
|
int ExtractSegment(const uchar *Data, int Length, int64_t Pts);
|
||||||
|
15
osd.c
15
osd.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: osd.c 3.1 2013/05/18 12:33:16 kls Exp $
|
* $Id: osd.c 3.2 2013/09/03 11:59:17 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "osd.h"
|
#include "osd.h"
|
||||||
@ -512,6 +512,17 @@ void cBitmap::SetIndex(int x, int y, tIndex Index)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cBitmap::Fill(tIndex Index)
|
||||||
|
{
|
||||||
|
if (bitmap) {
|
||||||
|
memset(bitmap, Index, width * height);
|
||||||
|
dirtyX1 = 0;
|
||||||
|
dirtyY1 = 0;
|
||||||
|
dirtyX2 = width - 1;
|
||||||
|
dirtyY2 = height - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void cBitmap::DrawPixel(int x, int y, tColor Color)
|
void cBitmap::DrawPixel(int x, int y, tColor Color)
|
||||||
{
|
{
|
||||||
x -= x0;
|
x -= x0;
|
||||||
@ -824,7 +835,7 @@ void cBitmap::ShrinkBpp(int NewBpp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cBitmap *cBitmap::Scaled(double FactorX, double FactorY, bool AntiAlias)
|
cBitmap *cBitmap::Scaled(double FactorX, double FactorY, bool AntiAlias) const
|
||||||
{
|
{
|
||||||
// Fixed point scaling code based on www.inversereality.org/files/bitmapscaling.pdf
|
// Fixed point scaling code based on www.inversereality.org/files/bitmapscaling.pdf
|
||||||
// by deltener@mindtremors.com
|
// by deltener@mindtremors.com
|
||||||
|
8
osd.h
8
osd.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: osd.h 3.1 2013/09/02 07:53:54 kls Exp $
|
* $Id: osd.h 3.2 2013/09/06 12:13:47 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __OSD_H
|
#ifndef __OSD_H
|
||||||
@ -192,6 +192,8 @@ public:
|
|||||||
///< contents of the bitmap will be lost. If Width and Height are the same
|
///< contents of the bitmap will be lost. If Width and Height are the same
|
||||||
///< as the current values, nothing will happen and the bitmap remains
|
///< as the current values, nothing will happen and the bitmap remains
|
||||||
///< unchanged.
|
///< unchanged.
|
||||||
|
void SetOffset(int X0, int Y0) { x0 = X0; y0 = Y0; }
|
||||||
|
///< Sets the offset of this bitmap to the given values.
|
||||||
bool Contains(int x, int y) const;
|
bool Contains(int x, int y) const;
|
||||||
///< Returns true if this bitmap contains the point (x, y).
|
///< Returns true if this bitmap contains the point (x, y).
|
||||||
bool Covers(int x1, int y1, int x2, int y2) const;
|
bool Covers(int x1, int y1, int x2, int y2) const;
|
||||||
@ -221,6 +223,8 @@ public:
|
|||||||
void SetIndex(int x, int y, tIndex Index);
|
void SetIndex(int x, int y, tIndex Index);
|
||||||
///< Sets the index at the given coordinates to Index.
|
///< Sets the index at the given coordinates to Index.
|
||||||
///< Coordinates are relative to the bitmap's origin.
|
///< Coordinates are relative to the bitmap's origin.
|
||||||
|
void Fill(tIndex Index);
|
||||||
|
///< Fills the bitmap data with the given Index.
|
||||||
void DrawPixel(int x, int y, tColor Color);
|
void DrawPixel(int x, int y, tColor Color);
|
||||||
///< Sets the pixel at the given coordinates to the given Color, which is
|
///< Sets the pixel at the given coordinates to the given Color, which is
|
||||||
///< a full 32 bit ARGB value.
|
///< a full 32 bit ARGB value.
|
||||||
@ -283,7 +287,7 @@ public:
|
|||||||
///< the 2^NewBpp most frequently used colors as defined in the current palette.
|
///< the 2^NewBpp most frequently used colors as defined in the current palette.
|
||||||
///< If NewBpp is not smaller than the bitmap's current color depth,
|
///< If NewBpp is not smaller than the bitmap's current color depth,
|
||||||
///< or if it is not one of 4bpp or 2bpp, nothing happens.
|
///< or if it is not one of 4bpp or 2bpp, nothing happens.
|
||||||
cBitmap *Scaled(double FactorX, double FactorY, bool AntiAlias = false);
|
cBitmap *Scaled(double FactorX, double FactorY, bool AntiAlias = false) const;
|
||||||
///< Creates a copy of this bitmap, scaled by the given factors.
|
///< Creates a copy of this bitmap, scaled by the given factors.
|
||||||
///< If AntiAlias is true and either of the factors is greater than 1.0,
|
///< If AntiAlias is true and either of the factors is greater than 1.0,
|
||||||
///< anti-aliasing is applied. This will also set the color depth of the
|
///< anti-aliasing is applied. This will also set the color depth of the
|
||||||
|
Loading…
Reference in New Issue
Block a user