Skip to content

Commit 886f898

Browse files
authored
Merge pull request #730 from w3c/add-em-rfc2119-tags
Add <em> tags for RFC2119 key words
2 parents 306e516 + e2378ec commit 886f898

File tree

1 file changed

+50
-43
lines changed

1 file changed

+50
-43
lines changed

index.src.html

Lines changed: 50 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,9 +2028,9 @@
20282028

20292029
<dt><dfn dict-member for=VideoDecoderConfig>optimizeForLatency</dfn></dt>
20302030
<dd>
2031-
Hint that the selected decoder SHOULD be configured to minimize the number
2032-
of {{EncodedVideoChunk}}s that have to be decoded before a {{VideoFrame}}
2033-
is output.
2031+
Hint that the selected decoder <em class="rfc2119">SHOULD</em> be configured
2032+
to minimize the number of {{EncodedVideoChunk}}s that have to be decoded
2033+
before a {{VideoFrame}} is output.
20342034

20352035
NOTE: In addition to User Agent and hardware limitations, some codec
20362036
bitstreams require a minimum number of inputs before any output can be
@@ -2236,16 +2236,17 @@
22362236

22372237
When supported, hardware acceleration offloads encoding or decoding to
22382238
specialized hardware. {{HardwareAcceleration/prefer-hardware}} and
2239-
{{HardwareAcceleration/prefer-software}} are hints. While User Agents SHOULD
2240-
respect these values when possible, User Agents may ignore these values in some
2241-
or all circumstances for any reason.
2239+
{{HardwareAcceleration/prefer-software}} are hints. While User Agents
2240+
<em class="rfc2119">SHOULD</em> respect these values when possible, User
2241+
Agents may ignore these values in some or all circumstances for any reason.
22422242

22432243
To prevent fingerprinting, if a User Agent implements [[media-capabilities]],
2244-
the User Agent MUST ensure rejection or acceptance of a given
2245-
{{HardwareAcceleration}} preference reveals no additional information on top of
2246-
what is inherent to the User Agent and revealed by [[media-capabilities]]. If a
2247-
User Agent does not implement [[media-capabilities]] for reasons of
2248-
fingerprinting, they SHOULD ignore the {{HardwareAcceleration}} preference.
2244+
the User Agent <em class="rfc2119">MUST</em> ensure rejection or acceptance of
2245+
a given {{HardwareAcceleration}} preference reveals no additional information
2246+
on top of what is inherent to the User Agent and revealed by
2247+
[[media-capabilities]]. If a User Agent does not implement
2248+
[[media-capabilities]] for reasons of fingerprinting, they
2249+
<em class="rfc2119">SHOULD</em> ignore the {{HardwareAcceleration}} preference.
22492250

22502251
<div class='note'>
22512252
NOTE: Good examples of when a User Agent can ignore
@@ -2395,9 +2396,10 @@
23952396
<dl>
23962397
<dt><dfn dict-member for=VideoEncoderEncodeOptions>keyFrame</dfn></dt>
23972398
<dd>
2398-
A value of `true` indicates that the given frame MUST be encoded as a key
2399-
frame. A value of `false` indicates that the User Agent has flexibility to
2400-
decide whether the frame will be encoded as a [=key frame=].
2399+
A value of `true` indicates that the given frame
2400+
<em class="rfc2119">MUST</em> be encoded as a key frame. A value of `false`
2401+
indicates that the User Agent has flexibility to decide whether the frame
2402+
will be encoded as a [=key frame=].
24012403
</dd>
24022404
</dl>
24032405

@@ -3245,24 +3247,26 @@
32453247
but audio content using 24-bit samples is common, so 32-bits integers are
32463248
commonly used to hold 24-bit content.
32473249

