Add Focus pull, a video effect that pulls Blur in and out of focus

Blur's box blur moves to effects/box_blur.hpp so both share it; Blur renders
exactly as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Si
2026-09-26 20:45:46 +02:00
co-authored by Claude Opus 5.5
parent 4b407281e2
commit 53dca6b4b8
8 changed files with 228 additions and 64 deletions
+27
View File
@@ -0,0 +1,27 @@
#pragma once
#include "effects/video_effect.hpp"
namespace effector {
// The blur effect in motion, as a lens being focused: either the whole
// picture drifts out of focus and back, or a band of sharpness travels down
// the picture and back up with the rest blurred, as a tilted lens shows it.
//
// The pull goes there and back once a cycle, so the clip loops without a
// jump; nothing in it is random.
class FocusPullEffect : public VideoEffect {
public:
std::string name() const override { return "focuspull"; }
std::string title() const override { return "Focus pull"; }
std::string description() const override {
return "Blurs the picture as Blur does, pulling it out of focus and back, or moving a "
"band of sharpness up and down it.";
}
const std::vector<ParamSpec>& params() const override;
protected:
Image animate(Image input, const ParamValues& values, const Moment& at) const override;
};
} // namespace effector