# HG changeset patch # User kabi # Date 1019505465 0 # Node ID 1a38b3b4ea28a08739221f2484b05cc37d0166b0 # Parent 8899c3b35b57b472e5c6422978f58ab0315203b6 * using liba52 diff -r 8899c3b35b57 -r 1a38b3b4ea28 Makefile --- a/Makefile Mon Apr 22 19:57:26 2002 +0000 +++ b/Makefile Mon Apr 22 19:57:45 2002 +0000 @@ -10,11 +10,15 @@ ratecontrol.o ASM_OBJS= -# currently using libac3 for ac3 decoding +# currently using liba52 for ac3 decoding ifeq ($(CONFIG_AC3),yes) -OBJS+= ac3dec.o \ - libac3/bit_allocate.o libac3/bitstream.o libac3/downmix.o \ - libac3/imdct.o libac3/parse.o +OBJS+= a52dec.o +endif + +# using builtin liba52 or runtime linked liba52.so.0 +ifeq ($(CONFIG_A52BIN),no) +OBJS+= liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o \ + liba52/imdct.o liba52/parse.o endif ifeq ($(CONFIG_MP3LAME),yes) @@ -30,7 +34,7 @@ ifeq ($(TARGET_MMX),yes) OBJS += i386/fdct_mmx.o i386/cputest.o \ i386/dsputil_mmx.o i386/mpegvideo_mmx.o \ - i386/idct_mmx.o i386/motion_est_mmx.o \ + i386/idct_mmx.o i386/motion_est_mmx.o \ i386/simple_idct_mmx.o endif @@ -91,8 +95,8 @@ armv4l/*.o armv4l/*~ \ mlib/*.o mlib/*~ \ alpha/*.o alpha/*~ \ - libac3/*.o libac3/*~ \ - apiexample $(TESTS) + liba52/*.o liba52/*~ \ + apiexample $(TESTS) distclean: clean rm -f Makefile.bak .depend diff -r 8899c3b35b57 -r 1a38b3b4ea28 a52dec.c --- a/a52dec.c Mon Apr 22 19:57:26 2002 +0000 +++ b/a52dec.c Mon Apr 22 19:57:45 2002 +0000 @@ -19,7 +19,7 @@ #include "avcodec.h" #include "liba52/a52.h" -#ifdef LIBAVCODEC_A52BIN +#ifdef CONFIG_A52BIN #include static const char* liba52name = "liba52.so.0"; #endif @@ -62,7 +62,7 @@ } AC3DecodeState; -#ifdef LIBAVCODEC_A52BIN +#ifdef CONFIG_A52BIN static void* dlsymm(void* handle, const char* symbol) { void* f = dlsym(handle, symbol); @@ -76,7 +76,7 @@ { AC3DecodeState *s = avctx->priv_data; -#ifdef LIBAVCODEC_A52BIN +#ifdef CONFIG_A52BIN s->handle = dlopen(liba52name, RTLD_LAZY); if (!s->handle) { @@ -95,7 +95,6 @@ dlclose(s->handle); return -1; } - printf("INITIALIZED\n"); #else /* static linked version */ s->handle = 0; @@ -233,7 +232,7 @@ { AC3DecodeState *s = avctx->priv_data; s->a52_free(s->state); -#ifdef LIBAVCODEC_A52BIN +#ifdef CONFIG_A52BIN dlclose(s->handle); #endif return 0;