Mercurial > libavcodec.hg
comparison ppc/mpegvideo_altivec.c @ 12475:9fef0a8ddd63 libavcodec
Move mm_support() from libavcodec to libavutil, make it a public
function and rename it to av_get_cpu_flags().
author | stefano |
---|---|
date | Wed, 08 Sep 2010 15:07:14 +0000 |
parents | 06abedae2906 |
children |
comparison
equal
deleted
inserted
replaced
12474:cf54b8e98e7a | 12475:9fef0a8ddd63 |
---|---|
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
22 */ | 22 */ |
23 | 23 |
24 #include <stdlib.h> | 24 #include <stdlib.h> |
25 #include <stdio.h> | 25 #include <stdio.h> |
26 #include "libavutil/cpu.h" | |
26 #include "libavcodec/dsputil.h" | 27 #include "libavcodec/dsputil.h" |
27 #include "libavcodec/mpegvideo.h" | 28 #include "libavcodec/mpegvideo.h" |
28 | 29 |
29 #include "util_altivec.h" | 30 #include "util_altivec.h" |
30 #include "types_altivec.h" | 31 #include "types_altivec.h" |
568 } | 569 } |
569 | 570 |
570 | 571 |
571 void MPV_common_init_altivec(MpegEncContext *s) | 572 void MPV_common_init_altivec(MpegEncContext *s) |
572 { | 573 { |
573 if (!(mm_support() & AV_CPU_FLAG_ALTIVEC)) return; | 574 if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) return; |
574 | 575 |
575 if (s->avctx->lowres==0) { | 576 if (s->avctx->lowres==0) { |
576 if ((s->avctx->idct_algo == FF_IDCT_AUTO) || | 577 if ((s->avctx->idct_algo == FF_IDCT_AUTO) || |
577 (s->avctx->idct_algo == FF_IDCT_ALTIVEC)) { | 578 (s->avctx->idct_algo == FF_IDCT_ALTIVEC)) { |
578 s->dsp.idct_put = idct_put_altivec; | 579 s->dsp.idct_put = idct_put_altivec; |