comparison mpegaudiodec.c @ 5161:94c3f01c243c libavcodec

move a couple of macros and structs to mpegaudio.h
author mru
date Sat, 16 Jun 2007 22:58:43 +0000
parents bff60ecc02f9
children 9f8219a3b86f
comparison
equal deleted inserted replaced
5160:13386224ff72 5161:94c3f01c243c
44 #include "mpegaudio.h" 44 #include "mpegaudio.h"
45 #include "mpegaudiodecheader.h" 45 #include "mpegaudiodecheader.h"
46 46
47 #include "mathops.h" 47 #include "mathops.h"
48 48
49 #define FRAC_ONE (1 << FRAC_BITS)
50
51 #define FIX(a) ((int)((a) * FRAC_ONE))
52 /* WARNING: only correct for posititive numbers */ 49 /* WARNING: only correct for posititive numbers */
53 #define FIXR(a) ((int)((a) * FRAC_ONE + 0.5)) 50 #define FIXR(a) ((int)((a) * FRAC_ONE + 0.5))
54 #define FRAC_RND(a) (((a) + (FRAC_ONE/2)) >> FRAC_BITS) 51 #define FRAC_RND(a) (((a) + (FRAC_ONE/2)) >> FRAC_BITS)
55 52
56 #define FIXHR(a) ((int)((a) * (1LL<<32) + 0.5)) 53 #define FIXHR(a) ((int)((a) * (1LL<<32) + 0.5))
88 int32_t sb_hybrid[SBLIMIT * 18]; /* 576 samples */ 85 int32_t sb_hybrid[SBLIMIT * 18]; /* 576 samples */
89 } GranuleDef; 86 } GranuleDef;
90 87
91 #define MODE_EXT_MS_STEREO 2 88 #define MODE_EXT_MS_STEREO 2
92 #define MODE_EXT_I_STEREO 1 89 #define MODE_EXT_I_STEREO 1
93
94 /* layer 3 huffman tables */
95 typedef struct HuffTable {
96 int xsize;
97 const uint8_t *bits;
98 const uint16_t *codes;
99 } HuffTable;
100 90
101 #include "mpegaudiodata.h" 91 #include "mpegaudiodata.h"
102 #include "mpegaudiodectab.h" 92 #include "mpegaudiodectab.h"
103 93
104 static void compute_antialias_integer(MPADecodeContext *s, GranuleDef *g); 94 static void compute_antialias_integer(MPADecodeContext *s, GranuleDef *g);