X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmpegaudio.h;h=d0461526bac2ee5850d03716336fc9435287af0a;hb=9d14ffbccee7e6e3f521aa0aa543d9e61b07514f;hp=d6a94ad9d0877c094bb42809b51973a9eb80fe0b;hpb=4bd8e17c8d371dc05af63b15c11342e40184df61;p=ffmpeg diff --git a/libavcodec/mpegaudio.h b/libavcodec/mpegaudio.h index d6a94ad9d08..d0461526bac 100644 --- a/libavcodec/mpegaudio.h +++ b/libavcodec/mpegaudio.h @@ -26,6 +26,7 @@ #ifndef MPEGAUDIO_H #define MPEGAUDIO_H +#include "avcodec.h" #include "bitstream.h" #include "dsputil.h" @@ -61,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 @@ -115,8 +120,15 @@ typedef struct MPADecodeContext { AVCodecContext* avctx; } MPADecodeContext; -int l2_select_table(int bitrate, int nb_channels, int freq, int lsf); -int mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_rate); +/* 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); void ff_mpa_synth_filter(MPA_INT *synth_buf_ptr, int *synth_buf_offset, MPA_INT *window, int *dither_state,