OSDN Git Service

LinGui: remove target file size option
[handbrake-jp/handbrake-jp-git.git] / libhb / downmix.h
1 /* $Id: downmix.h,v 1.51 2005/11/04 13:09:40 stebbins Exp $
2
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. */
6
7 #ifndef DOWNMIX_H
8 #define DOWNMIX_H
9
10 typedef float hb_sample_t;
11
12 typedef struct
13 {
14     int chan_map[10][2][8];
15     int inv_chan_map[10][2][8];
16 } hb_chan_map_t;
17
18 typedef struct
19 {
20     int            mode_in;
21     int            mode_out;
22     int            nchans_in;
23     int            nchans_out;
24     hb_sample_t    matrix[8][8];
25     int            matrix_initialized;
26     hb_sample_t    clev;
27     hb_sample_t    slev;
28     hb_sample_t    level;
29     hb_sample_t    bias;
30     hb_chan_map_t  map_in;
31     hb_chan_map_t  map_out;
32
33     int center;
34     int left_surround;
35     int right_surround;
36     int rear_left_surround;
37     int rear_right_surround;
38 } hb_downmix_t;
39
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;
46
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);
58 void hb_layout_remap( 
59     hb_chan_map_t * map_in, 
60     hb_chan_map_t * map_out, 
61     int layout, 
62     hb_sample_t * samples, 
63     int nsamples );
64 int hb_need_downmix( int layout, int mixdown );
65
66 #endif /* DOWNMIX_H */