00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00028 #ifndef AVCODEC_MPC_H
00029 #define AVCODEC_MPC_H
00030
00031 #include "libavutil/lfg.h"
00032 #include "avcodec.h"
00033 #include "get_bits.h"
00034 #include "dsputil.h"
00035 #include "mpegaudio.h"
00036
00037 #include "mpcdata.h"
00038
00039 #define BANDS 32
00040 #define SAMPLES_PER_BAND 36
00041 #define MPC_FRAME_SIZE (BANDS * SAMPLES_PER_BAND)
00042
00044 typedef struct {
00045 int msf;
00046 int res[2];
00047 int scfi[2];
00048 int scf_idx[2][3];
00049 int Q[2];
00050 }Band;
00051
00052 typedef struct {
00053 DSPContext dsp;
00054 GetBitContext gb;
00055 int IS, MSS, gapless;
00056 int lastframelen;
00057 int maxbands, last_max_band;
00058 int last_bits_used;
00059 int oldDSCF[2][BANDS];
00060 Band bands[BANDS];
00061 int Q[2][MPC_FRAME_SIZE];
00062 int cur_frame, frames;
00063 uint8_t *bits;
00064 int buf_size;
00065 AVLFG rnd;
00066 int frames_to_skip;
00067
00068 DECLARE_ALIGNED(16, MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512*2];
00069 int synth_buf_offset[MPA_MAX_CHANNELS];
00070 DECLARE_ALIGNED(16, int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT];
00071 } MPCContext;
00072
00073 void ff_mpc_init(void);
00074 void ff_mpc_dequantize_and_synth(MPCContext *c, int maxband, void *dst);
00075
00076 #endif