annotate ac3enc.h @ 308:072c4ff05e62 libavcodec

b frames & slices bugfix
author michaelni
date Fri, 05 Apr 2002 04:23:01 +0000
parents 986e461dc072
children 289eb941b8ba
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
1
986e461dc072 Initial revision
glantau
parents:
diff changeset
2 #define AC3_FRAME_SIZE (6*256)
986e461dc072 Initial revision
glantau
parents:
diff changeset
3 #define AC3_MAX_CODED_FRAME_SIZE 3840 /* in bytes */
986e461dc072 Initial revision
glantau
parents:
diff changeset
4 #define AC3_MAX_CHANNELS 2 /* we handle at most two channels, although
986e461dc072 Initial revision
glantau
parents:
diff changeset
5 AC3 allows 6 channels */
986e461dc072 Initial revision
glantau
parents:
diff changeset
6
986e461dc072 Initial revision
glantau
parents:
diff changeset
7 typedef struct AC3EncodeContext {
986e461dc072 Initial revision
glantau
parents:
diff changeset
8 PutBitContext pb;
986e461dc072 Initial revision
glantau
parents:
diff changeset
9 int nb_channels;
986e461dc072 Initial revision
glantau
parents:
diff changeset
10 int bit_rate;
986e461dc072 Initial revision
glantau
parents:
diff changeset
11 int sample_rate;
986e461dc072 Initial revision
glantau
parents:
diff changeset
12 int bsid;
986e461dc072 Initial revision
glantau
parents:
diff changeset
13 int frame_size_min; /* minimum frame size in case rounding is necessary */
986e461dc072 Initial revision
glantau
parents:
diff changeset
14 int frame_size; /* current frame size in words */
986e461dc072 Initial revision
glantau
parents:
diff changeset
15 int halfratecod;
986e461dc072 Initial revision
glantau
parents:
diff changeset
16 int frmsizecod;
986e461dc072 Initial revision
glantau
parents:
diff changeset
17 int fscod; /* frequency */
986e461dc072 Initial revision
glantau
parents:
diff changeset
18 int acmod;
986e461dc072 Initial revision
glantau
parents:
diff changeset
19 int bsmod;
986e461dc072 Initial revision
glantau
parents:
diff changeset
20 short last_samples[AC3_MAX_CHANNELS][256];
986e461dc072 Initial revision
glantau
parents:
diff changeset
21 int chbwcod[AC3_MAX_CHANNELS];
986e461dc072 Initial revision
glantau
parents:
diff changeset
22 int nb_coefs[AC3_MAX_CHANNELS];
986e461dc072 Initial revision
glantau
parents:
diff changeset
23
986e461dc072 Initial revision
glantau
parents:
diff changeset
24 /* bitrate allocation control */
986e461dc072 Initial revision
glantau
parents:
diff changeset
25 int sgaincod, sdecaycod, fdecaycod, dbkneecod, floorcod;
986e461dc072 Initial revision
glantau
parents:
diff changeset
26 int sgain, sdecay, fdecay, dbknee, floor;
986e461dc072 Initial revision
glantau
parents:
diff changeset
27 int csnroffst;
986e461dc072 Initial revision
glantau
parents:
diff changeset
28 int fgaincod[AC3_MAX_CHANNELS];
986e461dc072 Initial revision
glantau
parents:
diff changeset
29 int fsnroffst[AC3_MAX_CHANNELS];
986e461dc072 Initial revision
glantau
parents:
diff changeset
30 /* mantissa encoding */
986e461dc072 Initial revision
glantau
parents:
diff changeset
31 int mant1_cnt, mant2_cnt, mant4_cnt;
986e461dc072 Initial revision
glantau
parents:
diff changeset
32 } AC3EncodeContext;