diff options
author | Diego Biurrun <diego@biurrun.de> | 2011-12-14 01:54:52 +0400 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2011-12-14 14:58:45 +0400 |
commit | 88b97357531bca25c22c351d5cac36e168b70803 (patch) | |
tree | 54cb861eed7540d0f6f83430cef5774f6493d30b /libavcodec | |
parent | 80f6c0bb95bb90f599b0c76c0fbac5454eff3b2f (diff) |
build: conditionally compile x86 H.264 chroma optimizations
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/x86/Makefile | 5 | ||||
-rw-r--r-- | libavcodec/x86/dsputil_mmx.c | 22 |
2 files changed, 16 insertions, 11 deletions
diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile index ab13109d72..6759a228c4 100644 --- a/libavcodec/x86/Makefile +++ b/libavcodec/x86/Makefile @@ -9,6 +9,9 @@ YASM-OBJS-FFT-$(HAVE_SSE) += x86/fft_sse.o YASM-OBJS-$(CONFIG_FFT) += x86/fft_mmx.o \ $(YASM-OBJS-FFT-yes) +YASM-OBJS-$(CONFIG_H264CHROMA) += x86/h264_chromamc.o \ + x86/h264_chromamc_10bit.o + MMX-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_mmx.o YASM-OBJS-$(CONFIG_H264DSP) += x86/h264_deblock.o \ x86/h264_deblock_10bit.o \ @@ -48,8 +51,6 @@ MMX-OBJS-$(CONFIG_VP8_DECODER) += x86/vp8dsp-init.o MMX-OBJS-$(HAVE_YASM) += x86/dsputil_yasm.o \ x86/deinterlace.o \ x86/fmtconvert.o \ - x86/h264_chromamc.o \ - x86/h264_chromamc_10bit.o \ x86/h264_qpel_10bit.o \ $(YASM-OBJS-yes) diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index 104bd7595f..e34b95b0da 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -2563,7 +2563,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) } #if HAVE_YASM - if (!high_bit_depth) { + if (!high_bit_depth && CONFIG_H264CHROMA) { c->put_h264_chroma_pixels_tab[0]= ff_put_h264_chroma_mc8_mmx_rnd; c->put_h264_chroma_pixels_tab[1]= ff_put_h264_chroma_mc4_mmx; } @@ -2667,13 +2667,13 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, mmx2, ); #if HAVE_YASM - if (!high_bit_depth) { + if (!high_bit_depth && CONFIG_H264CHROMA) { c->avg_h264_chroma_pixels_tab[0]= ff_avg_h264_chroma_mc8_mmx2_rnd; c->avg_h264_chroma_pixels_tab[1]= ff_avg_h264_chroma_mc4_mmx2; c->avg_h264_chroma_pixels_tab[2]= ff_avg_h264_chroma_mc2_mmx2; c->put_h264_chroma_pixels_tab[2]= ff_put_h264_chroma_mc2_mmx2; } - if (bit_depth == 10) { + if (bit_depth == 10 && CONFIG_H264CHROMA) { c->put_h264_chroma_pixels_tab[2]= ff_put_h264_chroma_mc2_10_mmxext; c->avg_h264_chroma_pixels_tab[2]= ff_avg_h264_chroma_mc2_10_mmxext; c->put_h264_chroma_pixels_tab[1]= ff_put_h264_chroma_mc4_10_mmxext; @@ -2744,7 +2744,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, 3dnow, ); #if HAVE_YASM - if (!high_bit_depth) { + if (!high_bit_depth && CONFIG_H264CHROMA) { c->avg_h264_chroma_pixels_tab[0]= ff_avg_h264_chroma_mc8_3dnow_rnd; c->avg_h264_chroma_pixels_tab[1]= ff_avg_h264_chroma_mc4_3dnow; } @@ -2797,8 +2797,10 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) H264_QPEL_FUNCS_10(2, 0, sse2_cache64) H264_QPEL_FUNCS_10(3, 0, sse2_cache64) - c->put_h264_chroma_pixels_tab[0]= ff_put_h264_chroma_mc8_10_sse2; - c->avg_h264_chroma_pixels_tab[0]= ff_avg_h264_chroma_mc8_10_sse2; + if (CONFIG_H264CHROMA) { + c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_10_sse2; + c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_10_sse2; + } } #endif } @@ -2827,7 +2829,7 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) #endif c->add_png_paeth_prediction= add_png_paeth_prediction_ssse3; #if HAVE_YASM - if (!high_bit_depth) { + if (!high_bit_depth && CONFIG_H264CHROMA) { c->put_h264_chroma_pixels_tab[0]= ff_put_h264_chroma_mc8_ssse3_rnd; c->avg_h264_chroma_pixels_tab[0]= ff_avg_h264_chroma_mc8_ssse3_rnd; c->put_h264_chroma_pixels_tab[1]= ff_put_h264_chroma_mc4_ssse3; @@ -2928,8 +2930,10 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) H264_QPEL_FUNCS_10(2, 0, sse2) H264_QPEL_FUNCS_10(3, 0, sse2) - c->put_h264_chroma_pixels_tab[0]= ff_put_h264_chroma_mc8_10_avx; - c->avg_h264_chroma_pixels_tab[0]= ff_avg_h264_chroma_mc8_10_avx; + if (CONFIG_H264CHROMA) { + c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_10_avx; + c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_10_avx; + } } c->butterflies_float_interleave = ff_butterflies_float_interleave_avx; } |