aboutsummaryrefslogtreecommitdiffstats
path: root/libav/mpegaudio.h
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2000-12-20 00:02:47 +0000
committerFabrice Bellard <fabrice@bellard.org>2000-12-20 00:02:47 +0000
commit9aeeeb63f7e1ab7b0b7bb839a5f258667a2d2d78 (patch)
tree133769894d45da35e05ded6ea39d33bb81e7ae18 /libav/mpegaudio.h
parent77bb6835ba752bb9335d208963a53227bbb1bc63 (diff)
downloadffmpeg-9aeeeb63f7e1ab7b0b7bb839a5f258667a2d2d78.tar.gz
Initial revision
Originally committed as revision 2 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libav/mpegaudio.h')
-rw-r--r--libav/mpegaudio.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/libav/mpegaudio.h b/libav/mpegaudio.h
new file mode 100644
index 0000000000..0734d3466b
--- /dev/null
+++ b/libav/mpegaudio.h
@@ -0,0 +1,31 @@
+
+/* max compressed frame size */
+#define MPA_MAX_CODED_FRAME_SIZE 1200
+
+#define MPA_FRAME_SIZE 1152
+
+#define SAMPLES_BUF_SIZE 4096
+#define SBLIMIT 32 /* number of subbands */
+#define DCT_BITS 14 /* number of bits for the DCT */
+#define MUL(a,b) (((a) * (b)) >> DCT_BITS)
+#define FIX(a) ((int)((a) * (1 << DCT_BITS)))
+
+typedef struct MpegAudioContext {
+ PutBitContext pb;
+ int freq, bit_rate;
+ int lsf; /* 1 if mpeg2 low bitrate selected */
+ int bitrate_index; /* bit rate */
+ int freq_index;
+ int frame_size; /* frame size, in bits, without padding */
+ long long nb_samples; /* total number of samples encoded */
+ /* padding computation */
+ int frame_frac, frame_frac_incr, do_padding;
+ short samples_buf[SAMPLES_BUF_SIZE]; /* buffer for filter */
+ int samples_offset; /* offset in samples_buf */
+ int sb_samples[3][12][SBLIMIT];
+ unsigned char scale_factors[SBLIMIT][3]; /* scale factors */
+ unsigned char scale_code[SBLIMIT]; /* code to group 3 scale factors */
+ int sblimit; /* number of used subbands */
+ const unsigned char *alloc_table;
+} MpegAudioContext;
+