]> git.sesse.net Git - vlc/blob - src/ac3_decoder/ac3_downmix.c
c78ec60b535b1003d7634151a55d720b4ededbcf
[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.21 2001/04/30 21:04:20 reno 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 "config.h"
28 #include "common.h"
29 #include "threads.h"
30 #include "mtime.h"
31
32 #include "tests.h"
33
34 #include "stream_control.h"
35 #include "input_ext-dec.h"
36 #include "ac3_decoder.h"
37 #include "ac3_internal.h"
38 #include "ac3_downmix.h"
39
40 void downmix_init (downmix_t * p_downmix)
41 {
42 #if 0
43     if ( TestCPU (CPU_CAPABILITY_MMX) )
44     {
45                 fprintf(stderr,"Using MMX for downmix\n");
46                 p_downmix->downmix_3f_2r_to_2ch = downmix_3f_2r_to_2ch_kni;
47                 p_downmix->downmix_2f_2r_to_2ch = downmix_2f_2r_to_2ch_kni;
48                 p_downmix->downmix_3f_1r_to_2ch = downmix_3f_1r_to_2ch_kni;
49                 p_downmix->downmix_2f_1r_to_2ch = downmix_2f_1r_to_2ch_kni;
50                 p_downmix->downmix_3f_0r_to_2ch = downmix_3f_0r_to_2ch_kni;
51                 p_downmix->stream_sample_2ch_to_s16 = stream_sample_2ch_to_s16_kni;
52         p_downmix->stream_sample_1ch_to_s16 = stream_sample_1ch_to_s16_kni;
53     } else 
54 #endif
55     {
56                 p_downmix->downmix_3f_2r_to_2ch = downmix_3f_2r_to_2ch_c;
57                 p_downmix->downmix_2f_2r_to_2ch = downmix_2f_2r_to_2ch_c;
58                 p_downmix->downmix_3f_1r_to_2ch = downmix_3f_1r_to_2ch_c;
59                 p_downmix->downmix_2f_1r_to_2ch = downmix_2f_1r_to_2ch_c;
60                 p_downmix->downmix_3f_0r_to_2ch = downmix_3f_0r_to_2ch_c;
61                 p_downmix->stream_sample_2ch_to_s16 = stream_sample_2ch_to_s16_c;
62                 p_downmix->stream_sample_1ch_to_s16 = stream_sample_1ch_to_s16_c;
63     }
64 }