Skip to content

Keep captioned video on Vulkan and cache caption fades - #1143

Merged
jonoomph merged 2 commits into
developfrom
caption-vulkan
Nov 15, 2026
Merged

jonoomph merged 2 commits into
developfrom
caption-vulkan

Conversation

@jonoomph

Copy link
Copy Markdown
Member

Caption effects now keep Vulkan-decoded video on the GPU while adding text and fading captions.

  • GPU rendering: reuse the existing image uploader and Vulkan compositor, avoiding video readbacks during native presentation and GPU export.
  • Cached overlays: reuse each unchanged caption raster and upload throughout its fade; content, style, layout, and resolution changes refresh the overlay.
  • Consistent fades: fade text, stroke, and background together on both CPU and GPU, fixing their blending during fades. CPU fallback remains available.

Local benchmark: Spring at 1920×804/24 fps, six captions with one-second fades over 30 seconds. Median frame work fell from 7.75 ms to 1.87 ms across three runs with Vulkan decode/presentation in both modes. GPU captions needed 6 uploads and zero video readbacks, versus 720 uploads/readbacks for CPU captions. Both met the playback frame budget.

Includes regression coverage for grouped fades, upload reuse, CPU/GPU agreement, and H.264 native presentation/GPU export.

Trello card

@jonoomph

Copy link
Copy Markdown
Member Author

@codecov

codecov Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.76543% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 75.34%. Comparing base (7570a62) to head (426c601).

Files with missing lines Patch % Lines
src/effects/Caption.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1143      +/-   ##
===========================================
+ Coverage    75.29%   75.34%   +0.05%     
===========================================
  Files          283      283              
  Lines        39225    39286      +61     
===========================================
+ Hits         29533    29601      +68     
+ Misses        9692     9685       -7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@jonoomph
jonoomph merged commit bbe5edb into develop Nov 15, 2026
20 checks passed
@jonoomph
jonoomph deleted the caption-vulkan branch November 15, 2026 22:22
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.

1 participant