From: Eric Wong <normalperson@yhbt.net>
To: "Måns Rullgård" <mans@mansr.com>
Cc: Pander <pander@users.sourceforge.net>, sox-devel@lists.sourceforge.net
Subject: Re: [PATCH RESEND 9/9] Added average power spectrum for stat -freq -a
Date: Sun, 2 Aug 2020 01:03:19 +0000 [thread overview]
Message-ID: <20200802010318.GA935@dcvr> (raw)
In-Reply-To: <yw1x7duizipe.fsf@mansr.com>
Måns Rullgård <mans@mansr.com> wrote:
> Eric Wong <normalperson@yhbt.net> writes:
>
> > From: Pander <pander@users.sourceforge.net>
>
> Does "Pander" have a real name?
Does it matter for this project?
Fwiw, I'm against real name policies; and there's no
copyright assignment or DCO here.
I don't see an acceptable way to enforce such a thing.
Speaking for myself, I have too much social anxiety to attend
keysigning parties pre-COVID; and refuse to video conference
because of facial/voice recognition privacy issues. Proving
my real name isn't feasible.
<snip>
> > + if (stat->fft_average) {
> > + samples = (stat->fft_size / 2);
> > + ffa = effp->in_signal.rate / samples;
> > + re_average = lsx_malloc(sizeof(float) * (int)samples);
> > + }
> >
> > if (len) {
> > if (stat->read == 0) /* 1st sample */
> > @@ -146,10 +160,20 @@ static int sox_stat_flow(sox_effect_t * effp, const sox_sample_t *ibuf, sox_samp
> >
> > if (stat->fft_offset >= stat->fft_size) {
> > stat->fft_offset = 0;
> > + if (stat->fft_average) {
> > + lsx_power_spectrum_f((int)samples, stat->re_in, stat->re_out);
> > + for (i = 0; i < samples / 2; i++) /* FIXME: should be <= samples / 2 */
>
> What's this about? If it should be <=, why isn't it?
>
> > + re_average[i] += stat->re_out[i];
>
> re_average is never initialised. This will produce garbage.
<snip>
> I'm skipping this patch unless someone can explain what the intent is.
> Then I might try to fix it.
I do agree this patch is buggy and I don't have the math knowledge
to comment on that part. But I should've caught the uninitialized
memory, at least :x
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel
next prev parent reply other threads:[~2020-08-02 1:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-31 9:37 [PATCH RESEND 0/9] some old accumulated patches Eric Wong
2020-07-31 9:37 ` [PATCH RESEND 1/9] use non-blocking stdin for interactive mode Eric Wong
2020-07-31 9:37 ` [PATCH RESEND 2/9] speed up "|program" inputs on Linux 2.6.35+ Eric Wong
2020-07-31 10:53 ` Måns Rullgård
2020-07-31 9:37 ` [PATCH RESEND 3/9] sox.1: fix section name Eric Wong
2020-07-31 9:37 ` [PATCH RESEND 4/9] sndio: handle 24-bit samples properly on OpenBSD Eric Wong
2020-07-31 10:59 ` Måns Rullgård
2020-07-31 9:37 ` [PATCH RESEND 5/9] Handle vorbis_analysis_headerout errors Eric Wong
2020-07-31 9:37 ` [PATCH RESEND 6/9] fix manpage warning: "table wider than line width" Eric Wong
2020-07-31 9:37 ` [PATCH RESEND 7/9] spectrogram: remove arbitrary limit on height of spectrogram Eric Wong
2020-07-31 14:34 ` Måns Rullgård
[not found] ` <CAL4-wQpF-qOD=BRVPhgZFC7fjvFDV-rQx1stvwY_xCTyj5uooA@mail.gmail.com>
2020-08-13 16:20 ` Måns Rullgård
2020-08-13 16:30 ` Pander via SoX-devel
2020-08-13 16:38 ` Måns Rullgård
2020-07-31 9:38 ` [PATCH RESEND 8/9] Add spectrogram -n flag to normalise the output to maximum brightness Eric Wong
2020-07-31 9:38 ` [PATCH RESEND 9/9] Added average power spectrum for stat -freq -a Eric Wong
2020-08-01 11:52 ` Måns Rullgård
2020-08-02 1:03 ` Eric Wong [this message]
2020-08-02 10:43 ` Måns Rullgård
2020-08-02 10:52 ` Måns Rullgård
2020-08-03 12:44 ` Pander via SoX-devel
2020-08-03 13:41 ` Måns Rullgård
2020-07-31 10:13 ` [PATCH RESEND 0/9] some old accumulated patches Måns Rullgård
2020-07-31 21:16 ` Eric Wong
2020-07-31 21:44 ` Måns Rullgård
2020-08-01 16:57 ` Måns Rullgård
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-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.sourceforge.net/lists/listinfo/sox-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200802010318.GA935@dcvr \
--to=sox-devel@lists.sourceforge.net \
--cc=mans@mansr.com \
--cc=pander@users.sourceforge.net \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).