Various fixes and improvements for OpenFX filters#1248
Merged
Conversation
Apparently some Natron OpenFX plugins need special handling.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the OpenFX host integration in MLT by extending supported parameter types, improving clip preference handling, and adding infrastructure for better threading and render-scale behavior when running OpenFX filters.
Changes:
- Added support for additional OpenFX parameter shapes (Integer2D/3D and Double2D/3D handling improvements) and sync-back of plugin-set parameter values to MLT filter properties.
- Implemented render-scale propagation into OFX actions and clip image properties, plus improved clip-preferences priming/caching.
- Added optional “frame-threaded” execution by creating per-frame OFX instances when the plugin’s declared thread-safety allows it, plus a Natron format compatibility helper.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/modules/openfx/mlt_openfx.h |
Extends property type enum and exposes new OpenFX helper APIs (render scale + threading query). |
src/modules/openfx/mlt_openfx.c |
Implements new param handling, logging, clip preference priming/apply, render-scale plumbing, and threading-safety query. |
src/modules/openfx/filter_openfx.c |
Updates filter execution to use render-scale, improved pre-render action ordering, optional per-frame instances, and Natron format compatibility. |
Comments suppressed due to low confidence (3)
src/modules/openfx/mlt_openfx.c:924
- In the Double3D branch,
statusis overwritten on each component read. If reading index 0/1 fails but index 2 succeeds,statusbecomes OK and the fallback-to-defaults block will be skipped, potentially returning an unset/stale X or Y.
OfxStatus status
= propGetDouble((OfxPropertySetHandle) param_props, "MltOfxParamValue", 0, X);
status = propGetDouble((OfxPropertySetHandle) param_props, "MltOfxParamValue", 1, Y);
status = propGetDouble((OfxPropertySetHandle) param_props, "MltOfxParamValue", 2, Z);
src/modules/openfx/mlt_openfx.c:940
- In the Integer3D branch,
statusis overwritten on each component read. A failure to read X or Y can be masked by a successful Z read, which skips the fallback and can return partially undefined values.
OfxStatus status = propGetInt((OfxPropertySetHandle) param_props, "MltOfxParamValue", 0, X);
status = propGetInt((OfxPropertySetHandle) param_props, "MltOfxParamValue", 1, Y);
status = propGetInt((OfxPropertySetHandle) param_props, "MltOfxParamValue", 2, Z);
src/modules/openfx/mlt_openfx.c:908
- In the Integer2D branch,
statusis overwritten on the second propGetInt() call. A failure to read index 0 can be masked by a successful index 1 read, causing partial/undefined values and skipping the default fallback.
OfxStatus status = propGetInt((OfxPropertySetHandle) param_props, "MltOfxParamValue", 0, X);
status = propGetInt((OfxPropertySetHandle) param_props, "MltOfxParamValue", 1, Y);
It was showing as the integer index, not one of the string choices.
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.
No description provided.