annotate mpegaudio.h @ 32:a524484f9adf libavcodec

added idct mmx
author glantau
date Tue, 07 Aug 2001 22:42:22 +0000
parents 986e461dc072
children 5aa6292a1660
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 /* max compressed frame size */
986e461dc072 Initial revision
glantau
parents:
diff changeset
3 #define MPA_MAX_CODED_FRAME_SIZE 1200
986e461dc072 Initial revision
glantau
parents:
diff changeset
4
986e461dc072 Initial revision
glantau
parents:
diff changeset
5 #define MPA_FRAME_SIZE 1152
986e461dc072 Initial revision
glantau
parents:
diff changeset
6 #define MPA_MAX_CHANNELS 2
986e461dc072 Initial revision
glantau
parents:
diff changeset
7
986e461dc072 Initial revision
glantau
parents:
diff changeset
8 #define SAMPLES_BUF_SIZE 4096
986e461dc072 Initial revision
glantau
parents:
diff changeset
9 #define SBLIMIT 32 /* number of subbands */
986e461dc072 Initial revision
glantau
parents:
diff changeset
10 #define DCT_BITS 14 /* number of bits for the DCT */
986e461dc072 Initial revision
glantau
parents:
diff changeset
11 #define MUL(a,b) (((a) * (b)) >> DCT_BITS)
986e461dc072 Initial revision
glantau
parents:
diff changeset
12 #define FIX(a) ((int)((a) * (1 << DCT_BITS)))
986e461dc072 Initial revision
glantau
parents:
diff changeset
13
986e461dc072 Initial revision
glantau
parents:
diff changeset
14 typedef struct MpegAudioContext {
986e461dc072 Initial revision
glantau
parents:
diff changeset
15 PutBitContext pb;
986e461dc072 Initial revision
glantau
parents:
diff changeset
16 int nb_channels;
986e461dc072 Initial revision
glantau
parents:
diff changeset
17 int freq, bit_rate;
986e461dc072 Initial revision
glantau
parents:
diff changeset
18 int lsf; /* 1 if mpeg2 low bitrate selected */
986e461dc072 Initial revision
glantau
parents:
diff changeset
19 int bitrate_index; /* bit rate */
986e461dc072 Initial revision
glantau
parents:
diff changeset
20 int freq_index;
986e461dc072 Initial revision
glantau
parents:
diff changeset
21 int frame_size; /* frame size, in bits, without padding */
986e461dc072 Initial revision
glantau
parents:
diff changeset
22 long long nb_samples; /* total number of samples encoded */
986e461dc072 Initial revision
glantau
parents:
diff changeset
23 /* padding computation */
986e461dc072 Initial revision
glantau
parents:
diff changeset
24 int frame_frac, frame_frac_incr, do_padding;
986e461dc072 Initial revision
glantau
parents:
diff changeset
25 short samples_buf[MPA_MAX_CHANNELS][SAMPLES_BUF_SIZE]; /* buffer for filter */
986e461dc072 Initial revision
glantau
parents:
diff changeset
26 int samples_offset[MPA_MAX_CHANNELS]; /* offset in samples_buf */
986e461dc072 Initial revision
glantau
parents:
diff changeset
27 int sb_samples[MPA_MAX_CHANNELS][3][12][SBLIMIT];
986e461dc072 Initial revision
glantau
parents:
diff changeset
28 unsigned char scale_factors[MPA_MAX_CHANNELS][SBLIMIT][3]; /* scale factors */
986e461dc072 Initial revision
glantau
parents:
diff changeset
29 /* code to group 3 scale factors */
986e461dc072 Initial revision
glantau
parents:
diff changeset
30 unsigned char scale_code[MPA_MAX_CHANNELS][SBLIMIT];
986e461dc072 Initial revision
glantau
parents:
diff changeset
31 int sblimit; /* number of used subbands */
986e461dc072 Initial revision
glantau
parents:
diff changeset
32 const unsigned char *alloc_table;
986e461dc072 Initial revision
glantau
parents:
diff changeset
33 } MpegAudioContext;
986e461dc072 Initial revision
glantau
parents:
diff changeset
34