diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-08-20 14:39:36 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-08-29 13:07:37 +0200 |
commit | 79aec43ce813a3e270743ca64fa3f31fa43df80b (patch) | |
tree | e0fabc70b0403906bdc75a28abe7c91e8f5b2ce7 /libswscale | |
parent | a6b650118543e1580e872896d8976042b7c32d01 (diff) | |
download | ffmpeg-79aec43ce813a3e270743ca64fa3f31fa43df80b.tar.gz |
x86: Add and use more convenience macros to check CPU extension availability
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/utils.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 403c1381e8..27819854e4 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1120,9 +1120,8 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, } else #endif /* HAVE_MMXEXT_INLINE */ { - const int filterAlign = - (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? 4 : - PPC_ALTIVEC(cpu_flags) ? 8 : 1; + const int filterAlign = X86_MMX(cpu_flags) ? 4 : + PPC_ALTIVEC(cpu_flags) ? 8 : 1; if (initFilter(&c->hLumFilter, &c->hLumFilterPos, &c->hLumFilterSize, c->lumXInc, @@ -1143,9 +1142,8 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, /* precalculate vertical scaler filter coefficients */ { - const int filterAlign = - (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) ? 2 : - PPC_ALTIVEC(cpu_flags) ? 8 : 1; + const int filterAlign = X86_MMX(cpu_flags) ? 2 : + PPC_ALTIVEC(cpu_flags) ? 8 : 1; if (initFilter(&c->vLumFilter, &c->vLumFilterPos, &c->vLumFilterSize, c->lumYInc, srcH, dstH, filterAlign, (1 << 12), |