]> git.sesse.net Git - ffmpeg/blob - libavcodec/mpegaudiodec_float.c
Use add instead of lshift in mmxext vp8 idct
[ffmpeg] / libavcodec / mpegaudiodec_float.c
1 /*
2  * Float MPEG Audio decoder
3  * Copyright (c) 2010 Michael Niedermayer
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg 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.
11  *
12  * FFmpeg 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.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21
22 #define CONFIG_FLOAT 1
23 #include "mpegaudiodec.c"
24
25 void ff_mpa_synth_filter_float(MPADecodeContext *s, float *synth_buf_ptr,
26                                int *synth_buf_offset,
27                                float *window, int *dither_state,
28                                float *samples, int incr,
29                                float sb_samples[SBLIMIT])
30 {
31     float *synth_buf;
32     int offset;
33
34     offset = *synth_buf_offset;
35     synth_buf = synth_buf_ptr + offset;
36
37     dct32(synth_buf, sb_samples);
38     s->apply_window_mp3(synth_buf, window, dither_state, samples, incr);
39
40     offset = (offset - 32) & 511;
41     *synth_buf_offset = offset;
42 }
43
44 #if CONFIG_MP1FLOAT_DECODER
45 AVCodec mp1float_decoder =
46 {
47     "mp1float",
48     AVMEDIA_TYPE_AUDIO,
49     CODEC_ID_MP1,
50     sizeof(MPADecodeContext),
51     decode_init,
52     NULL,
53     NULL,
54     decode_frame,
55     CODEC_CAP_PARSE_ONLY,
56     .flush= flush,
57     .long_name= NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
58 };
59 #endif
60 #if CONFIG_MP2FLOAT_DECODER
61 AVCodec mp2float_decoder =
62 {
63     "mp2float",
64     AVMEDIA_TYPE_AUDIO,
65     CODEC_ID_MP2,
66     sizeof(MPADecodeContext),
67     decode_init,
68     NULL,
69     NULL,
70     decode_frame,
71     CODEC_CAP_PARSE_ONLY,
72     .flush= flush,
73     .long_name= NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
74 };
75 #endif
76 #if CONFIG_MP3FLOAT_DECODER
77 AVCodec mp3float_decoder =
78 {
79     "mp3float",
80     AVMEDIA_TYPE_AUDIO,
81     CODEC_ID_MP3,
82     sizeof(MPADecodeContext),
83     decode_init,
84     NULL,
85     NULL,
86     decode_frame,
87     CODEC_CAP_PARSE_ONLY,
88     .flush= flush,
89     .long_name= NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
90 };
91 #endif
92 #if CONFIG_MP3ADUFLOAT_DECODER
93 AVCodec mp3adufloat_decoder =
94 {
95     "mp3adufloat",
96     AVMEDIA_TYPE_AUDIO,
97     CODEC_ID_MP3ADU,
98     sizeof(MPADecodeContext),
99     decode_init,
100     NULL,
101     NULL,
102     decode_frame_adu,
103     CODEC_CAP_PARSE_ONLY,
104     .flush= flush,
105     .long_name= NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
106 };
107 #endif
108 #if CONFIG_MP3ON4FLOAT_DECODER
109 AVCodec mp3on4float_decoder =
110 {
111     "mp3on4float",
112     AVMEDIA_TYPE_AUDIO,
113     CODEC_ID_MP3ON4,
114     sizeof(MP3On4DecodeContext),
115     decode_init_mp3on4,
116     NULL,
117     decode_close_mp3on4,
118     decode_frame_mp3on4,
119     .flush= flush,
120     .long_name= NULL_IF_CONFIG_SMALL("MP3onMP4"),
121 };
122 #endif