changeset 9342:7f594601d5e9 libavcodec

Rename FF_MM_MMXEXT to FF_MM_MMX2, for both clarity and consistency with libswscale.
author stefano
date Sat, 04 Apr 2009 13:20:53 +0000
parents 06532529c428
children dfe2d348aa50
files avcodec.h motion-test.c x86/cpuid.c x86/dsputil_mmx.c x86/dsputilenc_mmx.c x86/motion_est_mmx.c x86/mpegvideo_mmx.c
diffstat 7 files changed, 19 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Fri Apr 03 14:03:49 2009 +0000
+++ b/avcodec.h	Sat Apr 04 13:20:53 2009 +0000
@@ -30,7 +30,7 @@
 #include "libavutil/avutil.h"
 
 #define LIBAVCODEC_VERSION_MAJOR 52
-#define LIBAVCODEC_VERSION_MINOR 23
+#define LIBAVCODEC_VERSION_MINOR 24
 #define LIBAVCODEC_VERSION_MICRO  0
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -1456,7 +1456,10 @@
     /* lower 16 bits - CPU features */
 #define FF_MM_MMX      0x0001 ///< standard MMX
 #define FF_MM_3DNOW    0x0004 ///< AMD 3DNOW
+#if LIBAVCODEC_VERSION_MAJOR < 53
 #define FF_MM_MMXEXT   0x0002 ///< SSE integer functions or AMD MMX ext
+#endif
+#define FF_MM_MMX2     0x0002 ///< SSE integer functions or AMD MMX ext
 #define FF_MM_SSE      0x0008 ///< SSE functions
 #define FF_MM_SSE2     0x0010 ///< PIV SSE2 functions
 #define FF_MM_3DNOWEXT 0x0020 ///< AMD 3DNowExt
--- a/motion-test.c	Fri Apr 03 14:03:49 2009 +0000
+++ b/motion-test.c	Sat Apr 04 13:20:53 2009 +0000
@@ -127,7 +127,7 @@
     AVCodecContext *ctx;
     int c;
     DSPContext cctx, mmxctx;
