Explain CEA-608 PAC mapping to WebVTT better.
authorSilvia Pfeiffer
Fri, 02 Nov 2012 11:12:47 +1100
changeset 12 10eb2f7a00f8
parent 11 0d217d0ee467
child 13 397d3ff6557d
Explain CEA-608 PAC mapping to WebVTT better.
608toVTT/608toVTT.html
--- a/608toVTT/608toVTT.html	Fri Nov 02 09:04:54 2012 +1100
+++ b/608toVTT/608toVTT.html	Fri Nov 02 11:12:47 2012 +1100
@@ -87,9 +87,9 @@
 
         <p>This document specifies a method for converting CEA-608/708 data streams to [[WEBVTT]]. This document details how such a conversion can be made, and defines some constraints on the translation process so that the resulting [[WEBVTT]] file is interoperable between WebVTT implementations.</p>
 
-        <p>This document does not target user agent developers. User agents (UAs) are expected to implement support for the full [[WebVTT]] specification. Any conversion tool that follows the suggestions in this document and delivers WebVTT files as converted by the suggestions in this document together with an appropriate HTML page and a style sheet as explained in <a href="#browsers" class="sectionRef"></a> can expect UAs to render their WebVTT file on their videos correctly.</p>
+        <p>This document does not target user agent developers. User agents (UAs) are expected to implement the [[WebVTT]] specification. Any conversion tool that follows the suggestions in this document and delivers WebVTT files as converted by the suggestions in this document together with an appropriate HTML page and a style sheet as explained in <a href="#browsers" class="sectionRef"></a> can expect UAs to render their WebVTT file on their videos correctly.</p>
 
-        <p>The aim of this document is to help developers of tools that convert between different caption formats to implement best practice for creating WebVTT files that support CEA-608 or CEA-708 features. It is non-normative.</p>
+        <p>The aim of this document is to help developers of tools that convert between different caption formats to implement best practice for creating WebVTT files that support CEA-608 or CEA-708 features.</p>
     </section>
     
 
@@ -104,11 +104,11 @@
       </p>
 
       <p>
-        A WebVTT file consists at its core of a series of so-called cues, which contain a start time, an end time, cue settings, and the to be rendered text. Styling of character attributes is provided through markup of the text in a similar fashion to how HTML marks up text.
+        A WebVTT file consists at its core of a series of so-called cues, which contain a start time, an end time, cue settings, and the cue text, which is rendered in browsers for WebVTT files of kind "subtitles" or "captions". Styling of character attributes is provided through markup of the text in a similar fashion to how HTML marks up text.
       </p>
 
       <p>
-        The command-based CEA-608 and CEA-708 streams are mapped in the following to the file-based WebVTT format. The aim is to achieve the same visual experience, so for CEA-608 it is important what is in the display memory and not what is in the off-screen composition memory. Similarly, for CEA-708 it is important what is in the visible windows. The translation shall in particular preserve the colour, background, spacing, and timing of captions, including individual character timings in rollup and paint on mode.
+        The command-based CEA-608 and CEA-708 streams are mapped in the following to the file-based WebVTT format. The aim is to achieve the same visual experience, so for CEA-608 it is important what is in the display memory and not what is in the off-screen composition memory. Similarly, for CEA-708 it is important what is in the visible windows. The translation shall in particular preserve the positioning, colour, background, spacing, and timing of captions, including individual character timings in rollup and paint on mode.
       </p>
 
       <section>
@@ -171,38 +171,38 @@
       </section>
 
       <section>
-        <h2>Positioning</h2>
+        <h2>Positioning in CEA-608</h2>
         <p>
-          CEA-60 defines a safe caption area as 80% of the TV picture height and 80% of TV picture width, centered. Within this area, it defines one or more areas (called “boxes”) within which caption characters are displayed.
-        </p>
-
-        <p>
-          These boxes can be positioned on a grid of 15 character rows of equal height and 32 columns of equal width to provide accurate placement of text on screen.
+          CEA-608 defines a safe caption area as 80% of the TV picture height and 80% of TV picture width, centered. Within this area, it defines one or more areas (called “boxes”) within which caption characters are displayed.
         </p>
 
         <p>
-          The default display area for WebVTT CEA-608 captions is an absolute position of the rendering area on top of the video’s rendering area with 80% of the width and height, positioned 10% in from the top and the bottom.
+          In WebVTT CEA-608, the safe caption area is set by the video player by setting "edge margin" to 10%.
         </p>
 
         <p>
-          In WebVTT CEA-608, each CEA-60 box is mapped to one or more WebVTT boxes, which are displayed into the WebVTT display area. A box contains the cue characters that are to be displayed.
+          The CEA-608 boxes can be positioned on a grid of 15 character rows of equal height and 32 columns of equal width to provide accurate placement of text on screen.
         </p>
 
         <p>
-          The sizes and positions of the boxes are defined in relation to the size of the video viewport:
+          In WebVTT CEA-608, each CEA-608 box is mapped to a tree of WebVTT Node Objects, which are displayed into the WebVTT rendering area, i.e. the video viewport. A tree of WebVTT Node Objects contains a parsed representation of the cue content that is to be rendered. They map easily to HTML DOM nodes which simplifies rendering when a browser rendering engine is available. We call the root of a WebVTT Node Object tree the WebVTT cue box.
+        </p>
+
+        <p>
+          When rendering a WebVTT CEA-608 cue box, their sizes and positions are defined in relation to the size of the video viewport using the features of CEA-608:
         </p>
         <ul>
