From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 3613E4B202 for ; Thu, 30 May 2024 21:31:43 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9A86B68D495; Fri, 31 May 2024 00:31:40 +0300 (EEST) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8F80268D263 for ; Fri, 31 May 2024 00:31:34 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7F8A1E0004 for ; Thu, 30 May 2024 21:31:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717104693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wb1PPCKJYZHnYFYMZO0akK5LLiGnNpjo2HcxvRcrrbw=; b=l+GVx+69a/2p3SN4IAKDzw5AorlQlTVH3bLsgQCZnRexWi41vU+WHVnuIn6dr6WPNxC5ea D7tXuZh88JCrZFj2Se3khyu+AILeNvQPh9dRSvgISoHVQeOO505CvjPVHdEoeim5g9Lpkx eToIyIXXYKsIeB+9VJOAkmBYG5U5R0CnNtgcFpYQtrxc96CFwXhv4hUJWU4EngWayMPwQZ WespNtlHNdI1Tb9Vi3RX9fOLu9VBJkRkBUbzhFr58YnvItXoPqlUTRfo12oMPzMFcglN74 7YEgKlhK0sxDWHJFI+UlW+wRGXMUEwa7GX/Yxg9R4n34eHXGllQ/Qno5qbG1ew== Date: Thu, 30 May 2024 23:31:32 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240530213132.GE2821752@pb2> References: <000c01daa54d$8a0eedf0$9e2cc9d0$@gmail.com> MIME-Version: 1.0 In-Reply-To: <000c01daa54d$8a0eedf0$9e2cc9d0$@gmail.com> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] area changed: scdet filter X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============6946607081930130256==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6946607081930130256== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SO+9/CRZBGNspxuY" Content-Disposition: inline --SO+9/CRZBGNspxuY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 13, 2024 at 06:52:19PM +0300, radu.taraibuta@gmail.com wrote: > Previous observations: >=20 > - Inconsistent code style with other filters. (Mostly using AVFilterLink* > link instead of AVFilterLink *link). > I hope it's fine now.=09 >=20 > - Unrelated changes, please split trivial unrelated changes into separate > patches. > Removed trivial changes from this patch. >=20 > - Can't tables be generated at .init/.config_props time? No point in > storing them into binary. > Done. >=20 > - Adding extra delay is not backward compatible change, it should be > implemented properly by adding option for users to select mode: next & pr= ev > frame or just next or prev frame. > Added legacy option to the mode parameter. >=20 > - Could split frame clone change into earlier separate patch. > Cannot be done. It's either frame clone or 1 frame delay. >=20 > - Where are results of improvements with accuracy so it can be confirmed? > Here are my test results with manual labeling of scene changes: > 2379 Full length movie >=20 > Method Threshold TP FP FN Precision > Recall F > Cubic 7 2357 423 22 0.847841727 0.990752417 > 0.913742973 > Cubic 10 2297 200 82 0.919903885 0.965531736 > 0.94216571 > Cubic 12 2217 146 162 0.938214135 0.931904161 > 0.935048503 > Cubic 15 2049 101 330 0.953023256 0.861286255 > 0.904835505 > Linear 2.8 2357 1060 22 0.689786362 0.990752417 > 0.813319531 > Linear 8 2099 236 280 0.898929336 0.882303489 > 0.890538821 > Linear 10 1886 173 493 0.91597863 0.792770071 > 0.849932402 > Legacy 5 2235 1260 144 0.639484979 0.939470366 > 0.760980592 > Legacy 8 1998 414 381 0.828358209 0.839848676 > 0.83406387 > Legacy 10 1743 193 636 0.900309917 0.732660782 > 0.80787949 > =09 > 15 HDR10Plus_PB_EAC3JOC > https://mega.nz/file/nehDka6Z#C5_OPbSZkONdOp1jRmc09C9-viDc3zMj8ZHruHcWKyA >=20 > Method Threshold TP FP FN Precision > Recall F > Cubic 10 15 0 0 1 1 1 > Linear 5 13 1 2 0.928571429 0.866666667 > 0.896551724 > Legacy 5 12 2 3 0.857142857 0.8 > 0.827586207 > =09 > 21 (HDR HEVC 10-bit BT.2020 24fps) Exodus Sample > https://mega.nz/file/Sfw1hDpK#ErxCOpQDVjcI1gq6ZbX3vIfdtXZompkFe0jq47EhR2o >=20 > Method Threshold TP FP FN Precision > Recall F > Cubic 10 21 0 0 1 1 1 > Linear 4 20 0 1 1 0.952380952 > 0.975609756 > Legacy 4 19 0 2 1 0.904761905 0.95 > =09 > 94 Bieber Grammys > https://mega.nz/#!c9dhAaKA!MG5Yi-MJNATE2_KqcnNJZCRKtTWvdjJP1NwG8Ggdw3E >=20 > Method Threshold TP FP FN Precision > Recall F > Cubic 15 91 23 3 0.798245614 0.968085106 > 0.875 > Cubic 18 85 9 9 0.904255319 0.904255319 > 0.904255319 > Linear 7 79 49 15 0.6171875 0.840425532 > 0.711711712 > Linear 8 74 28 20 0.725490196 0.787234043 > 0.755102041 > Legacy 7 74 40 20 0.649122807 0.787234043 > 0.711538462 > Legacy 8 71 26 23 0.731958763 0.755319149 > 0.743455497 >=20 >=20 > Improve scene detection accuracy by comparing frame with both previous and > next frame (creates one frame delay). > Add new mode parameter and new method to compute the frame difference usi= ng > cubic square to increase the weight of small changes and new mean formula. > This improves accuracy significantly. Slightly improve performance by not > using frame clone. > Add legacy mode for backward compatibility. >=20 > Signed-off-by: raduct > --- > doc/filters.texi | 16 ++++ > libavfilter/scene_sad.c | 151 ++++++++++++++++++++++++++++++++++ > libavfilter/scene_sad.h | 6 ++ > libavfilter/vf_scdet.c | 156 +++++++++++++++++++++++++----------- > tests/fate/filter-video.mak | 3 + > 5 files changed, 284 insertions(+), 48 deletions(-) >=20 > diff --git a/doc/filters.texi b/doc/filters.texi > index bfa8ccec8b..53814e003b 100644 > --- a/doc/filters.texi > +++ b/doc/filters.texi > @@ -21797,6 +21797,22 @@ Default value is @code{10.}. > @item sc_pass, s > Set the flag to pass scene change frames to the next filter. Default val= ue > is @code{0} The patch is corrupted by linebreaks: Applying: area changed: scdet filter error: corrupt patch at line 16 Patch failed at 0001 area changed: scdet filter please check the linebreak settings or attach the patch or use git send-ema= il thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Homeopathy is like voting while filling the ballot out with transparent ink. Sometimes the outcome one wanted occurs. Rarely its worse than filling out a ballot properly. --SO+9/CRZBGNspxuY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZljwMQAKCRBhHseHBAsP q4X6AJ9IgLuRJ/JU4ncmWUArBTZutYyc1ACaAxK8FUZ5MMPNSqHlQrrFdBzm7qM= =DJNs -----END PGP SIGNATURE----- --SO+9/CRZBGNspxuY-- --===============6946607081930130256== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============6946607081930130256==--