| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008 Konstantin Shishkov, Mathieu Velten | 2 * Copyright (c) 2008 Konstantin Shishkov, Mathieu Velten |
| 3 * | 3 * |
| 4 * MMX-optimized DSP functions for RV40, based on H.264 optimizations by | 4 * MMX-optimized DSP functions for RV40, based on H.264 optimizations by |
| 5 * Michael Niedermayer and Loren Merritt | 5 * Michael Niedermayer and Loren Merritt |
| 6 * | 6 * |
| 7 * This file is part of FFmpeg. | 7 * This file is part of FFmpeg. |
| 8 * | 8 * |
| 9 * FFmpeg is free software; you can redistribute it and/or | 9 * FFmpeg is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
| 11 * License as published by the Free Software Foundation; either | 11 * License as published by the Free Software Foundation; either |
| 12 * version 2.1 of the License, or (at your option) any later version. | 12 * version 2.1 of the License, or (at your option) any later version. |
| 13 * | 13 * |
| 14 * FFmpeg is distributed in the hope that it will be useful, | 14 * FFmpeg is distributed in the hope that it will be useful, |
| 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 17 * Lesser General Public License for more details. | 17 * Lesser General Public License for more details. |
| 18 * | 18 * |
| 19 * You should have received a copy of the GNU Lesser General Public | 19 * You should have received a copy of the GNU Lesser General Public |
| 20 * License along with FFmpeg; if not, write to the Free Software | 20 * License along with FFmpeg; if not, write to the Free Software |
| 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 22 */ | 22 */ |
| 23 | 23 |
| 24 #include "dsputil_mmx.h" | 24 #include "dsputil_mmx.h" |
| 25 | 25 |
| 26 /* bias interleaved with bias div 8, use p+1 to access bias div 8 */ | 26 /* bias interleaved with bias div 8, use p+1 to access bias div 8 */ |
| 27 DECLARE_ALIGNED_8(static const uint64_t, rv40_bias_reg)[4][8] = { | 27 DECLARE_ALIGNED(8, static const uint64_t, rv40_bias_reg)[4][8] = { |
| 28 { 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0010001000100010ULL, 0x000
2000200020002ULL, | 28 { 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0010001000100010ULL, 0x000
2000200020002ULL, |
| 29 0x0020002000200020ULL, 0x0004000400040004ULL, 0x0010001000100010ULL, 0x000
2000200020002ULL }, | 29 0x0020002000200020ULL, 0x0004000400040004ULL, 0x0010001000100010ULL, 0x000
2000200020002ULL }, |
| 30 { 0x0020002000200020ULL, 0x0004000400040004ULL, 0x001C001C001C001CULL, 0x000
3000300030003ULL, | 30 { 0x0020002000200020ULL, 0x0004000400040004ULL, 0x001C001C001C001CULL, 0x000
3000300030003ULL, |
| 31 0x0020002000200020ULL, 0x0004000400040004ULL, 0x001C001C001C001CULL, 0x000
3000300030003ULL }, | 31 0x0020002000200020ULL, 0x0004000400040004ULL, 0x001C001C001C001CULL, 0x000
3000300030003ULL }, |
| 32 { 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0020002000200020ULL, 0x000
4000400040004ULL, | 32 { 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0020002000200020ULL, 0x000
4000400040004ULL, |
| 33 0x0010001000100010ULL, 0x0002000200020002ULL, 0x0020002000200020ULL, 0x000
4000400040004ULL }, | 33 0x0010001000100010ULL, 0x0002000200020002ULL, 0x0020002000200020ULL, 0x000
4000400040004ULL }, |
| 34 { 0x0020002000200020ULL, 0x0004000400040004ULL, 0x001C001C001C001CULL, 0x000
3000300030003ULL, | 34 { 0x0020002000200020ULL, 0x0004000400040004ULL, 0x001C001C001C001CULL, 0x000
3000300030003ULL, |
| 35 0x0020002000200020ULL, 0x0004000400040004ULL, 0x001C001C001C001CULL, 0x000
3000300030003ULL } | 35 0x0020002000200020ULL, 0x0004000400040004ULL, 0x001C001C001C001CULL, 0x000
3000300030003ULL } |
| 36 }; | 36 }; |
| 37 | 37 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 52 avg_h264_chroma_generic_mc4_mmx2(dst, src, stride, h, x, y, &rv40_bias_reg[y
>>1][x&(~1)]); | 52 avg_h264_chroma_generic_mc4_mmx2(dst, src, stride, h, x, y, &rv40_bias_reg[y
>>1][x&(~1)]); |
| 53 } | 53 } |
| 54 static void avg_rv40_chroma_mc8_3dnow(uint8_t *dst/*align 8*/, uint8_t *src/*ali
gn 1*/, int stride, int h, int x, int y) | 54 static void avg_rv40_chroma_mc8_3dnow(uint8_t *dst/*align 8*/, uint8_t *src/*ali
gn 1*/, int stride, int h, int x, int y) |
| 55 { | 55 { |
| 56 avg_h264_chroma_generic_mc8_3dnow(dst, src, stride, h, x, y, &rv40_bias_reg[
y>>1][x&(~1)]); | 56 avg_h264_chroma_generic_mc8_3dnow(dst, src, stride, h, x, y, &rv40_bias_reg[
y>>1][x&(~1)]); |
| 57 } | 57 } |
| 58 static void avg_rv40_chroma_mc4_3dnow(uint8_t *dst/*align 8*/, uint8_t *src/*ali
gn 1*/, int stride, int h, int x, int y) | 58 static void avg_rv40_chroma_mc4_3dnow(uint8_t *dst/*align 8*/, uint8_t *src/*ali
gn 1*/, int stride, int h, int x, int y) |
| 59 { | 59 { |
| 60 avg_h264_chroma_generic_mc4_3dnow(dst, src, stride, h, x, y, &rv40_bias_reg[
y>>1][x&(~1)]); | 60 avg_h264_chroma_generic_mc4_3dnow(dst, src, stride, h, x, y, &rv40_bias_reg[
y>>1][x&(~1)]); |
| 61 } | 61 } |
| OLD | NEW |