3248-
{{AudioData}} containing 24-bit samples SHOULD store those samples in {{s32}} or
3249-
{{f32}}. When samples are stored in {{s32}}, each sample MUST be left-shifted by
3250-
`8` bits. By virtue of this process, samples outside of the valid 24-bit range
3251-
([-8388608, +8388607]) will be clipped. To avoid clipping and ensure lossless
3252-
transport, samples <em class="rfc2119">MAY</em> be converted to {{f32}}.
3250+
{{AudioData}} containing 24-bit samples <em class="rfc2119">SHOULD</em> store those
3251+
samples in {{s32}} or {{f32}}. When samples are stored in {{s32}}, each sample
3252+
<em class="rfc2119">MUST</em> be left-shifted by `8` bits. By virtue of this
3253+
process, samples outside of the valid 24-bit range ([-8388608, +8388607]) will
3254+
be clipped. To avoid clipping and ensure lossless transport, samples
3255+
<em class="rfc2119">MAY</em> be converted to {{f32}}.
32533256

32543257
NOTE: While clipping is unavoidable in {{u8}}, {{s16}}, and {{s32}} samples due
3255-
to their storage types, implementations SHOULD take care not to clip internally
3256-
when handling {{f32}} samples.
3258+
to their storage types, implementations <em class="rfc2119">SHOULD</em> take
3259+
care not to clip internally when handling {{f32}} samples.
32573260

32583261
### Audio channel ordering ### {#audio-channel-ordering}
32593262

32603263
When decoding, the ordering of the audio channels in the resulting {{AudioData}}
3261-
MUST be the same as what is present in the {{EncodedAudioChunk}}.
3264+
<em class="rfc2119">MUST</em> be the same as what is present in the
3265+
{{EncodedAudioChunk}}.
32623266

32633267
When encoding, the ordering of the audio channels in the resulting
3264-
{{EncodedAudioChunk}} MUST be the same as what is preset in the given
3265-
{{AudioData}};
3268+
{{EncodedAudioChunk}} <em class="rfc2119">MUST</em> be the same as what is
3269+
preset in the given {{AudioData}}.
32663270

32673271
In other terms, no channel reordering is performed when encoding and decoding.
32683272

@@ -3820,8 +3824,8 @@
38203824
:: 1. If |overrideColorSpace| is provided, return a new {{VideoColorSpace}}
38213825
constructed with |overrideColorSpace|.
38223826

3823-
User Agents MAY replace `null` members of the provided
3824-
|overrideColorSpace| with guessed values as determined by implementer
3827+
User Agents <em class="rfc2119">MAY</em> replace `null` members of the
3828+
provided |overrideColorSpace| with guessed values as determined by implementer
38253829
defined heuristics.
38263830

38273831
2. Otherwise, if {{VideoFrame/[[format]]}} is an [=RGB format=] return a new
@@ -4333,7 +4337,8 @@
43334337
integer. Samples are arranged starting at the top left of the image.
43344338

43354339
The visible rectangle offset ({{VideoFrame/visibleRect}}.{{DOMRectInit/x}}
4336-
and {{VideoFrame/visibleRect}}.{{DOMRectInit/y}}) MUST be even.
4340+
and {{VideoFrame/visibleRect}}.{{DOMRectInit/y}})
4341+
<em class="rfc2119">MUST</em> be even.
43374342
</dd>
43384343
<dt><dfn enum-value for=VideoPixelFormat>I420A</dfn></dt>
43394344
<dd>
@@ -4360,7 +4365,8 @@
43604365
integer. Samples are arranged starting at the top left of the image.
43614366

43624367
The visible rectangle offset ({{VideoFrame/visibleRect}}.{{DOMRectInit/x}}
4363-
and {{VideoFrame/visibleRect}}.{{DOMRectInit/y}}) MUST be even.
4368+
and {{VideoFrame/visibleRect}}.{{DOMRectInit/y}})
4369+
<em class="rfc2119">MUST</em> be even.
43644370

