1 //
2 // C++ Interface: audiofilter_dolby
3 //
4 // Description:
5 //
6 //
7 // Author: Mihail Zenkov <kreator@tut.by>, (C) 2006
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12 #ifndef AUDM_DOLBY_H
13 #define AUDM_DOLBY_H
14 
15 
16 #define NZEROS 500
17 #define GAIN 1.571116176e+00
18 
19 /**
20  * \class  ADMDolbyContext
21  */
22 class ADMDolbyContext
23 {
24 public:
25         ADMDolbyContext();
26         ~ADMDolbyContext();
27         float *xv_left[4];
28         float *xv_right[4];
29         static bool  skip;
30         int    posLeft;
31         int    posRight;
32 
33         float DolbyShiftLeft(float isamp);
34         float DolbyShiftRight(float isamp);
35         void  DolbyInit();
36         void  reset();
37 
38 static   bool setValue(  float **target,int offset, float value);
39 static   bool setOneValue(float *target,int offset, float value);
40 
41 static   void  DolbySkip(bool on);
42 
43 static  float DolbyShift_simple(int pos, float *oldie, float *coef);
44 static  float DolbyShift_convolution(int pos, float *oldie, float *coef);
45 static  float DolbyShift_convolutionAlign1(int pos, float *oldie, float *coef);
46 static  float DolbyShift_convolutionAlign2(float *oldie, float *coef);
47 static  float DolbyShift_convolutionAlign3(float *oldie, float *coef);
48 static  float DolbyShift_convolutionAlignSSE(float *oldie, float *coef);
49 };
50 
51 #endif
52