summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudio.h
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-05-19 13:44:11 +0100
committerMans Rullgard <mans@mansr.com>2011-05-20 11:05:07 +0100
commit0199e00bc80a55aacf7ecd393bf32dcd64e06739 (patch)
treefc1744a173ca698ac97881820abe68f6d7d0a043 /libavcodec/mpegaudio.h
parent984ece7503597d30e6f3bdeb67e337ea1616f880 (diff)
downloadffmpeg-0199e00bc80a55aacf7ecd393bf32dcd64e06739.tar.gz
mpegaudio: move all header parsing to mpegaudiodecheader.[ch]
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/mpegaudio.h')
-rw-r--r--libavcodec/mpegaudio.h38
1 files changed, 1 insertions, 37 deletions
diff --git a/libavcodec/mpegaudio.h b/libavcodec/mpegaudio.h
index a46ecc5a9f..b55680100b 100644
--- a/libavcodec/mpegaudio.h
+++ b/libavcodec/mpegaudio.h
@@ -30,7 +30,7 @@
# define CONFIG_FLOAT 0
#endif
-#include "avcodec.h"
+#include <stdint.h>
/* max frame size, in samples */
#define MPA_FRAME_SIZE 1152
@@ -47,8 +47,6 @@
#define MPA_DUAL 2
#define MPA_MONO 3
-#define MP3_MASK 0xFFFE0CCF
-
#ifndef FRAC_BITS
#define FRAC_BITS 23 /* fractional bits for sb_samples and dct */
#define WFRAC_BITS 16 /* fractional bits for window */
@@ -72,40 +70,6 @@ typedef int32_t MPA_INT;
typedef int16_t OUT_INT;
#endif
-#define MPA_DECODE_HEADER \
- int frame_size; \
- int error_protection; \
- int layer; \
- int sample_rate; \
- int sample_rate_index; /* between 0 and 8 */ \
- int bit_rate; \
- int nb_channels; \
- int mode; \
- int mode_ext; \
- int lsf;
-
-typedef struct MPADecodeHeader {
- MPA_DECODE_HEADER
-} MPADecodeHeader;
-
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, int *channels, int *frame_size, int *bitrate);
-
-/* fast header check for resync */
-static inline int ff_mpa_check_header(uint32_t header){
- /* header */
- if ((header & 0xffe00000) != 0xffe00000)
- return -1;
- /* layer check */
- if ((header & (3<<17)) == 0)
- return -1;
- /* bit rate */
- if ((header & (0xf<<12)) == 0xf<<12)
- return -1;
- /* frequency */
- if ((header & (3<<10)) == 3<<10)
- return -1;
- return 0;
-}
#endif /* AVCODEC_MPEGAUDIO_H */