Mercurial > libavcodec.hg
diff armv4l/dsputil_iwmmxt.c @ 2776:930e56f92c57 libavcodec
IWMMXT configure support + runtime selection patch by (Gildas Bazin, gbazin : altern org)
author | michael |
---|---|
date | Tue, 28 Jun 2005 22:46:36 +0000 |
parents | aeea63c97878 |
children | bfabfdf9ce55 |
line wrap: on
line diff
--- a/armv4l/dsputil_iwmmxt.c Tue Jun 28 14:56:16 2005 +0000 +++ b/armv4l/dsputil_iwmmxt.c Tue Jun 28 22:46:36 2005 +0000 @@ -126,8 +126,26 @@ return; } +int mm_flags; /* multimedia extension flags */ + +int mm_support(void) +{ + return 0; /* TODO, implement proper detection */ +} + void dsputil_init_iwmmxt(DSPContext* c, AVCodecContext *avctx) { + mm_flags = mm_support(); + + if (avctx->dsp_mask) { + if (avctx->dsp_mask & FF_MM_FORCE) + mm_flags |= (avctx->dsp_mask & 0xffff); + else + mm_flags &= ~(avctx->dsp_mask & 0xffff); + } + + if (!(mm_flags & MM_IWMMXT)) return; + c->add_pixels_clamped = add_pixels_clamped_iwmmxt; c->put_pixels_tab[0][0] = put_pixels16_iwmmxt;