]> git.sesse.net Git - vlc/blob - src/ac3_decoder/ac3_downmix.c
* Fixed a few warnings with gcc 3.0.
[vlc] / src / ac3_decoder / ac3_downmix.c
1 /*****************************************************************************
2  * ac3_downmix.c: ac3 downmix functions
3  *****************************************************************************
4  * Copyright (C) 1999, 2000 VideoLAN
5  * $Id: ac3_downmix.c,v 1.22 2001/05/06 04:32:02 sam Exp $
6  *
7  * Authors: Michel Kaempf <maxx@via.ecp.fr>
8  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
9  *          Renaud Dartus <reno@videolan.org>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  * 
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
24  *****************************************************************************/
25 #include "defs.h"
26
27 #include <string.h>                                              /* memcpy() */
28
29 #include "config.h"
30 #include "common.h"
31 #include "threads.h"
32 #include "mtime.h"
33
34 #include "tests.h"
35
36 #include "stream_control.h"
37 #include "input_ext-dec.h"
38
39 #include "ac3_decoder.h"
40 #include "ac3_internal.h"
41 #include "ac3_downmix.h"
42
43 void downmix_init (downmix_t * p_downmix)
44 {
45 #if 0
46     if ( TestCPU (CPU_CAPABILITY_MMX) )
47     {
48                 fprintf(stderr,"Using MMX for downmix\n");
49                 p_downmix->downmix_3f_2r_to_2ch = downmix_3f_2r_to_2ch_kni;
50                 p_downmix->downmix_2f_2r_to_2ch = downmix_2f_2r_to_2ch_kni;
51                 p_downmix->downmix_3f_1r_to_2ch = downmix_3f_1r_to_2ch_kni;
52                 p_downmix->downmix_2f_1r_to_2ch = downmix_2f_1r_to_2ch_kni;
53                 p_downmix->downmix_3f_0r_to_2ch = downmix_3f_0r_to_2ch_kni;
54                 p_downmix->stream_sample_2ch_to_s16 = stream_sample_2ch_to_s16_kni;
55         p_downmix->stream_sample_1ch_to_s16 = stream_sample_1ch_to_s16_kni;
56     } else 
57 #endif
58     {
59                 p_downmix->downmix_3f_2r_to_2ch = downmix_3f_2r_to_2ch_c;
60                 p_downmix->downmix_2f_2r_to_2ch = downmix_2f_2r_to_2ch_c;
61                 p_downmix->downmix_3f_1r_to_2ch = downmix_3f_1r_to_2ch_c;
62                 p_downmix->downmix_2f_1r_to_2ch = downmix_2f_1r_to_2ch_c;
63                 p_downmix->downmix_3f_0r_to_2ch = downmix_3f_0r_to_2ch_c;
64                 p_downmix->stream_sample_2ch_to_s16 = stream_sample_2ch_to_s16_c;
65                 p_downmix->stream_sample_1ch_to_s16 = stream_sample_1ch_to_s16_c;
66     }
67 }