43654371
{{I420A}}'s [=equivalent opaque format=] is {{I420}}.
43664372
</dd>
@@ -4387,7 +4393,7 @@
43874393
are arranged starting at the top left of the image.
43884394

43894395
The visible rectangle offset ({{VideoFrame/visibleRect}}.{{DOMRectInit/x}})
4390-
MUST be even.
4396+
<em class="rfc2119">MUST</em> be even.
43914397
</dd>
43924398
<dt><dfn enum-value for=VideoPixelFormat>I444</dfn></dt>
43934399
<dd>
@@ -4430,7 +4436,8 @@
44304436
at the top left of the image.
44314437

44324438
The visible rectangle offset ({{VideoFrame/visibleRect}}.{{DOMRectInit/x}}
4433-
and {{VideoFrame/visibleRect}}.{{DOMRectInit/y}}) MUST be even.
4439+
and {{VideoFrame/visibleRect}}.{{DOMRectInit/y}})
4440+
<em class="rfc2119">MUST</em> be even.
44344441

44354442
<div class=example>
44364443
An image in the NV12 pixel format that is 16 pixels wide and 10 pixels tall
@@ -5575,14 +5582,14 @@
55755582
Resource Reclamation{#resource-reclamation}
55765583
==============================================
55775584

5578-
When resources are constrained, a User Agent MAY proactively reclaim codecs.
5579-
This is particularly true in the case where hardware codecs are limited, and
5580-
shared accross web pages or platform apps.
5585+
When resources are constrained, a User Agent <em class="rfc2119">MAY</em>
5586+
proactively reclaim codecs. This is particularly true in the case where hardware
5587+
codecs are limited, and shared accross web pages or platform apps.
55815588

5582-
To <dfn>reclaim a codec</dfn>, a User Agent MUST run the appropriate
5583-
close algorithm (amongst [=Close AudioDecoder=], [=Close AudioEncoder=],
5584-
[=Close VideoDecoder=] and [=Close VideoEncoder=]) with a {{QuotaExceededError}}
5585-
{{DOMException}}.
5589+
To <dfn>reclaim a codec</dfn>, a User Agent <em class="rfc2119">MUST</em> run
5590+
the appropriate close algorithm (amongst [=Close AudioDecoder=],
5591+
[=Close AudioEncoder=], [=Close VideoDecoder=] and [=Close VideoEncoder=]) with
5592+
a {{QuotaExceededError}} {{DOMException}}.
55865593

55875594
The rules governing when a codec may be reclaimed depend on whether the codec is
55885595
an [=active=] or [=inactive=] codec and/or a [=background=] codec.
@@ -5604,13 +5611,13 @@
56045611
{{ownerDocument}} (or [=owner set=]'s {{Document}}, for codecs in workers) has a
56055612
{{Document/hidden}} attribute equal to `true`.
56065613

5607-
A User Agent MUST only [=reclaim a codec=] that is either an
5608-
[=inactive codec=], a [=background codec=], or both. A User Agent MUST NOT
5609-
reclaim a codec that is both [=active=] and in the foreground, i.e. not a
5610-
[=background codec=].
5614+
A User Agent <em class="rfc2119">MUST</em> only [=reclaim a codec=] that is
5615+
either an [=inactive codec=], a [=background codec=], or both. A User Agent
5616+
<em class="rfc2119">MUST NOT</em> reclaim a codec that is both [=active=] and in
5617+
the foreground, i.e. not a [=background codec=].
56115618

5612-
Additionally, User Agents MUST NOT reclaim an [=active=] [=background=] codec
5613-
if it is:
5619+
Additionally, User Agents <em class="rfc2119">MUST NOT</em> reclaim an [=active=]
5620+
[=background=] codec if it is:
56145621
- An encoder, e.g. an {{AudioEncoder}} or {{VideoEncoder}}.
56155622

56165623
NOTE: This prevents long running encode tasks from being interrupted.

0 commit comments

Comments
 (0)