]> git.sesse.net Git - ffmpeg/blob - libavcodec/ac3enc.h
10l
[ffmpeg] / libavcodec / ac3enc.h
1
2 #define AC3_FRAME_SIZE (6*256)
3 #define AC3_MAX_CODED_FRAME_SIZE 3840 /* in bytes */
4 #define AC3_MAX_CHANNELS 6
5
6 typedef struct AC3EncodeContext {
7     PutBitContext pb;
8     int nb_channels;
9     int nb_all_channels;
10     int lfe_channel;
11     int bit_rate;
12     int sample_rate;
13     int bsid;
14     int frame_size_min; /* minimum frame size in case rounding is necessary */
15     int frame_size; /* current frame size in words */
16     int halfratecod;
17     int frmsizecod;
18     int fscod; /* frequency */
19     int acmod;
20     int lfe;
21     int bsmod;
22     short last_samples[AC3_MAX_CHANNELS][256];
23     int chbwcod[AC3_MAX_CHANNELS];
24     int nb_coefs[AC3_MAX_CHANNELS];
25     
26     /* bitrate allocation control */
27     int sgaincod, sdecaycod, fdecaycod, dbkneecod, floorcod; 
28     int sgain, sdecay, fdecay, dbknee, floor;
29     int csnroffst;
30     int fgaincod[AC3_MAX_CHANNELS];
31     int fsnroffst[AC3_MAX_CHANNELS];
32     /* mantissa encoding */
33     int mant1_cnt, mant2_cnt, mant4_cnt;
34 } AC3EncodeContext;