Mercurial > libavcodec.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
2775:f3cdd51c9e16 | 2776:930e56f92c57 |
---|---|
124 static void nop(uint8_t *block, const uint8_t *pixels, int line_size, int h) | 124 static void nop(uint8_t *block, const uint8_t *pixels, int line_size, int h) |
125 { | 125 { |
126 return; | 126 return; |
127 } | 127 } |
128 | 128 |
129 int mm_flags; /* multimedia extension flags */ | |
130 | |
131 int mm_support(void) | |
132 { | |
133 return 0; /* TODO, implement proper detection */ | |
134 } | |
135 | |
129 void dsputil_init_iwmmxt(DSPContext* c, AVCodecContext *avctx) | 136 void dsputil_init_iwmmxt(DSPContext* c, AVCodecContext *avctx) |
130 { | 137 { |
138 mm_flags = mm_support(); | |
139 | |
140 if (avctx->dsp_mask) { | |
141 if (avctx->dsp_mask & FF_MM_FORCE) | |
142 mm_flags |= (avctx->dsp_mask & 0xffff); | |
143 else | |
144 mm_flags &= ~(avctx->dsp_mask & 0xffff); | |
145 } | |
146 | |
147 if (!(mm_flags & MM_IWMMXT)) return; | |
148 | |
131 c->add_pixels_clamped = add_pixels_clamped_iwmmxt; | 149 c->add_pixels_clamped = add_pixels_clamped_iwmmxt; |
132 | 150 |
133 c->put_pixels_tab[0][0] = put_pixels16_iwmmxt; | 151 c->put_pixels_tab[0][0] = put_pixels16_iwmmxt; |
134 c->put_pixels_tab[0][1] = put_pixels16_x2_iwmmxt; | 152 c->put_pixels_tab[0][1] = put_pixels16_x2_iwmmxt; |
135 c->put_pixels_tab[0][2] = put_pixels16_y2_iwmmxt; | 153 c->put_pixels_tab[0][2] = put_pixels16_y2_iwmmxt; |