---
libavcodec/x86/dsputilenc_mmx.c | 6 ++----
libavcodec/x86/h264_intrapred_init.c | 4 +---
libavcodec/x86/h264dsp_init.c | 4 +---
libavcodec/x86/mpegaudiodec.c | 10 ++++------
libavcodec/x86/proresdsp_init.c | 4 +---
5 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c
index c0ef0ba..712c15b 100644
--- a/libavcodec/x86/dsputilenc_mmx.c
+++ b/libavcodec/x86/dsputilenc_mmx.c
@@ -1162,7 +1162,7 @@ void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext
*avctx)
}
#if HAVE_SSSE3
- if(mm_flags & AV_CPU_FLAG_SSSE3){
+ if (mm_flags & AV_CPU_FLAG_SSSE3) {
if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
c->try_8x8basis= try_8x8basis_ssse3;
}
@@ -1199,12 +1199,10 @@ void ff_dsputilenc_init_mmx(DSPContext* c,
AVCodecContext *avctx)
#endif
}
-#if HAVE_SSSE3 && HAVE_ALIGNED_STACK
- if (mm_flags & AV_CPU_FLAG_SSSE3) {
+ if (mm_flags & AV_CPU_FLAG_SSSE3 && HAVE_SSSE3 && HAVE_ALIGNED_STACK) {
c->hadamard8_diff[0] = ff_hadamard8_diff16_ssse3;
c->hadamard8_diff[1] = ff_hadamard8_diff_ssse3;
}
-#endif
}
#endif /* HAVE_YASM */
diff --git a/libavcodec/x86/h264_intrapred_init.c
b/libavcodec/x86/h264_intrapred_init.c
index 3703e78..6832989 100644
--- a/libavcodec/x86/h264_intrapred_init.c
+++ b/libavcodec/x86/h264_intrapred_init.c
@@ -367,8 +367,7 @@ void ff_h264_pred_init_x86(H264PredContext *h, int
codec_id, const int bit_depth
h->pred8x8l[VERT_RIGHT_PRED ] =
ff_pred8x8l_vertical_right_10_ssse3;
h->pred8x8l[HOR_UP_PRED ] =
ff_pred8x8l_horizontal_up_10_ssse3;
}
-#if HAVE_AVX
- if (mm_flags & AV_CPU_FLAG_AVX) {
+ if (mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) {
h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_avx;
h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_avx;
h->pred4x4[VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_10_avx;
@@ -384,7 +383,6 @@ void ff_h264_pred_init_x86(H264PredContext *h, int
codec_id, const int bit_depth
h->pred8x8l[VERT_RIGHT_PRED ] =
ff_pred8x8l_vertical_right_10_avx;
h->pred8x8l[HOR_UP_PRED ] =
ff_pred8x8l_horizontal_up_10_avx;
}
-#endif /* HAVE_AVX */
}
#endif /* HAVE_YASM */
}
diff --git a/libavcodec/x86/h264dsp_init.c b/libavcodec/x86/h264dsp_init.c
index f24f751..69ad472 100644
--- a/libavcodec/x86/h264dsp_init.c
+++ b/libavcodec/x86/h264dsp_init.c
@@ -292,13 +292,11 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int
bit_depth,
c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_ssse3;
c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_ssse3;
}
- if (mm_flags & AV_CPU_FLAG_AVX) {
-#if HAVE_ALIGNED_STACK
+ if (mm_flags & AV_CPU_FLAG_AVX && HAVE_ALIGNED_STACK) {
c->h264_v_loop_filter_luma = ff_deblock_v_luma_8_avx;
c->h264_h_loop_filter_luma = ff_deblock_h_luma_8_avx;
c->h264_v_loop_filter_luma_intra =
ff_deblock_v_luma_intra_8_avx;
c->h264_h_loop_filter_luma_intra =
ff_deblock_h_luma_intra_8_avx;
-#endif /* HAVE_ALIGNED_STACK */
}
}
}
diff --git a/libavcodec/x86/mpegaudiodec.c b/libavcodec/x86/mpegaudiodec.c
index 701ae75..bc552f7 100644
--- a/libavcodec/x86/mpegaudiodec.c
+++ b/libavcodec/x86/mpegaudiodec.c
@@ -246,16 +246,14 @@ void ff_mpadsp_init_mmx(MPADSPContext *s)
#if HAVE_YASM
if (mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) {
s->imdct36_blocks_float = imdct36_blocks_avx;
-#if HAVE_SSE
- } else if (mm_flags & AV_CPU_FLAG_SSSE3) {
+ } else if (mm_flags & AV_CPU_FLAG_SSSE3 && HAVE_SSSE3) {
s->imdct36_blocks_float = imdct36_blocks_ssse3;
- } else if (mm_flags & AV_CPU_FLAG_SSE3) {
+ } else if (mm_flags & AV_CPU_FLAG_SSE3 && HAVE_SSE3) {
s->imdct36_blocks_float = imdct36_blocks_sse3;
- } else if (mm_flags & AV_CPU_FLAG_SSE2) {
+ } else if (mm_flags & AV_CPU_FLAG_SSE2 && HAVE_SSE2) {
s->imdct36_blocks_float = imdct36_blocks_sse2;
- } else if (mm_flags & AV_CPU_FLAG_SSE) {
+ } else if (mm_flags & AV_CPU_FLAG_SSE && HAVE_SSE) {
s->imdct36_blocks_float = imdct36_blocks_sse;
-#endif /* HAVE_SSE */
}
#endif /* HAVE_YASM */
}
diff --git a/libavcodec/x86/proresdsp_init.c b/libavcodec/x86/proresdsp_init.c
index f202f9f..b94c261 100644
--- a/libavcodec/x86/proresdsp_init.c
+++ b/libavcodec/x86/proresdsp_init.c
@@ -44,11 +44,9 @@ void ff_proresdsp_x86_init(ProresDSPContext *dsp)
dsp->idct_put = ff_prores_idct_put_10_sse4;
}
-#if HAVE_AVX
- if (flags & AV_CPU_FLAG_AVX) {
+ if (flags & AV_CPU_FLAG_AVX && HAVE_AVX) {
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 */
}
--
1.7.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel