- * We do not have information on the subtitle format used on CVD's
- * except the submux sample code and a couple of samples of dubious
- * origin. Thus, this is the result of reading some code whose
- * correctness is not known and some experimentation.
- *
- * CVD subtitles present several differences compared to SVCD OGT
- * subtitles. Firstly, the image comes first and the metadata is at
- * the end. So that the metadata can be found easily, the subtitle
- * begins with two two-byte (everything is big-endian again) that
- * describe, the total size of the subtitle data and the offset to the
- * metadata (size of the image data plus the four bytes at the
- * beginning.
- *
- * Image data comes interlaced and uses RLE. Coding is based in
- * four-bit nibbles that are further subdivided in a two-bit repeat
- * count and a two-bit color number so that up to three pixels can be
- * describe with a total of four bits. The function of a 0 repeat
- * count is unknown. It might be used for RLE extension. There is a
- * special case, though. When the full nibble is zero, the rest of
- * the line is filled with the color value in the next nibble. It is
- * unknown what happens if the color value is greater than three. The
- * rest seems to use a 4-entries palette. It is not impossible that
- * the fill-line complete case above is not as described and the zero
- * repeat count means fill line. The sample code never produces this,
- * so it may be untested.
- *
- * The metadata section does not follow a fixed pattern, every
- * metadata item consists of a tag byte followed by parameters. In all
- * cases known, the block (including the tag byte) is exactly four
- * bytes in length. Read the code for the rest.
- */
-
-/* FIXME: do we really need p_buffer and p?
- Can't all of thes _offset's and _lengths's get removed?
+ We do not have information on the subtitle format used on CVD's
+ except the submux sample code and a couple of samples of dubious
+ origin. Thus, this is the result of reading some code whose
+ correctness is not known and some experimentation.
+
+ CVD subtitles are different in severl ways from SVCD OGT subtitles.
+ First, the image comes first and the metadata is at the end. So
+ that the metadata can be found easily, the subtitle packet starts
+ with two bytes (everything is big-endian again) that give the total
+ size of the subtitle data and the offset to the metadata - i.e. size
+ of the image data plus the four bytes at the beginning.
+
+ Image data comes interlaced is run-length encoded. Each field is a
+ four-bit nibble. Each nibble contains a two-bit repeat count and a
+ two-bit color number so that up to three pixels can be described in
+ four bits. The function of a 0 repeat count is unknown; it might be
+ used for RLE extension. However when the full nibble is zero, the
+ rest of the line is filled with the color value in the next nibble.
+ It is unknown what happens if the color value is greater than three.
+ The rest seems to use a 4-entries palette. It is not impossible
+ that the fill-line complete case above is not as described and the
+ zero repeat count means fill line. The sample code never produces
+ this, so it may be untested.
+
+ The metadata section does not follow a fixed pattern, every
+ metadata item consists of a tag byte followed by parameters. In all
+ cases known, the block (including the tag byte) is exactly four
+ bytes in length. Read the code for the rest.