| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Simple IDCT (Alpha optimized) | 2 * Simple IDCT (Alpha optimized) |
| 3 * | 3 * |
| 4 * Copyright (c) 2001 Michael Niedermayer <michaelni@gmx.at> | 4 * Copyright (c) 2001 Michael Niedermayer <michaelni@gmx.at> |
| 5 * | 5 * |
| 6 * based upon some outcommented C code from mpeg2dec (idct_mmx.c | 6 * based upon some outcommented C code from mpeg2dec (idct_mmx.c |
| 7 * written by Aaron Holtzman <aholtzma@ess.engr.uvic.ca>) | 7 * written by Aaron Holtzman <aholtzma@ess.engr.uvic.ca>) |
| 8 * | 8 * |
| 9 * Alpha optimizations by Måns Rullgård <mans@mansr.com> | 9 * Alpha optimizations by Måns Rullgård <mans@mansr.com> |
| 10 * and Falk Hueffner <falk@debian.org> | 10 * and Falk Hueffner <falk@debian.org> |
| 11 * | 11 * |
| 12 * This file is part of FFmpeg. | 12 * This file is part of FFmpeg. |
| 13 * | 13 * |
| 14 * FFmpeg is free software; you can redistribute it and/or | 14 * FFmpeg is free software; you can redistribute it and/or |
| 15 * modify it under the terms of the GNU Lesser General Public | 15 * modify it under the terms of the GNU Lesser General Public |
| 16 * License as published by the Free Software Foundation; either | 16 * License as published by the Free Software Foundation; either |
| 17 * version 2.1 of the License, or (at your option) any later version. | 17 * version 2.1 of the License, or (at your option) any later version. |
| 18 * | 18 * |
| 19 * FFmpeg is distributed in the hope that it will be useful, | 19 * FFmpeg is distributed in the hope that it will be useful, |
| 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 22 * Lesser General Public License for more details. | 22 * Lesser General Public License for more details. |
| 23 * | 23 * |
| 24 * You should have received a copy of the GNU Lesser General Public | 24 * You should have received a copy of the GNU Lesser General Public |
| 25 * License along with FFmpeg; if not, write to the Free Software | 25 * License along with FFmpeg; if not, write to the Free Software |
| 26 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 26 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "libavcodec/dsputil.h" | 29 #include "libavcodec/dsputil.h" |
| 30 #include "dsputil_alpha.h" |
| 30 #include "asm.h" | 31 #include "asm.h" |
| 31 | 32 |
| 32 extern void (*put_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels, | |
| 33 int line_size); | |
| 34 extern void (*add_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels, | |
| 35 int line_size); | |
| 36 | |
| 37 // cos(i * M_PI / 16) * sqrt(2) * (1 << 14) | 33 // cos(i * M_PI / 16) * sqrt(2) * (1 << 14) |
| 38 // W4 is actually exactly 16384, but using 16383 works around | 34 // W4 is actually exactly 16384, but using 16383 works around |
| 39 // accumulating rounding errors for some encoders | 35 // accumulating rounding errors for some encoders |
| 40 #define W1 ((int_fast32_t) 22725) | 36 #define W1 ((int_fast32_t) 22725) |
| 41 #define W2 ((int_fast32_t) 21407) | 37 #define W2 ((int_fast32_t) 21407) |
| 42 #define W3 ((int_fast32_t) 19266) | 38 #define W3 ((int_fast32_t) 19266) |
| 43 #define W4 ((int_fast32_t) 16383) | 39 #define W4 ((int_fast32_t) 16383) |
| 44 #define W5 ((int_fast32_t) 12873) | 40 #define W5 ((int_fast32_t) 12873) |
| 45 #define W6 ((int_fast32_t) 8867) | 41 #define W6 ((int_fast32_t) 8867) |
| 46 #define W7 ((int_fast32_t) 4520) | 42 #define W7 ((int_fast32_t) 4520) |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 { | 295 { |
| 300 ff_simple_idct_axp(block); | 296 ff_simple_idct_axp(block); |
| 301 put_pixels_clamped_axp_p(block, dest, line_size); | 297 put_pixels_clamped_axp_p(block, dest, line_size); |
| 302 } | 298 } |
| 303 | 299 |
| 304 void ff_simple_idct_add_axp(uint8_t *dest, int line_size, DCTELEM *block) | 300 void ff_simple_idct_add_axp(uint8_t *dest, int line_size, DCTELEM *block) |
| 305 { | 301 { |
| 306 ff_simple_idct_axp(block); | 302 ff_simple_idct_axp(block); |
| 307 add_pixels_clamped_axp_p(block, dest, line_size); | 303 add_pixels_clamped_axp_p(block, dest, line_size); |
| 308 } | 304 } |
| OLD | NEW |