Bug 411930 - DeFish filter is not threadsafe
Summary: DeFish filter is not threadsafe
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (show other bugs)
Version: 19.08.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2019-09-15 08:00 UTC by Jonathan Gilbert
Modified: 2025-01-23 19:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
fritzibaby: Brainstorm+


Attachments
Sample frame (148.19 KB, image/jpeg)
2019-09-15 08:00 UTC, Jonathan Gilbert
Details
Sample frame (131.24 KB, image/jpeg)
2019-09-15 08:00 UTC, Jonathan Gilbert
Details
Sample frame (131.12 KB, image/jpeg)
2019-09-15 08:00 UTC, Jonathan Gilbert
Details
Sample frame (128.51 KB, image/jpeg)
2019-09-15 08:01 UTC, Jonathan Gilbert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Gilbert 2019-09-15 08:00:22 UTC
Created attachment 122663 [details]
Sample frame

SUMMARY
If its parameters are animated, the DeFish filter produces very interesting results when rendered with parallel processing enabled. Apparently, the settings get overwritten mid-frame by competing threads, resulting in different zones being rendered with the settings from different frames.

STEPS TO REPRODUCE
1. Add a clip to the timeline.
2. Add the DeFish filter to the clip.
3. Set the Type to Stereographic (this probably isn't important to the bug, but it affects the interpretation of the Amount value).
4. Add a key frame to the end of the clip's range.
5. Within the DeFish filter, set the key frame at the start to Amount = 0 and the key frame at the end to Amount = 930.
6. Render the video with Parallel processing enabled and with Threads set to 1.

OBSERVED RESULT
Frames are rendered with different DeFish filter Amount values for different scanlines. This becomes more noticeable near the end of the animation, when the change in Amount produces a more pronounced change in the distortion.

EXPECTED RESULT
The rendered video frames should be effectively the same as shown in the preview window, with a smooth change in the distortion over the course of the animation.

SOFTWARE/OS VERSIONS
Windows: Windows 10 1903
KDE Frameworks Version: 5.61.0
Qt Version: 5.13.0
MLT Version: 6.16.0
Comment 1 Jonathan Gilbert 2019-09-15 08:00:46 UTC
Created attachment 122664 [details]
Sample frame
Comment 2 Jonathan Gilbert 2019-09-15 08:00:55 UTC
Created attachment 122665 [details]
Sample frame
Comment 3 Jonathan Gilbert 2019-09-15 08:01:09 UTC
Created attachment 122666 [details]
Sample frame
Comment 4 Jonathan Gilbert 2019-09-15 08:01:26 UTC
Work-around: Disable parallel processing.
Comment 5 emohr 2019-09-15 18:23:16 UTC
Rendering is done via MLT and MLT has problems with parallel processing. So it's an upstream problem Kdenlive cannot solve.
Comment 6 Jonathan Gilbert 2019-09-16 06:31:32 UTC
Perhaps it would make sense, then, for Kdenlive to know which filters have this upstream problem and either warn the user or refuse to use parallel processing if the render will be affected.
Comment 7 Bernd 2024-12-24 00:34:07 UTC
Hi and thank you for your patience.

Can you please check whether this issue still exists in the latest version 24.12.0?

If yes, please update this report to reflect the new version and set the status to CONFIRMED.

If it works now like you expect it would, you may change the status of this report to RESOLVED - FIXED.

At any rate, this report will be closed if there is no activity for the next 30 days.
Comment 8 Bug Janitor Service 2025-01-08 03:47:29 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2025-01-23 03:47:19 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.
Comment 10 Jonathan Gilbert 2025-01-23 18:23:39 UTC
Sorry for the delay. I repeated by reproduction steps with 24.12.1 and it appears the issue has been fixed. No rendering error occurred. Tried with both 1 and 4 threads with parallel processing enabled. The Resolved state of the bug thus seems to be correct.
Comment 11 emohr 2025-01-23 19:14:56 UTC
Thank you for the feedback