From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 4BEA54C43A for ; Wed, 12 Nov 2025 20:28:23 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'pTkFnO3Ag+rjyVmsk/hiqy3cz57P5m8Ocj3x2bE/nWs=', expected b'PE6G84VCpTYYyzRPfwgEwxulkRmBUsHfbaVzMbYMBa0=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1762979289; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=pTkFnO3Ag+rjyVmsk/hiqy3cz57P5m8Ocj3x2bE/nWs=; b=wd6hgLPSyfH3paGt5l8M415+yaGmXq3+usst6rSs42bpGJUlF9hO6AU4cjfHfNNmOIF+H 9Ku0Nor+UeaoOPvWUF+e3c517ggJrTR/0Po4hBBEDE5TR9PihEe33gXpJ4vzt9V8yDcW5Wp 4Sdw+d9eCmIn+EW/1QNBnOQAGF5UE8dDwiaO+EAlOq3llU0ZKZpHaIun68Gdn8VqbFxb/pU Krz4ItRNLL12PyccYCSlIglUCOl6s1YePiOQsO+UmSQ2Ye2pIlsnCvJDOghzJHQkFw/paGG UVbxMqKWQRIRU8aVy4VWpl46iH5V5m5kbbCfkR1whfJiCvq+CJVfu7CD3wFg== Received: from [172.19.0.2] (unknown [172.19.0.2]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 264E168FD91; Wed, 12 Nov 2025 22:28:09 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1762979268; b=PB2z99e3rLOy/ZW3Tgy1D8OkxhzQg5PPcj1yO8PhIjV+8acZnS/q9fuFdGo/cu3/efKt2 ecURsvfpUj8aBCKJRXvund/W7WcSaU/zWoNN/fIPV7mPJam5yXkUblt3DZSc/aS7tuGEspU i0XvCv+Sqzo0SippEz08hQFNv01yJGI4Sq5M73NEjIU3EwIYgOLZfcFOx3B0G+nhbTEACPZ r2NF3VZMPEgiE6M8XeIGA2Pk5dv07GkCqRX9BlODIVdT+4QCHTwmrnkPFnLHPjEsg3P5jUx Q1ro5Xgy2rPkw4capFhpZFwtLVKeALw7gp+LXUlgZq2mecw1NnT/7roXgxEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1762979268; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=+cJbJstT63ahMU7/LhFzUNtsT0IgRrGF0ddr6FX+PLs=; b=qWiBzzLFcLq0MO9sv4AFSe7LsIWZ46TMuOdYm7M5fG1misD4F53IbBMVS9tKLo3KLweMa 5saFEamql3Hx0LhP9sL+N1VeHiMWQPl36xdZA8BsOxd4B4sur2Rz6TVdwdEJFaXwVBuWKod TbtJOvGbusHu90MN7vmwR3/XpESuQ/5yRGO1W29S69AzwRz8S0a3KnQdAO5lKMG/UkhU/Vl KuZc0WxYilhZi48jCPQYxUbk1XkgOR4dwKL8tv4dubUWQovd13gYry0R9zSWJwToY4OQByc KVrrUvOmGoxac/xE8dUCWhQw08ZFbjVWQSzJJrBMAS3eM10dOshT621w9y+g== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1762979261; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=PE6G84VCpTYYyzRPfwgEwxulkRmBUsHfbaVzMbYMBa0=; b=3kpE4+4ggANni1B3apguidSEtgRBAbgoxWDOYdyVnWVLugGPHl3Uyk76a2CRyI02kq3r4 WVuqvbPtwjQr2U+5PrP7Sa/xjmAmdMGwYJ9/XRKzpe6lRYfF9sbpYn4iNqSR+XZ+DOcWb1J QbqFzL+PsrfQJlFCkU45DCm0X3N7k6JEJ2bIp1mJRb748UMvDIjPpWgi6Klb69m/Y048iXL uirJAoeQD+Mx/0Wmw01J4U0dPXf+1fw6+5DI3ULkgYXmhIeRaNuX7G+pafjnh9AFxmeVUUg Aw1plQgkatUcn5BC8B26Aldc4i0ssXF9lmrZM5pHd5TyJTsmuItNqNoZKglg== Received: from 188d6d40ca7a (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 60A3D68FDA2 for ; Wed, 12 Nov 2025 22:27:41 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Nov 2025 20:27:40 -0000 Message-ID: <176297926159.25.776932108030366925@2cb04c0e5124> Message-ID-Hash: AB6TGM4YNCUGZ52KNTF3XITLKJ2RXJR6 X-Message-ID-Hash: AB6TGM4YNCUGZ52KNTF3XITLKJ2RXJR6 X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] avfilter/vf_frei0r: fix time when input is realigned (PR #20903) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: breunigs via ffmpeg-devel Cc: breunigs Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #20903 opened by breunigs URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20903 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20903.patch av_frame_copy doesn't copy the input's PTS property, which resulted in the frei0r filter always receiving the same static time. Example that has a static distortion without patch: ffmpeg -filter_complex "testsrc2=s=328x240:d=5,frei0r=distort0r" out.mp4 An installation of frei0r-plugins is required to run the tests, which is usually seperate from the build headers. Some systems have it packaged (e.g. `apt install frei0r-plugins`). An upstream release extracted to `FREI0R_PATH` also works. The distort0r filter requires dimensions to be divisible by 8. >>From 8a72bc558ea82e1a0f41d63a706531790a2ce878 Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Wed, 12 Nov 2025 20:58:05 +0100 Subject: [PATCH] avfilter/vf_frei0r: fix time when input is realigned av_frame_copy doesn't copy the input's PTS property, which resulted in the frei0r filter always receiving the same static time. Example that has a static distortion without patch: ffmpeg -filter_complex "testsrc2=s=328x240:d=5,frei0r=distort0r" out.mp4 An installation of frei0r-plugins is required to run the tests, which is usually seperate from the build headers. Some systems have it packaged (e.g. `apt install frei0r-plugins`). An upstream release extracted to `FREI0R_PATH` also works. The distort0r filter requires dimensions to be divisible by 8. --- libavfilter/vf_frei0r.c | 4 ++++ tests/fate/filter-video.mak | 3 ++- tests/ref/fate/filter-frei0r-filter-unaligned | 10 ++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tests/ref/fate/filter-frei0r-filter-unaligned diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index 50d81d220f..5dd7387721 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -375,6 +375,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) if (!in2) goto fail; av_frame_copy(in2, in); + if(av_frame_copy_props(in2, in) < 0) { + av_frame_free(&in2); + goto fail; + } av_frame_free(&in); in = in2; } diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index cd5903c960..3fe7f10476 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -717,8 +717,9 @@ $(FATE_FILTER_VSYNTH-yes): SRC = $(TARGET_PATH)/tests/vsynth1/%02d.pgm FATE_FFMPEG += $(FATE_FILTER_VSYNTH-yes) -FATE_FILTER_FREI0R-$(call FILTERFRAMECRC, TESTSRC2, FREI0R_FILTER) = fate-filter-frei0r-filter +FATE_FILTER_FREI0R-$(call FILTERFRAMECRC, TESTSRC2, FREI0R_FILTER) = fate-filter-frei0r-filter fate-filter-frei0r-filter-unaligned fate-filter-frei0r-filter: CMD = framecrc -lavfi "testsrc2=r=1:d=5,frei0r=enable=gte(n\,3):filter_name=distort0r" +fate-filter-frei0r-filter-unaligned: CMD = framecrc -lavfi "testsrc2=s=328x240:r=1:d=5,frei0r=filter_name=distort0r" FATE_FFMPEG += $(FATE_FILTER_FREI0R-yes) # diff --git a/tests/ref/fate/filter-frei0r-filter-unaligned b/tests/ref/fate/filter-frei0r-filter-unaligned new file mode 100644 index 0000000000..c3cffc69f1 --- /dev/null +++ b/tests/ref/fate/filter-frei0r-filter-unaligned @@ -0,0 +1,10 @@ +#tb 0: 1/1 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 328x240 +#sar 0: 1/1 +0, 0, 0, 1, 314880, 0x7b9cad8f +0, 1, 1, 1, 314880, 0x0184436f +0, 2, 2, 1, 314880, 0x7e3f2776 +0, 3, 3, 1, 314880, 0x0dc5e915 +0, 4, 4, 1, 314880, 0xcf9c76ef -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org