Added size calculation for CEA708 WebVTT calc.
authorSilvia Pfeiffer
Fri, 02 Nov 2012 22:20:18 +1100
changeset 18 4f800f08aa27
parent 17 78cf88faf9c0
child 19 ab80912300d7
Added size calculation for CEA708 WebVTT calc.
608toVTT/608toVTT.html
--- a/608toVTT/608toVTT.html	Fri Nov 02 17:01:05 2012 +1100
+++ b/608toVTT/608toVTT.html	Fri Nov 02 22:20:18 2012 +1100
@@ -360,7 +360,7 @@
       <section>
         <h2>Positioning in CEA-708</h2>
         <p>
-          CEA-708 captions make use of what is called a "Caption Screen", which for WebVTT is the video viewport. CEA-708 defines a grid on top of the video viewport that depends on the dimensions of the video - e.g. it is different for 16:9 video to 4:3 video. For WebVTT we expect that the grid locations are converted to percentage locations in a coordinate system with (0%,0%) at the top left and (100%,100%) on the bottom right. This specification relies on this percentage-based coordinate system.
+          CEA-708 captions make use of what is called a "Caption Screen", which for WebVTT is the video viewport. CEA-708 defines a grid on the Caption Screen that depends on the dimensions of the video - e.g. it is different for 16:9 video to 4:3 video.
         </p>
 
         <p>
@@ -464,7 +464,43 @@
             </tr>
           </tbody>
         </table>
-      
+
+        <p>
+          For WebVTT we assume that the grid that is defined on the Caption Screen consists of 100 horizontal cells and 100 vertical cells.
+        </p>
+
+        <p>
+          If the CEA-708 Caption Screen grid is not provided as a 100x100 grid, we need to convert the given grid to percentages. For 16:9 video we thus convert the 210 horizontal by 75 vertical cells, and for 4:3 the 160 horizontal by 75 vertical cells to a percentage. We end up with grid locations (x%,y%) in a percentage coordinate system with (0%,0%) at the top left and (100%,100%) on the bottom right.
+        </p>
+
+        <p>
+          The grid is used to position the Caption Windows through the "Anchor Location" property. It is given in WebVTT in "anchorlocation" Region attribute:<br>
+          anchorlocation:x%,y%
+        </p>
+
+        <p>
+          In CEA-708, the size of the Caption Windows is provided through a number of character rows and columns. There is a maximum of 15 rows and a maximum of 32 columns, just like in CEA-608. Similar to CEA-608, these numbers represent the maximum number of rows and columns that a Caption Window that covers the full Caption Screen can provide.
+        </p>
+
+        <p>
+          The width of a Caption Window is converted to a WebVTT Region width by multiplying by 2.5, resulting in a percentage Region width setting:<br>
+          w=columns*2.5<br>
+          width:w%
+        </p>
+
+        <p>
+          The height of a Caption Window is converted to a WebVTT Region height by multiplying by 5.33, resulting in a percentage Region height setting:<br>
+          h=rows*5.22<br>
+          height:h%
+        </p>
+
+        <p>
+          The actual height and width of the caption window depends, however, on the actual font size. Thus, the width is calculated by multiplying the number of columns with the character width and the height by multiplying the number of rows with the character height.
+        </p>
+
+        <p>
+          The "Lock Rows" and “Lock Columns” Caption Window parameters if set fix the maximum number of rows and columns of caption text that a window may have. This means that lines that were rendered at the font size set by the WebVTT format are not changed when the user changes the font size. If rows or columns are unlocked, rendering can change the line breaks and fill the defined region with different lines.
+        </p>
       </section>
 
       <section>