Skip to content
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

Extend EncodedVideoChunkMetadata #636

Closed
wants to merge 7 commits into from
Closed
Changes from 2 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
50 changes: 47 additions & 3 deletions index.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@
:: A grouping of {{EncodedVideoChunk}}s whose timestamp cadence produces a
particular framerate. See {{VideoEncoderConfig/scalabilityMode}}.

: <dfn>Spatial Layer</dfn>
:: A grouping of {{EncodedVideoChunk}}s that produces a particular resolution.
See {{VideoEncoderConfig/scalabilityMode}}.

: <dfn>Decode Target</dfn>
:: A numerical index determined by the encoder that indicates the set of frames
needed to decode a sequence of {{EncodedVideoChunk}}s at a given spatial and
temporal fidelity. Values do not necessarily correspond to a given
[=Temporal Layer=] or [=Spatial Layer=].

: <dfn>Progressive Image</dfn>
:: An image that supports decoding to multiple levels of detail, with lower
levels becoming available while the encoded data is not yet fully buffered.
Expand Down Expand Up @@ -1639,11 +1649,20 @@
|svc|.{{SvcOutputMetadata/temporalLayerId}}.
4. Assign |svc| to
|chunkMetadata|.{{EncodedVideoChunkMetadata/svc}}.
8. If |encoderConfig|.{{VideoEncoderConfig/alpha}} is set to `"keep"`:
8. If |encoderConfig|.{{VideoEncoderConfig/scalabilityMode}}
describes multiple [=spatial layers=]:
1. Let |svc| be a new {{SvcOutputMetadata}} instance.
2. Let |spatial_layer_id| be the zero-based index describing the
spatial layer for |output|.
3. Assign |spatial_layer_id| to
|svc|.{{SvcOutputMetadata/spatiallLayerId}}.
4. Assign |svc| to
|chunkMetadata|.{{EncodedVideoChunkMetadata/svc}}.
9. If |encoderConfig|.{{VideoEncoderConfig/alpha}} is set to `"keep"`:
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
10. Invoke {{VideoEncoder/[[output callback]]}} with |chunk| and
|chunkMetadata|.
</dd>
<dt><dfn>Reset VideoEncoder</dfn> (with |exception|)</dt>
Expand Down Expand Up @@ -1692,6 +1711,11 @@

dictionary SvcOutputMetadata {
unsigned long temporalLayerId;
unsigned long spatiallayerId;
unsigned short frameNumber;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not frameId like in RTCEncodedVideoFrameMetadata ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As noted in the Dependency Descriptor specification section A.8.3, frame_number is not the same as FrameId.

sequence<unsigned long> dependsOnIds;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not dependencies like in RTCEncodedVideoFrameMetadata?

Copy link
Collaborator Author

@aboba aboba Feb 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dependencies in RTCEncodedVideoFrameMetadata is not defined but I'm assuming it is a sequence of frameId values. dependsOnIds is a sequence of frameNumber values (though it seems odd that frameNumber is an unsigned short and dependsOnIds is a sequence of unsigned long values).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be names dependsOnFrameNumbers then?

Otherwise LGTM.

sequence<unsigned long> decodeTargets;
map<unsigned long, unsigned long> chainLinks;
};
</xmp>

Expand All @@ -1708,9 +1732,29 @@
channel data.

: <dfn dict-member for=SvcOutputMetadata>temporalLayerId</dfn>
:: A number that identifies the [=temporal layer=] for the associated
:: A number that identifies the [=Temporal Layer=] for the associated
{{EncodedVideoChunk}}.

: <dfn dict-member for=SvcOutputMetadata>spatialLayerId</dfn>
:: A number that identifies the [=Spatial Layer=] for the associated
{{EncodedVideoChunk}}.

: <dfn dict-member for=SvcOutputMetadata>frameNumber</dfn>
:: A number that identifies the frame in {{dependsOnIds}} and
{{chainLinks}} (for other {{EncodedVideoChunk}} values).

: <dfn dict-member for=SvcOutputMetadata>dependsOnIds</dfn>
:: A sequence of {{frameNumber}} values that this {{EncodedVideoChunk}}
depends on.

: <dfn dict-member for=SvcOutputMetadata>decodeTargets</dfn>
:: A sequence of [=Decode Target=] values that this {{EncodedVideoChunk}}
participates in.

: <dfn dict-member for=SvcOutputMetadata>chainLinks</dfn>
:: A mapping of [=Decode Target=] values to the last important frame to
decode prior to this {{EncodedVideoChunk}}, for a given
[=Decode Target=] value.

Configurations{#configurations}
===============================
Expand Down