Comments (3)
Hello. The code you are mentioning is part of libebur128 and the interpolator (https://en.wikipedia.org/wiki/Whittaker%E2%80%93Shannon_interpolation_formula) part has been mostly implemented by @bmatherly (jiixyj/libebur128#51).
He might be a better source to explain the reasoning behind.
from r128x.
The pull request that @audionuma linked to tells the whole story. It would be good for someone to map some of that discussion into some code comments for future reference.
TLDR:
This implementation uses the sinc/windowed method with odd filter taps at the nyquist frequency. The sinc coefficients end up being zero for every other coefficient (except the middle) and the hanning window zeros out the first and last coeffficient. So the total number of multiply/add operations per sample for 49 taps comes to ((48 x 3 / 4) + 1 - 2) / 4 = 8.75 for this implementation.
Compare that to the example filter provided by BS.1770-4 for 48 taps. The total number of multiply/add operations per sample comes to 48 / 4 = 12
So this method is 27% more efficient than the BS.1770-4 example.
You can trade performance for quality by reducing the number of filter taps (but keep the number odd to take advantage of the "zero" side-effect).
from r128x.
@audionuma @bmatherly Thank you so much! Having read up on interpolation filters from Watkinson's The Art of Digital Audio, this is how I expected them all to work:
[for an upsampling factor of 4,] three sets of coefficients will be used in turn. In hardware-implemented filters, the input sample which is passed straight to the output is transferred using a fourth filter phase where all coefficients are zero except the central one which is unity.
(Perhaps erroneously) I applied the spec's original coefficients in the same way. The results were within the error bounds but generating the coefficients manually yields more accurate results (using the EBU test samples). Thanks again!
from r128x.
Related Issues (11)
- Missing icon for r128x-gui HOT 1
- GUI progress elements don't update on recent macOSes (and suggested fix) HOT 3
- No localization for r128x HOT 1
- Unable to parse rf64 audio files HOT 1
- Not running or compiling on osx 10.6.8 HOT 5
- Memory leak? HOT 1
- Installation question. HOT 1
- Measurements for "input threshold" and "target offset" HOT 3
- Not possible to pipe output to file HOT 4
- Update to latest libebur128? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r128x.