Mercurial > libavcodec.hg
comparison mlib/dsputil_mlib.c @ 2979:bfabfdf9ce55 libavcodec
COSMETICS: tabs --> spaces, some prettyprinting
author | diego |
---|---|
date | Thu, 22 Dec 2005 01:10:11 +0000 |
parents | ef2149182f1c |
children | 0b546eab515d |
comparison
equal
deleted
inserted
replaced
2978:403183bbb505 | 2979:bfabfdf9ce55 |
---|---|
59 } | 59 } |
60 | 60 |
61 /* put block, width 16 pixel, height 8/16 */ | 61 /* put block, width 16 pixel, height 8/16 */ |
62 | 62 |
63 static void put_pixels16_mlib (uint8_t * dest, const uint8_t * ref, | 63 static void put_pixels16_mlib (uint8_t * dest, const uint8_t * ref, |
64 int stride, int height) | 64 int stride, int height) |
65 { | 65 { |
66 switch (height) { | 66 switch (height) { |
67 case 8: | 67 case 8: |
68 mlib_VideoCopyRef_U8_U8_16x8(dest, (uint8_t *)ref, stride); | 68 mlib_VideoCopyRef_U8_U8_16x8(dest, (uint8_t *)ref, stride); |
69 break; | 69 break; |
76 assert(0); | 76 assert(0); |
77 } | 77 } |
78 } | 78 } |
79 | 79 |
80 static void put_pixels16_x2_mlib (uint8_t * dest, const uint8_t * ref, | 80 static void put_pixels16_x2_mlib (uint8_t * dest, const uint8_t * ref, |
81 int stride, int height) | 81 int stride, int height) |
82 { | 82 { |
83 switch (height) { | 83 switch (height) { |
84 case 8: | 84 case 8: |
85 mlib_VideoInterpX_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride); | 85 mlib_VideoInterpX_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride); |
86 break; | 86 break; |
93 assert(0); | 93 assert(0); |
94 } | 94 } |
95 } | 95 } |
96 | 96 |
97 static void put_pixels16_y2_mlib (uint8_t * dest, const uint8_t * ref, | 97 static void put_pixels16_y2_mlib (uint8_t * dest, const uint8_t * ref, |
98 int stride, int height) | 98 int stride, int height) |
99 { | 99 { |
100 switch (height) { | 100 switch (height) { |
101 case 8: | 101 case 8: |
102 mlib_VideoInterpY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride); | 102 mlib_VideoInterpY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride); |
103 break; | 103 break; |
110 assert(0); | 110 assert(0); |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 static void put_pixels16_xy2_mlib(uint8_t * dest, const uint8_t * ref, | 114 static void put_pixels16_xy2_mlib(uint8_t * dest, const uint8_t * ref, |
115 int stride, int height) | 115 int stride, int height) |
116 { | 116 { |
117 switch (height) { | 117 switch (height) { |
118 case 8: | 118 case 8: |
119 mlib_VideoInterpXY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride); | 119 mlib_VideoInterpXY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride); |
120 break; | 120 break; |
129 } | 129 } |
130 | 130 |
131 /* put block, width 8 pixel, height 4/8/16 */ | 131 /* put block, width 8 pixel, height 4/8/16 */ |
132 | 132 |
133 static void put_pixels8_mlib (uint8_t * dest, const uint8_t * ref, | 133 static void put_pixels8_mlib (uint8_t * dest, const uint8_t * ref, |
134 int stride, int height) | 134 int stride, int height) |
135 { | 135 { |
136 switch (height) { | 136 switch (height) { |
137 case 4: | 137 case 4: |
138 mlib_VideoCopyRef_U8_U8_8x4(dest, (uint8_t *)ref, stride); | 138 mlib_VideoCopyRef_U8_U8_8x4(dest, (uint8_t *)ref, stride); |
139 break; | 139 break; |
150 assert(0); | 150 assert(0); |
151 } | 151 } |
152 } | 152 } |
153 | 153 |
154 static void put_pixels8_x2_mlib (uint8_t * dest, const uint8_t * ref, | 154 static void put_pixels8_x2_mlib (uint8_t * dest, const uint8_t * ref, |
155 int stride, int height) | 155 int stride, int height) |
156 { | 156 { |
157 switch (height) { | 157 switch (height) { |
158 case 4: | 158 case 4: |
159 mlib_VideoInterpX_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride); | 159 mlib_VideoInterpX_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride); |
160 break; | 160 break; |
171 assert(0); | 171 assert(0); |
172 } | 172 } |
173 } | 173 } |
174 | 174 |
175 static void put_pixels8_y2_mlib (uint8_t * dest, const uint8_t * ref, | 175 static void put_pixels8_y2_mlib (uint8_t * dest, const uint8_t * ref, |
176 int stride, int height) | 176 int stride, int height) |
177 { | 177 { |
178 switch (height) { | 178 switch (height) { |
179 case 4: | 179 case 4: |
180 mlib_VideoInterpY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride); | 180 mlib_VideoInterpY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride); |
181 break; | 181 break; |
192 assert(0); | 192 assert(0); |
193 } | 193 } |
194 } | 194 } |
195 | 195 |
196 static void put_pixels8_xy2_mlib(uint8_t * dest, const uint8_t * ref, | 196 static void put_pixels8_xy2_mlib(uint8_t * dest, const uint8_t * ref, |
197 int stride, int height) | 197 int stride, int height) |
198 { | 198 { |
199 switch (height) { | 199 switch (height) { |
200 case 4: | 200 case 4: |
201 mlib_VideoInterpXY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride); | 201 mlib_VideoInterpXY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride); |
202 break; | 202 break; |
215 } | 215 } |
216 | 216 |
217 /* average block, width 16 pixel, height 8/16 */ | 217 /* average block, width 16 pixel, height 8/16 */ |
218 | 218 |
219 static void avg_pixels16_mlib (uint8_t * dest, const uint8_t * ref, | 219 static void avg_pixels16_mlib (uint8_t * dest, const uint8_t * ref, |
220 int stride, int height) | 220 int stride, int height) |
221 { | 221 { |
222 switch (height) { | 222 switch (height) { |
223 case 8: | 223 case 8: |
224 mlib_VideoCopyRefAve_U8_U8_16x8(dest, (uint8_t *)ref, stride); | 224 mlib_VideoCopyRefAve_U8_U8_16x8(dest, (uint8_t *)ref, stride); |
225 break; | 225 break; |
232 assert(0); | 232 assert(0); |
233 } | 233 } |
234 } | 234 } |
235 | 235 |
236 static void avg_pixels16_x2_mlib (uint8_t * dest, const uint8_t * ref, | 236 static void avg_pixels16_x2_mlib (uint8_t * dest, const uint8_t * ref, |
237 int stride, int height) | 237 int stride, int height) |
238 { | 238 { |
239 switch (height) { | 239 switch (height) { |
240 case 8: | 240 case 8: |
241 mlib_VideoInterpAveX_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride); | 241 mlib_VideoInterpAveX_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride); |
242 break; | 242 break; |
249 assert(0); | 249 assert(0); |
250 } | 250 } |
251 } | 251 } |
252 | 252 |
253 static void avg_pixels16_y2_mlib (uint8_t * dest, const uint8_t * ref, | 253 static void avg_pixels16_y2_mlib (uint8_t * dest, const uint8_t * ref, |
254 int stride, int height) | 254 int stride, int height) |
255 { | 255 { |
256 switch (height) { | 256 switch (height) { |
257 case 8: | 257 case 8: |
258 mlib_VideoInterpAveY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride); | 258 mlib_VideoInterpAveY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride); |
259 break; | 259 break; |
266 assert(0); | 266 assert(0); |
267 } | 267 } |
268 } | 268 } |
269 | 269 |
270 static void avg_pixels16_xy2_mlib(uint8_t * dest, const uint8_t * ref, | 270 static void avg_pixels16_xy2_mlib(uint8_t * dest, const uint8_t * ref, |
271 int stride, int height) | 271 int stride, int height) |
272 { | 272 { |
273 switch (height) { | 273 switch (height) { |
274 case 8: | 274 case 8: |
275 mlib_VideoInterpAveXY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride); | 275 mlib_VideoInterpAveXY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride); |
276 break; | 276 break; |
285 } | 285 } |
286 | 286 |
287 /* average block, width 8 pixel, height 4/8/16 */ | 287 /* average block, width 8 pixel, height 4/8/16 */ |
288 | 288 |
289 static void avg_pixels8_mlib (uint8_t * dest, const uint8_t * ref, | 289 static void avg_pixels8_mlib (uint8_t * dest, const uint8_t * ref, |
290 int stride, int height) | 290 int stride, int height) |
291 { | 291 { |
292 switch (height) { | 292 switch (height) { |
293 case 4: | 293 case 4: |
294 mlib_VideoCopyRefAve_U8_U8_8x4(dest, (uint8_t *)ref, stride); | 294 mlib_VideoCopyRefAve_U8_U8_8x4(dest, (uint8_t *)ref, stride); |
295 break; | 295 break; |
306 assert(0); | 306 assert(0); |
307 } | 307 } |
308 } | 308 } |
309 | 309 |
310 static void avg_pixels8_x2_mlib (uint8_t * dest, const uint8_t * ref, | 310 static void avg_pixels8_x2_mlib (uint8_t * dest, const uint8_t * ref, |
311 int stride, int height) | 311 int stride, int height) |
312 { | 312 { |
313 switch (height) { | 313 switch (height) { |
314 case 4: | 314 case 4: |
315 mlib_VideoInterpAveX_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride); | 315 mlib_VideoInterpAveX_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride); |
316 break; | 316 break; |
327 assert(0); | 327 assert(0); |
328 } | 328 } |
329 } | 329 } |
330 | 330 |
331 static void avg_pixels8_y2_mlib (uint8_t * dest, const uint8_t * ref, | 331 static void avg_pixels8_y2_mlib (uint8_t * dest, const uint8_t * ref, |
332 int stride, int height) | 332 int stride, int height) |
333 { | 333 { |
334 switch (height) { | 334 switch (height) { |
335 case 4: | 335 case 4: |
336 mlib_VideoInterpAveY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride); | 336 mlib_VideoInterpAveY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride); |
337 break; | 337 break; |
348 assert(0); | 348 assert(0); |
349 } | 349 } |
350 } | 350 } |
351 | 351 |
352 static void avg_pixels8_xy2_mlib(uint8_t * dest, const uint8_t * ref, | 352 static void avg_pixels8_xy2_mlib(uint8_t * dest, const uint8_t * ref, |
353 int stride, int height) | 353 int stride, int height) |
354 { | 354 { |
355 switch (height) { | 355 switch (height) { |
356 case 4: | 356 case 4: |
357 mlib_VideoInterpAveXY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride); | 357 mlib_VideoInterpAveXY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride); |
358 break; | 358 break; |
448 } | 448 } |
449 | 449 |
450 void MPV_common_init_mlib(MpegEncContext *s) | 450 void MPV_common_init_mlib(MpegEncContext *s) |
451 { | 451 { |
452 if(s->avctx->dct_algo==FF_DCT_AUTO || s->avctx->dct_algo==FF_DCT_MLIB){ | 452 if(s->avctx->dct_algo==FF_DCT_AUTO || s->avctx->dct_algo==FF_DCT_MLIB){ |
453 s->dsp.fdct = ff_fdct_mlib; | 453 s->dsp.fdct = ff_fdct_mlib; |
454 } | 454 } |
455 | 455 |
456 if(s->avctx->idct_algo==FF_IDCT_AUTO || s->avctx->idct_algo==FF_IDCT_MLIB){ | 456 if(s->avctx->idct_algo==FF_IDCT_AUTO || s->avctx->idct_algo==FF_IDCT_MLIB){ |
457 s->dsp.idct_put= ff_idct_put_mlib; | 457 s->dsp.idct_put= ff_idct_put_mlib; |
458 s->dsp.idct_add= ff_idct_add_mlib; | 458 s->dsp.idct_add= ff_idct_add_mlib; |