Fix: Correct hardware filter chaining for QSV/VAAPI to prevent video corruption#25
Fix: Correct hardware filter chaining for QSV/VAAPI to prevent video corruption#25DeRoelO wants to merge 2 commits into
Conversation
Josh5
left a comment
There was a problem hiding this comment.
Please fix these up and rebase of the master branch.
| plugins.qsv.py | ||
|
|
||
| Written by: Josh.5 <jsunnex@gmail.com> | ||
| Written by: DeRoelO (Based on Josh.5) |
There was a problem hiding this comment.
Not sure you are the author of this file 🤔. I thought I was?
| plugins.vaapi.py | ||
|
|
||
| Written by: Josh.5 <jsunnex@gmail.com> | ||
| Written by: DeRoelO (Based on Josh.5) |
There was a problem hiding this comment.
You are not the author of this file.
| plugins.plugin.py | ||
|
|
||
| Written by: Josh.5 <jsunnex@gmail.com> | ||
| Written by: DeRoelO (Based on Josh.5) |
There was a problem hiding this comment.
You are not the author of this file.
| @@ -1,5 +1,5 @@ | |||
| { | |||
| "author": "Josh.5", | |||
| "author": "DeRoelO", | |||
There was a problem hiding this comment.
You are not taking ownership as the maintainer of the official plugin. You are still more than welcome to fork and maintain your own version and change the author this info.json file there, but I would recommend keeping the original author cited in it also.
| # Pure HW path - frames stay in VAAPI memory | ||
| chain = [f"format={target_fmt}|vaapi", "hwupload"] | ||
| # We skip hwupload as it would attempt to upload hardware frames as software frames. | ||
| chain = ["format=vaapi"] |
There was a problem hiding this comment.
This change drops the target pixel-format handling from the pure hardware path. I don't think it is correct to drop the target_fmt constraint entirely. From what I know, doing this means that 10-bit/HDR-oriented paths that depend on p010le vs nv12 can stop being enforced.
This PR addresses a known issue with Intel Hardware Acceleration (QSV and VAAPI) where transcoded files could result in a corrupted "half-green" screen.
Key changes:
Filter Chain Optimization: Removed redundant hwupload calls in the "Pure HW path". Previously, hwupload was being applied to frames already residing in hardware memory (QSV/VAAPI surfaces), which caused buffer corruption and visual artifacts.
QSV Stability Tweak: Reduced the default look_ahead_depth from 100 to 40. A depth of 100 was causing instability and crashes on several Intel iGPU generations (especially mobile and older desktop models) when processing high-resolution content.
Redundant VPP Removal: Simplified the hardware filter chain to avoid unnecessary VPP (Video Post-Processing) steps when the format is already correct, further reducing the chance of driver-related glitches.
These changes significantly improve the reliability of hardware-accelerated transcoding for Intel users without sacrificing quality.