Open Bug 1837228 Opened 1 year ago Updated 3 months ago

Vendor in ffmpeg's vp9 superframe re-assembly bitstream filter

Categories

(Core :: WebRTC: Audio/Video, task, P3)

task

Tracking

()

People

(Reporter: pehrsons, Assigned: padenot)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

From bug 1832276 comment 11 it seems likely some decoders will need to be served assembled superframes rather than split ones to work properly. This bug is for vendoring in the assembling bitstream filter from ffmpeg to investigate whether it helps the ffmpeg, ffvpx and AppleVT decoders to decode webrtc svc streams properly.

API doc is here: https://ffmpeg.org/doxygen/6.0/group__lavc__bsf.html. It looks like it should be:

AVBitStreamFilter * bsf = av_bsf_get_by_name(name_of_the_bsf);
// check null
int rv = av_bsf_alloc(bsf, &bsfCtx);
// check OK
rv = av_bsf_init(bsfCtx);
// check OK
AVPacket pkt;
pkr.data = const_cast<uint8_t*>(the_packet_bytes);
pkt.size = the_packet_size;
do {
  rv = av_bsf_send_packet (bsfCtx, &pkt);
} while (rv == 0); // check error code for reassembly

do {
  rv = av_bsf_receive_packet (bsfCtx, &pkt);
} while (rv == 0); // check error code for receiving assembled packet

// pkt is usable now, merged 

it would make sense do to multiple send calls and a single receive call, since this is assembly of packets. Likely the opposite for superframe split.

I exposed the methods much in the same way we use the FFT from FFmpeg, see the patches for the names I picked, but an example usage of the FFT: https://searchfox.org/mozilla-central/rev/887d4b5da89a11920ed0fd96b7b7f066927a67db/dom/media/webaudio/FFTBlock.h#47

The following patch is waiting for review from an inactive reviewer:

ID Title Author Reviewer Status
D180332 Bug 1837228 - Vendor in ffmpeg's vp9 superframe re-assembly bitstream filter. r?pehrsons padenot pehrsons: Back Aug 1, 2023

:padenot, could you please find another reviewer?

For more information, please visit BugBot documentation.

Flags: needinfo?(padenot)
Attachment #9338075 - Attachment is obsolete: true

Apparently we don't need this, clearing NI.

Flags: needinfo?(padenot)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: