Mercurial > libavcodec.hg
annotate alpha/dsputil_alpha.c @ 1213:a71fe70b428b libavcodec
doc fixes (forgot to commit)
author | michaelni |
---|---|
date | Fri, 25 Apr 2003 00:21:53 +0000 |
parents | f59c3f66363b |
children | 7d328fd9d8a5 |
rev | line source |
---|---|
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
1 /* |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
2 * Alpha optimized DSP utils |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
3 * Copyright (c) 2002 Falk Hueffner <falk@debian.org> |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
4 * |
429 | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Lesser General Public | |
7 * License as published by the Free Software Foundation; either | |
8 * version 2 of the License, or (at your option) any later version. | |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
9 * |
429 | 10 * This library is distributed in the hope that it will be useful, |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
429 | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Lesser General Public License for more details. | |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
14 * |
429 | 15 * You should have received a copy of the GNU Lesser General Public |
16 * License along with this library; if not, write to the Free Software | |
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
18 */ |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
19 |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
20 #include "asm.h" |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
21 #include "../dsputil.h" |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
22 |
1092 | 23 extern void simple_idct_put_axp(uint8_t *dest, int line_size, DCTELEM *block); |
24 extern void simple_idct_add_axp(uint8_t *dest, int line_size, DCTELEM *block); | |
25 | |
511
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
509
diff
changeset
|
26 void put_pixels_axp_asm(uint8_t *block, const uint8_t *pixels, |
897 | 27 int line_size, int h); |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
28 void put_pixels_clamped_mvi_asm(const DCTELEM *block, uint8_t *pixels, |
897 | 29 int line_size); |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
30 void add_pixels_clamped_mvi_asm(const DCTELEM *block, uint8_t *pixels, |
897 | 31 int line_size); |
32 void (*put_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels, | |
33 int line_size); | |
34 void (*add_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels, | |
35 int line_size); | |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
36 |
586 | 37 void get_pixels_mvi(DCTELEM *restrict block, |
38 const uint8_t *restrict pixels, int line_size); | |
39 void diff_pixels_mvi(DCTELEM *block, const uint8_t *s1, const uint8_t *s2, | |
40 int stride); | |
41 int pix_abs8x8_mvi(uint8_t *pix1, uint8_t *pix2, int line_size); | |
705
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
670
diff
changeset
|
42 int pix_abs16x16_mvi_asm(uint8_t *pix1, uint8_t *pix2, int line_size); |
586 | 43 int pix_abs16x16_x2_mvi(uint8_t *pix1, uint8_t *pix2, int line_size); |
44 int pix_abs16x16_y2_mvi(uint8_t *pix1, uint8_t *pix2, int line_size); | |
45 int pix_abs16x16_xy2_mvi(uint8_t *pix1, uint8_t *pix2, int line_size); | |
46 | |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
47 #if 0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
48 /* These functions were the base for the optimized assembler routines, |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
49 and remain here for documentation purposes. */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
50 static void put_pixels_clamped_mvi(const DCTELEM *block, uint8_t *pixels, |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
51 int line_size) |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
52 { |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
53 int i = 8; |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
54 uint64_t clampmask = zap(-1, 0xaa); /* 0x00ff00ff00ff00ff */ |
505
7a976bf93394
Ugly hack to make the assembler accept MVI instructions.
mellum
parents:
429
diff
changeset
|
55 |
7a976bf93394
Ugly hack to make the assembler accept MVI instructions.
mellum
parents:
429
diff
changeset
|
56 ASM_ACCEPT_MVI; |
7a976bf93394
Ugly hack to make the assembler accept MVI instructions.
mellum
parents:
429
diff
changeset
|
57 |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
58 do { |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
59 uint64_t shorts0, shorts1; |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
60 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
61 shorts0 = ldq(block); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
62 shorts0 = maxsw4(shorts0, 0); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
63 shorts0 = minsw4(shorts0, clampmask); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
64 stl(pkwb(shorts0), pixels); |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
65 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
66 shorts1 = ldq(block + 4); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
67 shorts1 = maxsw4(shorts1, 0); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
68 shorts1 = minsw4(shorts1, clampmask); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
69 stl(pkwb(shorts1), pixels + 4); |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
70 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
71 pixels += line_size; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
72 block += 8; |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
73 } while (--i); |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
74 } |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
75 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
76 void add_pixels_clamped_mvi(const DCTELEM *block, uint8_t *pixels, |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
77 int line_size) |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
78 { |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
79 int h = 8; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
80 /* Keep this function a leaf function by generating the constants |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
81 manually (mainly for the hack value ;-). */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
82 uint64_t clampmask = zap(-1, 0xaa); /* 0x00ff00ff00ff00ff */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
83 uint64_t signmask = zap(-1, 0x33); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
84 signmask ^= signmask >> 1; /* 0x8000800080008000 */ |
505
7a976bf93394
Ugly hack to make the assembler accept MVI instructions.
mellum
parents:
429
diff
changeset
|
85 |
7a976bf93394
Ugly hack to make the assembler accept MVI instructions.
mellum
parents:
429
diff
changeset
|
86 ASM_ACCEPT_MVI; |
7a976bf93394
Ugly hack to make the assembler accept MVI instructions.
mellum
parents:
429
diff
changeset
|
87 |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
88 do { |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
89 uint64_t shorts0, pix0, signs0; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
90 uint64_t shorts1, pix1, signs1; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
91 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
92 shorts0 = ldq(block); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
93 shorts1 = ldq(block + 4); |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
94 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
95 pix0 = unpkbw(ldl(pixels)); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
96 /* Signed subword add (MMX paddw). */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
97 signs0 = shorts0 & signmask; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
98 shorts0 &= ~signmask; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
99 shorts0 += pix0; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
100 shorts0 ^= signs0; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
101 /* Clamp. */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
102 shorts0 = maxsw4(shorts0, 0); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
103 shorts0 = minsw4(shorts0, clampmask); |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
104 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
105 /* Next 4. */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
106 pix1 = unpkbw(ldl(pixels + 4)); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
107 signs1 = shorts1 & signmask; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
108 shorts1 &= ~signmask; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
109 shorts1 += pix1; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
110 shorts1 ^= signs1; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
111 shorts1 = maxsw4(shorts1, 0); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
112 shorts1 = minsw4(shorts1, clampmask); |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
113 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
114 stl(pkwb(shorts0), pixels); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
115 stl(pkwb(shorts1), pixels + 4); |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
116 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
117 pixels += line_size; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
118 block += 8; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
119 } while (--h); |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
120 } |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
505
diff
changeset
|
121 #endif |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
122 |
518 | 123 static void clear_blocks_axp(DCTELEM *blocks) { |
124 uint64_t *p = (uint64_t *) blocks; | |
125 int n = sizeof(DCTELEM) * 6 * 64; | |
126 | |
127 do { | |
128 p[0] = 0; | |
129 p[1] = 0; | |
130 p[2] = 0; | |
131 p[3] = 0; | |
132 p[4] = 0; | |
133 p[5] = 0; | |
134 p[6] = 0; | |
135 p[7] = 0; | |
136 p += 8; | |
137 n -= 8 * 8; | |
138 } while (n); | |
139 } | |
140 | |
513 | 141 static inline uint64_t avg2_no_rnd(uint64_t a, uint64_t b) |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
142 { |
513 | 143 return (a & b) + (((a ^ b) & BYTE_VEC(0xfe)) >> 1); |
144 } | |
145 | |
146 static inline uint64_t avg2(uint64_t a, uint64_t b) | |
147 { | |
148 return (a | b) - (((a ^ b) & BYTE_VEC(0xfe)) >> 1); | |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
149 } |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
150 |
546 | 151 #if 0 |
152 /* The XY2 routines basically utilize this scheme, but reuse parts in | |
153 each iteration. */ | |
513 | 154 static inline uint64_t avg4(uint64_t l1, uint64_t l2, uint64_t l3, uint64_t l4) |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
155 { |
513 | 156 uint64_t r1 = ((l1 & ~BYTE_VEC(0x03)) >> 2) |
897 | 157 + ((l2 & ~BYTE_VEC(0x03)) >> 2) |
158 + ((l3 & ~BYTE_VEC(0x03)) >> 2) | |
159 + ((l4 & ~BYTE_VEC(0x03)) >> 2); | |
513 | 160 uint64_t r2 = (( (l1 & BYTE_VEC(0x03)) |
897 | 161 + (l2 & BYTE_VEC(0x03)) |
162 + (l3 & BYTE_VEC(0x03)) | |
163 + (l4 & BYTE_VEC(0x03)) | |
164 + BYTE_VEC(0x02)) >> 2) & BYTE_VEC(0x03); | |
513 | 165 return r1 + r2; |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
166 } |
546 | 167 #endif |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
168 |
548
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
169 #define OP(LOAD, STORE) \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
170 do { \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
171 STORE(LOAD(pixels), block); \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
172 pixels += line_size; \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
173 block += line_size; \ |
513 | 174 } while (--h) |
175 | |
548
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
176 #define OP_X2(LOAD, STORE) \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
177 do { \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
178 uint64_t pix1, pix2; \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
179 \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
180 pix1 = LOAD(pixels); \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
181 pix2 = pix1 >> 8 | ((uint64_t) pixels[8] << 56); \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
182 STORE(AVG2(pix1, pix2), block); \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
183 pixels += line_size; \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
184 block += line_size; \ |
513 | 185 } while (--h) |
186 | |
548
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
187 #define OP_Y2(LOAD, STORE) \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
188 do { \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
189 uint64_t pix = LOAD(pixels); \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
190 do { \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
191 uint64_t next_pix; \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
192 \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
193 pixels += line_size; \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
194 next_pix = LOAD(pixels); \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
195 STORE(AVG2(pix, next_pix), block); \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
196 block += line_size; \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
197 pix = next_pix; \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
198 } while (--h); \ |
513 | 199 } while (0) |
200 | |
548
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
201 #define OP_XY2(LOAD, STORE) \ |
546 | 202 do { \ |
203 uint64_t pix1 = LOAD(pixels); \ | |
204 uint64_t pix2 = pix1 >> 8 | ((uint64_t) pixels[8] << 56); \ | |
205 uint64_t pix_l = (pix1 & BYTE_VEC(0x03)) \ | |
206 + (pix2 & BYTE_VEC(0x03)); \ | |
207 uint64_t pix_h = ((pix1 & ~BYTE_VEC(0x03)) >> 2) \ | |
208 + ((pix2 & ~BYTE_VEC(0x03)) >> 2); \ | |
209 \ | |
210 do { \ | |
211 uint64_t npix1, npix2; \ | |
212 uint64_t npix_l, npix_h; \ | |
213 uint64_t avg; \ | |
214 \ | |
215 pixels += line_size; \ | |
216 npix1 = LOAD(pixels); \ | |
217 npix2 = npix1 >> 8 | ((uint64_t) pixels[8] << 56); \ | |
218 npix_l = (npix1 & BYTE_VEC(0x03)) \ | |
219 + (npix2 & BYTE_VEC(0x03)); \ | |
220 npix_h = ((npix1 & ~BYTE_VEC(0x03)) >> 2) \ | |
221 + ((npix2 & ~BYTE_VEC(0x03)) >> 2); \ | |
222 avg = (((pix_l + npix_l + AVG4_ROUNDER) >> 2) & BYTE_VEC(0x03)) \ | |
223 + pix_h + npix_h; \ | |
224 STORE(avg, block); \ | |
225 \ | |
548
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
226 block += line_size; \ |
546 | 227 pix_l = npix_l; \ |
228 pix_h = npix_h; \ | |
229 } while (--h); \ | |
513 | 230 } while (0) |
231 | |
670
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
232 #define MAKE_OP(OPNAME, SUFF, OPKIND, STORE) \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
233 static void OPNAME ## _pixels ## SUFF ## _axp \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
234 (uint8_t *restrict block, const uint8_t *restrict pixels, \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
235 int line_size, int h) \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
236 { \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
237 if ((size_t) pixels & 0x7) { \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
238 OPKIND(uldq, STORE); \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
239 } else { \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
240 OPKIND(ldq, STORE); \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
241 } \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
242 } \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
243 \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
244 static void OPNAME ## _pixels16 ## SUFF ## _axp \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
245 (uint8_t *restrict block, const uint8_t *restrict pixels, \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
246 int line_size, int h) \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
247 { \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
248 OPNAME ## _pixels ## SUFF ## _axp(block, pixels, line_size, h); \ |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
249 OPNAME ## _pixels ## SUFF ## _axp(block + 8, pixels + 8, line_size, h); \ |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
250 } |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
251 |
548
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
252 #define PIXOP(OPNAME, STORE) \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
253 MAKE_OP(OPNAME, , OP, STORE) \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
254 MAKE_OP(OPNAME, _x2, OP_X2, STORE) \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
255 MAKE_OP(OPNAME, _y2, OP_Y2, STORE) \ |
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
256 MAKE_OP(OPNAME, _xy2, OP_XY2, STORE) |
513 | 257 |
258 /* Rounding primitives. */ | |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
259 #define AVG2 avg2 |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
260 #define AVG4 avg4 |
546 | 261 #define AVG4_ROUNDER BYTE_VEC(0x02) |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
262 #define STORE(l, b) stq(l, b) |
548
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
263 PIXOP(put, STORE); |
513 | 264 |
265 #undef STORE | |
266 #define STORE(l, b) stq(AVG2(l, ldq(b)), b); | |
548
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
267 PIXOP(avg, STORE); |
513 | 268 |
269 /* Not rounding primitives. */ | |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
270 #undef AVG2 |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
271 #undef AVG4 |
546 | 272 #undef AVG4_ROUNDER |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
273 #undef STORE |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
274 #define AVG2 avg2_no_rnd |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
275 #define AVG4 avg4_no_rnd |
546 | 276 #define AVG4_ROUNDER BYTE_VEC(0x01) |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
277 #define STORE(l, b) stq(l, b) |
548
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
278 PIXOP(put_no_rnd, STORE); |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
279 |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
280 #undef STORE |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
281 #define STORE(l, b) stq(AVG2(l, ldq(b)), b); |
548
3f05be811b5a
Remove support for variable BSIZE and INCR, as sub_pixels_* is no
mellum
parents:
546
diff
changeset
|
282 PIXOP(avg_no_rnd, STORE); |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
283 |
670
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
284 void put_pixels16_axp_asm(uint8_t *block, const uint8_t *pixels, |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
285 int line_size, int h) |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
286 { |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
287 put_pixels_axp_asm(block, pixels, line_size, h); |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
288 put_pixels_axp_asm(block + 8, pixels + 8, line_size, h); |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
289 } |
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
290 |
986 | 291 static int sad16x16_mvi(void *s, uint8_t *a, uint8_t *b, int stride) |
292 { | |
293 return pix_abs16x16_mvi_asm(a, b, stride); | |
294 } | |
295 | |
296 static int sad8x8_mvi(void *s, uint8_t *a, uint8_t *b, int stride) | |
297 { | |
298 return pix_abs8x8_mvi(a, b, stride); | |
299 } | |
300 | |
1092 | 301 void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx) |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
302 { |
856
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
303 c->put_pixels_tab[0][0] = put_pixels16_axp_asm; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
304 c->put_pixels_tab[0][1] = put_pixels16_x2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
305 c->put_pixels_tab[0][2] = put_pixels16_y2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
306 c->put_pixels_tab[0][3] = put_pixels16_xy2_axp; |
670
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
307 |
856
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
308 c->put_no_rnd_pixels_tab[0][0] = put_pixels16_axp_asm; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
309 c->put_no_rnd_pixels_tab[0][1] = put_no_rnd_pixels16_x2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
310 c->put_no_rnd_pixels_tab[0][2] = put_no_rnd_pixels16_y2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
311 c->put_no_rnd_pixels_tab[0][3] = put_no_rnd_pixels16_xy2_axp; |
670
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
312 |
856
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
313 c->avg_pixels_tab[0][0] = avg_pixels16_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
314 c->avg_pixels_tab[0][1] = avg_pixels16_x2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
315 c->avg_pixels_tab[0][2] = avg_pixels16_y2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
316 c->avg_pixels_tab[0][3] = avg_pixels16_xy2_axp; |
670
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
317 |
856
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
318 c->avg_no_rnd_pixels_tab[0][0] = avg_no_rnd_pixels16_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
319 c->avg_no_rnd_pixels_tab[0][1] = avg_no_rnd_pixels16_x2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
320 c->avg_no_rnd_pixels_tab[0][2] = avg_no_rnd_pixels16_y2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
321 c->avg_no_rnd_pixels_tab[0][3] = avg_no_rnd_pixels16_xy2_axp; |
670
340e3ba84119
Synthesize pixels16 functions from pixels functions.
mellum
parents:
663
diff
changeset
|
322 |
856
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
323 c->put_pixels_tab[1][0] = put_pixels_axp_asm; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
324 c->put_pixels_tab[1][1] = put_pixels_x2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
325 c->put_pixels_tab[1][2] = put_pixels_y2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
326 c->put_pixels_tab[1][3] = put_pixels_xy2_axp; |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
327 |
856
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
328 c->put_no_rnd_pixels_tab[1][0] = put_pixels_axp_asm; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
329 c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels_x2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
330 c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels_y2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
331 c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels_xy2_axp; |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
332 |
856
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
333 c->avg_pixels_tab[1][0] = avg_pixels_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
334 c->avg_pixels_tab[1][1] = avg_pixels_x2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
335 c->avg_pixels_tab[1][2] = avg_pixels_y2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
336 c->avg_pixels_tab[1][3] = avg_pixels_xy2_axp; |
513 | 337 |
856
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
338 c->avg_no_rnd_pixels_tab[1][0] = avg_no_rnd_pixels_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
339 c->avg_no_rnd_pixels_tab[1][1] = avg_no_rnd_pixels_x2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
340 c->avg_no_rnd_pixels_tab[1][2] = avg_no_rnd_pixels_y2_axp; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
341 c->avg_no_rnd_pixels_tab[1][3] = avg_no_rnd_pixels_xy2_axp; |
513 | 342 |
856
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
343 c->clear_blocks = clear_blocks_axp; |
518 | 344 |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
345 /* amask clears all bits that correspond to present features. */ |
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
346 if (amask(AMASK_MVI) == 0) { |
856
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
347 c->put_pixels_clamped = put_pixels_clamped_mvi_asm; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
348 c->add_pixels_clamped = add_pixels_clamped_mvi_asm; |
586 | 349 |
856
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
350 c->get_pixels = get_pixels_mvi; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
351 c->diff_pixels = diff_pixels_mvi; |
986 | 352 c->sad[0] = sad16x16_mvi; |
353 c->sad[1] = sad8x8_mvi; | |
856
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
354 c->pix_abs8x8 = pix_abs8x8_mvi; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
355 c->pix_abs16x16 = pix_abs16x16_mvi_asm; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
356 c->pix_abs16x16_x2 = pix_abs16x16_x2_mvi; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
357 c->pix_abs16x16_y2 = pix_abs16x16_y2_mvi; |
3c6df37177dd
* using DSPContext - so each codec could use its local (sub)set of CPU extension
kabi
parents:
744
diff
changeset
|
358 c->pix_abs16x16_xy2 = pix_abs16x16_xy2_mvi; |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
359 } |
897 | 360 |
361 put_pixels_clamped_axp_p = c->put_pixels_clamped; | |
362 add_pixels_clamped_axp_p = c->add_pixels_clamped; | |
1092 | 363 |
364 c->idct_put = simple_idct_put_axp; | |
365 c->idct_add = simple_idct_add_axp; | |
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
diff
changeset
|
366 } |