Revision 262d8702 libavcodec/ac3dec.c
libavcodec/ac3dec.c  

224  224 
* Generate a Kaiser Window. 
225  225 
*/ 
226  226 
static void 
227 
k_window_init(int alpha, double *window, int n, int iter)


227 
k_window_init(int alpha, float *window, int n, int iter)


228  228 
{ 
229  229 
int j, k; 
230 
double a, x;


230 
float a, x;


231  231 
a = alpha * M_PI / n; 
232  232 
a = a*a; 
233  233 
for(k=0; k<n; k++) { 
...  ...  
247  247 
* @param iter number of iterations to use in BesselI0 
248  248 
*/ 
249  249 
static void 
250 
kbd_window_init(int alpha, double *window, int n, int iter)


250 
kbd_window_init(int alpha, float *window, int n, int iter)


251  251 
{ 
252  252 
int k, n2; 
253 
double *kwindow;


253 
float *kwindow;


254  254  
255  255 
n2 = n >> 1; 
256  256 
kwindow = &window[n2]; 
...  ...  
319  319 
static void ac3_tables_init(void) 
320  320 
{ 
321  321 
int i, j, k, l, v; 
322 
float alpha; 

323  322 
/* compute bndtab and masktab from bandsz */ 
324  323 
k = 0; 
325  324 
l = 0; 
...  ...  
376  375 
//for level15 quantizers 
377  376 
generate_quantizers_table(l15_quantizers, 15, 15); 
378  377  
379 
/* Twiddle Factors for IMDCT. */ 

380 
for(i = 0; i < N / 4; i++) { 

381 
alpha = 2 * M_PI * (8 * i + 1) / (8 * N); 

382 
x_cos1[i] = cos(alpha); 

383 
x_sin1[i] = sin(alpha); 

384 
} 

385  
386 
for (i = 0; i < N / 8; i++) { 

387 
alpha = 2 * M_PI * (8 * i + 1) / (4 * N); 

388 
x_cos2[i] = cos(alpha); 

389 
x_sin2[i] = sin(alpha); 

390 
} 

391  
392  378 
/* KaiserBessel derived window. */ 
393  379 
kbd_window_init(5, window, 256, 100); 
394  380 
} 
...  ...  
1917  1903 
AC3DecodeContext *ctx = (AC3DecodeContext *)avctx>priv_data; 
1918  1904 
int frame_start; 
1919  1905 
int16_t *out_samples = (int16_t *)data; 
1920 
int i, j, k, value, fs_58; 

1921 
uint16_t crc1; 

1906 
int i, j, k, value; 

1922  1907  
1923  1908 
av_log(NULL, AV_LOG_INFO, "decoding frame %d buf_size = %d\n", frame_count++, buf_size); 
1924  1909 
Also available in: Unified diff