Source: Fix alpha transparency in Low/Lowest#1477
Open
scr512 wants to merge 1 commit into
Open
Conversation
With NDIlib_recv_color_format_fastest, the NDI runtime decodes alpha-carrying streams to UYVA (UYVY + separate alpha plane), and ndi_source_thread_process_video2() mapped UYVA to VIDEO_FORMAT_UYVY, silently dropping the alpha plane. Request NDIlib_recv_color_format_UYVY_BGRA for all latency modes: non-alpha sources still decode zero-copy to UYVY, while alpha sources are converted to BGRA by the NDI runtime, preserving transparency. Fixes DistroAV#937
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #937.
Problem: NDI sources carrying alpha (ProPresenter, FreeShow, vTube Studio, …) lose transparency when the source latency mode is Low or Lowest.
Root cause: with
NDIlib_recv_color_format_fastest, the NDI runtime decodes alpha-carrying streams to UYVA (UYVY + separate alpha plane).ndi_source_thread_process_video2()maps UYVA →VIDEO_FORMAT_UYVY, silently discarding the alpha plane. Verified with a local probe receiver against a BGRA test source:UYVY_BGRA→ BGRA with alpha intact;fastest→ UYVA.Fix: request
NDIlib_recv_color_format_UYVY_BGRAfor all latency modes. Non-alpha sources still decode zero-copy to UYVY (same asfastest); alpha sources are converted to BGRA by the NDI runtime.Notes:
developand was lost in the 6.0.0 rewrite — no shipped release contains it. This PR extends the same approach to Lowest as well.VIDEO_FORMAT_UYVAin libobs (libobs: Add YUVA pixel format obsproject/obs-studio#10345, closed unmerged). This is a minimal alternative that works with stock OBS today.Seeking Testerslabel so CI packages test installers?Testing: built for macOS (6.2.1) and Windows x64 (this branch); verified alpha checkerboard and real ProPresenter/FreeShow feeds render with transparency in Normal, Low, and Lowest. Plugin loads cleanly; no new warnings.