Mercurial > mplayer.hg
comparison libaf/af_hrtf.h @ 15124:e267fad254fb
More HRTF enhancements
- a passive locking mechanism to enable the matrix to switch between active
and passive mode, which enhances the stereo image.
- a center front cancellation algorithm that damps the cross-talk if the
sound is coming predominantly from center (e.g. if there is dialogue).
These two new features should enhance the quality of surround downmix
noticeably.
Also a correction to the active gain control is included. The previous
implementation of Lt + Rt/Lt - Rt AGC should be fine in most cases, but the
calculation was inconsistent (gain unitarity is not guaranteed to be
preserved).
Signed off by Yue Shi Lai <ylai@users.sourceforge.net>
author | henry |
---|---|
date | Mon, 11 Apr 2005 14:01:29 +0000 |
parents | 71570687c1a3 |
children | 6ac1ece1f9fe |
comparison
equal
deleted
inserted
replaced
15123:29c677995503 | 15124:e267fad254fb |
---|---|
2 #define HRTF_MIX_STEREO 1 | 2 #define HRTF_MIX_STEREO 1 |
3 #define HRTF_MIX_MATRIX2CH 2 | 3 #define HRTF_MIX_MATRIX2CH 2 |
4 | 4 |
5 /* Amplitude scaling factors */ | 5 /* Amplitude scaling factors */ |
6 #define M17_0DB 0.1414213562 | 6 #define M17_0DB 0.1414213562 |
7 #define M9_03DB 0.3535533906 | |
7 #define M6_99DB 0.4472135955 | 8 #define M6_99DB 0.4472135955 |
8 #define M4_77DB 0.5773502692 | 9 #define M4_77DB 0.5773502692 |
9 #define M3_01DB 0.7071067812 | 10 #define M3_01DB 0.7071067812 |
10 #define M1_76DB 0.8164965809 | 11 #define M1_76DB 0.8164965809 |
11 | 12 |
23 #define FWRDURATION 240 /* FWR average duration (samples) */ | 24 #define FWRDURATION 240 /* FWR average duration (samples) */ |
24 #define MATREARDELAY 720 /* Matrix mode rear delay (samples) */ | 25 #define MATREARDELAY 720 /* Matrix mode rear delay (samples) */ |
25 | 26 |
26 #define MATAGCTRIG 8.0 /* (Fuzzy) AGC trigger */ | 27 #define MATAGCTRIG 8.0 /* (Fuzzy) AGC trigger */ |
27 #define MATAGCDECAY 1.0 /* AGC baseline decay rate (1/samp.) */ | 28 #define MATAGCDECAY 1.0 /* AGC baseline decay rate (1/samp.) */ |
29 #define MATAGCLOCK 0.2 /* AGC range (around 1) where the | |
30 matrix behaves passively */ | |
31 #define MATCOMPGAIN 0.37 /* Cross talk compensation gain, | |
32 0.50 - 0.55 is full cancellation. */ | |
28 | 33 |
29 #define CFECHODELAY 360 /* Center front echo delay (samples) */ | 34 #define CFECHODELAY 360 /* Center front echo delay (samples) */ |
30 #define CFECHOAMPL M17_0DB /* Center front echo amplitude */ | 35 #define CFECHOAMPL M17_0DB /* Center front echo amplitude */ |
31 | 36 |
32 #define STEXPAND2 0.07 /* Stereo expansion / 2 */ | 37 #define STEXPAND2 0.07 /* Stereo expansion / 2 */ |