Skip to content

Various fixes and improvements for OpenFX filters#1248

Merged
ddennedy merged 19 commits into
masterfrom
openfx-fixes
May 21, 2026
Merged

Various fixes and improvements for OpenFX filters#1248
ddennedy merged 19 commits into
masterfrom
openfx-fixes

Conversation

@ddennedy
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, status is overwritten on each component read. If reading index 0/1 fails but index 2 succeeds, status becomes 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, status is 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, status is 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);

Comment thread src/modules/openfx/mlt_openfx.c
Comment thread src/modules/openfx/filter_openfx.c Outdated
Comment thread src/modules/openfx/mlt_openfx.c
@ddennedy ddennedy added this to the v7.40.0 milestone May 18, 2026
It was showing as the integer index, not one of the string choices.
@ddennedy ddennedy marked this pull request as ready for review May 19, 2026 18:11
@ddennedy ddennedy merged commit ad973b4 into master May 21, 2026
26 checks passed
@ddennedy ddennedy deleted the openfx-fixes branch May 21, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants