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 2220E4B4B7 for ; Fri, 7 Jun 2024 10:19:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 857B068D79F; Fri, 7 Jun 2024 13:19:22 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BAE4068D797 for ; Fri, 7 Jun 2024 13:19:15 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id E8CEFC0009 for ; Fri, 7 Jun 2024 10:19:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717755555; 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=cMaOa9Ld4AyzSfWrO+kVZK2PtkT19Bwkpj9m+3+GkSg=; b=EiMyIAhYrKJ9jTFnqyTyuJnmCLkFoHD66MndXMKpHZs1mca8UO6SX40X6JRuiXVj6kbs/9 gJCqN9ji04TrO3GwTPPjHa5/7WjdjK7RislbXKfoWaW2BZlycYLJAb/jcpZz39DLctWT8w 7oULO11n3jkH2ODlwDpGDfInBD1WHFIhdjAz+VDdzduIaHWxPCzqZXQBImv5pzMQUYw8CB Mar7jmQyer9fjch6OmCGIhB2hmxe7I8H2gZBK1EgeiS2iQ0ZgbrGU1L0XP8uwivFvqeKxw UD4v/G88Hba6MInK6Dzan8e4U1RknJAx4zUwEBnLZSJ6qLKyXsGJrAFGI/PCFw== Date: Fri, 7 Jun 2024 12:19:13 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240607101913.GQ2821752@pb2> References: <20240531201721.GO2821752@pb2> <20240602120334.832369-1-gerion.entrup@flump.de> MIME-Version: 1.0 In-Reply-To: <20240602120334.832369-1-gerion.entrup@flump.de> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] libavfilter/signature_lookup: fix jaccard distance 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="===============4033590051774054673==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4033590051774054673== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="eCam2inYEBLywDwW" Content-Disposition: inline --eCam2inYEBLywDwW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 02, 2024 at 02:02:53PM +0200, Gerion Entrup wrote: > Actually, the jaccard distance is defined as D =3D 1 - intersect / union. > Additionally, the distance value is compared against a constant that > must be between 0 and 1, which is not the case here. Both facts together > has led to the fact, that the function always returned a matching course > signature. To leave the constant intact and to avoid floating point > computation, this commit multiplies with 1 << 16 making the constant > effectively 9000 / (1<<16) =3D~ 0.14. >=20 > Reported-by: Sachin Tilloo > Reviewed-by: Sachin Tilloo > Tested-by: Sachin Tilloo > --- > Sorry, it should apply clean now. >=20 > libavfilter/signature_lookup.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Its not that you shouldnt use gotos but rather that you should write readable code and code with gotos often but not always is less readable --eCam2inYEBLywDwW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZmLengAKCRBhHseHBAsP q/CBAJ94BmLYEvYAhdVk41VEEL83DhwvmQCgiiMhmnWXKkXQs64dOD5YZXXyKFc= =8U5N -----END PGP SIGNATURE----- --eCam2inYEBLywDwW-- --===============4033590051774054673== 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". --===============4033590051774054673==--