Skip to content

BUG: Fix black frames with --cudacg and spatial TV - #996

Open
axel-grc wants to merge 2 commits into
RTKConsortium:mainfrom
axel-grc:BlackFrame
Open

axel-grc wants to merge 2 commits into
RTKConsortium:mainfrom
axel-grc:BlackFrame

Conversation

@axel-grc

@axel-grc axel-grc commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Fixes #888 .

The total variation denoise sequence filter reused the paste output as the
destination for every frame following the first. On the ROOSTER main loop
iterations, that accumulator could alias the fed-back CG volume through the
CUDA buffer pool, so downstream spatial TV zeroed every frame but the first.

Accumulate all frames in place into a single, freshly allocated destination
buffer, which can never alias an upstream buffer.

Fixes RTKConsortium#888.

The total variation denoise sequence filter reused the paste output as the
destination for every frame following the first. On the ROOSTER main loop
iterations, that accumulator could alias the fed-back CG volume through the
CUDA buffer pool, so downstream spatial TV zeroed every frame but the first.

Accumulate all frames in place into a single, freshly allocated destination
buffer, which can never alias an upstream buffer.
The test check for black frames with --cudacg and spatial TV
@axel-grc axel-grc changed the title Black frame BUG: Fix black frames with --cudacg and spatial TV Sep 8, 2026

@SimonRit SimonRit left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

rtk::TotalVariationDenoiseSequenceImageFilter is not InPlace. Maybe setting the PasteImageFilter to InPlaceOff would have solved the issue more clearly?

@SimonRit SimonRit added this to the RTK 3.0 milestone Sep 10, 2026
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.

rtkfourdrooster return black frames when --cudacg option is on

2 participants