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

Implemented handling of HD resolution subtitles according to v1.3.1 of ETSI EN 300 743, chapter 7.2.1 (cont'd)

This commit is contained in:
Klaus Schmidinger 2010-06-05 14:03:55 +02:00
parent 9377d831b3
commit fd42609883

View File

@ -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.5 2010/05/13 14:43:44 kls Exp $ * $Id: dvbsubtitle.c 2.6 2010/06/05 14:03:55 kls Exp $
*/ */
#include "dvbsubtitle.h" #include "dvbsubtitle.h"
@ -1017,10 +1017,16 @@ 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;
displayWidth = (Data[7] << 8) | Data[8]; displayHorizontalOffset = 0;
displayHeight = (Data[9] << 8) | Data[10]; displayVerticalOffset = 0;
displayHorizontalOffset = displayWindowFlag ? Data[11] : 0; // displayWindowHorizontalPositionMinimum displayWidth = ((Data[7] << 8) | Data[8]) + 1;
displayVerticalOffset = displayWindowFlag ? Data[13] : 0; // displayWindowVerticalPositionMinimum displayHeight = ((Data[9] << 8) | Data[10]) + 1;
if (displayWindowFlag) {
displayHorizontalOffset = (Data[11] << 8) | Data[12]; // displayWindowHorizontalPositionMinimum
displayWidth = ((Data[13] << 8) | Data[14]) - displayHorizontalOffset + 1; // displayWindowHorizontalPositionMaximum
displayVerticalOffset = (Data[15] << 8) | Data[16]; // displayWindowVerticalPositionMinimum
displayHeight = ((Data[17] << 8) | Data[18]) - displayVerticalOffset + 1; // displayWindowVerticalPositionMaximum
}
SetupChanged(); SetupChanged();
ddsVersionNumber = version; ddsVersionNumber = version;
} }