Offsets are from the start of the segment data, after the 13-byte header. Numbers are big-endian.
Presentation composition (PCS, 0x16)
Says which objects to show, in which windows and where. It begins every display set.
| Offset | Size | Name | Meaning |
|---|---|---|---|
0 | 2 | Width | Video width in pixels. |
2 | 2 | Height | Video height in pixels. |
4 | 1 | Frame rate | Reported to be always 10, and ignored by readers. |
5 | 2 | Composition number | Increases with each graphics update. |
7 | 1 | Composition state | See the table below. |
8 | 1 | Palette update flag | 00 false; 80 true, meaning only the palette changes. |
9 | 1 | Palette ID | The palette to use for a palette-only update. |
10 | 1 | Object count | Composition objects that follow. Zero clears the screen. |
11 | varies | Composition objects | Each is described below. |
Composition state
FFmpeg reads the top two bits of this byte.
| Value | Name | Meaning |
|---|---|---|
00 | Normal | An update within the current epoch. |
40 | Acquisition point | A point where a reader joining the stream can start. It repeats what is already on screen. |
80 | Epoch start | A new epoch: graphics memory is reset. |
C0 | Epoch continue | An epoch that continues across a break in the stream, named by FFmpeg’s source only. |
Composition object
Each is 8 bytes, or 16 when cropped.
| Offset | Size | Name | Meaning |
|---|---|---|---|
0 | 2 | Object ID | Which object to show. |
2 | 1 | Window ID | Which window to show it in. |
3 | 1 | Flags | 80 object is cropped; 40 forced subtitle. Other bits unused. |
4 | 2 | X | Horizontal position of the object’s top-left corner. |
6 | 2 | Y | Vertical position of the object’s top-left corner. |
8 | 2 | Crop X | Only when cropped. |
10 | 2 | Crop Y | Only when cropped. |
12 | 2 | Crop width | Only when cropped. |
14 | 2 | Crop height | Only when cropped. |
The flag bits come from FFmpeg’s decoder, which uses 80 for cropping and
40 for forced. The Scorpius’s description gives 40 for
cropping and does not mention a forced flag. FFmpeg reads the crop values but does not
apply them when it renders.
Window definition (WDS, 0x17)
Defines the rectangles in which objects may be shown.
| Offset | Size | Name | Meaning |
|---|---|---|---|
0 | 1 | Window count | The number of windows. One byte, then one entry each. |
1 | 1 | Window ID | |
2 | 2 | X | Horizontal position of the window. |
4 | 2 | Y | Vertical position of the window. |
6 | 2 | Width | |
8 | 2 | Height |
FFmpeg does not use window segments when it decodes.
Worked example
07 80 width 1920
04 38 height 1080
10 frame rate
01 AE composition number 430
80 composition state: epoch start
00 palette update flag
00 palette ID
01 1 composition object
00 00 object ID 0
00 window ID 0
00 no flags
03 05 x 773
00 6C y 108