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

Kaarlo Räihä kaarlo.raiha at gmail.com
Sat Feb 18 10:36:59 CET 2012


17. helmikuuta 2012 22.40 Ron Wright <logiconcepts819 at gmail.com> kirjoitti:

>  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.
>
>
Your patch is so MUCH better. I manually applied it (I had to change some
parts to make it compile), and there aren't any issues under Win32. 8000
Hz, 96000 Hz etc. all playback without issues when this new Eq is enabled.
I turned it into git patch (you as author, naturally) and it is attached to
this message. Some changes are prolly required to Skins2 and Mac OS X
interface to make the ISO frequency mode available to those, but IMHO those
can be dealt later.

>
>
>
> _______________________________________________
> 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
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120218/f1ae40ba/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Improve-equalizer.patch
Type: text/x-patch
Size: 16582 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120218/f1ae40ba/attachment.bin>


More information about the vlc-devel mailing list