04d7f601 |
/*
* copyright (c) 2001 Fabrice Bellard
* |
b78e7197 |
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or |
04d7f601 |
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either |
b78e7197 |
* version 2.1 of the License, or (at your option) any later version. |
04d7f601 |
* |
b78e7197 |
* FFmpeg is distributed in the hope that it will be useful, |
04d7f601 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public |
b78e7197 |
* License along with FFmpeg; if not, write to the Free Software |
04d7f601 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
|
983e3246 |
/** |
ba87f080 |
* @file |
983e3246 |
* mpeg audio declarations for both encoder and decoder.
*/ |
2456e28d |
|
98790382 |
#ifndef AVCODEC_MPEGAUDIO_H
#define AVCODEC_MPEGAUDIO_H |
4bd8e17c |
|
babb611d |
#ifndef USE_FLOATS
# define USE_FLOATS 0 |
b91d4661 |
#endif
|
0199e00b |
#include <stdint.h> |
15ccaa34 |
#include "libavutil/internal.h" |
4bd8e17c |
|
2456e28d |
/* max frame size, in samples */ |
115329f1 |
#define MPA_FRAME_SIZE 1152 |
de6d9b64 |
/* max compressed frame size */ |
2456e28d |
#define MPA_MAX_CODED_FRAME_SIZE 1792 |
de6d9b64 |
#define MPA_MAX_CHANNELS 2
#define SBLIMIT 32 /* number of subbands */
|
2456e28d |
#define MPA_STEREO 0
#define MPA_JSTEREO 1
#define MPA_DUAL 2
#define MPA_MONO 3
|
6bb6fb05 |
#ifndef FRAC_BITS |
d9b1c197 |
#define FRAC_BITS 23 /* fractional bits for sb_samples and dct */
#define WFRAC_BITS 16 /* fractional bits for window */
#endif
|
571572fc |
#define IMDCT_SCALAR 1.759
|
c2d08dc0 |
#define FRAC_ONE (1 << FRAC_BITS)
#define FIX(a) ((int)((a) * FRAC_ONE))
|
babb611d |
#if USE_FLOATS |
b91d4661 |
# define INTFLOAT float |
15ccaa34 |
# define SUINTFLOAT float |
b91d4661 |
typedef float MPA_INT; |
c7bbc6cd |
typedef float OUT_INT; |
b91d4661 |
#elif FRAC_BITS <= 15
# define INTFLOAT int |
15ccaa34 |
# define SUINTFLOAT SUINT |
d9b1c197 |
typedef int16_t MPA_INT; |
c7bbc6cd |
typedef int16_t OUT_INT; |
d9b1c197 |
#else |
b91d4661 |
# define INTFLOAT int |
15ccaa34 |
# define SUINTFLOAT SUINT |
d9b1c197 |
typedef int32_t MPA_INT; |
c7bbc6cd |
typedef int16_t OUT_INT; |
d9b1c197 |
#endif
|
08aa2c9b |
int ff_mpa_l2_select_table(int bitrate, int nb_channels, int freq, int lsf); |
4bd8e17c |
|
98790382 |
#endif /* AVCODEC_MPEGAUDIO_H */ |