2 * Float MPEG Audio decoder
3 * Copyright (c) 2010 Michael Niedermayer
5 * This file is part of Libav.
7 * Libav is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * Libav is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with Libav; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 #define CONFIG_FLOAT 1
23 #include "mpegaudiodec.c"
25 static void compute_antialias_float(MPADecodeContext *s,
31 /* we antialias only "long" bands */
32 if (g->block_type == 2) {
35 /* XXX: check this for 8000Hz case */
41 ptr = g->sb_hybrid + 18;
42 for(i = n;i > 0;i--) {
44 float *csa = &csa_table_float[0][0];
48 ptr[-1-j] = tmp0 * csa[0+4*j] - tmp1 * csa[1+4*j];\
49 ptr[ j] = tmp0 * csa[1+4*j] + tmp1 * csa[0+4*j];
64 #if CONFIG_MP1FLOAT_DECODER
65 AVCodec ff_mp1float_decoder =
70 sizeof(MPADecodeContext),
77 .long_name= NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
80 #if CONFIG_MP2FLOAT_DECODER
81 AVCodec ff_mp2float_decoder =
86 sizeof(MPADecodeContext),
93 .long_name= NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
96 #if CONFIG_MP3FLOAT_DECODER
97 AVCodec ff_mp3float_decoder =
102 sizeof(MPADecodeContext),
107 CODEC_CAP_PARSE_ONLY,
109 .long_name= NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
112 #if CONFIG_MP3ADUFLOAT_DECODER
113 AVCodec ff_mp3adufloat_decoder =
118 sizeof(MPADecodeContext),
123 CODEC_CAP_PARSE_ONLY,
125 .long_name= NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
128 #if CONFIG_MP3ON4FLOAT_DECODER
129 AVCodec ff_mp3on4float_decoder =
134 sizeof(MP3On4DecodeContext),
140 .long_name= NULL_IF_CONFIG_SMALL("MP3onMP4"),