summaryrefslogtreecommitdiff
path: root/libavcodec/x86
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-31 13:18:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-31 13:34:32 +0200
commitc617bed34f39a122ab1f89581ddce9cc63885383 (patch)
treeed2c0bd467f5f5c912ac46a2b95457a5647ced75 /libavcodec/x86
parent98298eb1034bddb4557fa689553dae793c2b0092 (diff)
parentede3d6400d7c06863e6eb4bcff5f676480ae6b5e (diff)
downloadffmpeg-c617bed34f39a122ab1f89581ddce9cc63885383.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: MSS1 and MSS2: set final pixel format after common stuff has been initialised MSS2 decoder configure: handle --disable-asm before check_deps x86: Split inline and external assembly #ifdefs configure: x86: Separate inline from standalone assembler capabilities pktdumper: Use a custom define instead of PATH_MAX for buffers pktdumper: Use av_strlcpy instead of strncpy pktdumper: Use sizeof(variable) instead of the direct buffer length Conflicts: Changelog configure libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/codec_desc.c libavcodec/dct-test.c libavcodec/imgconvert.c libavcodec/mss12.c libavcodec/version.h libavfilter/x86/gradfun.c libswscale/x86/yuv2rgb.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86')
-rw-r--r--libavcodec/x86/ac3dsp.asm8
-rw-r--r--libavcodec/x86/dct32.asm2
-rw-r--r--libavcodec/x86/dsputil.asm6
-rw-r--r--libavcodec/x86/dsputil_mmx.c21
-rw-r--r--libavcodec/x86/dsputilenc_mmx.c8
-rw-r--r--libavcodec/x86/fft.asm8
-rw-r--r--libavcodec/x86/h264_chromamc_10bit.asm4
-rw-r--r--libavcodec/x86/h264_idct_10bit.asm16
-rw-r--r--libavcodec/x86/h264_intrapred_10bit.asm26
-rw-r--r--libavcodec/x86/h264_qpel.c4
-rw-r--r--libavcodec/x86/h264dsp_init.c10
-rw-r--r--libavcodec/x86/mpegvideoenc.c30
12 files changed, 68 insertions, 75 deletions
diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm
index acbab35cae..9eaf743b4b 100644
--- a/libavcodec/x86/ac3dsp.asm
+++ b/libavcodec/x86/ac3dsp.asm
@@ -73,7 +73,7 @@ AC3_EXPONENT_MIN mmx
%define LOOP_ALIGN ALIGN 16
AC3_EXPONENT_MIN mmxext
%endif
-%if HAVE_SSE
+%if HAVE_SSE2_EXTERNAL
INIT_XMM
AC3_EXPONENT_MIN sse2
%endif
@@ -385,7 +385,7 @@ cglobal ac3_compute_mantissa_size_sse2, 1,2,4, mant_cnt, sum
pabsd %1, %1
%endmacro
-%if HAVE_AMD3DNOW
+%if HAVE_AMD3DNOW_EXTERNAL
INIT_MMX
cglobal ac3_extract_exponents_3dnow, 3,3,0, exp, coef, len
add expq, lenq
@@ -453,11 +453,11 @@ cglobal ac3_extract_exponents_%1, 3,3,4, exp, coef, len
REP_RET
%endmacro
-%if HAVE_SSE
+%if HAVE_SSE2_EXTERNAL
INIT_XMM
%define PABSD PABSD_MMX
AC3_EXTRACT_EXPONENTS sse2
-%if HAVE_SSSE3
+%if HAVE_SSSE3_EXTERNAL
%define PABSD PABSD_SSSE3
AC3_EXTRACT_EXPONENTS ssse3
%endif
diff --git a/libavcodec/x86/dct32.asm b/libavcodec/x86/dct32.asm
index 02b5f3fc89..91ea493dc7 100644
--- a/libavcodec/x86/dct32.asm
+++ b/libavcodec/x86/dct32.asm
@@ -193,7 +193,7 @@ ps_p1p1m1m1: dd 0, 0, 0x80000000, 0x80000000, 0, 0, 0x80000000, 0x80000000
INIT_YMM avx
SECTION_TEXT
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
; void ff_dct32_float_avx(FFTSample *out, const FFTSample *in)
cglobal dct32_float, 2,3,8, out, in, tmp
; pass 1
diff --git a/libavcodec/x86/dsputil.asm b/libavcodec/x86/dsputil.asm
index 19884a36a8..af7669ac5b 100644
--- a/libavcodec/x86/dsputil.asm
+++ b/libavcodec/x86/dsputil.asm
@@ -1169,7 +1169,7 @@ ALIGN 16
INIT_XMM sse
VECTOR_FMUL_REVERSE
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_YMM avx
VECTOR_FMUL_REVERSE
%endif
@@ -1199,7 +1199,7 @@ ALIGN 16
INIT_XMM sse
VECTOR_FMUL_ADD
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_YMM avx
VECTOR_FMUL_ADD
%endif
@@ -1245,7 +1245,7 @@ cglobal butterflies_float_interleave, 4,4,3, dst, src0, src1, len
INIT_XMM sse
BUTTERFLIES_FLOAT_INTERLEAVE
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_YMM avx
BUTTERFLIES_FLOAT_INTERLEAVE
%endif
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
index 5997adcb3a..d293e19b59 100644
--- a/libavcodec/x86/dsputil_mmx.c
+++ b/libavcodec/x86/dsputil_mmx.c
@@ -2942,7 +2942,7 @@ static void dsputil_init_3dnow(DSPContext *c, AVCodecContext *avctx,
static void dsputil_init_3dnowext(DSPContext *c, AVCodecContext *avctx,
int mm_flags)
{
-#if HAVE_6REGS && HAVE_INLINE_ASM
+#if HAVE_AMD3DNOWEXT_INLINE && HAVE_6REGS
c->vector_fmul_window = vector_fmul_window_3dnowext;
#endif
}
@@ -3056,11 +3056,10 @@ static void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx,
static void dsputil_init_ssse3(DSPContext *c, AVCodecContext *avctx,
int mm_flags)
{
-#if HAVE_SSSE3
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
const int bit_depth = avctx->bits_per_raw_sample;
-#if HAVE_INLINE_ASM
+#if HAVE_SSSE3_INLINE
if (!high_bit_depth && CONFIG_H264QPEL) {
H264_QPEL_FUNCS(1, 0, ssse3);
H264_QPEL_FUNCS(1, 1, ssse3);
@@ -3075,8 +3074,9 @@ static void dsputil_init_ssse3(DSPContext *c, AVCodecContext *avctx,
H264_QPEL_FUNCS(3, 2, ssse3);
H264_QPEL_FUNCS(3, 3, ssse3);
}
-#endif /* HAVE_INLINE_ASM */
-#if HAVE_YASM
+#endif /* HAVE_SSSE3_INLINE */
+
+#if HAVE_SSSE3_EXTERNAL
if (bit_depth == 10 && CONFIG_H264QPEL) {
H264_QPEL_FUNCS_10(1, 0, ssse3_cache64);
H264_QPEL_FUNCS_10(2, 0, ssse3_cache64);
@@ -3099,21 +3099,20 @@ static void dsputil_init_ssse3(DSPContext *c, AVCodecContext *avctx,
if (!(mm_flags & (AV_CPU_FLAG_SSE42|AV_CPU_FLAG_3DNOW))) // cachesplit
c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_ssse3;
c->bswap_buf = ff_bswap32_buf_ssse3;
-#endif
-#endif
+#endif /* HAVE_SSSE3_EXTERNAL */
}
static void dsputil_init_sse4(DSPContext *c, AVCodecContext *avctx,
int mm_flags)
{
-#if HAVE_YASM
+#if HAVE_SSE4_EXTERNAL
c->vector_clip_int32 = ff_vector_clip_int32_sse4;
-#endif
+#endif /* HAVE_SSE4_EXTERNAL */
}
static void dsputil_init_avx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
{
-#if HAVE_AVX && HAVE_YASM
+#if HAVE_AVX_EXTERNAL
const int bit_depth = avctx->bits_per_raw_sample;
if (bit_depth == 10) {
@@ -3133,7 +3132,7 @@ static void dsputil_init_avx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
c->butterflies_float_interleave = ff_butterflies_float_interleave_avx;
c->vector_fmul_reverse = ff_vector_fmul_reverse_avx;
c->vector_fmul_add = ff_vector_fmul_add_avx;
-#endif
+#endif /* HAVE_AVX_EXTERNAL */
}
void ff_dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx)
diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c
index 65c38fa89d..9f9680b596 100644
--- a/libavcodec/x86/dsputilenc_mmx.c
+++ b/libavcodec/x86/dsputilenc_mmx.c
@@ -983,7 +983,7 @@ DCT_SAD_FUNC(mmx2)
DCT_SAD_FUNC(sse2)
#undef MMABS
-#if HAVE_SSSE3
+#if HAVE_SSSE3_INLINE
#define MMABS(a,z) MMABS_SSSE3(a,z)
DCT_SAD_FUNC(ssse3)
#undef MMABS
@@ -1063,7 +1063,7 @@ static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int si
#undef SCALE_OFFSET
#undef PMULHRW
-#if HAVE_SSSE3
+#if HAVE_SSSE3_INLINE
#undef PHADDD
#define DEF(x) x ## _ssse3
#define SET_RND(x)
@@ -1082,7 +1082,7 @@ static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int si
#undef SCALE_OFFSET
#undef PMULHRW
#undef PHADDD
-#endif //HAVE_SSSE3
+#endif /* HAVE_SSSE3_INLINE */
#endif /* HAVE_INLINE_ASM */
@@ -1162,7 +1162,7 @@ void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
c->sum_abs_dctelem= sum_abs_dctelem_sse2;
}
-#if HAVE_SSSE3
+#if HAVE_SSSE3_INLINE
if(mm_flags & AV_CPU_FLAG_SSSE3){
if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
c->try_8x8basis= try_8x8basis_ssse3;
diff --git a/libavcodec/x86/fft.asm b/libavcodec/x86/fft.asm
index e8a9925105..c2b9cbb12f 100644
--- a/libavcodec/x86/fft.asm
+++ b/libavcodec/x86/fft.asm
@@ -305,7 +305,7 @@ IF%1 mova Z(1), m5
INIT_YMM avx
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
align 16
fft8_avx:
mova m0, Z(0)
@@ -553,7 +553,7 @@ DEFINE_ARGS zc, w, n, o1, o3
INIT_YMM avx
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
%macro INTERL_AVX 5
vunpckhps %3, %2, %1
vunpcklps %2, %2, %1
@@ -794,7 +794,7 @@ align 8
dispatch_tab %+ fullsuffix: pointer list_of_fft
%endmacro ; DECL_FFT
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_YMM avx
DECL_FFT 6
DECL_FFT 6, _interleave
@@ -1101,6 +1101,6 @@ DECL_IMDCT POSROTATESHUF_3DNOW
INIT_YMM avx
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
DECL_IMDCT POSROTATESHUF_AVX
%endif
diff --git a/libavcodec/x86/h264_chromamc_10bit.asm b/libavcodec/x86/h264_chromamc_10bit.asm
index f8a2cff68f..bcdb27c176 100644
--- a/libavcodec/x86/h264_chromamc_10bit.asm
+++ b/libavcodec/x86/h264_chromamc_10bit.asm
@@ -252,7 +252,7 @@ cglobal %1_h264_chroma_mc2_10, 6,7
%define CHROMAMC_AVG NOTHING
INIT_XMM sse2
CHROMA_MC8 put
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_XMM avx
CHROMA_MC8 put
%endif
@@ -264,7 +264,7 @@ CHROMA_MC2 put
%define PAVG pavgw
INIT_XMM sse2
CHROMA_MC8 avg
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_XMM avx
CHROMA_MC8 avg
%endif
diff --git a/libavcodec/x86/h264_idct_10bit.asm b/libavcodec/x86/h264_idct_10bit.asm
index 3d4ac5fb71..525ce39e45 100644
--- a/libavcodec/x86/h264_idct_10bit.asm
+++ b/libavcodec/x86/h264_idct_10bit.asm
@@ -80,7 +80,7 @@ cglobal h264_idct_add_10, 3,3
INIT_XMM sse2
IDCT_ADD_10
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_XMM avx
IDCT_ADD_10
%endif
@@ -110,7 +110,7 @@ add4x4_idct %+ SUFFIX:
INIT_XMM sse2
ALIGN 16
ADD4x4IDCT
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_XMM avx
ALIGN 16
ADD4x4IDCT
@@ -150,7 +150,7 @@ cglobal h264_idct_add16_10, 5,6
INIT_XMM sse2
IDCT_ADD16_10
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_XMM avx
IDCT_ADD16_10
%endif
@@ -216,7 +216,7 @@ cglobal h264_idct8_dc_add_10,3,3,7
INIT_XMM sse2
IDCT8_DC_ADD
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_XMM avx
IDCT8_DC_ADD
%endif
@@ -287,7 +287,7 @@ cglobal h264_idct_add16intra_10,5,7,8
INIT_XMM sse2
IDCT_ADD16INTRA_10
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_XMM avx
IDCT_ADD16INTRA_10
%endif
@@ -324,7 +324,7 @@ cglobal h264_idct_add8_10,5,8,7
INIT_XMM sse2
IDCT_ADD8
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_XMM avx
IDCT_ADD8
%endif
@@ -501,7 +501,7 @@ h264_idct8_add1_10 %+ SUFFIX:
INIT_XMM sse2
IDCT8_ADD
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_XMM avx
IDCT8_ADD
%endif
@@ -541,7 +541,7 @@ cglobal h264_idct8_add4_10, 0,7,16
INIT_XMM sse2
IDCT8_ADD4
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_XMM avx
IDCT8_ADD4
%endif
diff --git a/libavcodec/x86/h264_intrapred_10bit.asm b/libavcodec/x86/h264_intrapred_10bit.asm
index 79fa23e71d..4eeb0a4303 100644
--- a/libavcodec/x86/h264_intrapred_10bit.asm
+++ b/libavcodec/x86/h264_intrapred_10bit.asm
@@ -84,7 +84,7 @@ INIT_XMM
PRED4x4_DR sse2
%define PALIGNR PALIGNR_SSSE3
PRED4x4_DR ssse3
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_AVX
PRED4x4_DR avx
%endif
@@ -124,7 +124,7 @@ INIT_XMM
PRED4x4_VR sse2
%define PALIGNR PALIGNR_SSSE3
PRED4x4_VR ssse3
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_AVX
PRED4x4_VR avx
%endif
@@ -167,7 +167,7 @@ INIT_XMM
PRED4x4_HD sse2
%define PALIGNR PALIGNR_SSSE3
PRED4x4_HD ssse3
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_AVX
PRED4x4_HD avx
%endif
@@ -238,7 +238,7 @@ cglobal pred4x4_down_left_10_%1, 3,3
INIT_XMM
PRED4x4_DL sse2
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_AVX
PRED4x4_DL avx
%endif
@@ -267,7 +267,7 @@ cglobal pred4x4_vertical_left_10_%1, 3,3
INIT_XMM
PRED4x4_VL sse2
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_AVX
PRED4x4_VL avx
%endif
@@ -577,7 +577,7 @@ cglobal pred8x8l_top_dc_10_%1, 4,4,6
INIT_XMM
PRED8x8L_TOP_DC sse2
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_AVX
PRED8x8L_TOP_DC avx
%endif
@@ -636,7 +636,7 @@ cglobal pred8x8l_dc_10_%1, 4,6,6
INIT_XMM
PRED8x8L_DC sse2
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_AVX
PRED8x8L_DC avx
%endif
@@ -671,7 +671,7 @@ cglobal pred8x8l_vertical_10_%1, 4,4,6
INIT_XMM
PRED8x8L_VERTICAL sse2
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_AVX
PRED8x8L_VERTICAL avx
%endif
@@ -728,7 +728,7 @@ INIT_XMM
PRED8x8L_HORIZONTAL sse2
%define PALIGNR PALIGNR_SSSE3
PRED8x8L_HORIZONTAL ssse3
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_AVX
PRED8x8L_HORIZONTAL avx
%endif
@@ -797,7 +797,7 @@ INIT_XMM
PRED8x8L_DOWN_LEFT sse2
%define PALIGNR PALIGNR_SSSE3
PRED8x8L_DOWN_LEFT ssse3
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_AVX
PRED8x8L_DOWN_LEFT avx
%endif
@@ -872,7 +872,7 @@ INIT_XMM
PRED8x8L_DOWN_RIGHT sse2
%define PALIGNR PALIGNR_SSSE3
PRED8x8L_DOWN_RIGHT ssse3
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_AVX
PRED8x8L_DOWN_RIGHT avx
%endif
@@ -943,7 +943,7 @@ INIT_XMM
PRED8x8L_VERTICAL_RIGHT sse2
%define PALIGNR PALIGNR_SSSE3
PRED8x8L_VERTICAL_RIGHT ssse3
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_AVX
PRED8x8L_VERTICAL_RIGHT avx
%endif
@@ -1005,7 +1005,7 @@ INIT_XMM
PRED8x8L_HORIZONTAL_UP sse2
%define PALIGNR PALIGNR_SSSE3
PRED8x8L_HORIZONTAL_UP ssse3
-%if HAVE_AVX
+%if HAVE_AVX_EXTERNAL
INIT_AVX
PRED8x8L_HORIZONTAL_UP avx
%endif
diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c
index 71a1fbeed9..faf8a76b76 100644
--- a/libavcodec/x86/h264_qpel.c
+++ b/libavcodec/x86/h264_qpel.c
@@ -1174,7 +1174,7 @@ QPEL_H264_V_XMM(put_, PUT_OP, sse2)
QPEL_H264_V_XMM(avg_, AVG_MMX2_OP, sse2)
QPEL_H264_HV_XMM(put_, PUT_OP, sse2)
QPEL_H264_HV_XMM(avg_, AVG_MMX2_OP, sse2)
-#if HAVE_SSSE3
+#if HAVE_SSSE3_INLINE
QPEL_H264_H_XMM(put_, PUT_OP, ssse3)
QPEL_H264_H_XMM(avg_, AVG_MMX2_OP, ssse3)
QPEL_H264_HV2_XMM(put_, PUT_OP, ssse3)
@@ -1188,7 +1188,7 @@ H264_MC_4816(3dnow)
H264_MC_4816(mmx2)
H264_MC_816(H264_MC_V, sse2)
H264_MC_816(H264_MC_HV, sse2)
-#if HAVE_SSSE3
+#if HAVE_SSSE3_INLINE
H264_MC_816(H264_MC_H, ssse3)
H264_MC_816(H264_MC_HV, ssse3)
#endif
diff --git a/libavcodec/x86/h264dsp_init.c b/libavcodec/x86/h264dsp_init.c
index ea71515079..6fd77be9f4 100644
--- a/libavcodec/x86/h264dsp_init.c
+++ b/libavcodec/x86/h264dsp_init.c
@@ -39,7 +39,7 @@ IDCT_ADD_FUNC(8_dc, 10, sse2)
IDCT_ADD_FUNC(8, 8, mmx)
IDCT_ADD_FUNC(8, 8, sse2)
IDCT_ADD_FUNC(8, 10, sse2)
-#if HAVE_AVX
+#if HAVE_AVX_EXTERNAL
IDCT_ADD_FUNC(, 10, avx)
IDCT_ADD_FUNC(8_dc, 10, avx)
IDCT_ADD_FUNC(8, 10, avx)
@@ -64,7 +64,7 @@ IDCT_ADD_REP_FUNC(, 16intra, 8, mmx)
IDCT_ADD_REP_FUNC(, 16intra, 8, mmx2)
IDCT_ADD_REP_FUNC(, 16intra, 8, sse2)
IDCT_ADD_REP_FUNC(, 16intra, 10, sse2)
-#if HAVE_AVX
+#if HAVE_AVX_EXTERNAL
IDCT_ADD_REP_FUNC(, 16, 10, avx)
IDCT_ADD_REP_FUNC(, 16intra, 10, avx)
#endif
@@ -79,7 +79,7 @@ IDCT_ADD_REP_FUNC2(, 8, 8, mmx)
IDCT_ADD_REP_FUNC2(, 8, 8, mmx2)
IDCT_ADD_REP_FUNC2(, 8, 8, sse2)
IDCT_ADD_REP_FUNC2(, 8, 10, sse2)
-#if HAVE_AVX
+#if HAVE_AVX_EXTERNAL
IDCT_ADD_REP_FUNC2(, 8, 10, avx)
#endif
@@ -353,7 +353,7 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_10_sse4;
c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_10_sse4;
}
-#if HAVE_AVX
+#if HAVE_AVX_EXTERNAL
if (mm_flags & AV_CPU_FLAG_AVX) {
c->h264_idct_dc_add =
c->h264_idct_add = ff_h264_idct_add_10_avx;
@@ -377,7 +377,7 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_10_avx;
#endif /* HAVE_ALIGNED_STACK */
}
-#endif /* HAVE_AVX */
+#endif /* HAVE_AVX_EXTERNAL */
}
}
}
diff --git a/libavcodec/x86/mpegvideoenc.c b/libavcodec/x86/mpegvideoenc.c
index 93ca54aff9..850467f663 100644
--- a/libavcodec/x86/mpegvideoenc.c
+++ b/libavcodec/x86/mpegvideoenc.c
@@ -26,20 +26,18 @@
#include "libavcodec/mpegvideo.h"
#include "dsputil_mmx.h"
-#if HAVE_INLINE_ASM
-
extern uint16_t ff_inv_zigzag_direct16[64];
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
#define COMPILE_TEMPLATE_MMXEXT 0
#define COMPILE_TEMPLATE_SSE2 0
#define COMPILE_TEMPLATE_SSSE3 0
#define RENAME(a) a ## _MMX
#define RENAMEl(a) a ## _mmx
#include "mpegvideoenc_template.c"
-#endif /* HAVE_MMX */
+#endif /* HAVE_MMX_INLINE */
-#if HAVE_MMXEXT
+#if HAVE_MMXEXT_INLINE
#undef COMPILE_TEMPLATE_SSSE3
#undef COMPILE_TEMPLATE_SSE2
#undef COMPILE_TEMPLATE_MMXEXT
@@ -51,9 +49,9 @@ extern uint16_t ff_inv_zigzag_direct16[64];
#define RENAME(a) a ## _MMX2
#define RENAMEl(a) a ## _mmx2
#include "mpegvideoenc_template.c"
-#endif /* HAVE_MMXEXT */
+#endif /* HAVE_MMXEXT_INLINE */
-#if HAVE_SSE2
+#if HAVE_SSE2_INLINE
#undef COMPILE_TEMPLATE_MMXEXT
#undef COMPILE_TEMPLATE_SSE2
#undef COMPILE_TEMPLATE_SSSE3
@@ -65,9 +63,9 @@ extern uint16_t ff_inv_zigzag_direct16[64];
#define RENAME(a) a ## _SSE2
#define RENAMEl(a) a ## _sse2
#include "mpegvideoenc_template.c"
-#endif /* HAVE_SSE2 */
+#endif /* HAVE_SSE2_INLINE */
-#if HAVE_SSSE3
+#if HAVE_SSSE3_INLINE
#undef COMPILE_TEMPLATE_MMXEXT
#undef COMPILE_TEMPLATE_SSE2
#undef COMPILE_TEMPLATE_SSSE3
@@ -79,33 +77,29 @@ extern uint16_t ff_inv_zigzag_direct16[64];
#define RENAME(a) a ## _SSSE3
#define RENAMEl(a) a ## _sse2
#include "mpegvideoenc_template.c"
-#endif /* HAVE_SSSE3 */
-
-#endif /* HAVE_INLINE_ASM */
+#endif /* HAVE_SSSE3_INLINE */
void ff_MPV_encode_init_x86(MpegEncContext *s)
{
-#if HAVE_INLINE_ASM
int mm_flags = av_get_cpu_flags();
const int dct_algo = s->avctx->dct_algo;
if (dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_MMX) {
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if (mm_flags & AV_CPU_FLAG_MMX && HAVE_MMX)
s->dct_quantize = dct_quantize_MMX;
#endif
-#if HAVE_MMXEXT
+#if HAVE_MMXEXT_INLINE
if (mm_flags & AV_CPU_FLAG_MMXEXT && HAVE_MMXEXT)
s->dct_quantize = dct_quantize_MMX2;
#endif
-#if HAVE_SSE2
+#if HAVE_SSE2_INLINE
if (mm_flags & AV_CPU_FLAG_SSE2 && HAVE_SSE2)
s->dct_quantize = dct_quantize_SSE2;
#endif
-#if HAVE_SSSE3
+#if HAVE_SSSE3_INLINE
if (mm_flags & AV_CPU_FLAG_SSSE3)
s->dct_quantize = dct_quantize_SSSE3;
#endif
}
-#endif /* HAVE_INLINE_ASM */
}