comparison mpegaudiodec.c @ 6699:99cf02b8f831 libavcodec

move MP3On4DecodeContext def near the code and under ifdef
author bcoudurier
date Sat, 26 Apr 2008 14:22:43 +0000
parents 06f422f73ade
children dd38dc6306a8
comparison
equal deleted inserted replaced
6698:06f422f73ade 6699:99cf02b8f831
53 #define FIXHR(a) ((int)((a) * (1LL<<32) + 0.5)) 53 #define FIXHR(a) ((int)((a) * (1LL<<32) + 0.5))
54 54
55 /****************/ 55 /****************/
56 56
57 #define HEADER_SIZE 4 57 #define HEADER_SIZE 4
58
59 /**
60 * Context for MP3On4 decoder
61 */
62 typedef struct MP3On4DecodeContext {
63 int frames; ///< number of mp3 frames per block (number of mp3 decoder instances)
64 int chan_cfg; ///< channel config number
65 int syncword; ///< syncword patch
66 MPADecodeContext *mp3decctx[5]; ///< MPADecodeContext for every decoder instance
67 } MP3On4DecodeContext;
68 58
69 /* layer 3 "granule" */ 59 /* layer 3 "granule" */
70 typedef struct GranuleDef { 60 typedef struct GranuleDef {
71 uint8_t scfsi; 61 uint8_t scfsi;
72 int part2_3_length; 62 int part2_3_length;
2475 } 2465 }
2476 #endif /* CONFIG_MP3ADU_DECODER */ 2466 #endif /* CONFIG_MP3ADU_DECODER */
2477 2467
2478 #ifdef CONFIG_MP3ON4_DECODER 2468 #ifdef CONFIG_MP3ON4_DECODER
2479 2469
2470 /**
2471 * Context for MP3On4 decoder
2472 */
2473 typedef struct MP3On4DecodeContext {
2474 int frames; ///< number of mp3 frames per block (number of mp3 decoder instances)
2475 int chan_cfg; ///< channel config number
2476 int syncword; ///< syncword patch
2477 MPADecodeContext *mp3decctx[5]; ///< MPADecodeContext for every decoder instance
2478 } MP3On4DecodeContext;
2479
2480 #include "mpeg4audio.h" 2480 #include "mpeg4audio.h"
2481 2481
2482 /* Next 3 arrays are indexed by channel config number (passed via codecdata) */ 2482 /* Next 3 arrays are indexed by channel config number (passed via codecdata) */
2483 static const uint8_t mp3Frames[8] = {0,1,1,2,3,3,4,5}; /* number of mp3 decoder instances */ 2483 static const uint8_t mp3Frames[8] = {0,1,1,2,3,3,4,5}; /* number of mp3 decoder instances */
2484 /* offsets into output buffer, assume output order is FL FR BL BR C LFE */ 2484 /* offsets into output buffer, assume output order is FL FR BL BR C LFE */