Commit c67cf0f6 authored by michaelni's avatar michaelni

moving postprocess to ffmpeg/libavcodec


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1586 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 892f6f9b
...@@ -60,6 +60,8 @@ mp3lame="no" ...@@ -60,6 +60,8 @@ mp3lame="no"
vorbis="no" vorbis="no"
a52="yes" a52="yes"
a52bin="no" a52bin="no"
pp="yes"
shared_pp="no"
win32="no" win32="no"
mingw32="no" mingw32="no"
cygwin="no" cygwin="no"
...@@ -281,6 +283,10 @@ for opt do ...@@ -281,6 +283,10 @@ for opt do
;; ;;
--enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs" --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
;; ;;
--disable-pp) pp="no"
;;
--enable-shared-pp) shared_pp="yes"
;;
--enable-mp3lame) mp3lame="yes" --enable-mp3lame) mp3lame="yes"
;; ;;
--enable-vorbis) vorbis="yes" --enable-vorbis) vorbis="yes"
...@@ -578,6 +584,8 @@ echo " --enable-win32 enable win32 cross compile" ...@@ -578,6 +584,8 @@ echo " --enable-win32 enable win32 cross compile"
echo " --enable-mingw32 enable mingw32 native windows compile" echo " --enable-mingw32 enable mingw32 native windows compile"
echo " --disable-a52 disable GPL'ed A52 support [default=no]" echo " --disable-a52 disable GPL'ed A52 support [default=no]"
echo " --enable-a52bin open liba52.so.0 at runtime [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 " --enable-shared build shared libraries [default=no]"
echo "" echo ""
echo "Advanced options (experts only):" echo "Advanced options (experts only):"
...@@ -631,6 +639,8 @@ echo "mp3lame enabled $mp3lame" ...@@ -631,6 +639,8 @@ echo "mp3lame enabled $mp3lame"
echo "vorbis enabled $vorbis" echo "vorbis enabled $vorbis"
echo "a52 support $a52" echo "a52 support $a52"
echo "a52 dlopened $a52bin" echo "a52 dlopened $a52bin"
echo "pp support $pp"
echo "shared pp $shared_pp"
echo "Video hooking $vhook" echo "Video hooking $vhook"
echo "risky / patent encumbered codecs $risky" echo "risky / patent encumbered codecs $risky"
...@@ -754,6 +764,17 @@ if test "$a52" = "yes" ; then ...@@ -754,6 +764,17 @@ if test "$a52" = "yes" ; then
fi fi
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 # mpeg audio high precision mode
if test "$mpegaudio_hp" = "yes" ; then if test "$mpegaudio_hp" = "yes" ; then
echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
......
...@@ -35,6 +35,15 @@ OBJS+= liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o \ ...@@ -35,6 +35,15 @@ OBJS+= liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o \
endif endif
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) ifeq ($(CONFIG_MP3LAME),yes)
OBJS += mp3lameaudio.o OBJS += mp3lameaudio.o
EXTRALIBS += -lmp3lame EXTRALIBS += -lmp3lame
...@@ -125,6 +134,9 @@ $(SLIB): $(OBJS) ...@@ -125,6 +134,9 @@ $(SLIB): $(OBJS)
dsputil.o: dsputil.c dsputil.h dsputil.o: dsputil.c dsputil.h
libpostproc/libpostproc.a:
$(MAKE) -C libpostproc
%.o: %.c %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $< $(CC) $(CFLAGS) -c -o $@ $<
......
include ../config.mak include ../../config.mak
SWSLIB = libswscale.a
ifeq ($(SHARED_PP),yes) ifeq ($(SHARED_PP),yes)
SPPLIB = libpostproc.so SPPLIB = libpostproc.so
SPPVERSION = 0.0.1 SPPVERSION = 0.0.1
endif endif
PPLIB = libpostproc.a PPLIB = libpostproc.a
SWSSRCS=swscale.c rgb2rgb.c yuv2rgb.c
SWSOBJS=$(SWSSRCS:.c=.o)
PPOBJS=postprocess.o PPOBJS=postprocess.o
SPPOBJS=postprocess_pic.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) CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
# -I/usr/X11R6/include/ # -I/usr/X11R6/include/
...@@ -22,13 +18,10 @@ CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC) ...@@ -22,13 +18,10 @@ CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
# .PHONY: all clean # .PHONY: all clean
.c.o: .c.o:
$(CC) -c $(CFLAGS) -I.. -o $@ $< $(CC) -c $(CFLAGS) -I.. -I../.. -o $@ $<
all: $(SWSLIB) $(PPLIB) $(SPPLIB) all: $(SWSLIB) $(PPLIB) $(SPPLIB)
$(SWSLIB): $(SWSOBJS)
$(AR) r $(SWSLIB) $(SWSOBJS)
clean: clean:
rm -f *.o *.a *~ *.so rm -f *.o *.a *~ *.so
...@@ -38,14 +31,11 @@ distclean: ...@@ -38,14 +31,11 @@ distclean:
dep: depend dep: depend
depend: depend:
$(CC) -MM $(CFLAGS) $(SWSSRCS) postprocess.c 1>.depend $(CC) -MM $(CFLAGS) postprocess.c 1>.depend
cs_test: $(CS_TEST_OBJS)
$(CC) $(CS_TEST_OBJS) -o cs_test
ifeq ($(SHARED_PP),yes) ifeq ($(SHARED_PP),yes)
postprocess_pic.o: postprocess.c postprocess_pic.o: postprocess.c
$(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -o $@ $< $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $<
$(SPPLIB): $(SPPOBJS) $(SPPLIB): $(SPPOBJS)
$(CC) -shared -Wl,-soname,$(SPPLIB).0 \ $(CC) -shared -Wl,-soname,$(SPPLIB).0 \
......
/* 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 */
...@@ -75,12 +75,13 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks ...@@ -75,12 +75,13 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks
//#undef HAVE_MMX //#undef HAVE_MMX
//#undef ARCH_X86 //#undef ARCH_X86
//#define DEBUG_BRIGHTNESS //#define DEBUG_BRIGHTNESS
#ifndef PIC #ifdef USE_FASTMEMCPY
#include "../libvo/fastmemcpy.h" #include "libvo/fastmemcpy.h"
#endif #endif
#include "postprocess.h" #include "postprocess.h"
#include "postprocess_internal.h" #include "postprocess_internal.h"
#include "mangle.h"
#include "mangle.h" //FIXME should be supressed
#define MIN(a,b) ((a) > (b) ? (b) : (a)) #define MIN(a,b) ((a) > (b) ? (b) : (a))
#define MAX(a,b) ((a) < (b) ? (b) : (a)) #define MAX(a,b) ((a) < (b) ? (b) : (a))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment