Skip to content

Add support for full-range VP9 video decoding#6367

Draft
JanuszL wants to merge 1 commit into
NVIDIA:mainfrom
JanuszL:support-vp9-full-range-video
Draft

Add support for full-range VP9 video decoding#6367
JanuszL wants to merge 1 commit into
NVIDIA:mainfrom
JanuszL:support-vp9-full-range-video

Conversation

@JanuszL
Copy link
Copy Markdown
Contributor

@JanuszL JanuszL commented May 25, 2026

Category:

Bug fix (non-breaking change which fixes an issue)

Description:

This PR fixes full-range video handling for VP9 video decoding.

The GPU video decoders used NVDEC's video_full_range_flag to choose the
YUV-to-RGB conversion range. NVDEC does not always report this flag for VP9,
even when FFmpeg stream metadata marks the video as full range. The GPU and
legacy GPU paths now fall back to FFmpeg color_range metadata when NVDEC
does not report full range.

The CPU decoder also now propagates full-range source information to
libswscale so VP9 CPU decoding uses the expected conversion range.

Additional information:

Affected modules and functionalities:

  • fn.readers.video GPU NVDEC conversion range selection
  • fn.experimental.readers.video GPU decoder range selection
  • fn.experimental.readers.video CPU decoder libswscale conversion setup
  • Full dynamic range video tests

Key points relevant for the review:

  • The GPU change keeps NVDEC's range flag as the primary source and only
    falls back to FFmpeg color_range == AVCOL_RANGE_JPEG.
  • The CPU path sets libswscale source range from decoded frame metadata,
    falling back to stream metadata when the frame leaves it unspecified.
  • Test coverage uses the existing H.264 full-range asset and the new VP9
    full-range asset from DALI_extra.

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

@JanuszL JanuszL mentioned this pull request May 25, 2026
18 tasks
- Use FFmpeg color-range metadata as a fallback when NVDEC does not
  report full-range video. Pass full-range source details to libswscale
  in the CPU decoder and extend full dynamic range video coverage
  to the VP9 sample.

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL JanuszL force-pushed the support-vp9-full-range-video branch from 65316c0 to 539de9e Compare May 26, 2026 06:59
@JanuszL
Copy link
Copy Markdown
Contributor Author

JanuszL commented May 26, 2026

!build

@dali-automaton
Copy link
Copy Markdown
Collaborator

CI MESSAGE: [52611502]: BUILD STARTED

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.

2 participants