Commit 67c9eaccfe for ffmpeg
commit 67c9eaccfe87043e7798b65df78c447264674286
Author: Lynne <dev@lynne.ee>
Date: Sat Oct 3 16:53:27 2026 +0900
ffv1_vulkan: use a 32-bit multiply when decoding remap runs
The product of the run length and the current multiplier fits in 32
bits for any valid stream, so avoid the 64-bit multiplication.
Also, the encoder uses 32-bit bits for this step.
diff --git a/libavcodec/vulkan/ffv1_dec_setup.comp.glsl b/libavcodec/vulkan/ffv1_dec_setup.comp.glsl
index ba9fc3fb05..5b38197f3f 100644
--- a/libavcodec/vulkan/ffv1_dec_setup.comp.glsl
+++ b/libavcodec/vulkan/ffv1_dec_setup.comp.glsl
@@ -123,7 +123,7 @@ bool decode_remap(uint slice_idx, inout SliceContext sc)
uint run0 = lu != 0 ? 0u : run;
uint run1 = lu != 0 ? run : 1u;
- i += int64_t(run0) * int64_t(current_mul);
+ i += int64_t(run0 * uint(current_mul));
while (run1 > 0u) {
run1--;