Skip to content

Commit 9cc2535

Browse files
tidoustpadenot
authored andcommitted
Drop local custom definitions where possible
Bikeshed now contains cross-reference anchors from Webref, which means it now knows about a number of "new" specifications, including WebCodecs, Media Capture specs, the Infra standard, etc. See announcement at: https://lists.w3.org/Archives/Public/spec-prod/2023JanMar/0004.html In turn, this means that WebCodecs specs no longer need to list and maintain a local database of cross-references, except in rare cases (such as when a term is not exported by the referenced spec). This update drops local definitions where ever possible, adjusting references in the prose as needed. A few definitions remain here and there to list external terms that are not exported, along with a couple of linking defaults in the WebCodecs spec. One temporary hiccup: the markup definitions of `CanvasImageSource` and `drawImage()` are slightly incorrect. Hence the need to re-define them locally. To be removed once the HTML spec is fixed. In codec registration specs, note that the form `{{VideoDecoderConfig/description|VideoDecoderConfig.description}}` is used to output `VideoDecoderConfig.description` (with the right link to the WebCodecs spec) when merely having `description` would be ambiguous.
1 parent e9b8cd3 commit 9cc2535

16 files changed

+147
-436
lines changed

aac_codec_registration.src.html

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
Abstract: This registration is entered into the [[webcodecs-codec-registry]].
1515
It describes, for AAC, the (1) fully qualified codec strings, (2) the
16-
codec-specific {{EncodedAudioChunk}} [=EncodedAudioChunk/[[internal data]]=]
17-
bytes, (3) the {{AudioDecoderConfig.description}} bytes, (4) the values of
18-
{{EncodedAudioChunk}} [=EncodedAudioChunk/[[type]]=], and (5) the
19-
codec-specific extensions to {{AudioEncoderConfig}}
16+
codec-specific {{EncodedAudioChunk}} {{EncodedAudioChunk/[[internal data]]}}
17+
bytes, (3) the {{AudioDecoderConfig/description|AudioDecoderConfig.description}}
18+
bytes, (4) the values of {{EncodedAudioChunk}} {{EncodedAudioChunk/[[type]]}},
19+
and (5) the codec-specific extensions to {{AudioEncoderConfig}}
2020

2121
The registration is not intended to include any information on whether a
2222
codec format is encumbered by intellectual property claims. Implementers and
@@ -32,23 +32,6 @@
3232
!Version History: <a href="https://github.com/w3c/webcodecs/commits">https://github.com/w3c/webcodecs/commits</a>
3333
</pre>
3434

35-
<pre class='anchors'>
36-
spec: WEBCODECS; urlPrefix: https://w3c.github.io/webcodecs/#
37-
type: attribute
38-
text: AudioDecoderConfig.description; url: dom-audiodecoderconfig-description
39-
text: AudioDecoderConfig.sampleRate; url: dom-audiodecoderconfig-samplerate
40-
text: AudioDecoderConfig.numberOfChannels; url: dom-audiodecoderconfig-numberofchannels
41-
type: dfn
42-
for: EncodedAudioChunkType; text: key; url: dom-encodedaudiochunktype-key
43-
for: EncodedAudioChunk; text: [[internal data]]; url: dom-encodedaudiochunk-internal-data-slot
44-
for: EncodedAudioChunk; text: [[type]]; url: dom-encodedaudiochunk-type-slot
45-
type: interface
46-
text: EncodedAudioChunk; url: encodedaudiochunk
47-
type: dictionary
48-
text: AudioDecoderConfig; url: dictdef-audiodecoderconfig
49-
text: AudioEncoderConfig; url: dictdef-audioencoderconfig
50-
</pre>
51-
5235
<pre class='biblio'>
5336
{
5437
"iso14496-3": {
@@ -76,32 +59,32 @@
7659
================================================
7760

7861
If the bitstream is in {{AacBitstreamFormat/adts}} format, the
79-
[=EncodedAudioChunk/[[internal data]]=] of {{EncodedAudioChunk}}s are expected
62+
{{EncodedAudioChunk/[[internal data]]}} of {{EncodedAudioChunk}}s are expected
8063
to be an ADTS frame, as described in section 1.A.3.2 of [[iso14496-3]].
8164

8265
If the bitstream is in {{AacBitstreamFormat/aac}} format, the
83-
[=EncodedAudioChunk/[[internal data]]=] of {{EncodedAudioChunk}}s are expected
66+
{{EncodedAudioChunk/[[internal data]]}} of {{EncodedAudioChunk}}s are expected
8467
to be a raw AAC frame (syntax element `raw_data_block()`), as described in
8568
section 4.4.2.1 of [[iso14496-3]].
8669

8770
AudioDecoderConfig description {#audiodecoderconfig-description}
8871
================================================================
8972

90-
If {{AudioDecoderConfig.description}} is present, it is assumed to a
73+
If {{AudioDecoderConfig/description}} is present, it is assumed to a
9174
`AudioSpecificConfig` as defined in [[iso14496-3]] section 1.6.2.1, Table 1.15,
9275
and the bitstream is assumed to be in {{AacBitstreamFormat/aac}}.
9376

94-
If the {{AudioDecoderConfig.description}} is not present, the bitstream is
77+
If the {{AudioDecoderConfig/description}} is not present, the bitstream is
9578
assumed to be in {{AacBitstreamFormat/adts}} format.
9679

97-
The {{AudioDecoderConfig.sampleRate}} and {{AudioDecoderConfig.numberOfChannels}}
80+
The {{AudioDecoderConfig/sampleRate}} and {{AudioDecoderConfig/numberOfChannels}}
9881
members are ignored.
9982

10083
EncodedAudioChunk type {#encodedaudiochunk-type}
10184
================================================
10285

103-
The [=EncodedAudioChunk/[[type]]=] for an {{EncodedAudioChunk}} containing
104-
AAC is always "[=EncodedAudioChunkType/key=]".
86+
The {{EncodedAudioChunk/[[type]]}} for an {{EncodedAudioChunk}} containing
87+
AAC is always "{{EncodedAudioChunkType/key}}".
10588

10689
NOTE: Once the initialization has succeeded, any AAC packet can be decoded at
10790
any time without error, but this might not result in the expected audio
@@ -161,12 +144,12 @@
161144
<dt><dfn enum-value for=AacBitstreamFormat>aac</dfn></dt>
162145
<dd>
163146
The metadata of the encoded audio stream are provided at configuration via
164-
{{AudioDecoderConfig.description}}.
147+
{{AudioDecoderConfig/description|AudioDecoderConfig.description}}.
165148
</dd>
166149
<dt><dfn enum-value for=AacBitstreamFormat>adts</dfn></dt>
167150
<dd>
168151
The metadata of the encoded audio stream are provided in each ADTS frame,
169-
and therefore no {{AudioDecoderConfig.description}} is necessary.
152+
and therefore no {{AudioDecoderConfig/description|AudioDecoderConfig.description}} is necessary.
170153
</dl>
171154

172155
Privacy Considerations {#privacy-considerations}

alaw_codec_registration.src.html

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
Abstract: This registration is entered into the [[webcodecs-codec-registry]].
1515
It describes, for A-law encoded PCM, the (1) fully qualified codec strings,
1616
(2) the codec-specific {{EncodedAudioChunk}}
17-
[=EncodedAudioChunk/[[internal data]]=] bytes, (3) the
18-
{{AudioDecoderConfig.description}}, and (4) the values of
19-
{{EncodedAudioChunk}} [=EncodedAudioChunk/[[type]]=].
17+
{{EncodedAudioChunk/[[internal data]]}} bytes, (3) the
18+
{{AudioDecoderConfig/description|AudioDecoderConfig.description}},
19+
and (4) the values of {{EncodedAudioChunk}} {{EncodedAudioChunk/[[type]]}}.
2020

2121
The registration is not intended to include any information on whether a
2222
codec format is encumbered by intellectual property claims. Implementers and
@@ -32,21 +32,6 @@
3232
!Version History: <a href="https://github.com/w3c/webcodecs/commits">https://github.com/w3c/webcodecs/commits</a>
3333
</pre>
3434

35-
<pre class='anchors'>
36-
spec: WEBCODECS; urlPrefix: https://w3c.github.io/webcodecs/#
37-
type: attribute
38-
text: AudioDecoderConfig.description; url: dom-audiodecoderconfig-description
39-
type: dfn
40-
for: EncodedAudioChunkType; text: key; url: dom-encodedaudiochunktype-key
41-
for: EncodedAudioChunk; text: [[internal data]]; url: dom-encodedaudiochunk-internal-data-slot
42-
for: EncodedAudioChunk; text: [[type]]; url: dom-encodedaudiochunk-type-slot
43-
type: interface
44-
text: EncodedAudioChunk; url: encodedaudiochunk
45-
type: dictionary
46-
text: AudioDecoderConfig; url: dictdef-audiodecoderconfig
47-
text: AudioEncoderConfig; url: dictdef-audioencoderconfig
48-
</pre>
49-
5035
<pre class='biblio'>
5136
{
5237
"ITU-G.711": {
@@ -66,21 +51,21 @@
6651
EncodedAudioChunk data {#encodedaudiochunk-data}
6752
================================================
6853

69-
{{EncodedAudioChunk}} [=EncodedAudioChunk/[[internal data]]=] is expected to be
54+
{{EncodedAudioChunk}} {{EncodedAudioChunk/[[internal data]]}} is expected to be
7055
a sequence of bytes of arbitrary length, where each byte is an A-law
7156
encoded PCM sample as defined by Tables 1a and 1b in [[ITU-G.711]].
7257

7358
AudioDecoderConfig description {#audiodecoderconfig-description}
7459
================================================================
7560

76-
An {{AudioDecoderConfig.description}} is expected to be omitted from the
61+
The {{AudioDecoderConfig/description}} is expected to be omitted from the
7762
{{AudioDecoderConfig}}.
7863

7964
EncodedAudioChunk type {#encodedaudiochunk-type}
8065
================================================
8166

82-
The [=EncodedAudioChunk/[[type]]=] for an {{EncodedAudioChunk}} containing
83-
A-law PCM is always "[=EncodedAudioChunkType/key=]".
67+
The {{EncodedAudioChunk/[[type]]}} for an {{EncodedAudioChunk}} containing
68+
A-law PCM is always "{{EncodedAudioChunkType/key}}".
8469

8570
Privacy Considerations {#privacy-considerations}
8671
==========================================================================

av1_codec_registration.src.html

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
Abstract: This registration is entered into the [[webcodecs-codec-registry]].
1515
It describes, for AV1, the (1) fully qualified codec strings,
1616
(2) the codec-specific {{EncodedVideoChunk}}
17-
[=EncodedVideoChunk/[[internal data]]=] bytes, (3) the
18-
{{VideoDecoderConfig.description}} bytes, and (4) the values of
19-
{{EncodedVideoChunk}} [=EncodedVideoChunk/[[type]]=].
17+
{{EncodedVideoChunk/[[internal data]]}} bytes, (3) the
18+
{{VideoDecoderConfig/description|VideoDecoderConfig.description}} bytes, and
19+
(4) the values of {{EncodedVideoChunk}} {{EncodedVideoChunk/[[type]]}}.
2020

2121
The registration is not intended to include any information on whether a
2222
codec format is encumbered by intellectual property claims. Implementers and
@@ -32,24 +32,6 @@
3232
!Version History: <a href="https://github.com/w3c/webcodecs/commits">https://github.com/w3c/webcodecs/commits</a>
3333
</pre>
3434

35-
<pre class='anchors'>
36-
spec: WEBCODECS; urlPrefix: https://w3c.github.io/webcodecs/#
37-
type: attribute
38-
text: EncodedVideoChunkMetadata.decoderConfig; url: dom-encodedvideochunkmetadata-decoderconfig
39-
for: EncodedVideoChunkType; text: key; url: dom-encodedvideochunktype-key
40-
text: VideoDecoderConfig.description; url: dom-videodecoderconfig-description
41-
type: dfn
42-
for: EncodedVideoChunk; text: [[internal data]]; url: dom-encodedvideochunk-internal-data-slot
43-
for: EncodedVideoChunk; text: [[type]]; url: dom-encodedvideochunk-type-slot
44-
for: VideoEncoder; text: [[output callback]]; url: dom-videoencoder-output-callback-slot
45-
type: interface
46-
text: EncodedVideoChunk; url: encodedvideochunk
47-
text: VideoEncoder; url: videoencoder
48-
type: dictionary
49-
text: VideoEncoderConfig; url: dictdef-videoencoderconfig
50-
text: VideoDecoderConfig; url: dictdef-videodecoderconfig
51-
</pre>
52-
5335
<pre class='biblio'>
5436
{
5537
"AV1": {
@@ -74,19 +56,19 @@
7456
EncodedVideoChunk data {#encodedvideochunk-data}
7557
================================================
7658

77-
{{EncodedVideoChunk}} [=EncodedVideoChunk/[[internal data]]=] is expected to be
59+
{{EncodedVideoChunk}} {{EncodedVideoChunk/[[internal data]]}} is expected to be
7860
data compliant to the "low-overhead bitstream format" as described in Section 5
7961
of [[AV1]].
8062

8163
VideoDecoderConfig description {#videodecoderconfig-description}
8264
================================================================
8365

84-
{{VideoDecoderConfig.description}} is not used for this codec.
66+
{{VideoDecoderConfig/description}} is not used for this codec.
8567

8668
EncodedVideoChunk type {#encodedvideochunk-type}
8769
================================================
8870

89-
If an {{EncodedVideoChunk}}'s [=EncodedVideoChunk/[[type]]=] is
71+
If an {{EncodedVideoChunk}}'s {{EncodedVideoChunk/[[type]]}} is
9072
{{EncodedVideoChunkType/key}}, then the {{EncodedVideoChunk}} is expected to
9173
contain a frame with a `frame_type` of `KEY_FRAME` as defined in Section
9274
6.8.2 of [[AV1]].

avc_codec_registration.src.html

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
Abstract: This registration is entered into the [[webcodecs-codec-registry]].
1515
It describes, for AVC (H.264), the (1) fully qualified codec strings,
1616
(2) the codec-specific {{EncodedVideoChunk}}
17-
[=EncodedVideoChunk/[[internal data]]=] bytes, (3) the
18-
{{VideoDecoderConfig.description}} bytes, (4) the values of
19-
{{EncodedVideoChunk}} [=EncodedVideoChunk/[[type]]=], and (5) the
20-
codec-specific extensions to {{VideoEncoderConfig}}
17+
{{EncodedVideoChunk/[[internal data]]}} bytes, (3) the
18+
{{VideoDecoderConfig/description|VideoDecoderConfig.description}} bytes,
19+
(4) the values of {{EncodedVideoChunk}} {{EncodedVideoChunk/[[type]]}},
20+
and (5) the codec-specific extensions to {{VideoEncoderConfig}}
2121

2222
The registration is not intended to include any information on whether a
2323
codec format is encumbered by intellectual property claims. Implementers and
@@ -33,24 +33,6 @@
3333
!Version History: <a href="https://github.com/w3c/webcodecs/commits">https://github.com/w3c/webcodecs/commits</a>
3434
</pre>
3535

36-
<pre class='anchors'>
37-
spec: WEBCODECS; urlPrefix: https://w3c.github.io/webcodecs/#
38-
type: attribute
39-
text: EncodedVideoChunkMetadata.decoderConfig; url: dom-encodedvideochunkmetadata-decoderconfig
40-
for: EncodedVideoChunkType; text: key; url: dom-encodedvideochunktype-key
41-
text: VideoDecoderConfig.description; url: dom-videodecoderconfig-description
42-
type: dfn
43-
for: EncodedVideoChunk; text: [[internal data]]; url: dom-encodedvideochunk-internal-data-slot
44-
for: EncodedVideoChunk; text: [[type]]; url: dom-encodedvideochunk-type-slot
45-
for: VideoEncoder; text: [[output callback]]; url: dom-videoencoder-output-callback-slot
46-
type: interface
47-
text: EncodedVideoChunk; url: encodedvideochunk
48-
text: VideoEncoder; url: videoencoder
49-
type: dictionary
50-
text: VideoEncoderConfig; url: dictdef-videoencoderconfig
51-
text: VideoDecoderConfig; url: dictdef-videodecoderconfig
52-
</pre>
53-
5436
<pre class='biblio'>
5537
{
5638
"ITU-T-REC-H.264": {
@@ -78,34 +60,34 @@
7860
EncodedVideoChunk data {#encodedvideochunk-data}
7961
================================================
8062

81-
{{EncodedVideoChunk}} [=EncodedVideoChunk/[[internal data]]=] is expected to be
63+
{{EncodedVideoChunk}} {{EncodedVideoChunk/[[internal data]]}} is expected to be
8264
an access unit as defined in [[ITU-T-REC-H.264]] section 7.4.1.2.
8365

8466
NOTE: An access unit contains exactly one primary coded picture.
8567

8668
If the bitstream is in {{AvcBitstreamFormat/avc}} format,
87-
[=EncodedVideoChunk/[[internal data]]=] is assumed to be in canonical format, as
69+
{{EncodedVideoChunk/[[internal data]]}} is assumed to be in canonical format, as
8870
defined in [[iso14496-15]] section 5.3.2.
8971

9072
If the bitstream is in {{AvcBitstreamFormat/annexb}} format,
91-
[=EncodedVideoChunk/[[internal data]]=] is assumed to be in in Annex B format,
73+
{{EncodedVideoChunk/[[internal data]]}} is assumed to be in in Annex B format,
9274
as defined in [[ITU-T-REC-H.264]] Annex B.
9375

94-
NOTE: Since [=EncodedVideoChunk/[[internal data]]=] is inherently byte-aligned,
76+
NOTE: Since {{EncodedVideoChunk/[[internal data]]}} is inherently byte-aligned,
9577
implementations are not required to recover byte-alignment.
9678

9779
VideoDecoderConfig description {#videodecoderconfig-description}
9880
================================================================
9981

100-
If the {{VideoDecoderConfig.description}} is present, it is assumed to be an
82+
If the {{VideoDecoderConfig/description}} is present, it is assumed to be an
10183
`AVCDecoderConfigurationRecord`, as defined by [[iso14496-15]], section
10284
5.3.3.1, and the bitstream is assumed to be in {{AvcBitstreamFormat/avc}}
10385
format.
10486

10587
NOTE: This format is commonly used in .MP4 files, where the player generally
10688
has random access to the media data.
10789

108-
If the {{VideoDecoderConfig.description}} is not present, the bitstream is
90+
If the {{VideoDecoderConfig/description}} is not present, the bitstream is
10991
assumed to be in {{AvcBitstreamFormat/annexb}} format.
11092

11193
NOTE: "annexb" format is described in greater detail by [[ITU-T-REC-H.264]],
@@ -116,16 +98,17 @@
11698
EncodedVideoChunk type {#encodedvideochunk-type}
11799
================================================
118100

119-
If an {{EncodedVideoChunk}}'s [=EncodedVideoChunk/[[type]]=] is
101+
If an {{EncodedVideoChunk}}'s {{EncodedVideoChunk/[[type]]}} is
120102
{{EncodedVideoChunkType/key}}, and the bitstream is in
121103
{{AvcBitstreamFormat/avc}} format, then the {{EncodedVideoChunk}} is expected to
122104
contain a primary coded picture that is an instantaneous decoding refresh (IDR)
123105
picture.
124106

125107
NOTE: If the bitstream is in {{AvcBitstreamFormat/avc}} format, parameter sets
126-
necessary for decoding are included in {{VideoDecoderConfig.description}}.
108+
necessary for decoding are included in
109+
{{VideoDecoderConfig/description|VideoDecoderConfig.description}}.
127110

128-
If an {{EncodedVideoChunk}}'s [=EncodedVideoChunk/[[type]]=] is
111+
If an {{EncodedVideoChunk}}'s {{EncodedVideoChunk/[[type]]}} is
129112
{{EncodedVideoChunkType/key}}, and the bitstream is in
130113
{{AvcBitstreamFormat/annexb}} format, then the {{EncodedVideoChunk}} is expected
131114
to contain both a primary coded picture that is an instantaneous decoding
@@ -195,9 +178,9 @@
195178
<dt><dfn enum-value for=AvcBitstreamFormat>avc</dfn></dt>
196179
<dd>
197180
SPS and PPS data are not included in the bitstream and are instead emitted
198-
via the [=VideoEncoder/[[output callback]]=] as the
199-
{{VideoDecoderConfig.description}} of the
200-
{{EncodedVideoChunkMetadata.decoderConfig}}.
181+
via the {{VideoEncoder/[[output callback]]}} as the
182+
{{VideoDecoderConfig/description|VideoDecoderConfig.description}} of the
183+
{{EncodedVideoChunkMetadata/decoderConfig|EncodedVideoChunkMetadata.decoderConfig}}.
201184

202185
NOTE: This format is described in greater detail by [[iso14496-15]],
203186
section 5.3. This format is commonly used in .MP4 files, where the

codec_registry.src.html

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,6 @@
3434
!Version History: <a href="https://github.com/w3c/webcodecs/commits">https://github.com/w3c/webcodecs/commits</a>
3535
</pre>
3636

37-
<pre class='anchors'>
38-
spec: WEBCODECS; urlPrefix: https://w3c.github.io/webcodecs/#
39-
type: attribute
40-
text: AudioDecoderConfig.description; url: dom-audiodecoderconfig-description
41-
text: VideoDecoderConfig.description; url: dom-videodecoderconfig-description
42-
type: dfn
43-
for: EncodedVideoChunk; text: [[type]]; url: dom-encodedaudiochunk-type-slot
44-
type: interface
45-
text: EncodedAudioChunk; url: encodedaudiochunk
46-
text: EncodedVideoChunk; url: encodedvideochunk
47-
type: dictionary
48-
text: AudioDecoderConfig; url: dictdef-audiodecoderconfig
49-
text: AudioEncoderConfig; url: dictdef-audioencoderconfig
50-
text: VideoDecoderConfig; url: dictdef-videodecoderconfig
51-
text: VideoEncoderConfig; url: dictdef-videoencoderconfig
52-
</pre>
53-
5437

5538
Organization {#organization}
5639
============================
@@ -78,7 +61,7 @@
7861
2. {{EncodedAudioChunk}} or {{EncodedVideoChunk}} internal data
7962
3. {{AudioDecoderConfig}} or {{VideoDecoderConfig}} description bytes
8063
4. Expectations for {{EncodedAudioChunk}} or {{EncodedVideoChunk}}
81-
[=EncodedVideoChunk/[[type]]=]
64+
{{EncodedVideoChunk/[[type]]}}
8265
3. Where applicable, a registration specification may include a section
8366
describing extensions to {{VideoEncoderConfig}} or {{AudioEncoderConfig}}
8467
dictionaries.

0 commit comments

Comments
 (0)