w3c / w3c/webcodecs

Spec errors for VideoFrame sizing exceeding implementation max

Open
#339 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Presently Chrome has checks in VideoFrame creation paths like this

  if (coded_width > media::limits::kMaxDimension ||
      coded_height > media::limits::kMaxDimension ||
      coded_width * coded_height > media::limits::kMaxCanvas) {
    exception_state.ThrowTypeError(
        String::Format("Coded size %u x %u exceeds implementation limit.",
                       coded_width, coded_height));
    return nullptr;
  }

This isn't spec'ed. Its not a huge deal, as the limits are large enough that probably no one is hitting them yet, but we should spec it.

Open question whether the exact cutoff should be an impl detail vs some standardized number. @sandersdan @dalecurtis do you recall the origin of the current limits?

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

Start by reading the linked Chromium implementation in video_frame.cc and the limits in media/base/limits.h, then compare those checks with the WebCodecs VideoFrame creation requirements. Resolve whether the size cutoff should be implementation-defined or standardized, and update the specification to define the intended behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
api
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.