Chromium SliceParams / SliceData interleave behavior
Chromium sends a whole batch of SliceParams in a row, then sends a single SliceData for the whole lot. I've formulated a patch that uses AppendableBuffers to store the slice data for all codecs, since this is apparently valid behavior in the API.
It's even weirder. They use a mapping mechanism to allocate buffers without assigning anything to them, then they map the buffer contents to the buffers. And the way they queue the buffers in the mapping list, at least for the AV1 handler, it lists the SliceData buffer before the SliceParams buffers. Who wrote this crap?
Yeah, looks like they're using some sort of sparse creation method that only takes buffer sizes, then maps the data pointers to them in one single call of another function. And yes, the AV1 implementation queues the slice data buffer first, then one slice param buffer per slice.
Also, it appears the AV1 code in this wrapper ends up setting the nNumSlices to double the number of slices. First it sets it to columns times rows, then it increments it for every slice param queued.
Grr. I fixed the uniform tile sizes issue. But I ran into another.
10 bit and possibly 12 bit per channel AV1 video files will try to decode to P010 or P012 format. But for some reason, both Chrome and Firefox are commanding the decoder to use an NV12 output format. And the output format can't be changed just based on the surface formats.
Bleh.