From 4edda03480f88548fec2d73230e2cfdfb57c2b84 Mon Sep 17 00:00:00 2001 From: Panagiotis Issaris Date: Wed, 23 May 2007 09:07:23 +0000 Subject: [PATCH] Make the compilation of h264idct.c optional. Originally committed as revision 9105 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/Makefile | 3 +-- libavcodec/dsputil.c | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index c2f024934f..f287c3cbb2 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -26,7 +26,6 @@ OBJS= bitstream.o \ raw.o \ faandct.o \ parser.o \ - h264idct.o \ rangecoder.o \ h263.o \ opt.o \ @@ -84,7 +83,7 @@ OBJS-$(CONFIG_GIF_ENCODER) += gif.o OBJS-$(CONFIG_H261_DECODER) += h261dec.o h261.o OBJS-$(CONFIG_H261_ENCODER) += h261enc.o h261.o OBJS-$(CONFIG_H263_DECODER) += h263dec.o -OBJS-$(CONFIG_H264_DECODER) += h264.o cabac.o golomb.o +OBJS-$(CONFIG_H264_DECODER) += h264.o h264idct.o cabac.o golomb.o OBJS-$(CONFIG_H264_ENCODER) += h264enc.o h264dsp.o OBJS-$(CONFIG_HUFFYUV_DECODER) += huffyuv.o OBJS-$(CONFIG_HUFFYUV_ENCODER) += huffyuv.o diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 9eecaa84ff..4f3152c622 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -3858,7 +3858,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx) #endif //CONFIG_ENCODERS if(avctx->lowres==1){ - if(avctx->idct_algo==FF_IDCT_INT || avctx->idct_algo==FF_IDCT_AUTO){ + if(avctx->idct_algo==FF_IDCT_INT || avctx->idct_algo==FF_IDCT_AUTO || !ENABLE_H264_DECODER){ c->idct_put= ff_jref_idct4_put; c->idct_add= ff_jref_idct4_add; }else{ @@ -3897,10 +3897,12 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx) } } + if (ENABLE_H264_DECODER) { c->h264_idct_add= ff_h264_idct_add_c; c->h264_idct8_add= ff_h264_idct8_add_c; c->h264_idct_dc_add= ff_h264_idct_dc_add_c; c->h264_idct8_dc_add= ff_h264_idct8_dc_add_c; + } c->get_pixels = get_pixels_c; c->diff_pixels = diff_pixels_c;