Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion (Read 17729 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

As available in Librempeg. Latest version have fixed input/output/duration bug.

Output is with minimal aliasing for many values of quality option set:

32000 Hz Sweep 32-bit Float -> 44100 Hz Sweep 32-bit Float

Audio filter ardftsrc, one possible very high quality processing example:

Code: [Select]
ffmpeg -i sweep.wav -af "aformat=dblp,ardftsrc=44100:quality=4096" -c:a pcm_f32le ardftsrc_4096q.wav

X

For smaller values of option quality and with float input instead of double input samples small aliasing can be seen and very small ringing on very high frequencies but this is only for extremely very low dB levels, much below 120dB.

Speed is on one machine tested consistently faster than SoX for same/similar quality presets.
Drawback is relatively high delay + buffering needed to process audio samples, quality filter option correlates with filtering delay size.

Known bugs:
- for some quality option values and sample ratio conversions combinations output may be invalid due to bug in x86 asm avx2 code path in FFT processing code, workaround is to use different value of quality parameter and/or disable certain/all instruction with "-cpuflags XXX" parameter set.

 

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #1
The taper window was changed from tukey to planck-taper window, this gives much less artifacts for same quality setting value than before.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #2
Now with samplerate conversion from 48000 to 44100.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #3
Why nobody cares?

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #4
It's a solution in need of a problem.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #5
I'd care if it was a standalone solution with a nice license. Only thing where resampler is needed in FFmpeg is DSD playback IMO.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #6
Very disappointed.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #7
It's like a reinvention of the wheel to me with a more inferior design or a design that's not well refined.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #8
@mycroft : if you were able to demonstrate by ABX that your DFT resampling is superior to the standard quartic (or whatever) waveform fitting, and provide those comparisons for others to verify, there might be some take-up, but my hunch is that it's no better and potentially worse, while at the same time being much more compute-intense.  Anything subjected to DFT is at risk of spurious artefacts.

You've really not provided any evidence.  A couple of nice smooth plots is not evidence of fidelity.  What I would want is a detailed plot showing the original input samples and the resulting output samples, demonstrating that it is at least a good match.  Then I might consider listening tests.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #9
@mycroft I know that feeling, I'm sorry for you.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #10
Added frame threading support to the filter.
Now its the fastest resampler and at same time providing superior quality.
Anyone can download and test it on their own.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #11
Extraordinary claims require extraordinary evidence.
The current mainstream resamplers already have excellent quality, so why would anyone want to swap them with a new method which naturally might have new undiscovered problems? Or spend time researching for those potential problems when there is a million other things to do?
a fan of AutoEq + Meier Crossfeed

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #12
I posted evidence, but there are folks out there no matter what evidence you give them they will never accept.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #13
I posted evidence

Where?  Those plots are not evidence.  Evidence would be ABX for quality and run time comparisons for speed.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #14
People are lazy, compiles and "evidence" like https://src.infinitewave.ca might be the way to go.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #15
Just commenting that if ABX can be used in resampler quality testing it would be a very bad resampler. ABX can only prove that there is an audible difference and resampler performances far exceed what ears can possibly hear.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #16
That's fair enough, but what other test can we devise to sustain the claim that this is a higher quality resampler?  The OP doesn't seem to have a clue, and just has faith that it is.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #17
What a harsh words from you. As usual, ad hominem attacks here.
Under right parameters the quality is comparable with r8brain.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #18
Added frame threading support to the filter.
Now its the fastest resampler and at same time providing superior quality.
Anyone can download and test it on their own.

I'm trying to get the hang of the resampler, but I've only found one place to download the Windows version of Librempeg. There's no documentation, only some .texi files. The ffmpeg documentation doesn't really help because it doesn't cover the ARDFSSC resampler at all. Also, the command line parameters seem to be different in some cases.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #19
To use thread_type=frame you need to compile with --enable-agpl flag.

Command line parameters are different depending what you want more: speed or quality of output.

ffmpeg -h filter=ardftsrc

will list private options that filter supports, they are more/less self explanatory.

ardftsrc AVOptions:
   sample_rate       <int>        ..F.A...... set the sample rate (from 0 to INT_MAX) (default 0)         -- this one is obvious
   quality           <int>        ..F.A...... set the quality (from 1 to INT_MAX) (default 1024)                     -- this one controls quality - similar to number of taps within sinc like sample rate converters
   bandwidth         <float>      ..F.A...... set the bandwidth (from 0 to 1) (default 0.95)                      -- this one control strength of lowpass like filter; with 8192 quality one can use very high value of 0.99 - do note that increasing this value and keeping quality small will not produce better output

additional options that are possible to set is thread_type=frame+slice (this is flag so can be set to only slice - default and/or frame - if agpl flag was enabled at compilation step) and threads=0-X number of threads.

Also the RDFT engine inside filter with some minor modifications can be replaced by FFTW or even libhpk (closed source, faster than FFTW, C++ only headers, but I have added working C code support for ardftsrc filter)

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #20
Also to not forget, conversion is currently linear phase only (no min-phase support) and I'm almost 100% sure that can not be changed.
Also delay and number of minimal samples for processing are closely proportionally related with quality option, and can be seen with "-v debug" flag added to ffmpeg command.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #21
What a harsh words from you.
Hardly.  I'm just looking for some kind of scientific rigour.  You've made big claims about your pet resampler, but presented nothing to back those claims and then whined that nobody seems interested.  Is that a surprise?

Under right parameters the quality is comparable with r8brain.
Where is the evidence?  All I (and others) are saying is that you are making these claims of "quality" without anything material to support those claims.  If you genuinely believe what you are saying, surely you would be motivated to provide some means by which what you say can be independently verified, but if you don't have verification then you are making unsubstantiated claims which are no better than faith.

You say you've presented evidence, but without direct comparison with existing resamplers it's meaningless.

For quality, you need to show the output from your resampler is a comparable or better fit with the input signal as existing resamplers.  How that can be done with a complex input signal is beyond me, I suppose one could resample up, then resample down again and apply subtraction to obtain the residuals and compare those results for various resamplers, but it involves a double-resampling.

For speed or efficiency, you need to compare processing times for various resamplers.

If you've done that (or something similar), please publish your results to substantiate your claims.   If you can't be bothered to do any of that, then your claims are invalid and you are in violation of the ToCs.

What you should have done (perhaps) is say that you've written a resampler and hope it might be of interest, instead of making claims about it.  The fact is I would be interested, if there was proper rigour.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #22
I already did rigorous testing and comparison with other re-samplers and fixed some regressions caused by recent frame threading addition.

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #23
This thing completely smells like typical audiophile bullshit poorly presented.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: ARDFTSRC - Real Discrete Fourier Transform Sample Rate Conversion

Reply #24
If it works faster than this or that, at the same beyond-hearing quality, then I'd say why not, if the developer fancies spending time on it.
Needs to be documented and available, of course.