[vlc-devel] [PATCH]Equalizer, support other sampling rates than 44100 and 48000

Ron Wright logiconcepts819 at gmail.com
Fri Feb 17 21:40:38 CET 2012


 On 02/17/2012 11:58 AM, Kaarlo Räihä wrote:

Someone noticed (forum post) that Equalizer doesn't work with 96000 Hz
files. So I made patch that calculates the coefficients on fly if sampling
rate is other than 44100 or 48000.

 96000 Hz audio now works with Equalizer. Problem is that if sampling rate
is gets somewhere below 26000, the audio vanishes. I tested this only under
Win32 where I get with 25000 Hz file following complains
 main warning: PTS is out of range (-13155), dropping buffer
main warning: buffer too early (-48573), down-sampling
main debug: audio output is too slow (1453031 us):  trashing 49977 us
 ...

 If someone knows why this happens, I would like to hear more about this.


 The added code is mostly from GPL projects (calc_bands.c by Felipe Rivera
and solve_quadratic.c by Brian Gough) and rest is by me. It could be
optimized for VLC purposes. I left i_bandcount to EqzComputeCoeffs because
it can be used in future to handle more Eq points.



_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription
options:http://mailman.videolan.org/listinfo/vlc-devel

 Hello,

I wish to contribute my piece of code that I wrote 7 months ago.  Not only
does the patch implement support for sampling frequencies other than 44100
Hz and 48000 Hz, it also allows the user to select between the Winamp
frequency bands that are already implemented in the application and the ISO
standard frequency bands (that are based on a logarithmic scale -- i.e.
31.25 Hz, 62.5 Hz, 125 Hz, 250 Hz, 500 Hz, 1 kHz, 2 kHz, 4 kHz, 8 kHz, and
16 kHz).

I do not wish to submit this patch yet via git.  Instead, I would like to
have the developers review the patch before submission.

The formula used for calculating the coefficients is based on the XMMS
formula.  I used Mathematica to simplify the formula and have also attached
a derivation that demonstrates the simplification.  This leads to efficient
computation of the equalizer coefficients with smaller roundoff errors.  I
have verified that using this simplified equation will give you the same
coefficients that are defined in the equalizer module as of right now.

Regards,

Ronald Wright
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120217/40497b18/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: improve-equalizer.patch
Type: text/x-patch
Size: 16548 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120217/40497b18/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmms-eq-formula.pdf
Type: application/pdf
Size: 147242 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120217/40497b18/attachment.pdf>


More information about the vlc-devel mailing list