Skip to content

Commit

Permalink
Merge pull request #171 from AOMediaCodec/assert_ids_120
Browse files Browse the repository at this point in the history
Assert ids for version 1.2.0 and draft 1.3.0
  • Loading branch information
cconcolato authored Dec 11, 2023
2 parents 014d8ea + 2510697 commit df5721b
Show file tree
Hide file tree
Showing 2 changed files with 1,228 additions and 1,279 deletions.
31 changes: 16 additions & 15 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ AV1 Sample Entry {#av1sampleentry-section}
<pre class="def">
Sample Entry Type: <dfn value export for="AV1SampleEntry">av01</dfn>
Container: Sample Description Box ('stsd')
Mandatory: <assert>Yes</assert>
Quantity: <assert>One or more.</assert>
<assert>Mandatory: Yes <span hidden>for av01</span></assert>
<assert>Quantity: One or more <span hidden>for av01</span></assert>
</pre>

### Description ### {#av1sampleentry-description}
Expand Down Expand Up @@ -251,8 +251,8 @@ AV1 Codec Configuration Box {#av1codecconfigurationbox-section}
<pre class="def">
Box Type: <dfn export>av1C</dfn>
Container: AV1 Sample Entry ('av01')
Mandatory: <assert>Yes</assert>
Quantity: <assert>Exactly One</assert>
<assert>Mandatory: Yes <span hidden>for av1C</span></assert>
<assert>Quantity: Exactly One <span hidden>for av1C</span></assert>
</pre>


Expand Down Expand Up @@ -429,8 +429,8 @@ AV1 Forward Key Frame sample group entry {#forwardkeyframesamplegroupentry}
<pre class="def">
Group Type: <dfn export>av1f</dfn>
Container: Sample Group Description Box ('sgpd')
Mandatory: <assert>No</assert>
Quantity: <assert>Zero or more</assert>.
<assert>Mandatory: No <span hidden>for av1f</span></assert>
<assert>Quantity: Zero or more <span hidden>for av1f</span></assert>.
</pre>

### Description ### {#forwardkeyframesamplegroupentry-description}
Expand Down Expand Up @@ -460,8 +460,8 @@ AV1 Multi-Frame sample group entry {#multiframesamplegroupentry}
<pre class="def">
Group Type: <dfn value export for="AV1MultiFrameSampleGroupEntry">av1m</dfn>
Container: Sample Group Description Box ('sgpd')
Mandatory: <assert>No</assert>
Quantity: <assert>Zero or more</assert>.
<assert>Mandatory: No <span hidden>for av1m</span></assert>
<assert>Quantity: Zero or more <span hidden>for av1m</span></assert>.
</pre>


Expand All @@ -487,8 +487,8 @@ AV1 Switch Frame sample group entry {#switchframesamplegroupentry}
<pre class="def">
Group Type: <dfn export>av1s</dfn>
Container: Sample Group Description Box ('sgpd')
Mandatory: <assert>No</assert>
Quantity: <assert>Zero or more</assert>.
<assert>Mandatory: No <span hidden>for av1s</span></assert>
<assert>Quantity: Zero or more <span hidden>for av1s</span></assert>.
</pre>


Expand All @@ -513,8 +513,8 @@ AV1 Metadata sample group entry {#metadatasamplegroupentry}
<pre class="def">
Group Type: <dfn value noexport for="AV1MetadataSampleGroupEntry">av1M</dfn>
Container: Sample Group Description Box ('sgpd')
Mandatory: <assert>No</assert>
Quantity: <assert>Zero or more</assert>.
<assert>Mandatory: No <span hidden>for av1M</span></assert>
<assert>Quantity: Zero or more <span hidden>for av1M</span></assert>.
</pre>


Expand Down Expand Up @@ -598,16 +598,16 @@ Within protected samples, the following constraints apply:
NOTE: As a result of the above, [=BytesOfProtectedData=] is not necessarily a multiple of 16 bytes and partial blocks are included in the [=BytesOfProtectedData=] range, but per [[!CENC]] the data is not be encrypted.

- <assert>A subsample SHALL be created for each tile, even if its size is less than 16 bytes</assert>.
- <assert>All other parts of [=Tile Group OBUs=] and [=Frame OBUs=] SHALL be unprotected</assert>.
- <assert>All other parts of [=Tile Group OBUs=] and [=Frame OBUs=] SHALL be unprotected <span hidden>for cbcs</span></assert>.

- for the protected scheme <code>[=cenc=]</code>:
- <assert>[=BytesOfProtectedData=] SHALL be a multiple of 16 bytes</assert>.
- <assert>[=BytesOfProtectedData=] SHALL end on the last byte of the <code>decode_tile</code> structure (including any trailing bits)</assert>.
- <assert>[=BytesOfProtectedData=] SHALL span all complete 16-byte blocks of the <code>decode_tile</code> structure (including any trailing bits)</assert>.

NOTE: As a result of the above, partial blocks are not used and it is possible that [=BytesOfProtectedData=] does not start at the first byte of the <code>decode_tile</code> structure, but some number of bytes following that.
- <assert>A subsample SHALL be created for each tile that has a <code>decode_tile</code> structure whose size (including any trailing bits) is larger or equal to 16 bytes<assert>. <assert>If it is less than 16 bytes, per the rules above, the <code>decode_tile</code> structure is not encrypted and the corresponding bytes SHOULD be included in the [=BytesOfClearData=] field of a surrounding subsample, if any</assert>.
- <assert>All other parts of [=Tile Group OBUs=] and [=Frame OBUs=] SHALL be unprotected</assert>.
- <assert>A subsample SHALL be created for each tile that has a <code>decode_tile</code> structure whose size (including any trailing bits) is larger or equal to 16 bytes</assert>. <assert>If it is less than 16 bytes, per the rules above, the <code>decode_tile</code> structure is not encrypted and the corresponding bytes SHOULD be included in the [=BytesOfClearData=] field of a surrounding subsample, if any</assert>.
- <assert>All other parts of [=Tile Group OBUs=] and [=Frame OBUs=] SHALL be unprotected <span hidden>for cenc</span></assert>.

Subsample Encryption Illustration {#subsample-encryption-illustration}
------------------
Expand Down Expand Up @@ -699,3 +699,4 @@ Changes since v1.2.0 release {#changelist}
- <a href="https://github.com/AOMediaCodec/av1-isobmff/pull/175">Shorten long lines</a>
- <a href="https://github.com/AOMediaCodec/av1-isobmff/pull/170">Update the CMAF section to mention the cmf2 brand.</a>
- <a href="https://github.com/AOMediaCodec/av1-isobmff/pull/142">Clarify the color info in the codecs string.</a>
- <a href="https://github.com/AOMediaCodec/av1-isobmff/pull/171">Make assert-id's unique and add them to the previous version.</a>
Loading

0 comments on commit df5721b

Please sign in to comment.