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 A78D6476E5 for ; Fri, 19 Jan 2024 09:00:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9B82368CFAC; Fri, 19 Jan 2024 11:00:37 +0200 (EET) Received: from mailout12.t-online.de (mailout12.t-online.de [194.25.134.22]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 94A0068CCED for ; Fri, 19 Jan 2024 11:00:31 +0200 (EET) Received: from fwd83.aul.t-online.de (fwd83.aul.t-online.de [10.223.144.109]) by mailout12.t-online.de (Postfix) with SMTP id F33421A2E6 for ; Fri, 19 Jan 2024 09:53:48 +0100 (CET) Received: from [192.168.178.21] ([91.60.179.66]) by fwd83.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1rQkdI-11qv7R0; Fri, 19 Jan 2024 09:53:48 +0100 To: ffmpeg-devel@ffmpeg.org References: <20240109015521.26231-1-michael@niedermayer.cc> From: Michael Koch Message-ID: <4d214d22-e1af-9374-1a66-886ca1692ad5@t-online.de> Date: Fri, 19 Jan 2024 09:53:46 +0100 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20240109015521.26231-1-michael@niedermayer.cc> X-TOI-EXPURGATEID: 150726::1705654428-ABFFC99C-80A4C8E1/0/0 CLEAN NORMAL X-TOI-MSGID: 35f97e8e-de0f-4623-ba6a-64fbf2594c30 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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: ffmpeg -loglevel repeat -f lavfi -i nullsrc=size=1x2,format=gray -vf "geq=lum='print(random(0));print(random(0));print(random(0))'" -frames 1 -y out.png 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. Michael _______________________________________________ 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".