From: Martin Guy <martinwguy@gmail.com>
To: sox-devel@lists.sourceforge.net
Subject: sox spectrogram changes
Date: Fri, 18 Dec 2015 21:32:34 +0100 [thread overview]
Message-ID: <CAL4-wQokyCjBuDDvQFQ=o0ZzoDCiNu7hFxV69p2pjyWXnDQUyA@mail.gmail.com> (raw)
Hi! I've been looking at "sox spectrogram" internals, and would
appreciate some feedback on what I've found before I submit them. My
application wraps sox in a shell script to apply a log frequency axis
to a raw spectrogram. The changes I needed were.
- remove the maximum graph height limit (was 1200 for no obvious reason)
- add FFTW3 support for a 150-times speed increase on FFTs of size
other than 2^n
spectrogram has two FFT routines: lsx_safe_rdft() which is fast but
only works for dft sizes a power of two (-y for powers of two plus
one) and its own personal "rdft_p()" for all other sizes.
Surprisingly, the built-in FFT is faster than FFTW3.
For rdft_p() it's very different. Other than being between 60 and 150
times slower than lsx_safe_rdft(), it pre-allocates an immense array 2
* N x N/2 double-floats, which is 2GB for 8192-sized FFTs and 8GB for
16384-height.
By comparison, lsx_safe_rdft() uses 200MB for an 8192-sized DFT, not 2GB.
So, my question is, should I just dump rdft_p() and require FFTW
support for non-power-of-two FFTs? Or is it better to keep it, with
all its limitations, so that sox spectrogram will continue to work at
all sizes when sox is compiled without FFTW support?
Thanks
M
------------------------------------------------------------------------------
reply other threads:[~2015-12-18 20:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='CAL4-wQokyCjBuDDvQFQ=o0ZzoDCiNu7hFxV69p2pjyWXnDQUyA@mail.gmail.com' \
--to=sox-devel@lists.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/sox.git
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).