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 ESMTPS id 15DE74CD92 for ; Wed, 12 Feb 2025 19:52:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6726968C05A; Wed, 12 Feb 2025 21:52:47 +0200 (EET) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9737C68BD10 for ; Wed, 12 Feb 2025 21:52:41 +0200 (EET) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-5450f38393aso36079e87.0 for ; Wed, 12 Feb 2025 11:52:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1739389960; x=1739994760; darn=ffmpeg.org; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=sLhqCI/vrIMxsswnTMbBxDzej+SBDpI3KYZoAEZX6RI=; b=impkVvl8Z9z8htD+BIZoVjjhPdjyuai76ODdIlPzAZ/bz2FraAq6QrTNWCI1A2Lrtl znb9xvpQLUek3+IWCxxFVLbRFR7klkFvpPeGyRtxhn5+U0MsAfhFvmioNUCaEbjTDOOM avVzUR1HRxQb2MlIDfRy2M5zTxveofOJnHb+v4WgWlaVGz4C8B88AsKMCenNMXMWZzlX b6fk9AfI1O4vPRajsav05qY31uRZkR6XdUkK1xvLl1OzZVqLAseDjz+Y97JWaJo7MJLR CeKz/s8ygdJx98wVQ03qcNbK0gVRbnDlyNYSN0mHonwhdEdPjlbQ/sramCKj8pIeJrRE OzIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739389960; x=1739994760; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sLhqCI/vrIMxsswnTMbBxDzej+SBDpI3KYZoAEZX6RI=; b=oomS+rQKyowy1qXofPk1MbZB7d40omqE7g4wnNSm4CFyOv9F6Gg9sCf6IEKUCe82bI p1lwvNXDWeb/KDaQoByaxJ+1qQ8KQiHI2beEewOypXf+qYhhSeLHLHDTllqO6tDxyrmi RR9lK0fAWZyF7fx4pvx5+/DUutB+2XA/L7fwRs6aul3ZRKXkoIHJiPi1SFDfbuNgd/c+ FSP1IdtrH7QnDUa7tf1oRWhx61q7wanJ+XLhRD5HWLVjwC/LfWQCh4ZPJy7sLIoTiBhA 9b4Ng/hDkiVKlJ2uk4GOEFj3RtbXaeo6Qn0c7atgMMw+ZcYXu6lyHXaF5tabTzggwVov bJYA== X-Gm-Message-State: AOJu0Yy1jxq4v9bKE2ygL3/W1dxAbZoP15WvjIrts5vpHguEmqXKG7I5 ZuFyuwAmqXbqz/H+dc9D47rP4rlqhfPFUXawr3meMFniYe1M9GMsW91y6JqyZt8e3LYhODOAKNS KrA== X-Gm-Gg: ASbGncswcihVOPJ1doZ5otvq7ee97fNA8lYe5zQevxXlLn39IzM6neOPib0VRRTsfVa URWiO5TIAHHIBPmRq4tThTEvUgUSpa1f41Rotkl8Z50uk/EVPL9ayZX5/2cMBM0/USl5g/tpItU VbEEET5IUnRzdvUlkfZzi+kmeQ1QggV09t8H5MFu+nkwYof1c1J0NEIyDlfg9bjRWr1lPm/e56W kwVELa0+Qca72PKKZhNhNfIy/tDrClL6geYH/dSktlhopds8cvg49P/oHC/pxLjaRLUbKAycvpU u+tN+CD+BZiJZyKLp7qY778eCzxFH9KlHsUJlAfvQkprPpJG6d7TjU/2Hhbq9ISSORHj51XBJtw ENFHb5IeR6UI= X-Google-Smtp-Source: AGHT+IFFM2yaJnnez7KnIctDGtbju3WYHUN8nphVL+opkgwJxlT94txJujxnYxRXTLwZqLsQlnUkRA== X-Received: by 2002:a05:6512:2085:b0:545:ee3:f3c2 with SMTP id 2adb3069b0e04-5451828ff21mr1062005e87.22.1739389960195; Wed, 12 Feb 2025 11:52:40 -0800 (PST) Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5441053eb2dsm1989527e87.28.2025.02.12.11.52.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2025 11:52:39 -0800 (PST) Date: Wed, 12 Feb 2025 21:52:35 +0200 (EET) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: <20250212194520.GQ4991@pb2> Message-ID: References: <20250205221813.4110398-1-martin@martin.st> <20250205221813.4110398-2-martin@martin.st> <20250206001638.GI4991@pb2> <20250206160443.GT4991@pb2> <317e9c7e-bc5-81dc-f036-9b1426a95b1@martin.st> <20250209222850.GB4991@pb2> <2ddaa6c8-711e-e23c-8d3b-673d2042bf79@martin.st> <20250211234944.GJ4991@pb2> <9cfa4774-50b1-7f98-4f8-e17ad8793dfb@martin.st> <20250212194520.GQ4991@pb2> MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH v2 2/2] random_seed: Improve behaviour with small timer increments with high precision timers 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: quoted-printable Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, 12 Feb 2025, Michael Niedermayer wrote: > Hi Martin > > On Wed, Feb 12, 2025 at 11:25:03AM +0200, Martin Storsj=F6 wrote: > [...] >>> Heres an example where the SWAP is needed: >>> noswap swap >>> 5 -> [x 5] [x 5] >>> 4 -> [5 4] [5 4] >>> 5 -> [5 4] [4 5] >>> 6 -> [4 6] [5 6] >>> 5 -> [6 5] [6 5] >>> >>> In the last case the 5 is in the old* when the swap was used but not >>> when it was not used >> >> Sorry, but your examples do not make sense or do not contain enough cont= ext >> (it does not include the initial states of the two old values, and it >> requires guesswork which ones of the two [x y] values is old and which o= ne >> is old2). >> >> But to be clear: >> >> Please specify the initial values of the variables new, old and old2, fo= r a >> case where >> >>>> if (old2 =3D=3D new) { >>>> FFSWAP(old,old2); >>>> } else if (old !=3D new) { >>>> old2 =3D old; >>>> old =3D new; >>>> } >> >> produces a different end result than >> >>>> if (old !=3D new) { >>>> old2 =3D old; >>>> old =3D new; >>>> } >> >> I claim that for any values of these variables, the end result is the sa= me. > > yes, you are correct, i thought you intended to run the old2/old update o= nly if > new differs from both old and old2. > > The actual code you wrote is fine and nicely optimizes the swap out Thanks, then I'll push it soon. And after some delay, I'd also backport it = to a couple branches if that's ok; without this, "make fate" hangs on my = machine. // Martin _______________________________________________ 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".