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 3FB0A46169 for ; Wed, 7 Jun 2023 16:01:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EAC1168BF63; Wed, 7 Jun 2023 19:01:18 +0300 (EEST) 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 D562F68B723 for ; Wed, 7 Jun 2023 19:01:11 +0300 (EEST) X-GND-Sasl: michael@niedermayer.cc Received: by mail.gandi.net (Postfix) with ESMTPSA id F1E78240003 for ; Wed, 7 Jun 2023 16:01:10 +0000 (UTC) Date: Wed, 7 Jun 2023 18:01:10 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230607160110.GF1391451@pb2> References: <20230513010910.GF1391451@pb2> MIME-Version: 1.0 In-Reply-To: X-Spam-Flag: yes X-Spam-Level: *********** X-GND-Spam-Score: 165 X-GND-Status: SPAM Subject: Re: [FFmpeg-devel] [PATCH] swresample: reuse DSP functions from avutil 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="===============8543006488772714504==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8543006488772714504== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oszPHF7CpAHCUy7e" Content-Disposition: inline --oszPHF7CpAHCUy7e Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 07, 2023 at 05:46:25PM +0200, Paul B Mahol wrote: > On Sat, May 13, 2023 at 3:09=E2=80=AFAM Michael Niedermayer > wrote: >=20 > > On Fri, May 12, 2023 at 07:28:08PM +0200, Paul B Mahol wrote: > > > With fixed alignment requirements. > > > > > rematrix.c | 54 > > ++++++++++++++++++++++++++++++++++++++++++++++++-- > > > swresample.c | 5 ++++ > > > swresample_internal.h | 2 + > > > 3 files changed, 59 insertions(+), 2 deletions(-) > > > 3b99c9eb2e2f1f17d1f306e37ddd7107405fede4 > > 0001-swresample-reuse-DSP-functions-from-avutil.patch > > > From 771bc1414b737475bc42c7263fd7f21b4d9cc9b7 Mon Sep 17 00:00:00 2001 > > > From: Paul B Mahol > > > Date: Wed, 10 May 2023 15:41:01 +0200 > > > Subject: [PATCH] swresample: reuse DSP functions from avutil > > > > > > Improves generic mixing dramatically. > > > > > > Signed-off-by: Paul B Mahol > > > --- > > > libswresample/rematrix.c | 54 +++++++++++++++++++++++++++= -- > > > libswresample/swresample.c | 5 +++ > > > libswresample/swresample_internal.h | 2 ++ > > > 3 files changed, 59 insertions(+), 2 deletions(-) > > > > > > diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c > > > index 79e8a43eac..2133b0f90d 100644 > > > --- a/libswresample/rematrix.c > > > +++ b/libswresample/rematrix.c > > > @@ -652,7 +652,32 @@ int swri_rematrix(SwrContext *s, AudioData *out, > > AudioData *in, int len, int mus > > > break;} > > > default: > > > if(s->int_sample_fmt =3D=3D AV_SAMPLE_FMT_FLTP){ > > > - for(i=3D0; i > > + if (out->planar && in->planar) > > > + len1 =3D len & ~15; > > > + else > > > + len1 =3D 0; > > > + if ((intptr_t)out->ch[out_i] & 0x1f) > > > + len1 =3D 0; > > > + for (j =3D 0; j < s->matrix_ch[out_i][0] && len1 > 0; > > j++) { > > > + in_i =3D s->matrix_ch[out_i][1+j]; > > > + if ((intptr_t)in->ch[in_i] & 0x1f) { > > > + len1 =3D 0; > > > + break; > > > + } > > > + } > > > > Cant this be done outside the "inner" loop ? >=20 >=20 > Sure. >=20 >=20 >=20 > > > > >=20 > > also this produces some new NaN values > > > > @@ -91810,16 +91810,16 @@ > > [e:0.246031 c:-nan max:0.988908] len: 936 > > [e:0.247006 c:-nan max:0.988908] len: 936 > > [e:0.247174 c:-nan max:0.988908] len: 936 > > -[e:0.197683 c:0.773693 max:0.825360] len: 936 > > -[e:0.192089 c:0.814010 max:0.820662] len: 936 > > +[e:0.245992 c:0.031094 max:0.988908] len: 936 > > +[e:0.246535 c:0.031025 max:0.988908] len: 936 > > [e:0.013306 c:0.996638 max:0.037320] len: 32 F: 2 > > [e:0.049179 c:0.909927 max:0.081071] len: 32 F: 2 > > [e:0.159079 c:-nan max:0.299026] len: 32 F: 2 > > [e:0.116819 c:-nan max:0.297598] len: 32 F: 2 > > [e:0.159382 c:-nan max:0.299980] len: 32 F: 2 > > [e:0.115993 c:-nan max:0.296648] len: 32 F: 2 > > -[e:0.099115 c:0.996999 max:0.189015] len: 32 F: 2 > > -[e:0.071657 c:0.998728 max:0.187209] len: 32 F: 2 > > +[e:0.159577 c:-nan max:0.299503] len: 32 F: 2 > > +[e:0.115367 c:-nan max:0.299503] len: 32 F: 2 > > > > > Is that really important to you? The important part is not what the tool displays. But that this points to a worsening of the tested code (or a bug in the tool) The other numbers also seem to worsen by non trivial amounts Thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Asymptotically faster algorithms should always be preferred if you have asymptotical amounts of data --oszPHF7CpAHCUy7e Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZICpxgAKCRBhHseHBAsP q21RAKCAew4XRGOdeD5dcMFpnrVdAlAawwCfYFb4BRdXEVpgkkiyQF6u/d2koGU= =dJpN -----END PGP SIGNATURE----- --oszPHF7CpAHCUy7e-- --===============8543006488772714504== 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". --===============8543006488772714504==--