| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004 the ffmpeg project | 2 * Copyright (C) 2004 the ffmpeg project |
| 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 /** | 21 /** |
| 22 * @file libavcodec/x86/vp3dsp_mmx.c | 22 * @file libavcodec/x86/vp3dsp_mmx.c |
| 23 * MMX-optimized functions cribbed from the original VP3 source code. | 23 * MMX-optimized functions cribbed from the original VP3 source code. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "libavutil/x86_cpu.h" | 26 #include "libavutil/x86_cpu.h" |
| 27 #include "libavcodec/dsputil.h" | 27 #include "libavcodec/dsputil.h" |
| 28 #include "dsputil_mmx.h" | 28 #include "dsputil_mmx.h" |
| 29 #include "vp3dsp_mmx.h" |
| 29 | 30 |
| 30 extern const uint16_t ff_vp3_idct_data[]; | 31 extern const uint16_t ff_vp3_idct_data[]; |
| 31 | 32 |
| 32 // this is off by one or two for some cases when filter_limit is greater than 63 | 33 // this is off by one or two for some cases when filter_limit is greater than 63 |
| 33 // in: p0 in mm6, p1 in mm4, p2 in mm2, p3 in mm1 | 34 // in: p0 in mm6, p1 in mm4, p2 in mm2, p3 in mm1 |
| 34 // out: p1 in mm4, p2 in mm3 | 35 // out: p1 in mm4, p2 in mm3 |
| 35 #define VP3_LOOP_FILTER(flim) \ | 36 #define VP3_LOOP_FILTER(flim) \ |
| 36 "movq %%mm6, %%mm7 \n\t" \ | 37 "movq %%mm6, %%mm7 \n\t" \ |
| 37 "pand "MANGLE(ff_pb_7 )", %%mm6 \n\t" /* p0&7 */ \ | 38 "pand "MANGLE(ff_pb_7 )", %%mm6 \n\t" /* p0&7 */ \ |
| 38 "psrlw $3, %%mm7 \n\t" \ | 39 "psrlw $3, %%mm7 \n\t" \ |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 { | 388 { |
| 388 ff_vp3_idct_mmx(block); | 389 ff_vp3_idct_mmx(block); |
| 389 put_signed_pixels_clamped_mmx(block, dest, line_size); | 390 put_signed_pixels_clamped_mmx(block, dest, line_size); |
| 390 } | 391 } |
| 391 | 392 |
| 392 void ff_vp3_idct_add_mmx(uint8_t *dest, int line_size, DCTELEM *block) | 393 void ff_vp3_idct_add_mmx(uint8_t *dest, int line_size, DCTELEM *block) |
| 393 { | 394 { |
| 394 ff_vp3_idct_mmx(block); | 395 ff_vp3_idct_mmx(block); |
| 395 add_pixels_clamped_mmx(block, dest, line_size); | 396 add_pixels_clamped_mmx(block, dest, line_size); |
| 396 } | 397 } |
| OLD | NEW |