1 /* $Id: downmix.h,v 1.51 2005/11/04 13:09:40 stebbins Exp $
3 This file is part of the HandBrake source code.
4 Homepage: <http://handbrake.fr/>.
5 It may be used under the terms of the GNU General Public License. */
10 typedef float hb_sample_t;
14 int chan_map[10][2][8];
15 int inv_chan_map[10][2][8];
24 hb_sample_t matrix[8][8];
25 int matrix_initialized;
31 hb_chan_map_t map_out;
36 int rear_left_surround;
37 int rear_right_surround;
40 // For convenience, a map to convert smpte channel layout
41 // to QuickTime channel layout.
42 // Map Indicies are mode, lfe, channel respectively
43 extern hb_chan_map_t hb_smpte_chan_map;
44 extern hb_chan_map_t hb_ac3_chan_map;
45 extern hb_chan_map_t hb_qt_chan_map;
47 hb_downmix_t * hb_downmix_init(int layout, int mixdown);
48 void hb_downmix_close( hb_downmix_t **downmix );
49 int hb_downmix_set_mode( hb_downmix_t * downmix, int layout, int mixdown );
50 void hb_downmix_set_level( hb_downmix_t * downmix, hb_sample_t clev, hb_sample_t slev, hb_sample_t level );
51 void hb_downmix_adjust_level( hb_downmix_t * downmix );
52 void hb_downmix_set_bias( hb_downmix_t * downmix, hb_sample_t bias );
53 void hb_downmix_set_chan_map(
54 hb_downmix_t * downmix,
55 hb_chan_map_t * map_in,
56 hb_chan_map_t * map_out );
57 void hb_downmix( hb_downmix_t * downmix, hb_sample_t * dst, hb_sample_t * src, int nsamples);
59 hb_chan_map_t * map_in,
60 hb_chan_map_t * map_out,
62 hb_sample_t * samples,
64 int hb_need_downmix( int layout, int mixdown );
66 #endif /* DOWNMIX_H */