OLD | NEW |
1 /* | 1 /* |
2 * FFT/MDCT transform with Extended 3DNow! optimizations | 2 * FFT/MDCT transform with Extended 3DNow! optimizations |
3 * Copyright (c) 2006-2008 Zuxy MENG Jie, Loren Merritt | 3 * Copyright (c) 2006-2008 Zuxy MENG Jie, Loren Merritt |
4 * | 4 * |
5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
6 * | 6 * |
7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
11 * | 11 * |
12 * FFmpeg is distributed in the hope that it will be useful, | 12 * FFmpeg is distributed in the hope that it will be useful, |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 * Lesser General Public License for more details. | 15 * Lesser General Public License for more details. |
16 * | 16 * |
17 * You should have received a copy of the GNU Lesser General Public | 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 | 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 | 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 */ | 20 */ |
21 | 21 |
22 #include "libavutil/x86_cpu.h" | 22 #include "libavutil/x86_cpu.h" |
23 #include "libavcodec/dsputil.h" | 23 #include "libavcodec/dsputil.h" |
24 #include "fft.h" | 24 #include "fft.h" |
25 | 25 |
26 DECLARE_ALIGNED_8(static const int, m1m1)[2] = { 1<<31, 1<<31 }; | 26 DECLARE_ALIGNED(8, static const int, m1m1)[2] = { 1<<31, 1<<31 }; |
27 | 27 |
28 #ifdef EMULATE_3DNOWEXT | 28 #ifdef EMULATE_3DNOWEXT |
29 #define PSWAPD(s,d)\ | 29 #define PSWAPD(s,d)\ |
30 "movq "#s","#d"\n"\ | 30 "movq "#s","#d"\n"\ |
31 "psrlq $32,"#d"\n"\ | 31 "psrlq $32,"#d"\n"\ |
32 "punpckldq "#s","#d"\n" | 32 "punpckldq "#s","#d"\n" |
33 #define ff_fft_calc_3dn2 ff_fft_calc_3dn | 33 #define ff_fft_calc_3dn2 ff_fft_calc_3dn |
34 #define ff_fft_dispatch_3dn2 ff_fft_dispatch_3dn | 34 #define ff_fft_dispatch_3dn2 ff_fft_dispatch_3dn |
35 #define ff_fft_dispatch_interleave_3dn2 ff_fft_dispatch_interleave_3dn | 35 #define ff_fft_dispatch_interleave_3dn2 ff_fft_dispatch_interleave_3dn |
36 #define ff_imdct_calc_3dn2 ff_imdct_calc_3dn | 36 #define ff_imdct_calc_3dn2 ff_imdct_calc_3dn |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 "sub $8, %1 \n" | 165 "sub $8, %1 \n" |
166 "add $8, %0 \n" | 166 "add $8, %0 \n" |
167 "jl 1b \n" | 167 "jl 1b \n" |
168 :"+r"(j), "+r"(k) | 168 :"+r"(j), "+r"(k) |
169 :"r"(output+n4), "r"(output+n4*3), | 169 :"r"(output+n4), "r"(output+n4*3), |
170 "m"(*m1m1) | 170 "m"(*m1m1) |
171 ); | 171 ); |
172 __asm__ volatile("femms"); | 172 __asm__ volatile("femms"); |
173 } | 173 } |
174 | 174 |
OLD | NEW |