Mercurial > libavcodec.hg
comparison ppc/dsputil_ppc.c @ 12473:06abedae2906 libavcodec
Merge has_altivec() function into mm_support(), remove it and use
mm_support() instead.
Reduce complexity and simplify pending move to libavutil.
author | stefano |
---|---|
date | Wed, 08 Sep 2010 10:02:40 +0000 |
parents | a5ddb39627fd |
children | 9fef0a8ddd63 |
comparison
equal
deleted
inserted
replaced
12472:9c9be94124f8 | 12473:06abedae2906 |
---|---|
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
21 */ | 21 */ |
22 | 22 |
23 #include "libavcodec/dsputil.h" | 23 #include "libavcodec/dsputil.h" |
24 #include "dsputil_altivec.h" | 24 #include "dsputil_altivec.h" |
25 | |
26 int mm_support(void) | |
27 { | |
28 int result = 0; | |
29 #if HAVE_ALTIVEC | |
30 if (has_altivec()) { | |
31 result |= AV_CPU_FLAG_ALTIVEC; | |
32 } | |
33 #endif /* result */ | |
34 return result; | |
35 } | |
36 | 25 |
37 /* ***** WARNING ***** WARNING ***** WARNING ***** */ | 26 /* ***** WARNING ***** WARNING ***** WARNING ***** */ |
38 /* | 27 /* |
39 clear_blocks_dcbz32_ppc will not work properly on PowerPC processors with a | 28 clear_blocks_dcbz32_ppc will not work properly on PowerPC processors with a |
40 cache line size not equal to 32 bytes. | 29 cache line size not equal to 32 bytes. |
177 } | 166 } |
178 | 167 |
179 #if HAVE_ALTIVEC | 168 #if HAVE_ALTIVEC |
180 if(CONFIG_H264_DECODER) dsputil_h264_init_ppc(c, avctx); | 169 if(CONFIG_H264_DECODER) dsputil_h264_init_ppc(c, avctx); |
181 | 170 |
182 if (has_altivec()) { | 171 if (mm_support() & AV_CPU_FLAG_ALTIVEC) { |
183 dsputil_init_altivec(c, avctx); | 172 dsputil_init_altivec(c, avctx); |
184 if(CONFIG_VC1_DECODER) | 173 if(CONFIG_VC1_DECODER) |
185 vc1dsp_init_altivec(c, avctx); | 174 vc1dsp_init_altivec(c, avctx); |
186 float_init_altivec(c, avctx); | 175 float_init_altivec(c, avctx); |
187 int_init_altivec(c, avctx); | 176 int_init_altivec(c, avctx); |