downmix.c 2.9 KB
Newer Older
Sam Hocevar's avatar
 
Sam Hocevar committed
1 2 3
/*****************************************************************************
 * downmix.c : AC3 downmix module
 *****************************************************************************
4
 * Copyright (C) 1999-2001 VideoLAN
5
 * $Id: downmix.c,v 1.10 2002/07/31 20:56:51 sam Exp $
Sam Hocevar's avatar
 
Sam Hocevar committed
6
 *
7
 * Authors: Renaud Dartus <reno@via.ecp.fr>
Sam Hocevar's avatar
 
Sam Hocevar committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
 *****************************************************************************/

/*****************************************************************************
 * Preamble
 *****************************************************************************/
#include <stdlib.h>
28
#include <string.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
29

30
#include <vlc/vlc.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
31 32 33 34 35

#include "ac3_downmix.h"
#include "ac3_downmix_common.h"

/*****************************************************************************
36
 * Module initializer
Sam Hocevar's avatar
 
Sam Hocevar committed
37
 *****************************************************************************/
38 39 40
static int Open ( vlc_object_t *p_this )
{
    downmix_t *p_downmix = (downmix_t *)p_this;
Sam Hocevar's avatar
 
Sam Hocevar committed
41

42 43 44 45 46 47 48
    p_downmix->pf_downmix_3f_2r_to_2ch = E_( downmix_3f_2r_to_2ch );
    p_downmix->pf_downmix_3f_1r_to_2ch = E_( downmix_3f_1r_to_2ch );
    p_downmix->pf_downmix_2f_2r_to_2ch = E_( downmix_2f_2r_to_2ch );
    p_downmix->pf_downmix_2f_1r_to_2ch = E_( downmix_2f_1r_to_2ch );
    p_downmix->pf_downmix_3f_0r_to_2ch = E_( downmix_3f_0r_to_2ch );
    p_downmix->pf_stream_sample_2ch_to_s16 = E_( stream_sample_2ch_to_s16 );
    p_downmix->pf_stream_sample_1ch_to_s16 = E_( stream_sample_1ch_to_s16 );
Sam Hocevar's avatar
 
Sam Hocevar committed
49

50 51
    return VLC_SUCCESS;
}
Sam Hocevar's avatar
 
Sam Hocevar committed
52 53

/*****************************************************************************
54
 * Module descriptor
Sam Hocevar's avatar
 
Sam Hocevar committed
55
 *****************************************************************************/
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
vlc_module_begin();
#ifdef MODULE_NAME_IS_downmix
    set_description( _("AC3 downmix module") );
    set_capability( "downmix", 50 );
    add_shortcut( "c" );
#elif defined( MODULE_NAME_IS_downmixsse )
    set_description( _("SSE AC3 downmix module") );
    set_capability( "downmix", 200 );
    add_shortcut( "sse" );
#elif defined( MODULE_NAME_IS_downmix3dn )
    set_description( _("3D Now! AC3 downmix module") );
    set_capability( "downmix", 200 );
    add_shortcut( "3dn" );
    add_shortcut( "3dnow" );
#endif
    set_callbacks( Open, NULL );
vlc_module_end();
Sam Hocevar's avatar
 
Sam Hocevar committed
73