vorbis="no"
a52="yes"
a52bin="no"
+pp="yes"
+shared_pp="no"
win32="no"
mingw32="no"
cygwin="no"
;;
--enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
;;
+ --disable-pp) pp="no"
+ ;;
+ --enable-shared-pp) shared_pp="yes"
+ ;;
--enable-mp3lame) mp3lame="yes"
;;
--enable-vorbis) vorbis="yes"
echo " --enable-mingw32 enable mingw32 native windows compile"
echo " --disable-a52 disable GPL'ed A52 support [default=no]"
echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
+echo " --disable-pp disable GPL'ed post processing support [default=no]"
+echo " --enable-shared-pp use libpostproc.so [default=no]"
echo " --enable-shared build shared libraries [default=no]"
echo ""
echo "Advanced options (experts only):"
echo "vorbis enabled $vorbis"
echo "a52 support $a52"
echo "a52 dlopened $a52bin"
+echo "pp support $pp"
+echo "shared pp $shared_pp"
echo "Video hooking $vhook"
echo "risky / patent encumbered codecs $risky"
fi
fi
+# PP
+if test "$pp" = "yes" ; then
+ echo "#define CONFIG_PP 1" >> $TMPH
+ echo "CONFIG_PP=yes" >> config.mak
+
+ if test "$shared_pp" = "yes" ; then
+ echo "#define SHARED_PP 1" >> $TMPH
+ echo "SHARED_PP=yes" >> config.mak
+ fi
+fi
+
# mpeg audio high precision mode
if test "$mpegaudio_hp" = "yes" ; then
echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
endif
endif
+ifeq ($(CONFIG_PP),yes)
+ifeq ($(SHARED_PP),yes)
+EXTRALIBS += -lpostproc
+else
+# LIBS += libpostproc/libpostproc.a ... should be fixed
+OBJS += libpostproc/postprocess.o
+endif
+endif
+
ifeq ($(CONFIG_MP3LAME),yes)
OBJS += mp3lameaudio.o
EXTRALIBS += -lmp3lame
dsputil.o: dsputil.c dsputil.h
+libpostproc/libpostproc.a:
+ $(MAKE) -C libpostproc
+
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
--- /dev/null
+
+include ../../config.mak
+
+ifeq ($(SHARED_PP),yes)
+SPPLIB = libpostproc.so
+SPPVERSION = 0.0.1
+endif
+PPLIB = libpostproc.a
+
+PPOBJS=postprocess.o
+SPPOBJS=postprocess_pic.o
+
+CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
+# -I/usr/X11R6/include/
+
+.SUFFIXES: .c .o
+
+# .PHONY: all clean
+
+.c.o:
+ $(CC) -c $(CFLAGS) -I.. -I../.. -o $@ $<
+
+all: $(SWSLIB) $(PPLIB) $(SPPLIB)
+
+clean:
+ rm -f *.o *.a *~ *.so
+
+distclean:
+ rm -f Makefile.bak *.o *.a *~ *.so .depend
+
+dep: depend
+
+depend:
+ $(CC) -MM $(CFLAGS) postprocess.c 1>.depend
+
+ifeq ($(SHARED_PP),yes)
+postprocess_pic.o: postprocess.c
+ $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $<
+
+$(SPPLIB): $(SPPOBJS)
+ $(CC) -shared -Wl,-soname,$(SPPLIB).0 \
+ -o $(SPPLIB) $(SPPOBJS)
+endif
+
+$(PPLIB): $(PPOBJS)
+ $(AR) r $(PPLIB) $(PPOBJS)
+
+install: all
+ifeq ($(SHARED_PP),yes)
+ install -d $(prefix)/lib
+ install -s -m 755 $(SPPLIB) $(prefix)/lib/$(SPPLIB).$(SPPVERSION)
+ ln -sf $(SPPLIB).$(SPPVERSION) $(prefix)/lib/$(SPPLIB)
+ ldconfig || true
+ mkdir -p $(prefix)/include/postproc
+ install -m 644 postprocess.h $(prefix)/include/postproc/postprocess.h
+endif
+
+
+#
+# include dependency files if they exist
+#
+ifneq ($(wildcard .depend),)
+include .depend
+endif
--- /dev/null
+/* mangle.h - This file has some CPP macros to deal with different symbol
+ * mangling across binary formats.
+ * (c)2002 by Felix Buenemann <atmosfear at users.sourceforge.net>
+ * File licensed under the GPL, see http://www.fsf.org/ for more info.
+ */
+
+#ifndef __MANGLE_H
+#define __MANGLE_H
+
+/* Feel free to add more to the list, eg. a.out IMO */
+#if defined(__CYGWIN__) || defined(__OS2__) || \
+ (defined(__OpenBSD__) && !defined(__ELF__))
+#define MANGLE(a) "_" #a
+#else
+#define MANGLE(a) #a
+#endif
+
+#endif /* !__MANGLE_H */
+
//#undef HAVE_MMX
//#undef ARCH_X86
//#define DEBUG_BRIGHTNESS
-#ifndef PIC
-#include "../libvo/fastmemcpy.h"
+#ifdef USE_FASTMEMCPY
+#include "libvo/fastmemcpy.h"
#endif
#include "postprocess.h"
#include "postprocess_internal.h"
-#include "mangle.h"
+
+#include "mangle.h" //FIXME should be supressed
#define MIN(a,b) ((a) > (b) ? (b) : (a))
#define MAX(a,b) ((a) < (b) ? (b) : (a))
include ../config.mak
SWSLIB = libswscale.a
-ifeq ($(SHARED_PP),yes)
-SPPLIB = libpostproc.so
-SPPVERSION = 0.0.1
-endif
-PPLIB = libpostproc.a
SWSSRCS=swscale.c rgb2rgb.c yuv2rgb.c
SWSOBJS=$(SWSSRCS:.c=.o)
-PPOBJS=postprocess.o
-SPPOBJS=postprocess_pic.o
CS_TEST_OBJS=cs_test.o rgb2rgb.o ../cpudetect.o ../mp_msg.o ../libvo/aclib.o
CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
.c.o:
$(CC) -c $(CFLAGS) -I.. -o $@ $<
-all: $(SWSLIB) $(PPLIB) $(SPPLIB)
+all: $(SWSLIB)
$(SWSLIB): $(SWSOBJS)
$(AR) r $(SWSLIB) $(SWSOBJS)
cs_test: $(CS_TEST_OBJS)
$(CC) $(CS_TEST_OBJS) -o cs_test
-ifeq ($(SHARED_PP),yes)
-postprocess_pic.o: postprocess.c
- $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -o $@ $<
-
-$(SPPLIB): $(SPPOBJS)
- $(CC) -shared -Wl,-soname,$(SPPLIB).0 \
- -o $(SPPLIB) $(SPPOBJS)
-endif
-
-$(PPLIB): $(PPOBJS)
- $(AR) r $(PPLIB) $(PPOBJS)
-
-install: all
-ifeq ($(SHARED_PP),yes)
- install -d $(prefix)/lib
- install -s -m 755 $(SPPLIB) $(prefix)/lib/$(SPPLIB).$(SPPVERSION)
- ln -sf $(SPPLIB).$(SPPVERSION) $(prefix)/lib/$(SPPLIB)
- ldconfig || true
- mkdir -p $(prefix)/include/postproc
- install -m 644 postprocess.h $(prefix)/include/postproc/postprocess.h
-endif
-
-
#
# include dependency files if they exist
#