-    int flags[2] = { FF_MM_MMX, FF_MM_MMXEXT };
+    int flags[2] = { FF_MM_MMX, FF_MM_MMX2 };
 
     for(;;) {
         c = getopt(argc, argv, "h");
--- a/x86/cpuid.c	Fri Apr 03 14:03:49 2009 +0000
+++ b/x86/cpuid.c	Sat Apr 04 13:20:53 2009 +0000
@@ -77,7 +77,7 @@
         if (std_caps & (1<<23))
             rval |= FF_MM_MMX;
         if (std_caps & (1<<25))
-            rval |= FF_MM_MMXEXT
+            rval |= FF_MM_MMX2
 #if HAVE_SSE
                   | FF_MM_SSE;
         if (std_caps & (1<<26))
@@ -105,13 +105,13 @@
         if (ext_caps & (1<<23))
             rval |= FF_MM_MMX;
         if (ext_caps & (1<<22))
-            rval |= FF_MM_MMXEXT;
+            rval |= FF_MM_MMX2;
     }
 
 #if 0
     av_log(NULL, AV_LOG_DEBUG, "%s%s%s%s%s%s%s%s%s%s\n",
         (rval&FF_MM_MMX) ? "MMX ":"",
-        (rval&FF_MM_MMXEXT) ? "MMX2 ":"",
+        (rval&FF_MM_MMX2) ? "MMX2 ":"",
         (rval&FF_MM_SSE) ? "SSE ":"",
         (rval&FF_MM_SSE2) ? "SSE2 ":"",
         (rval&FF_MM_SSE3) ? "SSE3 ":"",
--- a/x86/dsputil_mmx.c	Fri Apr 03 14:03:49 2009 +0000
+++ b/x86/dsputil_mmx.c	Sat Apr 04 13:20:53 2009 +0000
@@ -2591,8 +2591,8 @@
     av_log(avctx, AV_LOG_INFO, "libavcodec: CPU flags:");
     if (mm_flags & FF_MM_MMX)
         av_log(avctx, AV_LOG_INFO, " mmx");
-    if (mm_flags & FF_MM_MMXEXT)
-        av_log(avctx, AV_LOG_INFO, " mmxext");
+    if (mm_flags & FF_MM_MMX2)
+        av_log(avctx, AV_LOG_INFO, " mmx2");
     if (mm_flags & FF_MM_3DNOW)
         av_log(avctx, AV_LOG_INFO, " 3dnow");
     if (mm_flags & FF_MM_SSE)
@@ -2613,7 +2613,7 @@
                 c->idct_permutation_type= FF_SIMPLE_IDCT_PERM;
 #if CONFIG_GPL
             }else if(idct_algo==FF_IDCT_LIBMPEG2MMX){
-                if(mm_flags & FF_MM_MMXEXT){
+                if(mm_flags & FF_MM_MMX2){
                     c->idct_put= ff_libmpeg2mmx2_idct_put;
                     c->idct_add= ff_libmpeg2mmx2_idct_add;
                     c->idct    = ff_mmxext_idct;
@@ -2645,7 +2645,7 @@
                     c->idct_add= ff_idct_xvid_sse2_add;
                     c->idct    = ff_idct_xvid_sse2;
                     c->idct_permutation_type= FF_SSE2_IDCT_PERM;
-                }else if(mm_flags & FF_MM_MMXEXT){
+                }else if(mm_flags & FF_MM_MMX2){
                     c->idct_put= ff_idct_xvid_mmx2_put;
                     c->idct_add= ff_idct_xvid_mmx2_add;
                     c->idct    = ff_idct_xvid_mmx2;
@@ -2712,7 +2712,7 @@
             c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx;
         }
 
-        if (mm_flags & FF_MM_MMXEXT) {
+        if (mm_flags & FF_MM_MMX2) {
             c->prefetch = prefetch_mmx2;
 
             c->put_pixels_tab[0][1] = put_pixels16_x2_mmx2;
@@ -2949,7 +2949,7 @@
 #endif
 
 #if CONFIG_GPL && HAVE_YASM
-        if( mm_flags&FF_MM_MMXEXT ){
+        if (mm_flags & FF_MM_MMX2){
 #if ARCH_X86_32
             c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_mmxext;
             c->h264_h_loop_filter_luma_intra = ff_x264_deblock_h_luma_intra_mmxext;
@@ -2977,7 +2977,7 @@
             c->inner_add_yblock = ff_snow_inner_add_yblock_sse2;
         }
         else{
-            if(mm_flags & FF_MM_MMXEXT){
+            if(mm_flags & FF_MM_MMX2){
             c->horizontal_compose97i = ff_snow_horizontal_compose97i_mmx;
 #if HAVE_7REGS
             c->vertical_compose97i = ff_snow_vertical_compose97i_mmx;
--- a/x86/dsputilenc_mmx.c	Fri Apr 03 14:03:49 2009 +0000
+++ b/x86/dsputilenc_mmx.c	Sat Apr 04 13:20:53 2009 +0000
@@ -1360,7 +1360,7 @@
         if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){
             if(mm_flags & FF_MM_SSE2){
                 c->fdct = ff_fdct_sse2;
-            }else if(mm_flags & FF_MM_MMXEXT){
+            }else if(mm_flags & FF_MM_MMX2){
                 c->fdct = ff_fdct_mmx2;
             }else{
                 c->fdct = ff_fdct_mmx;
@@ -1396,7 +1396,7 @@
         c->ssd_int8_vs_int16 = ssd_int8_vs_int16_mmx;
 
 
-        if (mm_flags & FF_MM_MMXEXT) {
+        if (mm_flags & FF_MM_MMX2) {
             c->sum_abs_dctelem= sum_abs_dctelem_mmx2;
             c->hadamard8_diff[0]= hadamard8_diff16_mmx2;
             c->hadamard8_diff[1]= hadamard8_diff_mmx2;
--- a/x86/motion_est_mmx.c	Fri Apr 03 14:03:49 2009 +0000
+++ b/x86/motion_est_mmx.c	Sat Apr 04 13:20:53 2009 +0000
@@ -439,7 +439,7 @@
         c->sad[0]= sad16_mmx;
         c->sad[1]= sad8_mmx;
     }
-    if (mm_flags & FF_MM_MMXEXT) {
+    if (mm_flags & FF_MM_MMX2) {
         c->pix_abs[0][0] = sad16_mmx2;
         c->pix_abs[1][0] = sad8_mmx2;
 
--- a/x86/mpegvideo_mmx.c	Fri Apr 03 14:03:49 2009 +0000
+++ b/x86/mpegvideo_mmx.c	Sat Apr 04 13:20:53 2009 +0000
@@ -650,7 +650,7 @@
 #endif
             if(mm_flags & FF_MM_SSE2){
                 s->dct_quantize= dct_quantize_SSE2;
-            } else if(mm_flags & FF_MM_MMXEXT){
+            } else if(mm_flags & FF_MM_MMX2){
                 s->dct_quantize= dct_quantize_MMX2;
             } else {
                 s->dct_quantize= dct_quantize_MMX;