comparison x86/cavsdsp_mmx.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 a5ddb39627fd
children
comparison
equal deleted inserted replaced
12474:cf54b8e98e7a 12475:9fef0a8ddd63
21 * License along with FFmpeg; if not, write to the Free Software 21 * License along with FFmpeg; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 */ 23 */
24 24
25 #include "libavutil/common.h" 25 #include "libavutil/common.h"
26 #include "libavutil/cpu.h"
26 #include "libavutil/x86_cpu.h" 27 #include "libavutil/x86_cpu.h"
27 #include "libavcodec/dsputil.h" 28 #include "libavcodec/dsputil.h"
28 #include "libavcodec/cavsdsp.h" 29 #include "libavcodec/cavsdsp.h"
29 #include "dsputil_mmx.h" 30 #include "dsputil_mmx.h"
30 31
470 c->cavs_idct8_add = cavs_idct8_add_mmx; 471 c->cavs_idct8_add = cavs_idct8_add_mmx;
471 } 472 }
472 473
473 void ff_cavsdsp_init_mmx(CAVSDSPContext *c, AVCodecContext *avctx) 474 void ff_cavsdsp_init_mmx(CAVSDSPContext *c, AVCodecContext *avctx)
474 { 475 {
475 int mm_flags = mm_support(); 476 int mm_flags = av_get_cpu_flags();
476 477
477 if (mm_flags & AV_CPU_FLAG_MMX2) ff_cavsdsp_init_mmx2 (c, avctx); 478 if (mm_flags & AV_CPU_FLAG_MMX2) ff_cavsdsp_init_mmx2 (c, avctx);
478 if (mm_flags & AV_CPU_FLAG_3DNOW) ff_cavsdsp_init_3dnow(c, avctx); 479 if (mm_flags & AV_CPU_FLAG_3DNOW) ff_cavsdsp_init_3dnow(c, avctx);
479 } 480 }