Commit ca167f03 authored by Rocky Bernstein's avatar Rocky Bernstein

Minor grammatical changes.

parent 8a61c1e8
$Id: cvd-subtitles.txt,v 1.2 2004/01/04 16:51:59 rocky Exp $ $Id: cvd-subtitles.txt,v 1.3 2004/01/09 01:17:57 rocky Exp $
The following information is culled from information from The following information is culled from information from
Julio Sanchez Fernandez (http://subhandler.sourceforge.net) Julio Sanchez Fernandez (http://subhandler.sourceforge.net)
by Rocky Bernstein. by Rocky Bernstein.
...@@ -11,40 +11,39 @@ whose correctness is not known and some experimentation. ...@@ -11,40 +11,39 @@ whose correctness is not known and some experimentation.
CVD subtitles are different in several ways from SVCD OGT subtitles CVD subtitles are different in several ways from SVCD OGT subtitles
(see see corresponding info on that.) (see see corresponding info on that.)
Image comes first and meta data is at the end. So that the metadata The image data comes first and meta data is at the end. So that the
can be found easily, the subtitle packet starts with two bytes metadata can be found easily, the subtitle packet starts with two
(everything is big-endian again) that gives the total size of the bytes (everything is big-endian again) that gives the total size of
subtitle data and the offset to the metadata - i.e. size of the image the subtitle data and the offset to the metadata - i.e. size of the
data plus the four bytes at the beginning. image data plus the four bytes at the beginning.
Data for single screen subtitle may come in several non-contiguous As with OGT subtitles, Data for single screen subtitle may come in
packets of a stream. From the scant data on the format, the only way several non-contiguous packets of a stream. From the scant data on
known to detect the first packet in a subtitle. The first packet the format, the only way known to detect the first packet in a
seems to have a valid PTS while later packets for the same image subtitle. The first packet seems to have a valid PTS while later
don't. packets for the same image don't.
Image data comes interlaced and is run-length encoded (RLE). Each The image data comes interlaced and is run-length encoded (RLE). Each
field is a four-bit nibbles that is further subdivided in a two-bit field is a four-bit nibbles that is further subdivided in a two-bit
repeat count and a two-bit color number - up to three pixels can be repeat count and a two-bit color number - up to three pixels can be
described in four bits. What a 0 repeat count means is unknown. It described in four bits. What a 0 repeat count means not known. It
might be used for RLE extension. There is a special case of a 0 might be used for RLE extension. There is a special case of a 0
repeat count though. When the full nibble is zero, the rest of the repeat count that has been inferred: when the full nibble is zero, the
line is filled with the color value in the next nibble. It is unknown rest of the line is filled with the color value in the next nibble.
what happens if the color value is greater than three. The rest seems It is unknown what happens if the color value is greater than three.
to use a 4-entries palette. It is not impossible that the fill-line The rest seems to use a 4-entries palette. It is possible that the
complete case above is not as described and the zero repeat count fill-line general case above is not as described and the zero repeat
means fill line. The sample code never produces this, so it may be count means fill line. But since this hasn't been ever seen, the
untested. preceding is only conjecture.
Here is information given at the start of a subtitle: Here is information given at the start of a subtitle:
SPU size 2 bytes SPU size 2 bytes
metadata offset 2 bytes metadata offset 2 bytes
Although metadata information does not have to come in a fixed field Although metadata information does come in a fixed field order, every
order, every metadata field consists of a tag byte followed by metadata field consists of a tag byte followed by parameters. In all
parameters. In all cases known, the size including the tag byte is cases seen, the size including the tag byte is exactly four bytes.
exactly four bytes.
code Meaning code Meaning
---- ------- ---- -------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment