This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit dd057bd8569a1fb74d5edc9ff56eee83bddb198f
Author:     Vladimir Panteleev <[email protected]>
AuthorDate: Mon Jun 15 10:18:05 2026 +0000
Commit:     michaelni <[email protected]>
CommitDate: Sun Jul 5 00:41:30 2026 +0000

    fate/filter-video: add photosensitivity blend test
    
    Add a small self-contained lavfi test for the photosensitivity filter's
    blend path. The graph produces one black RGB frame followed by two white
    RGB frames, then runs:
    
        photosensitivity=frames=2:threshold=95:blend=0.5
    
    The threshold is chosen so that the first black-to-white transition
    barely exceeds the detector limit. A full 8x8 RGB grid transition has
    badness 64 * 3 * 255 = 48960, while threshold=95 gives 48640 for the
    first checked history window. That forces the filter into the blend
    branch without needing any external sample.
    
    With blend=0.5, the runtime factor is 48640 / 48960 * 0.5, or about
    0.4967. The fixed-point blender truncates this to an input-frame weight
    of 127/256, so blending black toward white produces an RGB component
    value of 126. The reference therefore records black, the blended gray
    frame, and then the following accepted white frame.
    
    This makes the otherwise cryptic CRCs tie directly to the blend
    calculation and history update behavior.
    
    Co-authored-by: Codex CLI <[email protected]>
---
 tests/fate/filter-video.mak                  | 3 +++
 tests/ref/fate/filter-photosensitivity-blend | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index c71158c7bc..f0f9e92834 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -320,6 +320,9 @@ fate-filter-overlays: $(FATE_FILTER_OVERLAY) 
$(FATE_FILTER_OVERLAY_ALPHA)
 FATE_FILTER_VSYNTH_PGMYUV-$(CONFIG_PHASE_FILTER) += fate-filter-phase
 fate-filter-phase: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf phase
 
+FATE_FILTER-$(call FILTERFRAMECRC, COLOR CONCAT FORMAT PHOTOSENSITIVITY) += 
fate-filter-photosensitivity-blend
+fate-filter-photosensitivity-blend: CMD = framecrc -lavfi 
"color=black:s=16x16:r=1:d=1[black];color=white:s=16x16:r=1:d=2[white];[black][white]concat=n=2:v=1:a=0,format=rgb24,photosensitivity=frames=2:threshold=95:blend=0.5"
 -pix_fmt rgb24
+
 FATE_REMOVEGRAIN := 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 \
                     16 17 18 19 20 21 22 23 24
 FATE_REMOVEGRAIN := $(addprefix fate-filter-removegrain-mode-, 
$(FATE_REMOVEGRAIN))
diff --git a/tests/ref/fate/filter-photosensitivity-blend 
b/tests/ref/fate/filter-photosensitivity-blend
new file mode 100644
index 0000000000..b40f1caa03
--- /dev/null
+++ b/tests/ref/fate/filter-photosensitivity-blend
@@ -0,0 +1,8 @@
+#tb 0: 1/1
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 16x16
+#sar 0: 1/1
+0,          0,          0,        1,      768, 0x00000000
+0,          1,          1,        1,      768, 0xde397a0f
+0,          2,          2,        1,      768, 0x41d3fd1e

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to