Functions are provided to:
* query the available equalizer presets
* create a new default equalizer instance
* create an equalizer instance from a preset
* set individual equalizer band amplitudes
* set equalizer pre-amplification
* apply an equalizer to a media player
Equalizer settings can be applied whether media is playing or not,
and will automatically be retained when playing media subsequently.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
It was my expectation that M_PI in the EqzCoeffs function is automatically cast
to a float during compile time, but my expectation turned out to be incorrect.
Specifically, I noticed in GCC's assembly output of equalizer.c that GCC was
doing the inverse by making the program convert all single-precision terms
(excluding 2.0f * M_PI) in the line containing M_PI to double-precision, and
then making it convert the double-precision result to single-precision before
the assignment to f_theta_1. As a result, M_PI must be explicitly cast to a
float.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
This patch enforces type correctness by changing all double-precision calls
and all double-precision and integral literals in the assignments to floats to
their single-precision equivalents.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
It is easy to see that the computation of the alpha constant is slightly
inefficient, as the root value can be close to 1 for the lower frequencies,
which would result in significant roundoff error if this value is subtracted
from 1. In this patch, the computation of the alpha, beta, and gamma constants
has been simplified and refactored.
Acked-by: Ilkka Ollakka <ileoo@videolan.org>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Currently, one of the debug lines in the equalizer module prints out center
frequency values truncated (not rounded) to zero decimal places, and when VLC
is set to use ISO center frequencies, this causes some level of disagreement
between the depiction of the truncated frequencies in the module debug output
and the depiction of the rounded frequencies in the Qt GUI labels. The 62.5 Hz
ISO center frequency is one of these frequencies, where we have 62 Hz shown in
the debug output and 63 Hz shown in the Qt GUI. This patch fixes the issue by
displaying the center frequencies in the debug output as real values rounded to
the nearest hundredth.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
With hardware FPU, FI32 was only used within the mad decoder and
internally converted to FL32. With software FPU, FI32 did not work
properly as the S16N conversion was broken (at least since VLC1.1.0).
Apparently, mad generates sample values outside the [-1,+1] range, so
FL32 seems to be the most reasonable output format.
(On systems without hardware FPU, I would recommend disabling mad, and
using libavcodec for MPGA decoding.)
Re-license almost all the playback modules to LGPLv2.1+ with
authorization from their respective contributors (230+)
This includes:
- access, codec, packetizers, demux
- audio filters, audio mixers, audio output
- video filters, video chroma, video output
- text renderers
- XML parser
- ARM NEON and SSE2 optimisations (mostly for chromas and filters)
Some modules are not concerned:
- BDA and DShow access modules because Manol Manolov is AWOL
- Real RTSP, because it is derived from Xine
- x264 and t140 because they are encoders only
- DLL Loader, because it is derived from MPlayer
- DTS packetizer, because Jon Lech Johansen is AWOL
- Shine and WMAfixed, because they are derived from Rockbox
- Real demuxer, as it is derived from MPlayer and Wang Bo is AWOL
- MPC demuxer, as Yavor Doganov is AWOL
- Tivo demuxer, because it is derived from an MPlayer fork
- Playlist demuxer, (WPL and ZPL parts missing), because suheaven is AWOL
- iOS audio output and video display, because author refuses the license change
- Equalizer and compressor, because Ronald Wright is AWOL
- Mono, Headphone and Dolby, because author refuses the license change
- hqdn3d and yadif, because they are from MPlayer/libavfilter
- remoteosd, because it derives from RealVNC code
- MMX optimisations, because Ollie Lho, from SiS, is AWOL
- Rotate, because it depends on GPL motion
Nota Bene:
- Some modules depend on GPL-only libraries, a LGPL module does not mean
that the resulting binary module will be LGPL.
Libraries affected would include liba52, libdvdcss, libdvdnav, libdvdread,
faad2, libdca, libmad, libmpeg2, libpostproc, SRC, sid, zvbi and probably others.