fix(linux/vulkan): preserve host aspect ratio in encoder output#5130
fix(linux/vulkan): preserve host aspect ratio in encoder output#5130hebo6 wants to merge 1 commit into
Conversation
|
This comment was marked as resolved.
This comment was marked as resolved.
neatnoise
left a comment
There was a problem hiding this comment.
As the original author of the Vulkan encoder path — this looks correct and clean. Single dispatch, no extra passes or sync, negligible overhead.
A few notes:
-
rgb2yuv.compL43-47: The black value computation assumesrange_y/range_uvare(1,0). Worth a comment noting this assumption so it doesn't break silently if those values change in the future. -
vulkan_encode.cppL115-116: Push constant struct layout changed (fields inserted in the middle) — fine since both C++ and GLSL are updated together, but worth being aware of for any future out-of-tree shader variants. -
vulkan_encode.cppL290-293: The& ~1rounding oneff_w/eff_hand offsets could theoretically leave a 1-pixel gap if frame dimensions are odd. Might want to assert or clamp thatdst_offset + eff_size <= frame_size.



Description
Fixes a behavior inconsistency between the VAAPI and Vulkan encoders on Linux: when the encoder target resolution differs in aspect from the captured source, the VAAPI path letterboxes the source into the encoded frame while the Vulkan path stretches it to fill.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage