Commit 6b434361 authored by Stefano Sabatini's avatar Stefano Sabatini

Rename FF_MM_MMXEXT to FF_MM_MMX2, for both clarity and consistency

with libswscale.

Originally committed as revision 18330 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1b2120c3
......@@ -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 @@ typedef struct AVCodecContext {
/* 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
......
......@@ -127,7 +127,7 @@ int main(int argc, char **argv)
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");
......
......@@ -77,7 +77,7 @@ int mm_support(void)
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 @@ int mm_support(void)
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 ":"",
......
......@@ -2591,8 +2591,8 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
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 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
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 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
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 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
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 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
#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 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
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;
......
......@@ -1360,7 +1360,7 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
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 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
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;
......
......@@ -439,7 +439,7 @@ void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx)
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;
......
......@@ -650,7 +650,7 @@ void MPV_common_init_mmx(MpegEncContext *s)
#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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment