mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Now storing the original display size when handling DVB subtitles
This commit is contained in:
parent
39c0065fe0
commit
11cca8015c
@ -1263,6 +1263,7 @@ Reinhard Nissl <rnissl@gmx.de>
|
|||||||
for fixing DDS detection for HD resolution subtitles
|
for fixing DDS detection for HD resolution subtitles
|
||||||
for some valuable input during development of the TrueColor OSD, help with
|
for some valuable input during development of the TrueColor OSD, help with
|
||||||
debugging, and an implementation of the AlphaBlend() function.
|
debugging, and an implementation of the AlphaBlend() function.
|
||||||
|
for storing the original display size when handling DVB subtitles
|
||||||
|
|
||||||
Richard Robson <richard_robson@beeb.net>
|
Richard Robson <richard_robson@beeb.net>
|
||||||
for reporting freezing replay if a timer starts while in Transfer Mode from the
|
for reporting freezing replay if a timer starts while in Transfer Mode from the
|
||||||
|
2
HISTORY
2
HISTORY
@ -6552,3 +6552,5 @@ Video Disk Recorder Revision History
|
|||||||
- Removed checking for minimum line length of 21 characters in the LIRC receiver code
|
- Removed checking for minimum line length of 21 characters in the LIRC receiver code
|
||||||
(reported by Gerald Dachs).
|
(reported by Gerald Dachs).
|
||||||
- Updated the Romanian OSD texts (thanks to Lucian Muresan).
|
- Updated the Romanian OSD texts (thanks to Lucian Muresan).
|
||||||
|
- Now storing the original display size when handling DVB subtitles (thanks to
|
||||||
|
Reinhard Nissl).
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* Original author: Marco Schlüßler <marco@lordzodiac.de>
|
* Original author: Marco Schlüßler <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.9 2011/02/25 15:13:32 kls Exp $
|
* $Id: dvbsubtitle.c 2.10 2011/03/12 13:07:59 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbsubtitle.h"
|
#include "dvbsubtitle.h"
|
||||||
@ -666,10 +666,10 @@ cDvbSubtitleConverter::cDvbSubtitleConverter(void)
|
|||||||
osd = NULL;
|
osd = NULL;
|
||||||
frozen = false;
|
frozen = false;
|
||||||
ddsVersionNumber = -1;
|
ddsVersionNumber = -1;
|
||||||
displayWidth = 720;
|
displayWidth = windowWidth = 720;
|
||||||
displayHeight = 576;
|
displayHeight = windowHeight = 576;
|
||||||
displayHorizontalOffset = 0;
|
windowHorizontalOffset = 0;
|
||||||
displayVerticalOffset = 0;
|
windowVerticalOffset = 0;
|
||||||
pages = new cList<cDvbSubtitlePage>;
|
pages = new cList<cDvbSubtitlePage>;
|
||||||
bitmaps = new cList<cDvbSubtitleBitmaps>;
|
bitmaps = new cList<cDvbSubtitleBitmaps>;
|
||||||
Start();
|
Start();
|
||||||
@ -699,10 +699,10 @@ void cDvbSubtitleConverter::Reset(void)
|
|||||||
DELETENULL(osd);
|
DELETENULL(osd);
|
||||||
frozen = false;
|
frozen = false;
|
||||||
ddsVersionNumber = -1;
|
ddsVersionNumber = -1;
|
||||||
displayWidth = 720;
|
displayWidth = windowWidth = 720;
|
||||||
displayHeight = 576;
|
displayHeight = windowHeight = 576;
|
||||||
displayHorizontalOffset = 0;
|
windowHorizontalOffset = 0;
|
||||||
displayVerticalOffset = 0;
|
windowVerticalOffset = 0;
|
||||||
Unlock();
|
Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -852,7 +852,7 @@ tColor cDvbSubtitleConverter::yuv2rgb(int Y, int Cb, int Cr)
|
|||||||
|
|
||||||
bool cDvbSubtitleConverter::AssertOsd(void)
|
bool cDvbSubtitleConverter::AssertOsd(void)
|
||||||
{
|
{
|
||||||
return osd || (osd = cOsdProvider::NewOsd(displayHorizontalOffset, displayVerticalOffset + Setup.SubtitleOffset, OSD_LEVEL_SUBTITLES));
|
return osd || (osd = cOsdProvider::NewOsd(windowHorizontalOffset, windowVerticalOffset + Setup.SubtitleOffset, OSD_LEVEL_SUBTITLES));
|
||||||
}
|
}
|
||||||
|
|
||||||
int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t Pts)
|
int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t Pts)
|
||||||
@ -1016,15 +1016,15 @@ int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t
|
|||||||
int version = (Data[6] & 0xF0) >> 4;
|
int version = (Data[6] & 0xF0) >> 4;
|
||||||
if (version != ddsVersionNumber) {
|
if (version != ddsVersionNumber) {
|
||||||
int displayWindowFlag = (Data[6] & 0x08) >> 3;
|
int displayWindowFlag = (Data[6] & 0x08) >> 3;
|
||||||
displayHorizontalOffset = 0;
|
windowHorizontalOffset = 0;
|
||||||
displayVerticalOffset = 0;
|
windowVerticalOffset = 0;
|
||||||
displayWidth = ((Data[7] << 8) | Data[8]) + 1;
|
displayWidth = windowWidth = ((Data[7] << 8) | Data[8]) + 1;
|
||||||
displayHeight = ((Data[9] << 8) | Data[10]) + 1;
|
displayHeight = windowHeight = ((Data[9] << 8) | Data[10]) + 1;
|
||||||
if (displayWindowFlag) {
|
if (displayWindowFlag) {
|
||||||
displayHorizontalOffset = (Data[11] << 8) | Data[12]; // displayWindowHorizontalPositionMinimum
|
windowHorizontalOffset = (Data[11] << 8) | Data[12]; // displayWindowHorizontalPositionMinimum
|
||||||
displayWidth = ((Data[13] << 8) | Data[14]) - displayHorizontalOffset + 1; // displayWindowHorizontalPositionMaximum
|
windowWidth = ((Data[13] << 8) | Data[14]) - windowHorizontalOffset + 1; // displayWindowHorizontalPositionMaximum
|
||||||
displayVerticalOffset = (Data[15] << 8) | Data[16]; // displayWindowVerticalPositionMinimum
|
windowVerticalOffset = (Data[15] << 8) | Data[16]; // displayWindowVerticalPositionMinimum
|
||||||
displayHeight = ((Data[17] << 8) | Data[18]) - displayVerticalOffset + 1; // displayWindowVerticalPositionMaximum
|
windowHeight = ((Data[17] << 8) | Data[18]) - windowVerticalOffset + 1; // displayWindowVerticalPositionMaximum
|
||||||
}
|
}
|
||||||
SetupChanged();
|
SetupChanged();
|
||||||
ddsVersionNumber = version;
|
ddsVersionNumber = version;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Original author: Marco Schlüßler <marco@lordzodiac.de>
|
* Original author: Marco Schlüßler <marco@lordzodiac.de>
|
||||||
*
|
*
|
||||||
* $Id: dvbsubtitle.h 2.3 2010/05/13 14:43:44 kls Exp $
|
* $Id: dvbsubtitle.h 2.4 2011/03/12 13:07:59 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DVBSUBTITLE_H
|
#ifndef __DVBSUBTITLE_H
|
||||||
@ -29,8 +29,10 @@ private:
|
|||||||
int ddsVersionNumber;
|
int ddsVersionNumber;
|
||||||
int displayWidth;
|
int displayWidth;
|
||||||
int displayHeight;
|
int displayHeight;
|
||||||
int displayHorizontalOffset;
|
int windowHorizontalOffset;
|
||||||
int displayVerticalOffset;
|
int windowVerticalOffset;
|
||||||
|
int windowWidth;
|
||||||
|
int windowHeight;
|
||||||
cList<cDvbSubtitlePage> *pages;
|
cList<cDvbSubtitlePage> *pages;
|
||||||
cList<cDvbSubtitleBitmaps> *bitmaps;
|
cList<cDvbSubtitleBitmaps> *bitmaps;
|
||||||
tColor yuv2rgb(int Y, int Cb, int Cr);
|
tColor yuv2rgb(int Y, int Cb, int Cr);
|
||||||
|
Loading…
Reference in New Issue
Block a user