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 48040487E7 for ; Sat, 20 Jan 2024 00:33:51 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 563BD68CFDD; Sat, 20 Jan 2024 02:33:49 +0200 (EET) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 277D7680066 for ; Sat, 20 Jan 2024 02:33:42 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id C8B0360004 for ; Sat, 20 Jan 2024 00:33:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1705710822; 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=exZLp/q1KLC97RILPg5mj6C1uRW1ijtBpBwvjzlQASk=; b=bSSRlH3NZV3hw7nLBp13yhPj5BLiAR5MDv4wvuA4N3UsnHwpbq15QQCIRRrbmKTrdi981z rWGMhTLz5N2LoDFuELVMik0F/a0RgX1EDTxROr122Z5V6yxkOAVAFdBJ6t5W/elLP2Om6T r5WZDh8lMb96VVU4Y3CT2njFlVn/8nDHSBbxMttITgeoRucljKPIqw3QqbPo4BUdsKj3RV 7dfe/NB6tPdhcGZynjmCCvHk8KjBAGIGdyQvFi1pXjfxtBRvc2DHkPPT5ahcE6seAtiLql t+1U06E1eMmFYMxvz4VA4SfBYKCCxDSRO10un+ILEnZhj+x/OiSY2TKTWhq+kw== Date: Sat, 20 Jan 2024 01:33:41 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240120003341.GX6420@pb2> References: <20240109015521.26231-1-michael@niedermayer.cc> <4d214d22-e1af-9374-1a66-886ca1692ad5@t-online.de> MIME-Version: 1.0 In-Reply-To: <4d214d22-e1af-9374-1a66-886ca1692ad5@t-online.de> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] avutil/eval: Use even better PRNG 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="===============7831870841025192038==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7831870841025192038== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8shKxwfbYt61rVqK" Content-Disposition: inline --8shKxwfbYt61rVqK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 19, 2024 at 09:53:46AM +0100, Michael Koch wrote: > There is still a small problem with the random generator, but this has > nothing to do with the recent changes. > If the random() expression is used in the geq filter, then multiple pixels > get the same sequence of random numbers. > As can be shown with this command, where the frame has only two pixels: >=20 > ffmpeg -loglevel repeat -f lavfi -i nullsrc=3Dsize=3D1x2,format=3Dgray -vf > "geq=3Dlum=3D'print(random(0));print(random(0));print(random(0))'" -frame= s 1 -y > out.png >=20 > I think it's because the filter is executed in multiple threads. > -filter_threads 1 fixes the problem, but it slows down the whole filter > thread. You can avoid this by using ifnot(X,st(0,Y)) which would reseed the random number generator differently on the first pix= el of each line Not sure this is the best solution, better ideas are welcome thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Some people wanted to paint the bikeshed green, some blue and some pink. People argued and fought, when they finally agreed, only rust was left. --8shKxwfbYt61rVqK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iFwEABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZasU4AAKCRBhHseHBAsP q+4BAJ9iQEWJZsYZU1gZtZGyNmpfQg+gxwCYxYxov+Ew6tW7cY+TAHRkB23gQg== =tRkg -----END PGP SIGNATURE----- --8shKxwfbYt61rVqK-- --===============7831870841025192038== 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". --===============7831870841025192038==--