-          <li>15 character rows are defined on 80% of the video rendering area’s height, which sets the line height - i.e. each line is 5.33% of the video height</li>
-          <li>the line height also defines the font height</li>
-          <li>32 columns of characters are defined on 80% of the video rendering area’s width - i.e. each column is 2.5% of the video width</li>
-          <li>every 4 columns/characters is a new indent position - i.e. each indent is 10% of the video width</li>
+          <li>The line height is defined as 5% of the video height, because CEA-608 requires 15 character rows to be rendered on 80% of the video rendering area’s height.</li>
+          <li>The font height is defined from the line height by dividing it by 1.3; this is to make sure there is enough space for the characters in a line.</li>
+          <li>The column width is defined as 2.5% of the video width, because CEA-608 requires 32 columns of characters to be rendered on 80% of the video rendering area’s width.</li>
+          <li>CEA-608 indent positions are every 10% of the video width, because CEA-68 defines a new indent position every 4 columns/characters.</li>
         </ul>
         <p>
           When translating to WebVTT only the final position of the region shall be translated.
         </p>
 
         <p>
-          Two different modes of addressing positions on this grid are possible:
+          CEA-608 defines two different modes of addressing positions on the grid of columns and rows:
         </p>
 
         <h3>(1) Preamble Address Code (PAC)</h3>
@@ -211,15 +211,129 @@
         </p>
 
         <p>
-          The PAC row number maps to a line position cue setting in WebVTT CEA-608, given as<br>
-          line:x% (percent of video height between 10..84.66% in steps of 5.33) or<br>
-          line:y (line position between 0..14)
+          The PAC row number maps to a line cue setting in WebVTT CEA-608. Since WebVTT defines its line numbering scheme based on the height of the font in use, WebVTT CEA-608 makes use of the percentage line cue setting of WebVTT:<br>
+          line:x%<br>
+          Use the following percentage values to represent CEA-608 row numbers:
+        </p>
+        <table border="1">
+          <thead>
+            <tr>
+              <td>CEA-608 PAC row</td>
+              <td>WebVTT cue line value</td>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>1</td>
+              <td>10%</td>
+            </tr>
+            <tr>
+              <td>2</td>
+              <td>15.33%</td>
+            </tr>
+            <tr>
+              <td>3</td>
+              <td>20.66%</td>
+            </tr>
+            <tr>
+              <td>4</td>
+              <td>26%</td>
+            </tr>
+            <tr>
+              <td>5</td>
+              <td>31.33%</td>
+            </tr>
+            <tr>
+              <td>6</td>
+              <td>36.66%</td>
+            </tr>
+            <tr>
+              <td>7</td>
+              <td>42%</td>
+            </tr>
+            <tr>
+              <td>8</td>
+              <td>47.33%</td>
+            </tr>
+            <tr>
+              <td>9</td>
+              <td>52.66%</td>
+            </tr>
+            <tr>
+              <td>10</td>
+              <td>58%</td>
+            </tr>
+            <tr>
+              <td>11</td>
+              <td>63.33%</td>
+            </tr>
+            <tr>
+              <td>12</td>
+              <td>68.66%</td>
+            </tr>
+            <tr>
+              <td>13</td>
+              <td>74%</td>
+            </tr>
+            <tr>
+              <td>14</td>
+              <td>79.33%</td>
+            </tr>
+            <tr>
+              <td>15</td>
+              <td>84.66%</td>
+            </tr>
+          </tbody>
+        </table>
+
+        <p>
+          The PAC indent position maps to a position cue setting in WebVTT CEA-608, which is a percentage offset within the video viewport:<br>
+          position:x%<br>
+          Use the following percentage values to represent CEA-608 indent positions:
         </p>
 
-        <p>
-          The PAC indent position maps to a text position cue setting in WebVTT CEA-608, given as<br>
-          position:x% (percent of video width between 10..87.5% in steps of 2.5)
-        </p>
+        <table border="1">
+          <thead>
+            <tr>
+              <td>CEA-608 PAC indent code</td>
+              <td>WebVTT cue position value</td>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>indent 0/column 1</td>
+              <td>10%</td>
+            </tr>
+            <tr>
+              <td>indent 4/column 5</td>
+              <td>20%</td>
+            </tr>
+            <tr>
+              <td>indent 8/column 9</td>
+              <td>30%</td>
+            </tr>
+            <tr>
+              <td>indent 12/column 13</td>
+              <td>40%</td>
+            </tr>
+            <tr>
+              <td>indent 16/column 17</td>
+              <td>50%</td>
+            </tr>
+            <tr>
+              <td>indent 20/column 21</td>
+              <td>60%</td>
+            </tr>
+            <tr>
+              <td>indent 24/column 25</td>
+              <td>70%</td>
+            </tr>
+            <tr>
+              <td>indent 28/column 29</td>
+              <td>80%</td>
+            </tr>
+          </tbody>
+        </table>
 
         <h3>(2) Tab Offset</h3>
         <p>