| OLD | NEW |
| 1 /* | 1 /* |
| 2 * copyright (c) 2008 Michael Niedermayer <michaelni@gmx.at> | 2 * copyright (c) 2008 Michael Niedermayer <michaelni@gmx.at> |
| 3 * | 3 * |
| 4 * This file is part of FFmpeg. | 4 * This file is part of FFmpeg. |
| 5 * | 5 * |
| 6 * FFmpeg is free software; you can redistribute it and/or | 6 * FFmpeg is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2.1 of the License, or (at your option) any later version. | 9 * version 2.1 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| 11 * FFmpeg is distributed in the hope that it will be useful, | 11 * FFmpeg is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Lesser General Public License for more details. | 14 * Lesser General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Lesser General Public | 16 * You should have received a copy of the GNU Lesser General Public |
| 17 * License along with FFmpeg; if not, write to the Free Software | 17 * License along with FFmpeg; if not, write to the Free Software |
| 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #include "fft.h" |
| 21 #include "synth_filter.h" | 22 #include "synth_filter.h" |
| 22 | 23 |
| 23 void ff_synth_filter_float(FFTContext *imdct, | 24 void ff_synth_filter_float(FFTContext *imdct, |
| 24 float *synth_buf_ptr, int *synth_buf_offset, | 25 float *synth_buf_ptr, int *synth_buf_offset, |
| 25 float synth_buf2[32], const float window[512], | 26 float synth_buf2[32], const float window[512], |
| 26 float out[32], const float in[32], float scale, float
bias) | 27 float out[32], const float in[32], float scale, float
bias) |
| 27 { | 28 { |
| 28 float *synth_buf= synth_buf_ptr + *synth_buf_offset; | 29 float *synth_buf= synth_buf_ptr + *synth_buf_offset; |
| 29 int i, j; | 30 int i, j; |
| 30 | 31 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 47 c += window[i + j + 32]*( synth_buf[16 + i + j - 512]); | 48 c += window[i + j + 32]*( synth_buf[16 + i + j - 512]); |
| 48 d += window[i + j + 48]*( synth_buf[31 - i + j - 512]); | 49 d += window[i + j + 48]*( synth_buf[31 - i + j - 512]); |
| 49 } | 50 } |
| 50 out[i ] = a*scale + bias; | 51 out[i ] = a*scale + bias; |
| 51 out[i + 16] = b*scale + bias; | 52 out[i + 16] = b*scale + bias; |
| 52 synth_buf2[i ] = c; | 53 synth_buf2[i ] = c; |
| 53 synth_buf2[i + 16] = d; | 54 synth_buf2[i + 16] = d; |
| 54 } | 55 } |
| 55 *synth_buf_offset= (*synth_buf_offset - 32)&511; | 56 *synth_buf_offset= (*synth_buf_offset - 32)&511; |
| 56 } | 57 } |
| OLD | NEW |