summaryrefslogtreecommitdiff
path: root/libavcodec/x86/proresdsp_init.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-08-29 19:01:05 +0200
committerDiego Biurrun <diego@biurrun.de>2012-09-08 18:18:34 +0200
commite0c6cce44729d94e2a5507a4b6d031f23e8bd7b6 (patch)
tree5118ee396e1879c3f90dfc1898e9bbd868e4b583 /libavcodec/x86/proresdsp_init.c
parent6a0200f24de51eeb94a3a1f75ee105786a6e088d (diff)
x86: Replace checks for CPU extensions and flags by convenience macros
This separates code relying on inline from that relying on external assembly and fixes instances where the coalesced check was incorrect.
Diffstat (limited to 'libavcodec/x86/proresdsp_init.c')
-rw-r--r--libavcodec/x86/proresdsp_init.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libavcodec/x86/proresdsp_init.c b/libavcodec/x86/proresdsp_init.c
index f202f9f0cf..46c26bdc56 100644
--- a/libavcodec/x86/proresdsp_init.c
+++ b/libavcodec/x86/proresdsp_init.c
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/x86/cpu.h"
#include "libavcodec/proresdsp.h"
void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize,
@@ -31,24 +32,22 @@ void ff_prores_idct_put_10_avx (uint16_t *dst, int linesize,
void ff_proresdsp_x86_init(ProresDSPContext *dsp)
{
-#if ARCH_X86_64 && HAVE_YASM
+#if ARCH_X86_64
int flags = av_get_cpu_flags();
- if (flags & AV_CPU_FLAG_SSE2) {
+ if (EXTERNAL_SSE2(flags)) {
dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
dsp->idct_put = ff_prores_idct_put_10_sse2;
}
- if (flags & AV_CPU_FLAG_SSE4) {
+ if (EXTERNAL_SSE4(flags)) {
dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
dsp->idct_put = ff_prores_idct_put_10_sse4;
}
-#if HAVE_AVX
- if (flags & AV_CPU_FLAG_AVX) {
+ if (EXTERNAL_AVX(flags)) {
dsp->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
dsp->idct_put = ff_prores_idct_put_10_avx;
}
-#endif /* HAVE_AVX */
-#endif /* ARCH_X86_64 && HAVE_YASM */
+#endif /* ARCH_X86_64 */
}