[FFmpeg-devel] [PATCH]Fix compilation with --disable-everything
Carl Eugen Hoyos
cehoyos at ag.or.at
Sun Feb 24 15:46:19 CET 2013
Hi!
Attached patch fixes ticket #2253 for me.
Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
index 2f7f50e..38ba749 100644
--- a/libavcodec/x86/dsputil_mmx.c
+++ b/libavcodec/x86/dsputil_mmx.c
@@ -302,6 +302,7 @@ void ff_put_no_rnd_mpeg4_qpel8_v_lowpass_mmxext(uint8_t *dst, uint8_t *src,
#if HAVE_YASM
#define ff_put_pixels8_mmx ff_put_pixels8_mmxext
+#if CONFIG_H264QPEL
/***********************************/
/* 3Dnow specific */
@@ -321,6 +322,7 @@ void ff_put_no_rnd_mpeg4_qpel8_v_lowpass_mmxext(uint8_t *dst, uint8_t *src,
#undef DEF
#endif /* HAVE_YASM */
+#endif /* CONFIG_H264QPEL */
#if HAVE_INLINE_ASM
@@ -776,7 +778,7 @@ static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height,
#endif /* HAVE_INLINE_ASM */
-#if HAVE_YASM
+#if HAVE_YASM && CONFIG_H264QPEL
#define QPEL_OP(OPNAME, ROUNDER, RND, OP, MMX) \
static void OPNAME ## qpel8_mc00_ ## MMX (uint8_t *dst, uint8_t *src, \
int stride) \
@@ -1169,7 +1171,7 @@ static void OPNAME ## qpel16_mc22_ ## MMX(uint8_t *dst, uint8_t *src, \
QPEL_OP(put_, ff_pw_16, _, PUT_OP, mmxext)
QPEL_OP(avg_, ff_pw_16, _, AVG_MMXEXT_OP, mmxext)
QPEL_OP(put_no_rnd_, ff_pw_15, _no_rnd_, PUT_OP, mmxext)
-#endif /* HAVE_YASM */
+#endif /* HAVE_YASM && CONFIG_H264QPEL */
#if HAVE_INLINE_ASM
@@ -1383,7 +1385,7 @@ void ff_avg_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride)
}
#endif /* HAVE_INLINE_ASM */
-#if HAVE_YASM
+#if HAVE_YASM && CONFIG_H264QPEL
/* VC-1-specific */
void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src,
int stride, int rnd)
@@ -1396,7 +1398,7 @@ void ff_avg_vc1_mspel_mc00_mmxext(uint8_t *dst, const uint8_t *src,
{
ff_avg_pixels8_mmxext(dst, src, stride, 8);
}
-#endif /* HAVE_YASM */
+#endif /* HAVE_YASM && CONFIG_H264QPEL */
#if CONFIG_DIRAC_DECODER
#define DIRAC_PIXOP(OPNAME2, OPNAME, EXT)\
@@ -1656,10 +1658,10 @@ static av_cold void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx,
static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
int mm_flags)
{
+#if HAVE_YASM && CONFIG_H264QPEL
const int bit_depth = avctx->bits_per_raw_sample;
const int high_bit_depth = bit_depth > 8;
-#if HAVE_YASM
SET_QPEL_FUNCS(avg_qpel, 0, 16, mmxext, );
SET_QPEL_FUNCS(avg_qpel, 1, 8, mmxext, );
@@ -1695,7 +1697,7 @@ static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
c->avg_pixels_tab[1][3] = ff_avg_pixels8_xy2_mmxext;
}
}
-#endif /* HAVE_YASM */
+#endif /* HAVE_YASM && CONFIG_H264QPEL */
#if HAVE_MMXEXT_EXTERNAL
if (CONFIG_VP3_DECODER && (avctx->codec_id == AV_CODEC_ID_VP3 ||
@@ -1722,9 +1724,10 @@ static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
static av_cold void dsputil_init_3dnow(DSPContext *c, AVCodecContext *avctx,
int mm_flags)
{
+#if HAVE_YASM
+#if CONFIG_H264QPEL
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
-#if HAVE_YASM
if (!high_bit_depth) {
c->put_pixels_tab[0][1] = ff_put_pixels16_x2_3dnow;
c->put_pixels_tab[0][2] = ff_put_pixels16_y2_3dnow;
@@ -1750,6 +1753,7 @@ static av_cold void dsputil_init_3dnow(DSPContext *c, AVCodecContext *avctx,
c->avg_pixels_tab[1][3] = ff_avg_pixels8_xy2_3dnow;
}
}
+#endif /* CONFIG_H264QPEL */
if (CONFIG_VP3_DECODER && (avctx->codec_id == AV_CODEC_ID_VP3 ||
avctx->codec_id == AV_CODEC_ID_THEORA)) {
More information about the ffmpeg-devel
mailing list