OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 Romain Dolbeau <romain@dolbeau.org> | 2 * Copyright (c) 2004 Romain Dolbeau <romain@dolbeau.org> |
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 * |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 OP_U8_ALTIVEC(fsum, vfdst, vdst);\ | 68 OP_U8_ALTIVEC(fsum, vfdst, vdst);\ |
69 \ | 69 \ |
70 vec_st(fsum, 0, dst);\ | 70 vec_st(fsum, 0, dst);\ |
71 \ | 71 \ |
72 dst += stride;\ | 72 dst += stride;\ |
73 src += stride; | 73 src += stride; |
74 | 74 |
75 #define noop(a) a | 75 #define noop(a) a |
76 #define add28(a) vec_add(v28ss, a) | 76 #define add28(a) vec_add(v28ss, a) |
77 | 77 |
78 void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, | 78 static void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, |
79 int stride, int h, int x, int y) { | 79 int stride, int h, int x, int y) { |
80 POWERPC_PERF_DECLARE(PREFIX_h264_chroma_mc8_num, 1); | 80 POWERPC_PERF_DECLARE(PREFIX_h264_chroma_mc8_num, 1); |
81 DECLARE_ALIGNED_16(signed int, ABCD)[4] = | 81 DECLARE_ALIGNED(16, signed int, ABCD)[4] = |
82 {((8 - x) * (8 - y)), | 82 {((8 - x) * (8 - y)), |
83 (( x) * (8 - y)), | 83 (( x) * (8 - y)), |
84 ((8 - x) * ( y)), | 84 ((8 - x) * ( y)), |
85 (( x) * ( y))}; | 85 (( x) * ( y))}; |
86 register int i; | 86 register int i; |
87 vec_u8 fperm; | 87 vec_u8 fperm; |
88 const vec_s32 vABCD = vec_ld(0, ABCD); | 88 const vec_s32 vABCD = vec_ld(0, ABCD); |
89 const vec_s16 vA = vec_splat((vec_s16)vABCD, 1); | 89 const vec_s16 vA = vec_splat((vec_s16)vABCD, 1); |
90 const vec_s16 vB = vec_splat((vec_s16)vABCD, 3); | 90 const vec_s16 vB = vec_splat((vec_s16)vABCD, 3); |
91 const vec_s16 vC = vec_splat((vec_s16)vABCD, 5); | 91 const vec_s16 vC = vec_splat((vec_s16)vABCD, 5); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 200 |
201 CHROMA_MC8_ALTIVEC_CORE_SIMPLE | 201 CHROMA_MC8_ALTIVEC_CORE_SIMPLE |
202 } | 202 } |
203 } | 203 } |
204 } | 204 } |
205 } | 205 } |
206 POWERPC_PERF_STOP_COUNT(PREFIX_h264_chroma_mc8_num, 1); | 206 POWERPC_PERF_STOP_COUNT(PREFIX_h264_chroma_mc8_num, 1); |
207 } | 207 } |
208 | 208 |
209 /* this code assume that stride % 16 == 0 */ | 209 /* this code assume that stride % 16 == 0 */ |
210 void PREFIX_no_rnd_vc1_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, int stri
de, int h, int x, int y) { | 210 static void PREFIX_no_rnd_vc1_chroma_mc8_altivec(uint8_t * dst, uint8_t * src, i
nt stride, int h, int x, int y) { |
211 DECLARE_ALIGNED_16(signed int, ABCD)[4] = | 211 DECLARE_ALIGNED(16, signed int, ABCD)[4] = |
212 {((8 - x) * (8 - y)), | 212 {((8 - x) * (8 - y)), |
213 (( x) * (8 - y)), | 213 (( x) * (8 - y)), |
214 ((8 - x) * ( y)), | 214 ((8 - x) * ( y)), |
215 (( x) * ( y))}; | 215 (( x) * ( y))}; |
216 register int i; | 216 register int i; |
217 vec_u8 fperm; | 217 vec_u8 fperm; |
218 const vec_s32 vABCD = vec_ld(0, ABCD); | 218 const vec_s32 vABCD = vec_ld(0, ABCD); |
219 const vec_s16 vA = vec_splat((vec_s16)vABCD, 1); | 219 const vec_s16 vA = vec_splat((vec_s16)vABCD, 1); |
220 const vec_s16 vB = vec_splat((vec_s16)vABCD, 3); | 220 const vec_s16 vB = vec_splat((vec_s16)vABCD, 3); |
221 const vec_s16 vC = vec_splat((vec_s16)vABCD, 5); | 221 const vec_s16 vC = vec_splat((vec_s16)vABCD, 5); |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 vdst = vec_ld(0, dst); | 774 vdst = vec_ld(0, dst); |
775 | 775 |
776 OP_U8_ALTIVEC(fsum, sum, vdst); | 776 OP_U8_ALTIVEC(fsum, sum, vdst); |
777 | 777 |
778 vec_st(fsum, 0, dst); | 778 vec_st(fsum, 0, dst); |
779 | 779 |
780 dst += dstStride; | 780 dst += dstStride; |
781 } | 781 } |
782 POWERPC_PERF_STOP_COUNT(PREFIX_h264_qpel16_hv_lowpass_num, 1); | 782 POWERPC_PERF_STOP_COUNT(PREFIX_h264_qpel16_hv_lowpass_num, 1); |
783 } | 783 } |
OLD | NEW |