[Sumover-dev] [svn commit] r3924 - in vic/branches/mpeg4: codec
render
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Fri Nov 10 12:54:24 GMT 2006
Author: barz
Date: Fri Nov 10 12:54:06 2006
New Revision: 3924
Modified:
vic/branches/mpeg4/Makefile.in
vic/branches/mpeg4/codec/encoder-h264.cpp
vic/branches/mpeg4/codec/ffmpeg_codec.h
vic/branches/mpeg4/codec/x264encoder.cpp
vic/branches/mpeg4/configure
vic/branches/mpeg4/configure.in
vic/branches/mpeg4/render/color-swscale.cpp
Log:
* x264 works again, but need to fine tune further
* add avcodec, avutil, swscale, x264 headers and libraries check in configure
* new configure options, --with-ffmpeglib --with-ffmpeginc --with--x264lib --withx264inc
Modified: vic/branches/mpeg4/Makefile.in
==============================================================================
--- vic/branches/mpeg4/Makefile.in (original)
+++ vic/branches/mpeg4/Makefile.in Fri Nov 10 12:54:06 2006
@@ -58,7 +58,7 @@
INCLUDE_TK = @V_INCLUDE_TK@
INCLUDE_TCL = @V_INCLUDE_TCL@
INCLUDE_X11 = @V_INCLUDE_X11@
-INCLUDE_MISC = @V_INCLUDE@ -I. -Icodec/x264 -Icodec/tmndec -Icodec/tmn-x -Icodec/h263 -Irtp -Irender -Inet -Ivideo -Icodec -I../common/src
+INCLUDE_MISC = @V_INCLUDE@ -I. -Icodec/tmndec -Icodec/tmn-x -Icodec/h263 -Irtp -Irender -Inet -Ivideo -Icodec -I../common/src
STATIC = @V_STATIC@
MKDEP = ./mkdep
@@ -91,11 +91,12 @@
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 -L/usr/local/lib -lavcodec -lavutil -lswscale -lx264
+ ../common/src/libuclmmbase.a -lm -lz -lcrypto -lpthread \
+ @V_LIB_FFMPEG@ @V_LIB_X264@
INCLUDE = $(INCLUDE_MISC) $(INCLUDE_GRABBER) $(INCLUDE_TK) $(INCLUDE_TCL) \
- $(INCLUDE_X11) $(MD_INC) -Icodec/jpeg -Icodec/p64 -I. -I/usr/local/include/ffmpeg
+ $(INCLUDE_X11) $(MD_INC) -Icodec/jpeg -Icodec/p64 -I.
DEFINE = @V_DEFINE@ -DED_YBITS=$(ED_YBITS) -DSIGRET=@V_SIGRET@ -DNLAYER=8 -D_GNU_SOURCE -D__X264__
BFLAGS = $(DEFINE) $(INCLUDE)
CFLAGS = $(CCOPT) $(BFLAGS)
@@ -145,6 +146,7 @@
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/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 \
Modified: vic/branches/mpeg4/codec/encoder-h264.cpp
==============================================================================
--- vic/branches/mpeg4/codec/encoder-h264.cpp (original)
+++ vic/branches/mpeg4/codec/encoder-h264.cpp Fri Nov 10 12:54:06 2006
@@ -140,9 +140,6 @@
pool = pool_;
bool first = true;
- //static int pframe_no=0;
- //double psnr = 0;
-
int i_nal, i, sent_size;
int frame_size = 0;
@@ -150,7 +147,7 @@
if (!state) {
state = true;
size(vf->width_, vf->height_);
- //std::cout << "init x264 encoder with kbps:" << kbps << " fps:" << fps << "\n";
+ debug_msg("init x264 encoder with kbps:%d, fps:%d", kbps, fps);
enc->init(vf->width_, vf->height_, kbps, fps);
enc->setGOP(gop);
frame_size = vf->width_ * vf->height_;
Modified: vic/branches/mpeg4/codec/ffmpeg_codec.h
==============================================================================
--- vic/branches/mpeg4/codec/ffmpeg_codec.h (original)
+++ vic/branches/mpeg4/codec/ffmpeg_codec.h Fri Nov 10 12:54:06 2006
@@ -5,11 +5,9 @@
{
#ifdef WIN32
#include "ffmpeg_config.h"
-#else
-// #include "ffmpeg/config.h"
#endif
-#include "avcodec.h"
+#include "ffmpeg/avcodec.h"
//#include "ffmpeg/libavcodec/dsputil.h"
//#include "ffmpeg/libavcodec/mpegvideo.h"
}
Modified: vic/branches/mpeg4/codec/x264encoder.cpp
==============================================================================
--- vic/branches/mpeg4/codec/x264encoder.cpp (original)
+++ vic/branches/mpeg4/codec/x264encoder.cpp Fri Nov 10 12:54:06 2006
@@ -3,11 +3,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+#include <stdint.h>
+#include <inttypes.h>
+#include "ffmpeg/avcodec.h"
extern "C"
{
-#include "x264/common/common.h"
-#include "x264/x264.h"
+// #include "x264/common/common.h"
+#include "x264.h"
}
#include "databuffer.h"
@@ -38,10 +40,10 @@
//DISABLE CABAC for more frame rate
param->b_cabac = 0;
//DONOT ENABLE PSNR ANALYSE
- param->analyse.b_psnr = 0;
- param->i_keyint_max = 20;
+ // param->analyse.b_psnr = 0;
+ param->i_keyint_max = 60;
param->i_keyint_min = 20;
-
+
enc->h = NULL;
encoder = (void *) enc;
@@ -65,9 +67,14 @@
x264_param_t *param = &(enc->param);
param->rc.i_bitrate = bps;
- param->rc.b_cbr = 1;
+ // param->rc.i_rc_method = X264_RC_ABR;
+ param->rc.i_rc_method = X264_RC_CRF;
+ // param->b_cabac = FF_CODER_TYPE_AC;
+ // param->b_deblocking_filter = 1;
param->i_fps_num = fps * 1000;
param->i_fps_den = 1000;
+ param->rc.f_qcompress = 0; /* 0.0 => cbr, 1.0 => constant qp */
+ param->analyse.i_me_method = X264_ME_UMH;
//Currently X264 only handle (16*n)x(16*m)
if (w % 16 != 0 && h % 16 != 0) {
@@ -150,7 +157,7 @@
{
x264 *enc = (x264 *) encoder;
x264_param_t *param = &(enc->param);
- param->i_keyint_max = gop;
+ param->i_keyint_max = 2*gop;
param->i_keyint_min = gop;
}
@@ -158,12 +165,15 @@
{
x264 *enc = (x264 *) encoder;
x264_param_t *param = &(enc->param);
- if (br > 256)
- param->rc.i_bitrate = br;
+ param->rc.i_bitrate = br;
}
void x264Encoder::setFPS(int fps)
{
+ x264 *enc = (x264 *) encoder;
+ x264_param_t *param = &(enc->param);
+ param->i_fps_num = fps * 1000;
+ param->i_fps_den = 1000;
}
bool x264Encoder::isInitialized()
Modified: vic/branches/mpeg4/configure
==============================================================================
--- vic/branches/mpeg4/configure (original)
+++ vic/branches/mpeg4/configure Fri Nov 10 12:54:06 2006
@@ -30,6 +30,14 @@
ac_help="$ac_help
--with-qcam=dir specify directory with qcam.h for Connectix QuickCam device driver"
ac_help="$ac_help
+--with-ffmpeginc=dir specify the prefix directory of ffmpeg header"
+ac_help="$ac_help
+--with-ffmpeglib=dir specify the directory of ffmpeg library"
+ac_help="$ac_help
+--with-x264inc=dir specify the directory of x264 header"
+ac_help="$ac_help
+--with-x264lib=dir specify the directory of x264 library"
+ac_help="$ac_help
--enable-cpudetect Enable or disable runtime cpu detection"
ac_help="$ac_help
--enable-h261as Enable or disable the h261as codec"
@@ -647,7 +655,7 @@
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:651: checking host system type" >&5
+echo "configure:659: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -668,7 +676,7 @@
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:672: checking target system type" >&5
+echo "configure:680: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -686,7 +694,7 @@
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:690: checking build system type" >&5
+echo "configure:698: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -712,7 +720,7 @@
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:716: checking for $ac_word" >&5
+echo "configure:724: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -742,7 +750,7 @@
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:746: checking for $ac_word" >&5
+echo "configure:754: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -793,7 +801,7 @@
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:797: checking for $ac_word" >&5
+echo "configure:805: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -825,7 +833,7 @@
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:829: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:837: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -836,12 +844,12 @@
cat > conftest.$ac_ext << EOF
-#line 840 "configure"
+#line 848 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -867,12 +875,12 @@
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:871: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:879: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:876: checking whether we are using GNU C" >&5
+echo "configure:884: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -881,7 +889,7 @@
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -900,7 +908,7 @@
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:904: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:912: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -936,7 +944,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:940: checking for $ac_word" >&5
+echo "configure:948: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -968,7 +976,7 @@
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:972: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:980: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -979,12 +987,12 @@
cat > conftest.$ac_ext << EOF
-#line 983 "configure"
+#line 991 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1010,12 +1018,12 @@
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1014: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1022: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1019: checking whether we are using GNU C++" >&5
+echo "configure:1027: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1024,7 +1032,7 @@
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -1043,7 +1051,7 @@
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1047: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1055: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1075,7 +1083,7 @@
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1079: checking how to run the C preprocessor" >&5
+echo "configure:1087: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1090,13 +1098,13 @@
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1094 "configure"
+#line 1102 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1107,13 +1115,13 @@
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1111 "configure"
+#line 1119 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1124,13 +1132,13 @@
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1128 "configure"
+#line 1136 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1155,12 +1163,12 @@
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1159: checking for ANSI C header files" >&5
+echo "configure:1167: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1164 "configure"
+#line 1172 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1168,7 +1176,7 @@
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1185,7 +1193,7 @@
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1189 "configure"
+#line 1197 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1203,7 +1211,7 @@
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1207 "configure"
+#line 1215 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1224,7 +1232,7 @@
:
else
cat > conftest.$ac_ext <<EOF
-#line 1228 "configure"
+#line 1236 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1235,7 +1243,7 @@
exit (0); }
EOF
-if { (eval echo configure:1239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1262,17 +1270,17 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1266: checking for $ac_hdr" >&5
+echo "configure:1274: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1271 "configure"
+#line 1279 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1310,7 +1318,7 @@
V_SIGRET="void"
echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:1314: checking for main in -lXbsd" >&5
+echo "configure:1322: checking for main in -lXbsd" >&5
ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1318,14 +1326,14 @@
ac_save_LIBS="$LIBS"
LIBS="-lXbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1322 "configure"
+#line 1330 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:1329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1346,7 +1354,7 @@
fi
echo $ac_n "checking for poll in -lsocket""... $ac_c" 1>&6
-echo "configure:1350: checking for poll in -lsocket" >&5
+echo "configure:1358: checking for poll in -lsocket" >&5
ac_lib_var=`echo socket'_'poll | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1354,7 +1362,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1358 "configure"
+#line 1366 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1365,7 +1373,7 @@
poll()
; return 0; }
EOF
-if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1389,7 +1397,7 @@
# nsl lib seems to cause problems on IRIX
if test `echo "$target_os" | sed 's/\..*//'` != irix6 ; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:1393: checking for gethostbyname in -lnsl" >&5
+echo "configure:1401: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1397,7 +1405,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1401 "configure"
+#line 1409 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1408,7 +1416,7 @@
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1530,12 +1538,12 @@
echo "checking for X11 header files"
if test "$x_includes" = NONE ; then
cat > conftest.$ac_ext <<EOF
-#line 1534 "configure"
+#line 1542 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1569,7 +1577,7 @@
echo "checking for X11 library archive"
if test "$x_libraries" = NONE ; then
echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:1573: checking for XOpenDisplay in -lX11" >&5
+echo "configure:1581: checking for XOpenDisplay in -lX11" >&5
ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1577,7 +1585,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lX11 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1581 "configure"
+#line 1589 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1588,7 +1596,7 @@
XOpenDisplay()
; return 0; }
EOF
-if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1628,7 +1636,7 @@
if test -n "$V_SHM" ; then
if test -z "$x_libraries" ; then
echo $ac_n "checking for XShmAttach in -lXext""... $ac_c" 1>&6
-echo "configure:1632: checking for XShmAttach in -lXext" >&5
+echo "configure:1640: checking for XShmAttach in -lXext" >&5
ac_lib_var=`echo Xext'_'XShmAttach | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1636,7 +1644,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lXext -lX11 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1640 "configure"
+#line 1648 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1647,7 +1655,7 @@
XShmAttach()
; return 0; }
EOF
-if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1774,12 +1782,12 @@
else
echo "Not using UCL tcl - You're on your own!"
cat > conftest.$ac_ext <<EOF
-#line 1778 "configure"
+#line 1786 "configure"
#include "confdefs.h"
#include <tcl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1818,7 +1826,7 @@
fi
fi
echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
-echo "configure:1822: checking for main in -ltcl8.0" >&5
+echo "configure:1830: checking for main in -ltcl8.0" >&5
ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1826,14 +1834,14 @@
ac_save_LIBS="$LIBS"
LIBS="-ltcl8.0 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1830 "configure"
+#line 1838 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:1837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1999,12 +2007,12 @@
else
echo "Not using UCL tk - You're on your own!"
cat > conftest.$ac_ext <<EOF
-#line 2003 "configure"
+#line 2011 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2045,7 +2053,7 @@
fi
fi
echo $ac_n "checking for main in -ltk8.0""... $ac_c" 1>&6
-echo "configure:2049: checking for main in -ltk8.0" >&5
+echo "configure:2057: checking for main in -ltk8.0" >&5
ac_lib_var=`echo tk8.0'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2053,14 +2061,14 @@
ac_save_LIBS="$LIBS"
LIBS="-ltk8.0 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2057 "configure"
+#line 2065 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2159,6 +2167,15 @@
#XXX
V_STATIC="-static"
+V_LIB_GRABBER=""
+V_INCLUDE_GRABBER=""
+V_OBJ_GRABBER=""
+V_LIB_XIL=""
+V_OBJ_XIL=""
+V_INCLUDE_FFMPEG=""
+V_INCLUDE_X264=""
+V_LIB_FFMPEG=""
+V_LIB_X264=""
# Check whether --with-aix-shm or --without-aix-shm was given.
if test "${with_aix_shm+set}" = set; then
@@ -2191,6 +2208,391 @@
exit 1
fi
+# Check whether --with-ffmpeginc or --without-ffmpeginc was given.
+if test "${with_ffmpeginc+set}" = set; then
+ withval="$with_ffmpeginc"
+ V_INCLUDE_FFMPEG=$withval
+else
+ V_INCLUDE_FFMPEG=""
+fi
+
+if test "$V_INCLUDE_FFMPEG" != "" ; then
+ if test ! -r $V_INCLUDE_FFMPEG/ffmpeg/avcodec.h ; then
+ echo "Error! you need to have $V_INCLUDE_FFMPEG/ffmpeg/avcodec.h around"
+ exit 1
+ elif test ! -r $V_INCLUDE_FFMPEG/ffmpeg/avutil.h ; then
+ echo "Error! you need to have $V_INCLUDE_FFMPEG/ffmpeg/avutil.h around"
+ exit 1
+ elif test ! -r $V_INCLUDE_FFMPEG/ffmpeg/swscale.h ; then
+ echo "Error! you need to have $V_INCLUDE_FFMPEG/ffmpeg/swscale.h around"
+ exit 1
+ fi
+ echo "checking for FFmpeg headers...yes"
+ V_INCLUDE="$V_INCLUDE -I$V_INCLUDE_FFMPEG"
+
+else
+
+ ac_safe=`echo "ffmpeg/avcodec.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for ffmpeg/avcodec.h""... $ac_c" 1>&6
+echo "configure:2238: checking for ffmpeg/avcodec.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2243 "configure"
+#include "confdefs.h"
+#include <ffmpeg/avcodec.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+
+ echo "Error! you need to have avcodec.h around."
+ exit -1
+
+fi
+
+ ac_safe=`echo "ffmpeg/avutil.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for ffmpeg/avutil.h""... $ac_c" 1>&6
+echo "configure:2275: checking for ffmpeg/avutil.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2280 "configure"
+#include "confdefs.h"
+#include <ffmpeg/avutil.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+
+ echo "Error! you need to have avutil.h around."
+ exit -1
+
+fi
+
+ ac_safe=`echo "ffmpeg/swscale.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for ffmpeg/swscale.h""... $ac_c" 1>&6
+echo "configure:2312: checking for ffmpeg/swscale.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2317 "configure"
+#include "confdefs.h"
+#include <ffmpeg/swscale.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+
+ echo "Error! you need to have swscale.h around."
+ exit -1
+
+fi
+
+fi
+
+# Check whether --with-ffmpeglib or --without-ffmpeglib was given.
+if test "${with_ffmpeglib+set}" = set; then
+ withval="$with_ffmpeglib"
+ V_LIB_FFMPEG=$withval
+else
+ V_LIB_FFMPEG=""
+fi
+
+if test "$V_LIB_FFMPEG" != "" ; then
+ if test ! -r $V_LIB_FFMPEG/libavcodec.a ; then
+ echo "Error! you need to have $V_LIB_FFMPEG/libavcodec.a around"
+ elif test ! -r $V_LIB_FFMPEG/libavutil.a ; then
+ echo "Error! you need to have $V_LIB_FFMPEG/libavutil.a around"
+ elif test ! -r $V_LIB_FFMPEG/libswscale.a ; then
+ echo "Error! you need to have $V_LIB_FFMPEG/libswscale.a around"
+ fi
+ V_LIB_FFMPEG="-L$V_LIB_FFMPEG -lavcodec -lavutil -lswscale"
+else
+ echo $ac_n "checking for main in -lavcodec""... $ac_c" 1>&6
+echo "configure:2368: checking for main in -lavcodec" >&5
+ac_lib_var=`echo avcodec'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lavcodec $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2376 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:2383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo avcodec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lavcodec $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+
+ echo "Error! you need to have libavcodec around."
+ exit -1
+
+fi
+
+ echo $ac_n "checking for main in -lavutil""... $ac_c" 1>&6
+echo "configure:2415: checking for main in -lavutil" >&5
+ac_lib_var=`echo avutil'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lavutil $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2423 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo avutil | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lavutil $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+
+ echo "Error! you need to have libavutil around."
+ exit -1
+
+fi
+
+ echo $ac_n "checking for main in -lswscale""... $ac_c" 1>&6
+echo "configure:2462: checking for main in -lswscale" >&5
+ac_lib_var=`echo swscale'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lswscale $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2470 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo swscale | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lswscale $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+
+ echo "Error! you need to have libswscale around."
+ exit -1
+
+fi
+
+ V_LIB_FFMPEG="-lavcodec -lavutil -lswscale"
+fi
+
+# Check whether --with-x264inc or --without-x264inc was given.
+if test "${with_x264inc+set}" = set; then
+ withval="$with_x264inc"
+ V_INCLUDE_X264=$withval
+else
+ V_INCLUDE_X264=""
+fi
+
+if test "$V_INCLUDE_X264" != "" ; then
+ if test ! -r $V_INCLUDE_X264/x264.h ; then
+ echo "Error! you need to have $V_INCLUDE_X264/x264.h around."
+ exit 1
+ fi
+ V_INCLUDE="$V_INCLUDE -I$V_INCLUDE_X264"
+elif test ! -r /usr/local/include/x264.h -a ! -r /usr/include/x264.h ; then
+ echo "Error! you need to have x264.h around."
+ exit 1
+else
+ echo "checking for x264.h...yes"
+fi
+
+# Check whether --with-x264lib or --without-x264lib was given.
+if test "${with_x264lib+set}" = set; then
+ withval="$with_x264lib"
+ V_LIB_X264=$withval
+else
+ V_LIB_X264=""
+fi
+
+if test "$V_LIB_X264" != "" ; then
+ if test ! -r $V_LIB_X264/libx264.a ; then
+ echo "Error! you need to have $V_LIB_X264/libx264.a around"
+ exit 1
+ fi
+ V_LIB_X264="-L$V_LIB_X264 -lx264"
+else
+ echo $ac_n "checking for main in -lx264""... $ac_c" 1>&6
+echo "configure:2548: checking for main in -lx264" >&5
+ac_lib_var=`echo x264'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lx264 $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2556 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:2563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo x264 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lx264 $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+
+ echo "Error! you need to have libx264 around."
+ exit -1
+
+fi
+
+ V_LIB_X264="-lx264"
+fi
+
V_CPUDETECT=""
# Check whether --enable-cpudetect or --disable-cpudetect was given.
@@ -2234,7 +2636,7 @@
if test "$dvdecode" = "yes"; then
echo $ac_n "checking for main in -ldv""... $ac_c" 1>&6
-echo "configure:2238: checking for main in -ldv" >&5
+echo "configure:2640: checking for main in -ldv" >&5
ac_lib_var=`echo dv'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2242,14 +2644,14 @@
ac_save_LIBS="$LIBS"
LIBS="-ldv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2246 "configure"
+#line 2648 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2284,17 +2686,17 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2288: checking for $ac_hdr" >&5
+echo "configure:2690: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2293 "configure"
+#line 2695 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2340,7 +2742,7 @@
if test "$xvideo" = "yes"; then
echo $ac_n "checking for XvQueryExtension in -lXv_pic""... $ac_c" 1>&6
-echo "configure:2344: checking for XvQueryExtension in -lXv_pic" >&5
+echo "configure:2746: checking for XvQueryExtension in -lXv_pic" >&5
ac_lib_var=`echo Xv_pic'_'XvQueryExtension | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2348,7 +2750,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lXv_pic -lXext $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2352 "configure"
+#line 2754 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2359,7 +2761,7 @@
XvQueryExtension()
; return 0; }
EOF
-if { (eval echo configure:2363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2387,7 +2789,7 @@
else
echo $ac_n "checking for XvQueryExtension in -lXv""... $ac_c" 1>&6
-echo "configure:2391: checking for XvQueryExtension in -lXv" >&5
+echo "configure:2793: checking for XvQueryExtension in -lXv" >&5
ac_lib_var=`echo Xv'_'XvQueryExtension | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2395,7 +2797,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lXv -lXext $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2399 "configure"
+#line 2801 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2406,7 +2808,7 @@
XvQueryExtension()
; return 0; }
EOF
-if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2440,17 +2842,17 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2444: checking for $ac_hdr" >&5
+echo "configure:2846: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2449 "configure"
+#line 2851 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2485,12 +2887,6 @@
# lots of hairy special cases for detecting which frame capture
# support to compile in
-V_LIB_GRABBER=""
-V_INCLUDE_GRABBER=""
-V_OBJ_GRABBER=""
-V_LIB_XIL=""
-V_OBJ_XIL=""
-
# Check whether --enable-v4l2old or --disable-v4l2old was given.
if test "${enable_v4l2old+set}" = set; then
enableval="$enable_v4l2old"
@@ -2820,6 +3216,8 @@
+
+
V_DEFINE="$V_DEFINE $V_SHM $V_H261AS $V_DV $V_XV $V_CPUDETECT"
@@ -2840,7 +3238,7 @@
;;
*-*-linux*)
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2844: checking for dlopen in -ldl" >&5
+echo "configure:3242: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2848,7 +3246,7 @@
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2852 "configure"
+#line 3250 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2859,7 +3257,7 @@
dlopen()
; return 0; }
EOF
-if { (eval echo configure:2863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2887,7 +3285,7 @@
esac
if test ! -z "$V_LIB_DL" ; then
echo $ac_n "checking for main in -l$V_LIB_DL""... $ac_c" 1>&6
-echo "configure:2891: checking for main in -l$V_LIB_DL" >&5
+echo "configure:3289: checking for main in -l$V_LIB_DL" >&5
ac_lib_var=`echo $V_LIB_DL'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2895,14 +3293,14 @@
ac_save_LIBS="$LIBS"
LIBS="-l$V_LIB_DL $V_STATIC $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2899 "configure"
+#line 3297 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3150,6 +3548,8 @@
s%@V_INCLUDE_TK@%$V_INCLUDE_TK%g
s%@V_LIB_TK@%$V_LIB_TK%g
s%@V_LIBRARY_TK@%$V_LIBRARY_TK%g
+s%@V_LIB_FFMPEG@%$V_LIB_FFMPEG%g
+s%@V_LIB_X264@%$V_LIB_X264%g
s%@V_INCLUDE_GRABBER@%$V_INCLUDE_GRABBER%g
s%@V_LIB_GRABBER@%$V_LIB_GRABBER%g
s%@V_OBJ_GRABBER@%$V_OBJ_GRABBER%g
Modified: vic/branches/mpeg4/configure.in
==============================================================================
--- vic/branches/mpeg4/configure.in (original)
+++ vic/branches/mpeg4/configure.in Fri Nov 10 12:54:06 2006
@@ -54,6 +54,15 @@
#XXX
V_STATIC="-static"
+V_LIB_GRABBER=""
+V_INCLUDE_GRABBER=""
+V_OBJ_GRABBER=""
+V_LIB_XIL=""
+V_OBJ_XIL=""
+V_INCLUDE_FFMPEG=""
+V_INCLUDE_X264=""
+V_LIB_FFMPEG=""
+V_LIB_X264=""
AC_ARG_WITH(aix-shm, --with-aix-shm=path specify a pathname for the AIX shm X extension library file, lib=$withval, lib="")
if test "$lib" != "" ; then
@@ -72,6 +81,94 @@
exit 1
fi
+AC_ARG_WITH(ffmpeginc, --with-ffmpeginc=dir specify the prefix directory of ffmpeg header, V_INCLUDE_FFMPEG=$withval, V_INCLUDE_FFMPEG="")
+if test "$V_INCLUDE_FFMPEG" != "" ; then
+ if test ! -r $V_INCLUDE_FFMPEG/ffmpeg/avcodec.h ; then
+ echo "Error! you need to have $V_INCLUDE_FFMPEG/ffmpeg/avcodec.h around"
+ exit 1
+ elif test ! -r $V_INCLUDE_FFMPEG/ffmpeg/avutil.h ; then
+ echo "Error! you need to have $V_INCLUDE_FFMPEG/ffmpeg/avutil.h around"
+ exit 1
+ elif test ! -r $V_INCLUDE_FFMPEG/ffmpeg/swscale.h ; then
+ echo "Error! you need to have $V_INCLUDE_FFMPEG/ffmpeg/swscale.h around"
+ exit 1
+ fi
+ echo "checking for FFmpeg headers...yes"
+ V_INCLUDE="$V_INCLUDE -I$V_INCLUDE_FFMPEG"
+
+else
+
+ AC_CHECK_HEADER(ffmpeg/avcodec.h, [], [
+ echo "Error! you need to have avcodec.h around."
+ exit -1
+ ])
+ AC_CHECK_HEADER(ffmpeg/avutil.h, [], [
+ echo "Error! you need to have avutil.h around."
+ exit -1
+ ])
+ AC_CHECK_HEADER(ffmpeg/swscale.h, [], [
+ echo "Error! you need to have swscale.h around."
+ exit -1
+ ])
+fi
+
+AC_ARG_WITH(ffmpeglib, --with-ffmpeglib=dir specify the directory of ffmpeg library, V_LIB_FFMPEG=$withval, V_LIB_FFMPEG="")
+if test "$V_LIB_FFMPEG" != "" ; then
+ if test ! -r $V_LIB_FFMPEG/libavcodec.a ; then
+ echo "Error! you need to have $V_LIB_FFMPEG/libavcodec.a around"
+ elif test ! -r $V_LIB_FFMPEG/libavutil.a ; then
+ echo "Error! you need to have $V_LIB_FFMPEG/libavutil.a around"
+ elif test ! -r $V_LIB_FFMPEG/libswscale.a ; then
+ echo "Error! you need to have $V_LIB_FFMPEG/libswscale.a around"
+ fi
+ V_LIB_FFMPEG="-L$V_LIB_FFMPEG -lavcodec -lavutil -lswscale"
+else
+ AC_CHECK_LIB(avcodec, main, [], [
+ echo "Error! you need to have libavcodec around."
+ exit -1
+ ])
+ AC_CHECK_LIB(avutil, main, [], [
+ echo "Error! you need to have libavutil around."
+ exit -1
+ ])
+ AC_CHECK_LIB(swscale, main, [], [
+ echo "Error! you need to have libswscale around."
+ exit -1
+ ])
+ V_LIB_FFMPEG="-lavcodec -lavutil -lswscale"
+fi
+
+AC_ARG_WITH(x264inc, --with-x264inc=dir specify the directory of x264 header, V_INCLUDE_X264=$withval, V_INCLUDE_X264="")
+dnl x264 header needs pre-included headers
+dnl
+if test "$V_INCLUDE_X264" != "" ; then
+ if test ! -r $V_INCLUDE_X264/x264.h ; then
+ echo "Error! you need to have $V_INCLUDE_X264/x264.h around."
+ exit 1
+ fi
+ V_INCLUDE="$V_INCLUDE -I$V_INCLUDE_X264"
+elif test ! -r /usr/local/include/x264.h -a ! -r /usr/include/x264.h ; then
+ echo "Error! you need to have x264.h around."
+ exit 1
+else
+ echo "checking for x264.h...yes"
+fi
+
+AC_ARG_WITH(x264lib, --with-x264lib=dir specify the directory of x264 library, V_LIB_X264=$withval, V_LIB_X264="")
+if test "$V_LIB_X264" != "" ; then
+ if test ! -r $V_LIB_X264/libx264.a ; then
+ echo "Error! you need to have $V_LIB_X264/libx264.a around"
+ exit 1
+ fi
+ V_LIB_X264="-L$V_LIB_X264 -lx264"
+else
+ AC_CHECK_LIB(x264, main, [], [
+ echo "Error! you need to have libx264 around."
+ exit -1
+ ])
+ V_LIB_X264="-lx264"
+fi
+
V_CPUDETECT=""
AC_ARG_ENABLE(cpudetect, --enable-cpudetect Enable or disable runtime cpu detection, cpudetect=no, cpudetect=yes)
@@ -146,12 +243,6 @@
# lots of hairy special cases for detecting which frame capture
# support to compile in
-V_LIB_GRABBER=""
-V_INCLUDE_GRABBER=""
-V_OBJ_GRABBER=""
-V_LIB_XIL=""
-V_OBJ_XIL=""
-
AC_ARG_ENABLE(v4l2old, --enable-v4l2old Enable or disable old Video4Linux2 grabber, v4l2old=yes, v4l2old=no)
if test "$v4l2old" = "yes" ; then
V_OBJ_GRABBER="$V_OBJ_GRABBER video/grabber-v4l2-old.o"
@@ -460,6 +551,8 @@
V_OBJ="$V_OBJ codec/encoder-bvc.o codec/decoder-bvc.o"
fi
+AC_SUBST(V_LIB_FFMPEG)
+AC_SUBST(V_LIB_X264)
AC_SUBST(V_INCLUDE_GRABBER)
AC_SUBST(V_LIB_GRABBER)
AC_SUBST(V_OBJ_GRABBER)
Modified: vic/branches/mpeg4/render/color-swscale.cpp
==============================================================================
--- vic/branches/mpeg4/render/color-swscale.cpp (original)
+++ vic/branches/mpeg4/render/color-swscale.cpp Fri Nov 10 12:54:06 2006
@@ -6,8 +6,8 @@
#include "renderer.h"
#include "config_arch.h"
-#include "swscale.h"
-#include "avutil.h"
+#include "ffmpeg/swscale.h"
+#include "ffmpeg/avutil.h"
#include "linux/cpudetect.h"
#ifdef HAVE_SWSCALE
More information about the Sumover-dev
mailing list