[vlc-devel] stereo enhancer audio effect

Sukrit Sangwan sukritsangwan at gmail.com
Fri Mar 9 19:05:31 CET 2012

This filter takes in a stereo input and widens it. Below is an extract
from http://en.wikipedia.org/wiki/3D_audio_effect.

<http://en.wikipedia.org/wiki/3D_audio_effect>Stereo widening

Widening of the stereo image can be achieved by manipulating the
relationship of the side signal S and the center
M = {\frac{L + R}2}; S = {\frac{L - R}2}]. A positive part of the side
signal S is now fed into the left channel and a part with its phase
inverted to the right channel. Some
boomboxes<http://en.wikipedia.org/wiki/Boombox>feature such a process.

Another way of looking at this same effect, without extrapolating a center
and side signal from the left and right signals, is to simply add the left
signal, slightly attenuated <http://en.wikipedia.org/wiki/Attenuation> and
phase inverted, into the right channel and vice-versa. Taking this a step
further, a small delay (20-100ms) can be added to the inverted signal
before mixing it back in to the original for output, adding a slight
reverberation to the effect.

I have implemented the same in this filter. I tested it and found that it
suppresses the mono (part of signal common to left & right)  a bit. and
enhances the stereo by delaying right signal into left and vice versa.

> +#define DELAY       20
> > +#define DRY_MIX     0.8
> > +#define WET_MIX     0.3
> > +#define FEEDBACK    0.3
> Are those the same as the spatializer wet and dry?

No, these are not same as spatializer wet and dry. Actually the wet mix is
the attenuation in right signal (phase inverted) before adding it to left
signal. and feedback is the attenuation in delayed signal.

> > +    set_description (N_("Simple Stereo enhancer"))
> What does it do?

> > +     !AOUT_FMTS_IDENTICAL( &p_filter->fmt_in.audio,
> &p_filter->fmt_out.audio ))
> Weird )) style.

Fixed these also.
And copyright year too

Sukrit Sangwan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120309/91bea342/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-stereo_widen.c-add-to-modules-LIST-and-NEWS.patch
Type: text/x-patch
Size: 2848 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120309/91bea342/attachment.bin>

More information about the vlc-devel mailing list