comparison ppc/dsputil_ppc.c @ 1578:6a4cfc5f9f96 libavcodec

AltiVec optimized fdct patch by (James Klicman <james at klicman dot org>)
author michael
date Sun, 26 Oct 2003 10:14:05 +0000
parents 587258262aa5
children dea5b2946999
comparison
equal deleted inserted replaced
1577:dbd0ede6623d 1578:6a4cfc5f9f96
23 23
24 #ifdef HAVE_ALTIVEC 24 #ifdef HAVE_ALTIVEC
25 #include "dsputil_altivec.h" 25 #include "dsputil_altivec.h"
26 #endif 26 #endif
27 27
28 extern void fdct_altivec(int16_t *block);
28 extern void idct_put_altivec(uint8_t *dest, int line_size, int16_t *block); 29 extern void idct_put_altivec(uint8_t *dest, int line_size, int16_t *block);
29 extern void idct_add_altivec(uint8_t *dest, int line_size, int16_t *block); 30 extern void idct_add_altivec(uint8_t *dest, int line_size, int16_t *block);
30 31
31 int mm_flags = 0; 32 int mm_flags = 0;
32 33
46 /* list below must match enum in dsputil_ppc.h */ 47 /* list below must match enum in dsputil_ppc.h */
47 static unsigned char* perfname[] = { 48 static unsigned char* perfname[] = {
48 "fft_calc_altivec", 49 "fft_calc_altivec",
49 "gmc1_altivec", 50 "gmc1_altivec",
50 "dct_unquantize_h263_altivec", 51 "dct_unquantize_h263_altivec",
52 "fdct_altivec",
51 "idct_add_altivec", 53 "idct_add_altivec",
52 "idct_put_altivec", 54 "idct_put_altivec",
53 "put_pixels16_altivec", 55 "put_pixels16_altivec",
54 "avg_pixels16_altivec", 56 "avg_pixels16_altivec",
55 "avg_pixels8_altivec", 57 "avg_pixels8_altivec",
268 c->put_pixels_tab[0][3] = put_pixels16_xy2_altivec; 270 c->put_pixels_tab[0][3] = put_pixels16_xy2_altivec;
269 c->put_no_rnd_pixels_tab[0][3] = put_no_rnd_pixels16_xy2_altivec; 271 c->put_no_rnd_pixels_tab[0][3] = put_no_rnd_pixels16_xy2_altivec;
270 272
271 c->gmc1 = gmc1_altivec; 273 c->gmc1 = gmc1_altivec;
272 274
275 #ifdef CONFIG_ENCODERS
276 if (avctx->dct_algo == FF_DCT_AUTO ||
277 avctx->dct_algo == FF_DCT_ALTIVEC)
278 {
279 c->fdct = fdct_altivec;
280 }
281 #endif //CONFIG_ENCODERS
282
273 if ((avctx->idct_algo == FF_IDCT_AUTO) || 283 if ((avctx->idct_algo == FF_IDCT_AUTO) ||
274 (avctx->idct_algo == FF_IDCT_ALTIVEC)) 284 (avctx->idct_algo == FF_IDCT_ALTIVEC))
275 { 285 {
276 c->idct_put = idct_put_altivec; 286 c->idct_put = idct_put_altivec;
277 c->idct_add = idct_add_altivec; 287 c->idct_add = idct_add_altivec;