comparison x86/dsputilenc_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 c5ffa8b81f9c
comparison
equal deleted inserted replaced
12474:cf54b8e98e7a 12475:9fef0a8ddd63
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 * MMX optimization by Nick Kurshev <nickols_k@mail.ru> 22 * MMX optimization by Nick Kurshev <nickols_k@mail.ru>
23 */ 23 */
24 24
25 #include "libavutil/cpu.h"
25 #include "libavutil/x86_cpu.h" 26 #include "libavutil/x86_cpu.h"
26 #include "libavcodec/dsputil.h" 27 #include "libavcodec/dsputil.h"
27 #include "libavcodec/mpegvideo.h" 28 #include "libavcodec/mpegvideo.h"
28 #include "libavcodec/mathops.h" 29 #include "libavcodec/mathops.h"
29 #include "dsputil_mmx.h" 30 #include "dsputil_mmx.h"
1348 #endif //HAVE_SSSE3 1349 #endif //HAVE_SSSE3
1349 1350
1350 1351
1351 void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) 1352 void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
1352 { 1353 {
1353 int mm_flags = mm_support(); 1354 int mm_flags = av_get_cpu_flags();
1354 1355
1355 if (mm_flags & AV_CPU_FLAG_MMX) { 1356 if (mm_flags & AV_CPU_FLAG_MMX) {
1356 const int dct_algo = avctx->dct_algo; 1357 const int dct_algo = avctx->dct_algo;
1357 if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){ 1358 if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){
1358 if(mm_flags & AV_CPU_FLAG_SSE2){ 1359 if(mm_flags & AV_CPU_FLAG_SSE2){