Repository navigation
video: decode ProRes and FFV1 with Vulkan again on a fixed FFmpeg - #2355
Merged
Merged
Conversation
42f0e43 refused the Vulkan compute-shader decoders because FFmpeg 9.0's ProRes one gets part of every frame full-scale wrong. FFmpeg master fixed it on 2026-09-20 (lavc 63.14): against the FATE ProRes files it now matches the software decoder to +-1 on Intel ANV and NVIDIA, where 9.0.2 was up to 147 code values off on 0.1% of the samples. Refuse them only when the libavcodec actually loaded is the 9.0 branch's 63.1.x, so builds on a distribution's 9.0.x keep the software decoder. Master's 63.21 bump was typed as 63.2 (0ec6a0872d), hence the >= 63.2 bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Re-enables the Vulkan compute-shader decoders (ProRes, FFV1) that 42f0e43 refused, as long as the libavcodec actually loaded has FFmpeg master's ProRes fixes.
codecSupportsHWPixelFormat()now refuses them only whenvulkanComputeDecodersAreReliable()is false, i.e. whenavcodec_version() < 63.2.0:0ec6a0872d, meant 63.21), which is why the bound is 63.2 rather than 63.15. The price is that master snapshots from between 9.0's branch point (June) and 2026-09-20 would also count as fixed.Needs the SDK on FFmpeg master: ossia/sdk#51. Unchanged: FFV1 still isn't in
ffmpegCanDoHardwareDecoding(), so it only reaches Vulkan when explicitly requested. FFmpeg warns that Vulkan FFV1 "may be very slow" with few slices, so automatic selection would deserve its own measurement.Tested (linux-x86_64; Intel Arc ARL on Mesa 26.2.4 ANV and RTX 5090 on NVIDIA 615.78, each forced first with
MESA_VK_DEVICE_SELECT)tests/corpus/run-hwdec.shwithHWDEC_ACCELS=vulkanon the FATEprores/set and the generated ProRes files. The tester was built from this branch against FFmpeg master71403a21b0(+ the SDK's rebased rpi patch):PIXEL_MISMATCH_MINOR, max delta 1HW_FALLBACK(gate)HW_FALLBACKPIXEL_DRIFT, max delta 1HW_FALLBACKHW_FALLBACKPIXEL_DRIFT, max delta 1HW_FALLBACKtest_unit_gpu_formatspasses against both FFmpeg master and 9.0.2.FFmpeg-level comparison over all 30 frames (
-hwaccel vulkan+hwdownloadvs software; details in ossia/sdk#51). On 9.0.2 the FATE 422 Proxy/LT files are up to 147 off with ~0.1% of samples grossly wrong; on master everything is ±1, except:prores-odd.mov, 322×178), the chroma of the bottom-right partial macroblock is wrong in some frames: up to 161 off, 72 samples over 30 frames.run-hwdec.shdoesn't see it, because the tester classifies a file by its first mismatching frame only, and here that is frame 0 (max delta 1). It isn't gated: the gate can't see frame sizes, and ProRes material is practically always a standard size.prores4444_with_transparency.movhas a MOVclap(1888×1062 of 1920×1080). On a hardware frame FFmpeg crops the top by 8 instead of 9. score's direct path doesn't apply container crops to hardware frames at all (nocrop_*handling for any codec), which is why the tester sees the full frame and a clean match. Not addressed here.🤖 Generated with Claude Code