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 7331648B72 for ; Thu, 4 Jan 2024 03:19:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3DB9268CCCF; Thu, 4 Jan 2024 05:19:51 +0200 (EET) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 812C368AB8E for ; Thu, 4 Jan 2024 05:19:45 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id A66D7240005 for ; Thu, 4 Jan 2024 03:19:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1704338384; 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=xRc1zeGwTa06tn0q2FAyLA3QePyEaIcnJYbO51EpiTY=; b=DST0TnjQ4kRZjKPtSA/jamRE6+TnHl0GJ2PG4bK6UahIfPbKVJ/7edLuOdAuAC08NeeaSs brUHvHgYRcQog/heo5W3DZJorI0hlqgYpbzP70zUktMuZrY9DH8D7oYVgQyrY6yp8HdYUr V9yyuAHK21QNUPWPb9AG9IuOP+4W/jx2FrntjQbJ1goJ6dX4m4kRSBq5vNz7ElkDFN2SPg 8h3h6C2pY0usyzAS2TeUQpz7q9q04UEhdAqz8iL8D9U3NvivgAU0GLQKrotoCDU0GE8rXO 5JvAmGep7L6LiVXB6zDPX4fhIE8lmM8uJuBeh+3XdUL7mfhWH+wm3QuVyAkQlg== Date: Thu, 4 Jan 2024 04:19:43 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240104031943.GC6420@pb2> References: <20240103222433.18444-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] avutil/eval: Use 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="===============4753916291166275650==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4753916291166275650== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mxNaOl2bXWqfnE26" Content-Disposition: inline --mxNaOl2bXWqfnE26 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 04, 2024 at 12:58:43AM +0100, Stefano Sabatini wrote: > On date Wednesday 2024-01-03 23:24:33 +0100, Michael Niedermayer wrote: [...] >=20 > > +typedef struct KISS64State{ > > + uint64_t x,y,z,c; > > +}KISS64State; >=20 > missing namespace here and in the functions below. >=20 > For this you could probably use AVKISS64PRNG (or AVKISS64), and use > av_kiss64prng_ or av_kiss64_ as function prefix (I'd probably go with > the shortest variant). >=20 > > + > > +static inline uint64_t get_random64(KISS64State *s){ >=20 > av_kiss64_get() ? as its not a public API yet, ill leave the av_ out but will switch to your names, they are nice and short [...] >=20 > > + //Constants based on SHA512 of "FFmpeg" and Marsaglias values so s= eed=3D0 matches his > > + s->x =3D 1234567890987654321ULL ^ seed; > > + s->y =3D( 362436362436362436ULL ^ (0xd255973df01e5086*seed)) | 4; > > + s->z =3D 1066149217761810ULL + seed; > > + s->c =3D 123456123456123456ULL - 0x33730c0524f137da*seed; > > +} > > + > > +#endif /* AVUTIL_KISS__PRNGH */ > > diff --git a/tests/fate/libswresample.mak b/tests/fate/libswresample.mak > > index 0d29f760248..ea421d45fb6 100644 > > --- a/tests/fate/libswresample.mak > > +++ b/tests/fate/libswresample.mak > > @@ -359,7 +359,7 @@ fate-swr-resample_nn-s16p-8000-44100: SIZE_TOLERANC= E =3D 96000 - 20480 > > define ARESAMPLE_ASYNC > > FATE_SWR_RESAMPLE +=3D fate-swr-resample_async-$(3)-$(1)-$(2) > > fate-swr-resample_async-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav > > -fate-swr-resample_async-$(3)-$(1)-$(2): CMD =3D ffmpeg -i $(TARGET_PAT= H)/tests/data/asynth-$(1)-1.wav -af atrim=3Dend_sample=3D10240,asetpts=3DPT= S+random\(0\)*200-100,aresample=3D$(2):async=3D50:min_hard_comp=3D0.100000:= first_pts=3D0:linear_interp=3D0:exact_rational=3D0:internal_sample_fmt=3D$(= 3),aformat=3D$(3),aresample=3D$(1):linear_interp=3D0:exact_rational=3D0:int= ernal_sample_fmt=3D$(3) -f wav -c:a pcm_s16le - > > +fate-swr-resample_async-$(3)-$(1)-$(2): CMD =3D ffmpeg -i $(TARGET_PAT= H)/tests/data/asynth-$(1)-1.wav -af atrim=3Dend_sample=3D10240,asetpts=3DPT= S+random\(1\)*200-100,aresample=3D$(2):async=3D50:min_hard_comp=3D0.100000:= first_pts=3D0:linear_interp=3D0:exact_rational=3D0:internal_sample_fmt=3D$(= 3),aformat=3D$(3),aresample=3D$(1):linear_interp=3D0:exact_rational=3D0:int= ernal_sample_fmt=3D$(3) -f wav -c:a pcm_s16le - >=20 > any reason to change the random() index? yes because i forgot removing that hunk. That was not intended to be in the patch [....] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell --mxNaOl2bXWqfnE26 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iFwEABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZZYjyQAKCRBhHseHBAsP qzToAJ9Gj5UT16tArqfBaPaBGmvTTzJUVwCVFN2WyCSMfiwv5HU8UUF/mlvzaw== =nlC6 -----END PGP SIGNATURE----- --mxNaOl2bXWqfnE26-- --===============4753916291166275650== 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". --===============4753916291166275650==--