Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

fix(effects): the filter allowlist is one sorted run, so the search finds picture filters

Jareer85f13b8ef48e
diff --git a/src/crates/concat-effects/src/filters.rs b/src/crates/concat-effects/src/filters.rs
index 6aa53830..e7ca0a68 100644
--- a/src/crates/concat-effects/src/filters.rs
+++ b/src/crates/concat-effects/src/filters.rs
@@ -13,12 +13,13 @@
//! names anything else is refused at load, before it is ever run.
//!
//! The list is the union of what the built-ins use and the plain pixel
-//! and sound filters an author is likely to reach for next. Adding one is
-//! adding a line, in order; the test keeps the order.
+//! and sound filters an author is likely to reach for next, sound and
+//! picture in one alphabet, since the search is binary and needs the
+//! whole list in order. Adding one is adding a line in its place; the
+//! test keeps the order.
-/// Every filter a chain may use, sorted for [`allowed`]'s search.
+/// Every filter a chain may use, in one sorted run for [`allowed`]'s search.
pub const ALLOWED: &[&str] = &[
- // ── sound ──
"acompressor",
"acontrast",
"acrusher",
@@ -49,49 +50,18 @@ pub const ALLOWED: &[&str] = &[
"asupercut",
"atempo",
"atilt",
+ "avgblur",
"bandpass",
"bandreject",
"bass",
- "biquad",
- "bs2b",
- "chorus",
- "compand",
- "compensationdelay",
- "crossfeed",
- "crystalizer",
- "dcshift",
- "deesser",
- "dynaudnorm",
- "earwax",
- "equalizer",
- "extrastereo",
- "firequalizer",
- "flanger",
- "haas",
- "highpass",
- "highshelf",
- "loudnorm",
- "lowpass",
- "lowshelf",
- "pan",
- "rubberband",
- "speechnorm",
- "stereotools",
- "stereowiden",
- "superequalizer",
- "surround",
- "treble",
- "tremolo",
- "vibrato",
- "virtualbass",
- "volume",
- // ── picture ──
- "avgblur",
"bilateral",
+ "biquad",
"blend",
"boxblur",
+ "bs2b",
"bwdif",
"cas",
+ "chorus",
"chromahold",
"chromakey",
"chromanr",
@@ -106,28 +76,43 @@ pub const ALLOWED: &[&str] = &[
"colorlevels",
"colorspace",
"colortemperature",
+ "compand",
+ "compensationdelay",
"convolution",
"crop",
+ "crossfeed",
+ "crystalizer",
"curves",
+ "dcshift",
"dctdnoiz",
"deband",
"deblock",
+ "deesser",
"deflicker",
"dilation",
"drawbox",
"drawgrid",
+ "dynaudnorm",
+ "earwax",
"edgedetect",
"eq",
+ "equalizer",
"erosion",
"exposure",
+ "extrastereo",
"fade",
"fftdnoiz",
"fillborders",
+ "firequalizer",
+ "flanger",
"format",
"gblur",
"geq",
"gradfun",
+ "haas",
"hflip",
+ "highpass",
+ "highshelf",
"histeq",
"hqdn3d",
"hqx",
@@ -139,6 +124,9 @@ pub const ALLOWED: &[&str] = &[
"lagfun",
"lenscorrection",
"limiter",
+ "loudnorm",
+ "lowpass",
+ "lowshelf",
"lumakey",
"lut",
"lut1d",
@@ -153,6 +141,7 @@ pub const ALLOWED: &[&str] = &[
"normalize",
"overlay",
"pad",
+ "pan",
"perspective",
"photosensitivity",
"pixelize",
@@ -161,6 +150,7 @@ pub const ALLOWED: &[&str] = &[
"rgbashift",
"roberts",
"rotate",
+ "rubberband",
"sab",
"scale",
"selectivecolor",
@@ -168,18 +158,28 @@ pub const ALLOWED: &[&str] = &[
"shuffleplanes",
"smartblur",
"sobel",
+ "speechnorm",
"split",
+ "stereotools",
+ "stereowiden",
+ "superequalizer",
+ "surround",
"swapuv",
"tblend",
"tile",
"tmix",
"tonemap",
"transpose",
+ "treble",
+ "tremolo",
"unsharp",
"vaguedenoiser",
"vflip",
"vibrance",
+ "vibrato",
"vignette",
+ "virtualbass",
+ "volume",
"vstack",
"xbr",
"zoompan",