Skip to content

Update display size scale tests with video frame from video file#4614

Draft
haoxli wants to merge 2 commits into
gpuweb:mainfrom
haoxli:import-external-texture-video-display-size
Draft

Update display size scale tests with video frame from video file#4614
haoxli wants to merge 2 commits into
gpuweb:mainfrom
haoxli:import-external-texture-video-display-size

Conversation

@haoxli

@haoxli haoxli commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

For display‑size scale tests, a VideoFrame created from a video file is the right source to validate importExternalTexture because it exercises the real decode, color conversion, and display‑size metadata path. A canvas ImageData frame bypasses the video decode path, so it’s removed.

Added a focused video list to validate scaling across codec and color‑space variation, covering both codecs (VP9, H.264) and both color spaces (bt.601, bt.709).

Issue: #4605


Requirements for PR author:

  • All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)
  • Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • Tests are properly located.
  • Test descriptions are accurate and complete.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Tests avoid over-parameterization (see case count report).

When landing this PR, be sure to make any necessary issue status updates.

For display‑size scale tests, a VideoFrame created from a video file is
the right source to validate importExternalTexture because it exercises
the real decode, color conversion, and display‑size metadata path. A
canvas ImageData frame bypasses the video decode path, so it’s removed.

Added a focused video list to validate scaling across codec and
color‑space variation, covering both codecs (VP9, H.264) and both color
spaces (bt.601, bt.709).

Issue: gpuweb#4605
@github-actions

github-actions Bot commented Mar 17, 2026

Copy link
Copy Markdown

Results for build job (at 585c479):

(No pr-comment-body.txt artifact found from this job.)

@haoxli haoxli requested a review from kainino0x March 17, 2026 08:50
@shaoboyan091 shaoboyan091 self-requested a review March 19, 2026 01:12
Comment thread src/webgpu/web_platform/external_texture/video.spec.ts Outdated
Comment thread src/webgpu/web_platform/external_texture/video.spec.ts
Comment thread src/webgpu/web_platform/external_texture/video.spec.ts Outdated
Comment thread src/webgpu/web_platform/external_texture/video.spec.ts
Comment thread src/webgpu/web_platform/external_texture/video.spec.ts Outdated
Comment thread src/webgpu/web_platform/external_texture/video.spec.ts Outdated

@shaoboyan091 shaoboyan091 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/webgpu/web_platform/external_texture/video.spec.ts
Comment thread src/webgpu/web_platform/external_texture/video.spec.ts Outdated
@haoxli

haoxli commented Mar 20, 2026

Copy link
Copy Markdown
Contributor Author

BTW, this http://127.0.0.1:8080/standalone/?q=webgpu:web_platform,external_texture,video:importExternalTexture,video_frame_display_size_scale:videoName=%22four-colors-h264-bt601.mp4%22;displayScale=%22same%22 fail in canary.

I tested it pass on Intel GPU, but failed on NV GPU. It seems to be a tolerance issue or decoder differences on NVIDIA. I will check it again after we update the video file.

@haoxli haoxli marked this pull request as draft June 18, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants