Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 56 additions & 3 deletions index.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@
"Youenn Fablet"
],
"status": "ED"
},
"ISO-29170-1": {
"href": "https://www.iso.org/standard/66532.html",
"title": "ISO/IEC 29170-1:2017 - Information technology — Advanced image coding and evaluation — Part 1: Guidelines for image quality assessment",
"publisher": "ISO",
"date": "November 2017"
}
}
</pre>
Expand Down Expand Up @@ -1689,9 +1695,15 @@
1. Let |alphaSideData| be the encoded alpha data in |output|.
2. Assign |alphaSideData| to
|chunkMetadata|.{{EncodedVideoChunkMetadata/alphaSideData}}.
9. Invoke {{VideoEncoder/[[output callback]]}} with |chunk| and
9. If |output| contains Peak Signal-to-Noise Ratio (PSNR) metrics:
1. Let |psnr| be a new {{YuvVideoPsnr}} dictionary.
2. Assign the PSNR value for the Y plane in |output| to |psnr|.{{YuvVideoPsnr/y}}.
3. Assign the PSNR value for the U plane in |output| to |psnr|.{{YuvVideoPsnr/u}}.
4. Assign the PSNR value for the V plane in |output| to |psnr|.{{YuvVideoPsnr/v}}.
5. Assign |psnr| to |chunkMetadata|.{{EncodedVideoChunkMetadata/psnr}}.
10. Invoke {{VideoEncoder/[[output callback]]}} with |chunk| and
|chunkMetadata|.
</dd>
</dd>
<dt><dfn>Reset VideoEncoder</dfn> (with |exception|)</dt>
<dd>
Run these steps:
Expand Down Expand Up @@ -1733,11 +1745,18 @@
VideoDecoderConfig decoderConfig;
SvcOutputMetadata svc;
BufferSource alphaSideData;
YuvVideoPsnr psnr;
};

dictionary SvcOutputMetadata {
unsigned long temporalLayerId;
};

dictionary YuvVideoPsnr {
double y;
double u;
double v;
};
</xmp>

: <dfn dict-member for=EncodedVideoChunkMetadata>decoderConfig</dfn>
Expand All @@ -1756,6 +1775,32 @@
:: A number that identifies the [=temporal layer=] for the associated
{{EncodedVideoChunk}}.

: <dfn dict-member for=EncodedVideoChunkMetadata>psnr</dfn>
:: The Peak Signal-to-Noise Ratio (PSNR) metrics for the encoded frame, if
requested and supported. See {{YuvVideoPsnr}}.


YuvVideoPsnr dictionary{#yuv-video-psnr}
----------------------------------------
The {{YuvVideoPsnr}} dictionary contains Peak Signal-to-Noise Ratio (PSNR)
values for the Y, U, and V planes, computed in decibels (dB) according to
[[ISO-29170-1]].

: <dfn dict-member for=YuvVideoPsnr>y</dfn>
:: The Peak Signal-to-Noise Ratio (PSNR) value for the Y (Luma) plane in dB.
: <dfn dict-member for=YuvVideoPsnr>u</dfn>
:: The Peak Signal-to-Noise Ratio (PSNR) value for the U (Chroma) plane in dB.
: <dfn dict-member for=YuvVideoPsnr>v</dfn>
:: The Peak Signal-to-Noise Ratio (PSNR) value for the V (Chroma) plane in dB.

NOTE: PSNR measurements are calculated by comparing the input frame with the
reconstructed frame at the configured coded resolution of the encoder.
If the input frame's resolution differs from the configured encoder resolution
and is scaled during encoding, the scaled version serves as the reference frame
for the PSNR calculation.




Configurations{#configurations}
===============================
Expand Down Expand Up @@ -2464,6 +2509,7 @@
<xmp class='idl'>
dictionary VideoEncoderEncodeOptions {
boolean keyFrame = false;
boolean generatePsnr = false;
};
</xmp>

Expand All @@ -2477,7 +2523,14 @@
<em class="rfc2119">MUST</em> be encoded as a key frame. A value of `false`
indicates that the User Agent has flexibility to decide whether the frame
will be encoded as a [=key frame=].
</dd>
</dd>
<dt><dfn dict-member for=VideoEncoderEncodeOptions>generatePsnr</dfn></dt>
<dd>
A value of `true` indicates that the Encoder will attempt to compute PSNR
metrics for the encoded frame and provide them as part of the
{{EncodedVideoChunkMetadata}}. Note that not all encoders supports this, so
the metrics is provided on a best-effort basis.
</dd>
</dl>


Expand Down
Loading