Closed Bug 1917583 Opened 5 months ago Closed 2 months ago

Teach GMP to do SVC when using OpenH264

Categories

(Core :: Audio/Video: Web Codecs, defect, P3)

defect

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: padenot, Assigned: aosmond)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

OpenH264 has SVC capabilities, but GMP lacks a way to use it. In temporal SVC, packets tagged by their layer index when output by the encoder. If n temporal layers are configured on the encoder, a decoder will be able to decode the stream if all layers with lower than a certain index are decoded (in order). For example, if n is 3 (typical), then the encoded images are going to be encoded like so:

0 (key frame), 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 0 (forced keyframe, e.g. because too much packet loss, sequence restarts:), 1, 2, 1, 0, 1, 2, 1, 0, ...

A decoder can decode the stream correctly if it only receives the frames tagged 0 and 1, or just the frames tagged 0. The stream will be at a lower frame rate, but otherwise decoding will work.

Web Codecs needs to implement L1T2 and L1T3, respectively, 2 and 3 temporal layers.

The necessary things we need to add to the GMP interface are:

The temporal layer identifier on the encoded packet:

The SVC configuration when creating the encoder:

It goes here: https://github.com/cisco/openh264/blob/3668daf135dea7d18737b01ce32774a7a2ffba32/codec/api/wels/codec_app_def.h#L550, when initing the encoder.

Now, when actually encoding, we get the layer id on the struct that's the last param:

Blocks: 1867066
Severity: -- → S3
Priority: -- → P3
Assignee: nobody → aosmond
Status: NEW → ASSIGNED
Blocks: openh264-2_6
Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ea6f6e7afb1f Make OpenH264 GMP video encoder support SVC. r=media-playback-reviewers,chunmin
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: