diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-23 11:01:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-23 11:01:46 +0200 |
commit | 0a73803c86f6f4e8db379d8514cccdd8a9d7b9ee (patch) | |
tree | 88c1e1cb1b855c90ec9b128e71ca2a62b80b3eb4 | |
parent | 5056cff12597d57fe9a6bd327aee63de8b1f7ce3 (diff) | |
parent | c1ad70c3cb0588254d66265578cfb14580dc0b94 (diff) | |
download | ffmpeg-0a73803c86f6f4e8db379d8514cccdd8a9d7b9ee.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
x86: Move some conditional code around to avoid unused variable warnings
Conflicts:
libavcodec/x86/dsputil_mmx.c
libavfilter/x86/vf_yadif_init.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/x86/dsputil_mmx.c | 12 | ||||
-rw-r--r-- | libavcodec/x86/dsputilenc_mmx.c | 3 | ||||
-rw-r--r-- | libavcodec/x86/mpegvideoenc.c | 2 | ||||
-rw-r--r-- | libavfilter/x86/vf_gradfun.c | 2 | ||||
-rw-r--r-- | libavfilter/x86/vf_yadif_init.c | 2 |
5 files changed, 9 insertions, 12 deletions
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index ca9d623448..250143f199 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -1416,9 +1416,9 @@ void ff_vector_clip_int32_sse4 (int32_t *dst, const int32_t *src, static av_cold void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, int mm_flags) { +#if HAVE_INLINE_ASM const int high_bit_depth = avctx->bits_per_raw_sample > 8; -#if HAVE_INLINE_ASM c->put_pixels_clamped = ff_put_pixels_clamped_mmx; c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_mmx; c->add_pixels_clamped = ff_add_pixels_clamped_mmx; @@ -1443,15 +1443,13 @@ static av_cold void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, } c->vector_clip_int32 = ff_vector_clip_int32_mmx; -#endif - +#endif /* HAVE_YASM */ } static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx, int mm_flags) { - -#if HAVE_YASM +#if HAVE_MMXEXT_EXTERNAL SET_QPEL_FUNCS(avg_qpel, 0, 16, mmxext, ); SET_QPEL_FUNCS(avg_qpel, 1, 8, mmxext, ); @@ -1459,9 +1457,7 @@ static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx, SET_QPEL_FUNCS(put_qpel, 1, 8, mmxext, ); SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, mmxext, ); SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, mmxext, ); -#endif /* HAVE_YASM */ -#if HAVE_MMXEXT_EXTERNAL /* slower than cmov version on AMD */ if (!(mm_flags & AV_CPU_FLAG_3DNOW)) c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmxext; @@ -1504,9 +1500,9 @@ static av_cold void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx, static av_cold void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx, int mm_flags) { +#if HAVE_SSE2_INLINE const int high_bit_depth = avctx->bits_per_raw_sample > 8; -#if HAVE_SSE2_INLINE if (!high_bit_depth && avctx->idct_algo == FF_IDCT_XVIDMMX) { c->idct_put = ff_idct_xvid_sse2_put; c->idct_add = ff_idct_xvid_sse2_add; diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c index 06186e2fde..49e30194ec 100644 --- a/libavcodec/x86/dsputilenc_mmx.c +++ b/libavcodec/x86/dsputilenc_mmx.c @@ -947,9 +947,10 @@ hadamard_func(ssse3) av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx) { int mm_flags = av_get_cpu_flags(); - int bit_depth = avctx->bits_per_raw_sample; #if HAVE_YASM + int bit_depth = avctx->bits_per_raw_sample; + if (EXTERNAL_MMX(mm_flags)) { if (bit_depth <= 8) c->get_pixels = ff_get_pixels_mmx; diff --git a/libavcodec/x86/mpegvideoenc.c b/libavcodec/x86/mpegvideoenc.c index 6219667af3..eda0b76957 100644 --- a/libavcodec/x86/mpegvideoenc.c +++ b/libavcodec/x86/mpegvideoenc.c @@ -83,11 +83,11 @@ extern uint16_t ff_inv_zigzag_direct16[64]; av_cold void ff_dct_encode_init_x86(MpegEncContext *s) { - 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_INLINE + int mm_flags = av_get_cpu_flags(); if (INLINE_MMX(mm_flags)) s->dct_quantize = dct_quantize_MMX; #endif diff --git a/libavfilter/x86/vf_gradfun.c b/libavfilter/x86/vf_gradfun.c index 214e764192..10accca105 100644 --- a/libavfilter/x86/vf_gradfun.c +++ b/libavfilter/x86/vf_gradfun.c @@ -200,9 +200,9 @@ static void gradfun_blur_line_sse2(uint16_t *dc, uint16_t *buf, const uint16_t * av_cold void ff_gradfun_init_x86(GradFunContext *gf) { +#if HAVE_MMXEXT_INLINE int cpu_flags = av_get_cpu_flags(); -#if HAVE_MMXEXT_INLINE if (cpu_flags & AV_CPU_FLAG_MMXEXT) gf->filter_line = gradfun_filter_line_mmxext; #endif diff --git a/libavfilter/x86/vf_yadif_init.c b/libavfilter/x86/vf_yadif_init.c index 58f2fc60d5..0043931e66 100644 --- a/libavfilter/x86/vf_yadif_init.c +++ b/libavfilter/x86/vf_yadif_init.c @@ -61,11 +61,11 @@ void ff_yadif_filter_line_10bit_ssse3(void *dst, void *prev, void *cur, av_cold void ff_yadif_init_x86(YADIFContext *yadif) { +#if HAVE_YASM int cpu_flags = av_get_cpu_flags(); int bit_depth = (!yadif->csp) ? 8 : yadif->csp->comp[0].depth_minus1 + 1; -#if HAVE_YASM if (bit_depth >= 15) { #if ARCH_X86_32 if (EXTERNAL_MMXEXT(cpu_flags)) |