Commit 4fe68a616a for ffmpeg
commit 4fe68a616a7e9bea62eab0ffb14135aca5041a54
Author: marcos ashton <marcosashiglesias@gmail.com>
Date: Tue Dec 1 16:36:55 2026 +0000
tests/fate/filter-video: add lut2 and tlut2 tests
Coverage for libavfilter/vf_lut2.c: 0.0% -> 71.0%
diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 6e03d6cd95..5faa88d203 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -506,6 +506,12 @@ fate-filter-displace-%: FMT = yuv420p
fate-filter-displace-wrap-rgb24: FMT = rgb24
fate-filter-displace-%: CMD = framecrc -lavfi "$(call FATE_TSRC2,$(FMT))[a];$(call FATE_TSRC2,$(FMT)),hflip[b];$(call FATE_TSRC2,$(FMT)),negate[c];[a][b][c]displace=edge=$(call FATE_TARGET_WORD,4)"
+FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 SCALE FORMAT LUT2 NEGATE) += fate-filter-lut2-8to16bit
+fate-filter-lut2-8to16bit: CMD = framecrc -lavfi "$(call FATE_TSRC2,yuv420p)[a];$(call FATE_TSRC2,yuv420p),negate[b];[a][b]lut2=c0=x*256+y:d=16,format=yuv420p16,scale" -pix_fmt yuv420p16le
+
+FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 SCALE FORMAT TLUT2) += fate-filter-tlut2
+fate-filter-tlut2: CMD = framecrc -lavfi "$(call FATE_TSRC2,yuv420p,,0.6),tlut2=c0=(x+y)/2:c1=abs(x-y)"
+
FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 FPS DECIMATE) += fate-filter-decimate
fate-filter-decimate: CMD = framecrc -lavfi testsrc2=r=24:d=10,fps=60,decimate=5,decimate=4,decimate=3 -pix_fmt yuv420p
diff --git a/tests/ref/fate/filter-lut2-8to16bit b/tests/ref/fate/filter-lut2-8to16bit
new file mode 100644
index 0000000000..77761a72a3
--- /dev/null
+++ b/tests/ref/fate/filter-lut2-8to16bit
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 0, 0, 1, 9216, 0x6625ff50
+0, 1, 1, 1, 9216, 0x3788fe05
diff --git a/tests/ref/fate/filter-tlut2 b/tests/ref/fate/filter-tlut2
new file mode 100644
index 0000000000..e19a74d358
--- /dev/null
+++ b/tests/ref/fate/filter-tlut2
@@ -0,0 +1,7 @@
+#tb 0: 1/5
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 64x48
+#sar 0: 1/1
+0, 1, 1, 1, 4608, 0xfe66fbed
+0, 2, 2, 1, 4608, 0x5464fa52