diff options
author | Gildas Bazin <gbazi@altern.org> | 2005-06-28 22:46:36 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-06-28 22:46:36 +0000 |
commit | eba9ae3cfcfb924e2dd6e6c45838e73181bd1430 (patch) | |
tree | 8b76726c4a504880d78b894125cd36822c525fb8 /libavcodec/armv4l | |
parent | b4cad5371b72027627220e96b79ec0d65b2debe5 (diff) | |
download | ffmpeg-streaming-eba9ae3cfcfb924e2dd6e6c45838e73181bd1430.zip ffmpeg-streaming-eba9ae3cfcfb924e2dd6e6c45838e73181bd1430.tar.gz |
IWMMXT configure support + runtime selection patch by (Gildas Bazin, gbazin : altern org)
Originally committed as revision 4409 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/armv4l')
-rw-r--r-- | libavcodec/armv4l/dsputil_arm.c | 2 | ||||
-rw-r--r-- | libavcodec/armv4l/dsputil_iwmmxt.c | 18 | ||||
-rw-r--r-- | libavcodec/armv4l/mpegvideo_iwmmxt.c | 2 |
3 files changed, 20 insertions, 2 deletions
diff --git a/libavcodec/armv4l/dsputil_arm.c b/libavcodec/armv4l/dsputil_arm.c index 4ba6280..0195c3c 100644 --- a/libavcodec/armv4l/dsputil_arm.c +++ b/libavcodec/armv4l/dsputil_arm.c @@ -240,9 +240,7 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx) c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_arm; //OK /* c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels8_xy2_arm;//NG */ -#if 1 #ifdef HAVE_IWMMXT dsputil_init_iwmmxt(c, avctx); #endif -#endif } diff --git a/libavcodec/armv4l/dsputil_iwmmxt.c b/libavcodec/armv4l/dsputil_iwmmxt.c index 6e2465d..99a55e7 100644 --- a/libavcodec/armv4l/dsputil_iwmmxt.c +++ b/libavcodec/armv4l/dsputil_iwmmxt.c @@ -126,8 +126,26 @@ static void nop(uint8_t *block, const uint8_t *pixels, int line_size, int h) 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; diff --git a/libavcodec/armv4l/mpegvideo_iwmmxt.c b/libavcodec/armv4l/mpegvideo_iwmmxt.c index 0f4c99e..9724de8 100644 --- a/libavcodec/armv4l/mpegvideo_iwmmxt.c +++ b/libavcodec/armv4l/mpegvideo_iwmmxt.c @@ -90,6 +90,8 @@ static void dct_unquantize_h263_inter_iwmmxt(MpegEncContext *s, void MPV_common_init_iwmmxt(MpegEncContext *s) { + if (!(mm_flags & MM_IWMMXT)) return; + s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_iwmmxt; #if 0 s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_iwmmxt; |