]> git.sesse.net Git - vlc/blobdiff - src/ac3_decoder/ac3_decoder.h
* Fixed a segfault on exit under Windows 2000
[vlc] / src / ac3_decoder / ac3_decoder.h
index 4de1c435f9560b5184fd447508189eb77117f889..c6740bc5196887a51894a572d2b0b6636ccb2bad 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_decoder.h : ac3 decoder interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: ac3_decoder.h,v 1.8 2001/05/14 15:58:03 reno Exp $
+ * $Id: ac3_decoder.h,v 1.13 2001/10/31 11:55:53 reno Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Renaud Dartus <reno@videolan.org>
@@ -352,65 +352,14 @@ typedef struct mantissa_s
     u16 lfsr_state;
 } mantissa_t;
 
-typedef struct complex_s {
-    float real;
-    float imag;
-} complex_t;
-
-#define N 512
-
-typedef struct imdct_s
-{
-    complex_t buf[N/4];
-
-    /* Delay buffer for time domain interleaving */
-    float delay[6][256];
-    float delay1[6][256];
-
-    /* Twiddle factors for IMDCT */
-    float xcos1[N/4];
-    float xsin1[N/4];
-    float xcos2[N/8];
-    float xsin2[N/8];
-   
-    /* Twiddle factor LUT */
-    complex_t *w[7];
-    complex_t w_1[1];
-    complex_t w_2[2];
-    complex_t w_4[4];
-    complex_t w_8[8];
-    complex_t w_16[16];
-    complex_t w_32[32];
-    complex_t w_64[64];
-
-    float xcos_sin_sse[128 * 4] __attribute__((aligned(16)));
-    
-    /* Functions */
-    void (*fft_64p) (complex_t *a);
-    
-    void (*imdct_do_512)(struct imdct_s * p_imdct, float data[], float delay[]);
-    void (*imdct_do_512_nol)(struct imdct_s * p_imdct, float data[], float delay[]);
-
-} imdct_t;
-
-typedef struct dm_par_s {
-    float unit;
-    float clev;
-    float slev;
-} dm_par_t;
-
-typedef struct downmix_s {
-    void (*downmix_3f_2r_to_2ch)(float *samples, dm_par_t * dm_par);
-    void (*downmix_3f_1r_to_2ch)(float *samples, dm_par_t * dm_par);
-    void (*downmix_2f_2r_to_2ch)(float *samples, dm_par_t * dm_par);
-    void (*downmix_2f_1r_to_2ch)(float *samples, dm_par_t * dm_par);
-    void (*downmix_3f_0r_to_2ch)(float *samples, dm_par_t * dm_par);
-    void (*stream_sample_2ch_to_s16)(s16 *s16_samples, float *left, float *right);
-    void (*stream_sample_1ch_to_s16)(s16 *s16_samples, float *center);
-} downmix_t;
-
 struct ac3dec_s
 {
+    float *             samples;
+#if defined( __MINGW32__ )
+    float *             samples_back;
+#endif
+    imdct_t *           imdct;
+
     /*
      * Input properties
      */
@@ -427,12 +376,11 @@ struct ac3dec_s
     bsi_t               bsi;
     audblk_t            audblk;
 
-    float               samples[6][256];
     dm_par_t            dm_par;
 
     bit_allocate_t      bit_allocate;
     mantissa_t          mantissa;
-    imdct_t             imdct;
     downmix_t           downmix;
 
 };
+