From: Michael Niedermayer <michael@niedermayer.cc> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] swresample: reuse DSP functions from avutil Date: Sat, 13 May 2023 03:09:10 +0200 Message-ID: <20230513010910.GF1391451@pb2> (raw) In-Reply-To: <CAPYw7P419msH3nW9SuxWPc5TtdzE_6aQPctNJvt4oPT-MOgG0w@mail.gmail.com> [-- Attachment #1.1: Type: text/plain, Size: 3107 bytes --] 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 <onemda@gmail.com> > 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 <onemda@gmail.com> > --- > 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 == AV_SAMPLE_FMT_FLTP){ > - for(i=0; i<len; i++){ > + if (out->planar && in->planar) > + len1 = len & ~15; > + else > + len1 = 0; > + if ((intptr_t)out->ch[out_i] & 0x1f) > + len1 = 0; > + for (j = 0; j < s->matrix_ch[out_i][0] && len1 > 0; j++) { > + in_i = s->matrix_ch[out_i][1+j]; > + if ((intptr_t)in->ch[in_i] & 0x1f) { > + len1 = 0; > + break; > + } > + } Cant this be done outside the "inner" loop ? 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 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No great genius has ever existed without some touch of madness. -- Aristotle [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ 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".
next prev parent reply other threads:[~2023-05-13 1:09 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-10 14:25 Paul B Mahol 2023-05-12 14:09 ` Michael Niedermayer 2023-05-12 17:28 ` Paul B Mahol 2023-05-13 1:09 ` Michael Niedermayer [this message] 2023-06-07 15:46 ` Paul B Mahol 2023-06-07 16:01 ` Michael Niedermayer 2023-06-07 17:29 ` Paul B Mahol 2023-06-07 20:17 ` Michael Niedermayer 2023-06-12 16:08 ` Paul B Mahol 2023-06-17 18:29 ` Paul B Mahol 2023-06-17 21:26 ` Michael Niedermayer
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230513010910.GF1391451@pb2 \ --to=michael@niedermayer.cc \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git