w3c / w3c/webcodecs

https://w3c.github.io/webcodecs/#videoframe-compute-layout-and-allocation-size is not taking into account RGB formats

Open
#573 5 comments 0 reactions 1 assignee View on GitHub

@padenot is already working on this.

Since Oct 11, 2022.

need-definition
Dominant language
HTML
Stars
1.3k
Forks
194
Avg merge
1d 13h
Merged PRs (30d)
3

Description

https://w3c.github.io/webcodecs/#videoframe-compute-layout-and-allocation-size algorithm is computing the allocation size based on computedLayout’s sourceWidthBytes.

Computation of sourceWidthBytes is based on sample size and rect width.
In the case of RGB formats, the sample size is 1, but each pixel has 4 samples.
I would assume sourceWidthBytes to be multiple by the per-pixel sample count.
I do not see where this is accounted for in the spec currently.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.