• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • Examples
  • File List
  • Globals

libavcodec/mpc.h

Go to the documentation of this file.
00001 /*
00002  * Musepack decoder
00003  * Copyright (c) 2006 Konstantin Shishkov
00004  *
00005  * This file is part of Libav.
00006  *
00007  * Libav is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * Libav is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with Libav; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00020  */
00021 
00029 #ifndef AVCODEC_MPC_H
00030 #define AVCODEC_MPC_H
00031 
00032 #include "libavutil/lfg.h"
00033 #include "avcodec.h"
00034 #include "get_bits.h"
00035 #include "dsputil.h"
00036 #include "mpegaudio.h"
00037 #include "mpegaudiodsp.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     AVFrame frame;
00054     DSPContext dsp;
00055     MPADSPContext mpadsp;
00056     GetBitContext gb;
00057     int IS, MSS, gapless;
00058     int lastframelen;
00059     int maxbands, last_max_band;
00060     int last_bits_used;
00061     int oldDSCF[2][BANDS];
00062     Band bands[BANDS];
00063     int Q[2][MPC_FRAME_SIZE];
00064     int cur_frame, frames;
00065     uint8_t *bits;
00066     int buf_size;
00067     AVLFG rnd;
00068     int frames_to_skip;
00069     /* for synthesis */
00070     DECLARE_ALIGNED(16, MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512*2];
00071     int synth_buf_offset[MPA_MAX_CHANNELS];
00072     DECLARE_ALIGNED(16, int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT];
00073 } MPCContext;
00074 
00075 void ff_mpc_init(void);
00076 void ff_mpc_dequantize_and_synth(MPCContext *c, int maxband, void *dst, int channels);
00077 
00078 #endif /* AVCODEC_MPC_H */
Generated on Thu Jul 11 2013 15:38:20 for Libav by doxygen 1.7.1