The branch, master has been updated
via c4b050fd6725561936115397575a4e1f9d9fd471 (commit)
via 3f0842294fbefcca32fdad6b644eae8c14f547e5 (commit)
from bce14bb1603a8333d46e5ac9b36ca2caa189ee43 (commit)
- Log -----------------------------------------------------------------
commit c4b050fd6725561936115397575a4e1f9d9fd471
Author: Jack Lau <[email protected]>
AuthorDate: Tue Nov 18 21:29:43 2025 +0800
Commit: Marton Balint <[email protected]>
CommitDate: Wed Dec 3 21:23:51 2025 +0000
tests/fate/filter-video: add two feedback tests
- Add fate-filter-feedback-yadif
- add fate-filter-feedback-hflip
Signed-off-by: Jack Lau <[email protected]>
diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 087ba8d9cd..9f3c92a395 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -20,6 +20,11 @@ fate-filter-bwdif10: CMD = framecrc -ec 0 -flags bitexact
-idct simple -i $(TARG
FATE_FILTER_SAMPLES-yes += $(FATE_BWDIF-yes)
+FATE_FEEDBACK-$(call FILTERDEMDEC, FEEDBACK YADIF, MPEGTS, MPEG2VIDEO) +=
fate-filter-feedback-yadif
+fate-filter-feedback-yadif: CMD = framecrc -ec 0 -flags bitexact -idct simple
-i $(TARGET_SAMPLES)/mpeg2/mpeg2_field_encoding.ts -frames:v 30 -vf
"[in][yadifin]feedback=x=0:y=0:w=100:h=100[out][yadifout];[yadifout]yadif[yadifin]"
+
+FATE_FILTER_SAMPLES-yes += $(FATE_FEEDBACK-yes)
+
FATE_YADIF-$(call FILTERDEMDEC, YADIF, MPEGTS, MPEG2VIDEO) +=
fate-filter-yadif-mode0 fate-filter-yadif-mode1
fate-filter-yadif-mode0: CMD = framecrc -ec 0 -flags bitexact -idct simple -i
$(TARGET_SAMPLES)/mpeg2/mpeg2_field_encoding.ts -frames:v 30 -vf yadif=0
fate-filter-yadif-mode1: CMD = framecrc -ec 0 -flags bitexact -idct simple -i
$(TARGET_SAMPLES)/mpeg2/mpeg2_field_encoding.ts -frames:v 59 -vf yadif=1
@@ -170,6 +175,9 @@ FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC FORMAT CONCAT
SCALE, LAVFI_INDEV FILE
fate-filter-lavd-scalenorm: tests/data/filtergraphs/scalenorm
fate-filter-lavd-scalenorm: CMD = framecrc -f lavfi -graph_file
$(TARGET_PATH)/tests/data/filtergraphs/scalenorm -i dummy
+FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 FEEDBACK HFLIP) +=
fate-filter-feedback-hflip
+fate-filter-feedback-hflip: CMD = framecrc -f lavfi -i testsrc2=d=1 -vf
"[in][hflipin]feedback=x=0:y=0:w=100:h=100[out][hflipout];[hflipout]hflip[hflipin]"
+
FATE_FILTER-$(call FILTERFRAMECRC, FRAMERATE TESTSRC2) +=
fate-filter-framerate-up fate-filter-framerate-down
fate-filter-framerate-up: CMD = framecrc -lavfi
testsrc2=r=2:d=10,framerate=fps=10 -t 1
fate-filter-framerate-down: CMD = framecrc -lavfi
testsrc2=r=2:d=10,framerate=fps=1 -t 1
diff --git a/tests/ref/fate/filter-feedback-hflip
b/tests/ref/fate/filter-feedback-hflip
new file mode 100644
index 0000000000..0c004ee281
--- /dev/null
+++ b/tests/ref/fate/filter-feedback-hflip
@@ -0,0 +1,30 @@
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 320x240
+#sar 0: 1/1
+0, 0, 0, 1, 115200, 0x441d0ff3
+0, 1, 1, 1, 115200, 0x5de73658
+0, 2, 2, 1, 115200, 0x1f727e03
+0, 3, 3, 1, 115200, 0xbf2fa0c4
+0, 4, 4, 1, 115200, 0xee4ed474
+0, 5, 5, 1, 115200, 0x0013f45b
+0, 6, 6, 1, 115200, 0x7c7cf929
+0, 7, 7, 1, 115200, 0xd4cdf824
+0, 8, 8, 1, 115200, 0x1e48fad9
+0, 9, 9, 1, 115200, 0xcbbff220
+0, 10, 10, 1, 115200, 0x1162fcc9
+0, 11, 11, 1, 115200, 0x742ff029
+0, 12, 12, 1, 115200, 0x9901f2e0
+0, 13, 13, 1, 115200, 0xf0a1f828
+0, 14, 14, 1, 115200, 0x585903b8
+0, 15, 15, 1, 115200, 0x2dbf15f6
+0, 16, 16, 1, 115200, 0x0fd011f5
+0, 17, 17, 1, 115200, 0x73ec12cf
+0, 18, 18, 1, 115200, 0x09c910e9
+0, 19, 19, 1, 115200, 0x90811025
+0, 20, 20, 1, 115200, 0xd2d721b1
+0, 21, 21, 1, 115200, 0xfaa309a0
+0, 22, 22, 1, 115200, 0x4c010776
+0, 23, 23, 1, 115200, 0x3560eaac
+0, 24, 24, 1, 115200, 0xeed2d55d
diff --git a/tests/ref/fate/filter-feedback-yadif
b/tests/ref/fate/filter-feedback-yadif
new file mode 100644
index 0000000000..841b17a7cd
--- /dev/null
+++ b/tests/ref/fate/filter-feedback-yadif
@@ -0,0 +1,35 @@
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 720x576
+#sar 0: 16/15
+0, 9, 9, 1, 622080, 0x694c9553
+0, 10, 10, 1, 622080, 0x213ec012
+0, 11, 11, 1, 622080, 0x25c5d006
+0, 12, 12, 1, 622080, 0x65b6207d
+0, 13, 13, 1, 622080, 0xa670b9eb
+0, 14, 14, 1, 622080, 0x1e01e2cf
+0, 15, 15, 1, 622080, 0xae927c11
+0, 16, 16, 1, 622080, 0xe05ae9f8
+0, 17, 17, 1, 622080, 0x93b5db69
+0, 18, 18, 1, 622080, 0x25295750
+0, 19, 19, 1, 622080, 0x82ebf126
+0, 20, 20, 1, 622080, 0x32aea022
+0, 21, 21, 1, 622080, 0x55a5851f
+0, 22, 22, 1, 622080, 0x69951dcc
+0, 23, 23, 1, 622080, 0xf4d9c6d0
+0, 24, 24, 1, 622080, 0x5178d1b1
+0, 25, 25, 1, 622080, 0x3fa221a3
+0, 26, 26, 1, 622080, 0x6f5044f4
+0, 27, 27, 1, 622080, 0x691c3234
+0, 28, 28, 1, 622080, 0xe67ac448
+0, 29, 29, 1, 622080, 0x7195350c
+0, 30, 30, 1, 622080, 0x1bb70e7b
+0, 31, 31, 1, 622080, 0xf089397d
+0, 32, 32, 1, 622080, 0x6e2363b6
+0, 33, 33, 1, 622080, 0x84c8548c
+0, 34, 34, 1, 622080, 0x812e5ea9
+0, 35, 35, 1, 622080, 0x7ba238c6
+0, 36, 36, 1, 622080, 0x740317f5
+0, 37, 37, 1, 622080, 0xf5b22ef6
+0, 38, 38, 1, 622080, 0x54e3b3f2
commit 3f0842294fbefcca32fdad6b644eae8c14f547e5
Author: Jack Lau <[email protected]>
AuthorDate: Tue Nov 18 06:45:06 2025 +0800
Commit: Marton Balint <[email protected]>
CommitDate: Wed Dec 3 21:23:51 2025 +0000
avfilter/vf_feedback: fix feedback block
Fix #20940
The feedback and its sub-filter both request frame
from each other, casuing block since 4440e499ba
The feedback should only request inputs[1] once
rather than continuously request frame cause blocking.
This patch add check whether feedback already request
inputs[1] via ff_outlink_frame_wanted(ctx->outputs[1]),
if true, then exit and waiting inputs[0] because it means
we need more frames input to proceed.
Signed-off-by: Jack Lau <[email protected]>
diff --git a/libavfilter/vf_feedback.c b/libavfilter/vf_feedback.c
index 6667ddfd16..e3633d7d37 100644
--- a/libavfilter/vf_feedback.c
+++ b/libavfilter/vf_feedback.c
@@ -245,6 +245,10 @@ static int activate(AVFilterContext *ctx)
}
if (!s->feed || ctx->is_disabled) {
+ if (!ctx->is_disabled && ff_outlink_frame_wanted(ctx->outputs[1])) {
+ ff_inlink_request_frame(ctx->inputs[0]);
+ return 0;
+ }
if (ff_outlink_frame_wanted(ctx->outputs[0])) {
ff_inlink_request_frame(ctx->inputs[0]);
if (!ctx->is_disabled)
-----------------------------------------------------------------------
Summary of changes:
libavfilter/vf_feedback.c | 4 ++++
tests/fate/filter-video.mak | 8 ++++++++
tests/ref/fate/filter-feedback-hflip | 30 ++++++++++++++++++++++++++++++
tests/ref/fate/filter-feedback-yadif | 35 +++++++++++++++++++++++++++++++++++
4 files changed, 77 insertions(+)
create mode 100644 tests/ref/fate/filter-feedback-hflip
create mode 100644 tests/ref/fate/filter-feedback-yadif
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]