summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudio.h
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2007-06-16 22:58:43 +0000
committerMåns Rullgård <mans@mansr.com>2007-06-16 22:58:43 +0000
commitc2d08dc0d78e85e6a45abb33e587b8a66a2de754 (patch)
tree20cea5fcc8aa1f191fcb3206819aedc35fecd0b6 /libavcodec/mpegaudio.h
parent41e4c556e93156cab184e5af9b246a4cf07c54ab (diff)
move a couple of macros and structs to mpegaudio.h
Originally committed as revision 9343 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegaudio.h')
-rw-r--r--libavcodec/mpegaudio.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/mpegaudio.h b/libavcodec/mpegaudio.h
index 8a830e25a9..d0461526ba 100644
--- a/libavcodec/mpegaudio.h
+++ b/libavcodec/mpegaudio.h
@@ -62,6 +62,10 @@
#define WFRAC_BITS 14 /* fractional bits for window */
#endif
+#define FRAC_ONE (1 << FRAC_BITS)
+
+#define FIX(a) ((int)((a) * FRAC_ONE))
+
#if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT)
typedef int32_t OUT_INT;
#define OUT_MAX INT32_MAX
@@ -116,6 +120,13 @@ typedef struct MPADecodeContext {
AVCodecContext* avctx;
} MPADecodeContext;
+/* layer 3 huffman tables */
+typedef struct HuffTable {
+ int xsize;
+ const uint8_t *bits;
+ const uint16_t *codes;
+} HuffTable;
+
int ff_mpa_l2_select_table(int bitrate, int nb_channels, int freq, int lsf);
int ff_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate);
void ff_mpa_synth_init(MPA_INT *window);