[Sumover-dev] [svn commit] r3999 - in vic/branches/mpeg4: tcl
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Wed May 2 22:58:24 BST 2007
Author: piers
Date: Wed May 2 22:59:16 2007
New Revision: 3999
Modified:
vic/branches/mpeg4/Makefile.in
vic/branches/mpeg4/config_arch.h
vic/branches/mpeg4/configure
vic/branches/mpeg4/configure.in
vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl
Log:
Added --enable-gpl configure option which is disabled by default - shutting off
use of h264, MPEG4, Software scaling and CPUdetect.
Also disables XVIDEO supportas default as this doesn't work properly without libswscale.
Moved HAVE_SWSCALE from config_arch.h to configure control.
Added dynamic check for prescence of h264/mpeg4 in tcl code so they're not displayed in encoder panel if not present.
Modified: vic/branches/mpeg4/Makefile.in
==============================================================================
--- vic/branches/mpeg4/Makefile.in (original)
+++ vic/branches/mpeg4/Makefile.in Wed May 2 22:59:16 2007
@@ -91,7 +91,7 @@
CODEC_LIB = @V_CODEC_LIB@ codec/tmndec/libh263.a codec/tmn-x/libh263coder.a
LIB = $(LIB_GRABBER) @V_LIB_TK@ @V_LIB_TCL@ @V_LIB_X11@ @V_LIB@ $(CODEC_LIB) $(VIDEO_LIB) \
- ../common/src/libuclmmbase.a -lm -lz -lcrypto -lpthread @V_LIB_FFMPEG@ @V_LIB_X264@
+ ../common/src/libuclmmbase.a -lm -lz -lpthread @V_LIB_FFMPEG@ @V_LIB_X264@
INCLUDE = $(INCLUDE_MISC) $(INCLUDE_GRABBER) $(INCLUDE_TK) $(INCLUDE_TCL) \
@@ -107,7 +107,7 @@
ui-srclist.tcl ui-stats.tcl ui-util.tcl ui-windows.tcl \
ui-switcher.tcl ui-extout.tcl ui-grabber.tcl ui-unix.tcl \
cf-main.tcl cf-tm.tcl cf-confbus.tcl cf-network.tcl cf-util.tcl \
- tkerror.tcl entry.tcl
+ tkerror.tcl entry.tcl accessgrid.tcl ag-pixrate.tcl autoplace_ui.tcl
#
# These modules are broken in libg++. Rather than fix libg++
@@ -126,7 +126,7 @@
# .c objects
OBJ1 = net/inet.o net/inet6.o codec/cellb_tables.o tkStripchart.o \
- md5c.o random.o cpu/cpudetect.o cpu/cpuid.o $(H263_OBJS)
+ md5c.o random.o @V_CPUDETECT_OBJ@ $(H263_OBJS)
# session-rtpv1.o session-nv.o session-ivs.o # Not supported anymore
# .cpp objects
@@ -137,21 +137,15 @@
net/mbus_handler.o net/mbus_engine.o net/group-ipc.o net/confbus.o \
rtp/session.o rtp/source.o rtp/transmitter.o rtp/pktbuf-rtp.o \
video/device.o video/grabber.o video/grabber-still.o \
- video/deinterlace.o \
codec/encoder-h261.o codec/encoder-jpeg.o codec/encoder-raw.o \
codec/encoder-h263.o codec/encoder-h263v2.o codec/encoder-nv.o \
codec/encoder-cellb.o codec/encoder-pvh.o codec/compositor.o \
codec/jpeg/jpeg.o codec/p64/p64.o codec/dct.o codec/transcoder-jpeg.o \
codec/framer-jpeg.o codec/decoder-pvh.o video/assistor-list.o \
codec/decoder.o codec/decoder-jpeg.o codec/decoder-nv.o \
- codec/packetbuffer.o codec/databuffer.o \
- codec/ffmpeg_codec.o codec/encoder-mpeg4.o codec/decoder-mpeg4.o \
- codec/x264encoder.o codec/encoder-h264.o codec/decoder-h264.o \
- codec/rtp_h264_depayloader.o \
codec/decoder-h263.o codec/decoder-h263v2.o codec/decoder-cellb.o \
codec/decoder-h261.o codec/decoder-h261v1.o codec/decoder-raw.o \
render/renderer.o render/renderer-window.o render/color.o \
- render/color-swscale.o\
render/color-pseudo.o render/color-dither.o \
render/color-ed.o render/color-quant.o \
render/color-gray.o render/color-mono.o render/color-hist.o \
@@ -279,6 +273,9 @@
./tcl2c++ 2 tcl/$$base.tcl > tcl/$$base.cpp ; \
$(C++) -o $@ -c $(CFLAGS) tcl/$$base.cpp ; rm -f tcl/$$base.cpp
+accessgrid.o: tcl/accessgrid.tcl
+ag-pixrate.o: tcl/ag-pixrate.tcl
+autoplace_ui.o: tcl/autoplace_ui.tcl
ui-ctrlmenu.o: tcl/ui-ctrlmenu.tcl
ui-extout.o: tcl/ui-extout.tcl
ui-grabber.o: tcl/ui-grabber.tcl
Modified: vic/branches/mpeg4/config_arch.h
==============================================================================
--- vic/branches/mpeg4/config_arch.h (original)
+++ vic/branches/mpeg4/config_arch.h Wed May 2 22:59:16 2007
@@ -33,7 +33,7 @@
#define USE_FASTMEMCPY 1
/* Use libswscale */
-#define HAVE_SWSCALE
+//#define HAVE_SWSCALE
/* attribute(used) as needed by some compilers */
#if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
Modified: vic/branches/mpeg4/configure
==============================================================================
--- vic/branches/mpeg4/configure (original)
+++ vic/branches/mpeg4/configure Wed May 2 22:59:16 2007
@@ -1297,6 +1297,7 @@
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-debug build with debugging enabled
--enable-ipv6 build with ipv6 enabled
+--enable-gpl Enable or disable use of gpl functionality - H264\
--disable-ffmpeg-co Enable or disable ffmpeg svn checkout
--disable-x264-co Enable or disable x264 svn checkout
--disable-cpudetect Enable or disable runtime cpu detection
@@ -5157,6 +5158,23 @@
exit 1
fi
+# Check whether --enable-gpl was given.
+if test "${enable_gpl+set}" = set; then
+ enableval=$enable_gpl; MPEG4\
+else
+ Swscale
+fi
+
+if test "$gpl" = "yes" ; then
+ V_DEFINE="$V_DEFINE -DHAVE_SWSCALE"
+ V_OBJ="$V_OBJ codec/packetbuffer.o codec/databuffer.o \
+ codec/ffmpeg_codec.o codec/encoder-mpeg4.o codec/decoder-mpeg4.o \
+ codec/x264encoder.o codec/encoder-h264.o codec/decoder-h264.o \
+ codec/rtp_h264_depayloader.o render/color-swscale.o video/deinterlace.o"
+else
+ V_OBJ="$V_OBJ render/color-true.o render/color-hi.o"
+fi
+
# Check whether --enable-ffmpeg-co was given.
if test "${enable_ffmpeg_co+set}" = set; then
enableval=$enable_ffmpeg_co; ffmpegco="no"
@@ -5165,14 +5183,19 @@
fi
if test "$ffmpegco" = "yes" ; then
+ if test "$gpl" = "yes" ; then
if test ! -r "ffmpeg" ; then
- echo "checking out r7110 of ffmpeg from svn://svn.mplayerhq.hu/ffmpeg/trunk..."
+ echo "checking out r7110 (and 21687 of libswscale) of ffmpeg from svn://svn.mplayerhq.hu/ffmpeg/trunk..."
svn checkout -r 7110 svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
+ svn checkout -r 21687 svn://svn.mplayerhq.hu/mplayer/trunk/libswscale ffmpeg/libswscale
echo "Configuring ffmpeg..."
cd ffmpeg; ./configure --prefix=$V_PATH/ffmpeg --enable-gpl --enable-swscaler --enable-pp; cd ..
fi
V_INCLUDE="$V_INCLUDE -Iffmpeg/libavformat -Iffmpeg/include/ffmpeg -Iffmpeg/include"
V_CODEC_LIB="$V_CODEC_LIB ffmpeg/lib/libavcodec.a ffmpeg/lib/libavutil.a ffmpeg/lib/libswscale.a ffmpeg/lib/libpostproc.a"
+ else
+ echo "ffmpeg not available without --enable-gpl"
+ fi
fi
# Check whether --enable-x264-co was given.
@@ -5183,6 +5206,7 @@
fi
if test "$x264co" = "yes" ; then
+ if test "$gpl" = "yes" ; then
if test ! -r "x264" ; then
echo "checking out r650 of x264 from svn co svn://svn.videolan.org/x264/trunk..."
svn checkout -r 650 svn://svn.videolan.org/x264/trunk x264
@@ -5191,6 +5215,9 @@
fi
V_INCLUDE="$V_INCLUDE -Ix264/include"
V_CODEC_LIB="$V_CODEC_LIB x264/lib/libx264.a"
+ else
+ echo "x264 not available without --enable-gpl"
+ fi
fi
@@ -5210,7 +5237,8 @@
fi
-if test "$ffmpegco" != "yes"; then
+if test "$gpl" = "yes" ; then
+ if test "$ffmpegco" != "yes"; then
if test "$ffmpeginc" != "" ; then
if test ! -r $ffmpeginc/ffmpeg/avcodec.h ; then
@@ -5932,6 +5960,7 @@
V_LIB_FFMPEG="-lavcodec -lavutil -lswscale -lpostproc"
fi
+ fi
fi
@@ -5950,7 +5979,8 @@
x264lib=""
fi
-if test "$x264co" != "yes" ; then
+if test "$gpl" = "yes" ; then
+ if test "$x264co" != "yes" ; then
if test "$x264inc" != "" ; then
if test ! -r $x264inc/x264.h ; then
echo "Error! you need to have $x264inc/x264.h around."
@@ -6043,6 +6073,7 @@
V_LIB_X264="-lx264"
fi
+ fi
fi
V_CPUDETECT=""
@@ -6053,9 +6084,12 @@
cpudetect="yes"
fi
-if test "$cpudetect" = "yes"; then
+if test "$gpl" = "yes" ; then
+ if test "$cpudetect" = "yes"; then
echo "using CPU runtime detection..."
V_CPUDETECT="-DRUNTIME_CPUDETECT"
+ V_CPUDETECT_OBJ="cpu/cpudetect.o cpu/cpuid.o"
+ fi
fi
V_H261AS=""
@@ -6303,9 +6337,9 @@
V_XV=""
# Check whether --enable-xvideo was given.
if test "${enable_xvideo+set}" = set; then
- enableval=$enable_xvideo; xvideo=no
+ enableval=$enable_xvideo; xvideo=yes
else
- xvideo=yes
+ xvideo=no
fi
if test "$xvideo" = "yes"; then
Modified: vic/branches/mpeg4/configure.in
==============================================================================
--- vic/branches/mpeg4/configure.in (original)
+++ vic/branches/mpeg4/configure.in Wed May 2 22:59:16 2007
@@ -64,20 +64,37 @@
exit 1
fi
+AC_ARG_ENABLE(gpl, --enable-gpl Enable or disable use of gpl functionality - H264\, MPEG4\,Swscale, gpl="yes", gpl="no")
+if test "$gpl" = "yes" ; then
+ V_DEFINE="$V_DEFINE -DHAVE_SWSCALE"
+ V_OBJ="$V_OBJ codec/packetbuffer.o codec/databuffer.o \
+ codec/ffmpeg_codec.o codec/encoder-mpeg4.o codec/decoder-mpeg4.o \
+ codec/x264encoder.o codec/encoder-h264.o codec/decoder-h264.o \
+ codec/rtp_h264_depayloader.o render/color-swscale.o video/deinterlace.o"
+else
+ V_OBJ="$V_OBJ render/color-true.o render/color-hi.o"
+fi
+
AC_ARG_ENABLE(ffmpeg-co, --disable-ffmpeg-co Enable or disable ffmpeg svn checkout, ffmpegco="no", ffmpegco="yes")
if test "$ffmpegco" = "yes" ; then
+ if test "$gpl" = "yes" ; then
if test ! -r "ffmpeg" ; then
- echo "checking out r7110 of ffmpeg from svn://svn.mplayerhq.hu/ffmpeg/trunk..."
+ echo "checking out r7110 (and 21687 of libswscale) of ffmpeg from svn://svn.mplayerhq.hu/ffmpeg/trunk..."
svn checkout -r 7110 svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
+ svn checkout -r 21687 svn://svn.mplayerhq.hu/mplayer/trunk/libswscale ffmpeg/libswscale
echo "Configuring ffmpeg..."
cd ffmpeg; ./configure --prefix=$V_PATH/ffmpeg --enable-gpl --enable-swscaler --enable-pp; cd ..
fi
V_INCLUDE="$V_INCLUDE -Iffmpeg/libavformat -Iffmpeg/include/ffmpeg -Iffmpeg/include"
V_CODEC_LIB="$V_CODEC_LIB ffmpeg/lib/libavcodec.a ffmpeg/lib/libavutil.a ffmpeg/lib/libswscale.a ffmpeg/lib/libpostproc.a"
+ else
+ echo "ffmpeg not available without --enable-gpl"
+ fi
fi
AC_ARG_ENABLE(x264-co, --disable-x264-co Enable or disable x264 svn checkout, x264co="no", x264co="yes")
if test "$x264co" = "yes" ; then
+ if test "$gpl" = "yes" ; then
if test ! -r "x264" ; then
echo "checking out r650 of x264 from svn co svn://svn.videolan.org/x264/trunk..."
svn checkout -r 650 svn://svn.videolan.org/x264/trunk x264
@@ -86,12 +103,16 @@
fi
V_INCLUDE="$V_INCLUDE -Ix264/include"
V_CODEC_LIB="$V_CODEC_LIB x264/lib/libx264.a"
+ else
+ echo "x264 not available without --enable-gpl"
+ fi
fi
AC_ARG_WITH(ffmpeginc, --with-ffmpeginc=dir specify the prefix directory of ffmpeg header, ffmpeginc=$withval, ffmpeginc="")
AC_ARG_WITH(ffmpeglib, --with-ffmpeglib=dir specify the directory of ffmpeg library, ffmpeglib=$withval, ffmpeglib="")
-if test "$ffmpegco" != "yes"; then
+if test "$gpl" = "yes" ; then
+ if test "$ffmpegco" != "yes"; then
if test "$ffmpeginc" != "" ; then
if test ! -r $ffmpeginc/ffmpeg/avcodec.h ; then
@@ -156,11 +177,13 @@
V_LIB_FFMPEG="-lavcodec -lavutil -lswscale -lpostproc"
fi
-fi
+ fi
+fi
AC_ARG_WITH(x264inc, --with-x264inc=dir specify the directory of x264 header, x264inc=$withval, x264inc="")
AC_ARG_WITH(x264lib, --with-x264lib=dir specify the directory of x264 library, x264lib=$withval, x264lib="")
-if test "$x264co" != "yes" ; then
+if test "$gpl" = "yes" ; then
+ if test "$x264co" != "yes" ; then
if test "$x264inc" != "" ; then
if test ! -r $x264inc/x264.h ; then
echo "Error! you need to have $x264inc/x264.h around."
@@ -187,13 +210,17 @@
])
V_LIB_X264="-lx264"
fi
+ fi
fi
V_CPUDETECT=""
AC_ARG_ENABLE(cpudetect, --disable-cpudetect Enable or disable runtime cpu detection, cpudetect="no", cpudetect="yes")
-if test "$cpudetect" = "yes"; then
+if test "$gpl" = "yes" ; then
+ if test "$cpudetect" = "yes"; then
echo "using CPU runtime detection..."
V_CPUDETECT="-DRUNTIME_CPUDETECT"
+ V_CPUDETECT_OBJ="cpu/cpudetect.o cpu/cpuid.o"
+ fi
fi
V_H261AS=""
@@ -223,7 +250,7 @@
dnl xvideo rendering support
V_XV=""
-AC_ARG_ENABLE(xvideo, --enable-xvideo Enable or disable Xvideo rendering, xvideo=no, xvideo=yes)
+AC_ARG_ENABLE(xvideo, --enable-xvideo Enable or disable Xvideo rendering, xvideo=yes, xvideo=no)
if test "$xvideo" = "yes"; then
dnl Look for the PIC library first, Debian requires it.
Modified: vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl
==============================================================================
--- vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl (original)
+++ vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl Wed May 2 22:59:16 2007
@@ -861,10 +861,20 @@
}
proc build.format w {
+ set encoder [new module h264]
+ if { $encoder == "" } {
+ set gpl 1
+ } else {
+ delete $encoder
+ set gpl 0
+ }
+
format_col $w.p0 nv nvdct
format_col $w.p1 h261 h263
- format_col $w.p2 h263+ h264
- format_col $w.p3 mpeg4 h261as
+ format_col $w.p2 h263+ h261as
+ if { $gpl == 0 } {
+ format_col $w.p3 mpeg4 h264
+ }
format_col $w.p4 raw cellb
format_col $w.p5 bvc pvh:
format_col $w.p6 jpeg null
@@ -872,7 +882,11 @@
frame $w.glue0
frame $w.glue1
- pack $w.p0 $w.p1 $w.p2 $w.p3 $w.p4 $w.p5 $w.p6 -side left
+ if { $gpl == 0 } {
+ pack $w.p0 $w.p1 $w.p2 $w.p3 $w.p4 $w.p5 $w.p6 -side left
+ } else {
+ pack $w.p0 $w.p1 $w.p2 $w.p4 $w.p5 $w.p6 -side left
+ }
}
More information about the Sumover-dev
mailing list