w3c / w3c/webcodecs

Potential typo in VideoFrame.copyTo method algorithm

Open
#918 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Step 10.4.7. reads:

Let layout be a new PlaneLayout, with offset set to destinationOffset and stride set to rowBytes.

Logically, this would make more sense if it were:

Let layout be a new PlaneLayout, with offset set to destinationOffset and stride set to computedLayout’s destinationStride.

Because the layout, which will ultimately be returned by the method, refers to the layout of the destination, not the source.

This is further supported by step 10.4.9.3.:

Increment destinationOffset by computedLayout’s destinationStride.

Obviously, we're moving along the destination using the destination's stride, so the returned layout should reflect that.

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.

Research direction

Read steps 10.4.7 and 10.4.9.3 of the VideoFrame.copyTo algorithm and compare the layout stride with computedLayout’s destinationStride. Update the suspected typo if the destination layout should use that value, then verify the surrounding algorithm consistently describes the destination layout.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.