New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 0173 safe crop area editor #197
Changes from all commits
1746212
b25905a
2076b39
27484df
12cc200
03d4963
9f9042d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1131,6 +1131,15 @@ that effectively represent the content, styling, layout, and timing of a source | |
an <loc href="#terms-intermediate-synchronic-document">intermediate synchronic document</loc>.</p> | ||
</def> | ||
</gitem> | ||
|
||
<gitem id="terms-higher-level-protocol"> | ||
<label>[higher level protocol]</label> | ||
<def> | ||
<p>A protocol or process of the <loc href="#terms-document-processing-context">document processing context</loc> | ||
that is outside the scope of this specification.</p> | ||
</def> | ||
</gitem> | ||
|
||
<gitem id="terms-nested-profile"> | ||
<label>[nested profile]</label> | ||
<def> | ||
|
@@ -3019,6 +3028,7 @@ Parameter Attributes | |
<loc href="#parameter-attribute-mediaDuration">ttp:mediaDuration</loc>, | ||
<loc href="#parameter-attribute-mediaOffset">ttp:mediaOffset</loc>, | ||
<loc href="#parameter-attribute-pixelAspectRatio">ttp:pixelAspectRatio</loc>, | ||
<loc href="#parameter-attribute-safeCropArea">ttp:safeCropArea</loc>, | ||
<loc href="#parameter-attribute-storageAspectRatio">ttp:storageAspectRatio</loc>, | ||
<loc href="#parameter-attribute-subFrameRate">ttp:subFrameRate</loc>, | ||
<loc href="#parameter-attribute-tickRate">ttp:tickRate</loc>, | ||
|
@@ -4390,6 +4400,7 @@ of which TTML Content can be related to an external environment.</p> | |
<item><p><specref ref="parameter-attribute-mediaDuration"/></p></item> | ||
<item><p><specref ref="parameter-attribute-mediaOffset"/></p></item> | ||
<item><p><specref ref="parameter-attribute-pixelAspectRatio"/></p></item> | ||
<item><p><specref ref="parameter-attribute-safeCropArea"/></p></item> | ||
<item><p><specref ref="parameter-attribute-storageAspectRatio"/></p></item> | ||
<item><p><specref ref="parameter-attribute-subFrameRate"/></p></item> | ||
<item><p><specref ref="parameter-attribute-tickRate"/></p></item> | ||
|
@@ -4890,6 +4901,87 @@ If specified, then both numerator and demoninator must be non-zero.</p> | |
<p>A <att>ttp:pixelAspectRatio</att> attribute is considered to be significant only | ||
when specified on the <el>tt</el> element.</p> | ||
</div3> | ||
<div3 id="parameter-attribute-safeCropArea"> | ||
<head>ttp:safeCropArea</head> | ||
<p>The <att>ttp:safeCropArea</att> attribute may be used to designate a rectangular area of the <loc href="#terms-root-container-region">root | ||
container region</loc> outside of which renderable content may be safely cropped during presentation processing.</p> | ||
<note role="motivation"> | ||
<p>Under normal circumstances, renderable content within the <loc href="#terms-root-container-region">root container region</loc> | ||
is not cropped during presentation processing. That is, the entirety of the <loc href="#terms-root-container-region">root container region</loc> | ||
is presented. However, under special circumstances, such as when a <loc href="#terms-related-media-object">related media object</loc> is cropped, then | ||
some cropping may also be applied to the <loc href="#terms-root-container-region">root container region</loc>. The <att>ttp:safeCropArea</att> parameter | ||
attribute provides a means for the author to signal a portion of the <loc href="#terms-root-container-region">root container region</loc> | ||
where cropping may safely occur, which is to say that the complement of this portion should not be cropped, i.e., the interior of the | ||
safe crop area is not safe to crop and should remain visible when presented.</p> | ||
</note> | ||
<note role="elaboration"> | ||
<p>Alternative names have been suggested for this attribute that would emphasize the intent to ensure that content remains visible as opposed | ||
to suggesting an intent to allow content to be hidden (by cropping). After considering alternatives, the current name has been retained in order to | ||
reflect existing industry practice surrounding this concept.</p> | ||
</note> | ||
<p>If specified, the value of this attribute must adhere to the following syntax:</p> | ||
<table id="parameter-attribute-safeCropArea-syntax" role="syntax"> | ||
<caption>Syntax Representation – ttp:safeCropArea</caption> | ||
<tbody> | ||
<tr> | ||
<td> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like a very complicated way to say that the width must not be more than 100%. |
||
<eg xml:space="preserve"> | ||
ttp:safeCropArea | ||
: origin? extent | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Likewise, why not simply restrict the height to a maximum of 100%? |
||
|
||
origin | ||
: x y | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can just remove this by requiring the origin to be specified. |
||
extent | ||
: width height | ||
|
||
x, y, width, height | ||
: <loc href="#style-value-percentage"><percentage></loc> // where <emph>percentage</emph> is non-negative | ||
</eg> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<p>Computed values of the origin and extent of the safe crop area are determined by the rules described below, | ||
where percentage values are resolved with respect to the width and height of the <loc href="#terms-root-container-region">root container region</loc>.</p> | ||
<note role="explanation"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's unclear what this is trying to achieve, or why it is a good idea. Same goes for height. For example, say the width is 60% and x is 30%; then the difference between those is 30%, which is smaller than the interim computed value of width, being 60%. So safe crop area is specified as having extent 60% and this clause makes it 30% instead. That seems like an unexpected result. |
||
<p>The intent of the following rules is to ensure | ||
that the safe crop area is bounded by the <loc href="#terms-root-container-region">root container region</loc>.</p> | ||
</note> | ||
<p>The interim computed values of the <emph>width</emph> and <emph>height</emph> of the extent of the safe crop area are determined as follows:</p> | ||
<ulist> | ||
<item><p>the interim computed value of <emph>width</emph>, <emph>I<sub>W</sub></emph>, | ||
is the minimum of the resolved value of the specified <emph>width</emph> and | ||
the computed <emph>width</emph> of the <loc href="#terms-root-container-region">root container region</loc>;</p></item> | ||
<item><p>the interim computed value of <emph>height</emph>, <emph>I<sub>H</sub></emph>, | ||
is the minimum of the resolved value of the specified <emph>height</emph> and | ||
the computed <emph>height</emph> of the <loc href="#terms-root-container-region">root container region</loc>.</p></item> | ||
</ulist> | ||
<p>The computed values of the <emph>x</emph> and <emph>y</emph> of the origin of the safe crop area are determined as follows:</p> | ||
<ulist> | ||
<item><p>if no <code>origin</code> component is specified, then the computed value of <emph>x</emph> is | ||
one half of the difference between the computed <emph>width</emph> of the <loc href="#terms-root-container-region">root container region</loc> and <emph>I<sub>W</sub></emph>; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, this is better. I'm not sure exactly why we need to distinguish the processing context from the higher level protocol - from the perspective of the TTML 2 semantics they seem like they are both "instructions from above" and the precise origin doesn't make any difference. |
||
otherwise, it is the minimum of the resolved value of the specified <emph>x</emph> and the computed <emph>width</emph> of the | ||
<loc href="#terms-root-container-region">root container region</loc>;</p></item> | ||
<item><p>if no <code>origin</code> component is specified, then the computed value of <emph>y</emph> is | ||
one half of the difference between the computed <emph>height</emph> of the <loc href="#terms-root-container-region">root container region</loc> and <emph>I<sub>H</sub></emph>; | ||
otherwise, it is the minimum of the resolved value of the specified <emph>y</emph> and the computed <emph>height</emph> of the | ||
<loc href="#terms-root-container-region">root container region</loc>.</p></item> | ||
</ulist> | ||
<p>The final computed values of the <emph>width</emph> and <emph>height</emph> of the extent of the safe crop area are determined as follows:</p> | ||
<ulist> | ||
<item><p>the final computed value of <emph>width</emph> is the minimum of (1) the difference between the computed <emph>width</emph> | ||
of the <loc href="#terms-root-container-region">root container region</loc> and the computed value of <emph>x</emph> and (2) the interim computed value of <emph>width</emph>, | ||
<emph>I<sub>W</sub></emph>;</p></item> | ||
<item><p>the final computed value of <emph>height</emph> is the minimum of (1) the difference between the computed <emph>height</emph> | ||
of the <loc href="#terms-root-container-region">root container region</loc> and the computed value of <emph>y</emph> and (2) the interim computed value of <emph>height</emph>, | ||
<emph>I<sub>H</sub></emph>.</p></item> | ||
</ulist> | ||
<p>When presented on a visual medium, renderable content within the bounds of the safe crop area must not be cropped unless overridden | ||
by a <loc href="#terms-higher-level-protocol">higher level protocol</loc>.</p> | ||
<p>A <att>ttp:safeCropArea</att> attribute is considered to be significant only | ||
when specified on the <el>tt</el> element.</p> | ||
</div3> | ||
<div3 id="parameter-attribute-storageAspectRatio"> | ||
<head>ttp:storageAspectRatio</head> | ||
<p>The <att>ttp:storageAspectRatio</att> attribute may be used to express the <loc href="#terms-storage-aspect-ratio">storage aspect ratio</loc> associated with the | ||
|
@@ -19479,6 +19571,15 @@ transforming the <loc href="#style-attribute-rubyReserve"><att>tts:rubyReserve</ | |
<code>#rubyReserve</code> feature if it implements presentation semantic support for the | ||
<loc href="#style-attribute-rubyReserve"><att>tts:rubyReserve</att></loc> attribute.</p> | ||
</div3> | ||
<div3 id="feature-safeCropArea"> | ||
<head>#safeCropArea</head> | ||
<p>A TTML <loc href="#terms-transformation-processor">transformation processor</loc> supports the | ||
<code>#safeCropArea</code> feature if it recognizes and is capable of | ||
transforming the <loc href="#parameter-attribute-safeCropArea"><att>ttp:safeCropArea</att></loc> attribute.</p> | ||
<p>A TTML <loc href="#terms-presentation-processor">presentation processor</loc> supports the | ||
<code>#safeCropArea</code> feature if it implements presentation semantic support for the | ||
<loc href="#parameter-attribute-safeCropArea"><att>ttp:safeCropArea</att></loc> attribute.</p> | ||
</div3> | ||
<div3 id="feature-showBackground"> | ||
<head>#showBackground</head> | ||
<p>A TTML <loc href="#terms-transformation-processor">transformation processor</loc> supports the | ||
|
@@ -20917,6 +21018,11 @@ is optional (O), for transformation and <loc href="#terms-presentation-processor | |
<td>O</td> | ||
</tr> | ||
<tr> | ||
<td><loc href="#feature-safeCropArea"><code>#safeCropArea</code></loc></td> | ||
<td>O</td> | ||
<td>O</td> | ||
</tr> | ||
<tr> | ||
<td><loc href="#feature-showBackground"><code>#showBackground</code></loc></td> | ||
<td>O</td> | ||
<td>O</td> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making origin optional is unnecessarily complex - I would simplify this by requiring it. (incidentally in an early draft of the submission I did exactly the same thing but got strong feedback that it would be better not to do this.)