Libav 0.7.1
|
00001 /* 00002 * copyright (c) 2001 Fabrice Bellard 00003 * 00004 * This file is part of Libav. 00005 * 00006 * Libav is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * Libav is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with Libav; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00026 #ifndef AVCODEC_MPEGAUDIO_H 00027 #define AVCODEC_MPEGAUDIO_H 00028 00029 #ifndef CONFIG_FLOAT 00030 # define CONFIG_FLOAT 0 00031 #endif 00032 00033 #include <stdint.h> 00034 00035 /* max frame size, in samples */ 00036 #define MPA_FRAME_SIZE 1152 00037 00038 /* max compressed frame size */ 00039 #define MPA_MAX_CODED_FRAME_SIZE 1792 00040 00041 #define MPA_MAX_CHANNELS 2 00042 00043 #define SBLIMIT 32 /* number of subbands */ 00044 00045 #define MPA_STEREO 0 00046 #define MPA_JSTEREO 1 00047 #define MPA_DUAL 2 00048 #define MPA_MONO 3 00049 00050 #ifndef FRAC_BITS 00051 #define FRAC_BITS 23 /* fractional bits for sb_samples and dct */ 00052 #define WFRAC_BITS 16 /* fractional bits for window */ 00053 #endif 00054 00055 #define FRAC_ONE (1 << FRAC_BITS) 00056 00057 #define FIX(a) ((int)((a) * FRAC_ONE)) 00058 00059 #if CONFIG_FLOAT 00060 # define INTFLOAT float 00061 typedef float MPA_INT; 00062 typedef float OUT_INT; 00063 #elif FRAC_BITS <= 15 00064 # define INTFLOAT int 00065 typedef int16_t MPA_INT; 00066 typedef int16_t OUT_INT; 00067 #else 00068 # define INTFLOAT int 00069 typedef int32_t MPA_INT; 00070 typedef int16_t OUT_INT; 00071 #endif 00072 00073 int ff_mpa_l2_select_table(int bitrate, int nb_channels, int freq, int lsf); 00074 00075 #endif /* AVCODEC_MPEGAUDIO_H */