changeset 11436:6afc2d6f5a08

XviD Api4 support
author iive
date Wed, 12 Nov 2003 00:43:42 +0000
parents e35ceb2bf375
children 7826e4e376c7
files cfg-common.h cfg-mencoder.h configure libmpcodecs/Makefile libmpcodecs/vd.c libmpcodecs/vd_xvid.c libmpcodecs/ve.c libmpcodecs/ve_xvid.c
diffstat 8 files changed, 31 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-common.h	Tue Nov 11 12:16:56 2003 +0000
+++ b/cfg-common.h	Wed Nov 12 00:43:42 2003 +0000
@@ -200,7 +200,7 @@
 #ifdef USE_LIBAVCODEC
 	{"lavdopts", lavc_decode_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #endif
-#ifdef HAVE_XVID
+#if defined(HAVE_XVID3) || defined(HAVE_XVID4)
 	{"xvidopts", xvid_dec_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #endif
 // ------------------------- subtitles options --------------------
@@ -437,7 +437,7 @@
 extern m_option_t lavc_decode_opts_conf[];
 #endif
 
-#ifdef HAVE_XVID
+#if defined(HAVE_XVID3) || defined(HAVE_XVID4)
 extern m_option_t xvid_dec_opts[];
 #endif
 
--- a/cfg-mencoder.h	Tue Nov 11 12:16:56 2003 +0000
+++ b/cfg-mencoder.h	Wed Nov 12 00:43:42 2003 +0000
@@ -52,7 +52,7 @@
 extern m_option_t vfwopts_conf[];
 #endif
 
-#ifdef HAVE_XVID
+#if defined(HAVE_XVID3) || defined(HAVE_XVID4)
 extern m_option_t xvidencopts_conf[];
 #endif
 
@@ -93,7 +93,7 @@
 #ifdef HAVE_LIBDV095
 	"   libdv    - DV encoding using libdv v0.9.5\n"
 #endif
-#ifdef HAVE_XVID
+#if defined(HAVE_XVID3) || defined(HAVE_XVID4)
 	"   xvid     - xvid encoding\n"
 #endif
 	"\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
@@ -216,7 +216,7 @@
 #ifdef USE_WIN32DLL
 	{"vfwopts", vfwopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #endif
-#ifdef HAVE_XVID
+#if defined(HAVE_XVID3) || defined(HAVE_XVID4)
 	{"xvidencopts", xvidencopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #endif
 
--- a/configure	Tue Nov 11 12:16:56 2003 +0000
+++ b/configure	Wed Nov 12 00:43:42 2003 +0000
@@ -1076,6 +1076,7 @@
 
 _prefix="/usr/local"
 _xvmclib="XvMCNVIDIA"
+_xvidcore="xvidcore"
 
 # GOTCHA: the variables below defines the default behavior for autodetection
 # and have - unless stated otherwise - at least 2 states : yes no
@@ -4932,21 +4933,30 @@
 #include <xvid.h>
 int main(void) { xvid_init(0, 0, 0, 0); return 0; }
 EOF
-if test "$_xvid" != no && cc_check "$_xvidcore" -lm ; then
+if test "$_xvid" != no && cc_check -l$_xvidcore -lm ; then
   _xvid=yes
-  _ld_xvid="$_xvidcore"
-  _def_xvid='#define HAVE_XVID 1'
+  _ld_xvid="-l$_xvidcore"
+  _def_xvid3='#define HAVE_XVID3 1'
+  _def_xvid4='#undef HAVE_XVID4'
   _codecmodules="xvid $_codecmodules"
-elif test "$_xvid" != no && cc_check -lxvidcore -lm ; then
+else
+cat > $TMPC << EOF
+#include <xvid.h>
+int main(void) { xvid_global(0, 0, 0, 0); return 0; }
+EOF
+  if test "$_xvid" != no && cc_check -l$_xvidcore -lm ; then
   _xvid=yes
-  _ld_xvid='-lxvidcore'
-  _def_xvid='#define HAVE_XVID 1'
+    _ld_xvid="-l$_xvidcore"
+    _def_xvid3='#undef HAVE_XVID3'
+    _def_xvid4='#define HAVE_XVID4 1'
   _codecmodules="xvid $_codecmodules"
-else
+  else
   _xvid=no
   _ld_xvid=''
-  _def_xvid='#undef HAVE_XVID'
+    _def_xvid3='#undef HAVE_XVID3'
+    _def_xvid4='#undef HAVE_XVID4'
   _nocodecmodules="xvid $_nocodecmodules"
+  fi
 fi
 echores "$_xvid"
 
@@ -5930,7 +5940,8 @@
 $_def_divx5
 
 /* Define if you are using XviD library */
-$_def_xvid
+$_def_xvid3
+$_def_xvid4
 $_def_decore_xvid
 $_def_encore_xvid
 
--- a/libmpcodecs/Makefile	Tue Nov 11 12:16:56 2003 +0000
+++ b/libmpcodecs/Makefile	Wed Nov 12 00:43:42 2003 +0000
@@ -11,7 +11,7 @@
 
 VIDEO_SRCS_LIB=vd_libmpeg2.c vd_nuv.c vd_lzo.c
 VIDEO_SRCS_NAT=vd_null.c vd_cinepak.c vd_qtrpza.c vd_raw.c vd_hmblck.c vd_msvidc.c vd_fli.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c vd_cyuv.c vd_msrle.c vd_mpegpes.c vd_lcl.c vd_mtga.c vd_sgi.c vd_qt8bps.c
-VIDEO_SRCS_OPT=vd_realvid.c vd_ffmpeg.c vd_dshow.c vd_dmo.c vd_vfw.c vd_vfwex.c vd_odivx.c vd_divx4.c vd_zrmjpeg.c vd_xanim.c vd_xvid.c vd_libdv.c vd_qtvideo.c vd_theora.c
+VIDEO_SRCS_OPT=vd_realvid.c vd_ffmpeg.c vd_dshow.c vd_dmo.c vd_vfw.c vd_vfwex.c vd_odivx.c vd_divx4.c vd_zrmjpeg.c vd_xanim.c vd_xvid.c vd_xvid4.c vd_libdv.c vd_qtvideo.c vd_theora.c
 VIDEO_SRCS=dec_video.c vd.c $(VIDEO_SRCS_NAT) $(VIDEO_SRCS_LIB) $(VIDEO_SRCS_OPT)
 
 VFILTER_SRCS=vf.c vf_vo.c vf_crop.c vf_expand.c vf_scale.c vf_format.c vf_yuy2.c vf_flip.c vf_rgb2bgr.c vf_rotate.c vf_mirror.c vf_palette.c vf_lavc.c vf_dvbscale.c vf_cropdetect.c vf_test.c vf_noise.c vf_yvu9.c vf_rectangle.c vf_lavcdeint.c vf_eq.c vf_eq2.c vf_halfpack.c vf_dint.c vf_1bpp.c vf_bmovl.c vf_2xsai.c vf_unsharp.c vf_swapuv.c vf_il.c vf_boxblur.c vf_sab.c vf_smartblur.c vf_perspective.c vf_down3dright.c vf_field.c vf_denoise3d.c vf_hqdn3d.c vf_detc.c vf_telecine.c vf_tfields.c vf_ivtc.c vf_ilpack.c vf_dsize.c vf_decimate.c vf_softpulldown.c vf_tinterlace.c vf_pullup.c pullup.c vf_framestep.c vf_tile.c vf_delogo.c vf_fil.c vf_hue.c vf_spp.c
@@ -19,7 +19,7 @@
 VFILTER_SRCS += vf_pp.c
 endif
 
-ENCODER_SRCS=ve.c ve_divx4.c ve_lavc.c ve_vfw.c ve_rawrgb.c ve_libdv.c ve_xvid.c ve_qtvideo.c ve_nuv.c
+ENCODER_SRCS=ve.c ve_divx4.c ve_lavc.c ve_vfw.c ve_rawrgb.c ve_libdv.c ve_xvid.c ve_xvid4.c ve_qtvideo.c ve_nuv.c
 
 NATIVE_SRCS=native/RTjpegN.c native/cinepak.c native/fli.c native/minilzo.c native/msvidc.c native/nuppelvideo.c native/qtrle.c native/qtrpza.c native/qtsmc.c native/roqav.c native/xa_gsm.c native/decode144.c native/decode288.c
 
--- a/libmpcodecs/vd.c	Tue Nov 11 12:16:56 2003 +0000
+++ b/libmpcodecs/vd.c	Wed Nov 12 00:43:42 2003 +0000
@@ -120,7 +120,7 @@
 #ifdef USE_REALCODECS
 	&mpcodecs_vd_realvid,
 #endif
-#ifdef HAVE_XVID
+#if defined(HAVE_XVID3) || defined(HAVE_XVID4)
 	&mpcodecs_vd_xvid,
 #endif
 #ifdef HAVE_LIBDV095
--- a/libmpcodecs/vd_xvid.c	Tue Nov 11 12:16:56 2003 +0000
+++ b/libmpcodecs/vd_xvid.c	Wed Nov 12 00:43:42 2003 +0000
@@ -4,7 +4,7 @@
 #include "config.h"
 #include "mp_msg.h"
 
-#ifdef HAVE_XVID
+#ifdef HAVE_XVID3
 
 #include "vd_internal.h"
 #include "m_option.h"
--- a/libmpcodecs/ve.c	Tue Nov 11 12:16:56 2003 +0000
+++ b/libmpcodecs/ve.c	Wed Nov 12 00:43:42 2003 +0000
@@ -33,7 +33,7 @@
     &ve_info_libdv,
 #endif
     &ve_info_rawrgb,
-#if defined(HAVE_XVID)
+#if defined(HAVE_XVID3) || defined(HAVE_XVID4)
     &ve_info_xvid,
 #endif
     &ve_info_nuv,
--- a/libmpcodecs/ve_xvid.c	Tue Nov 11 12:16:56 2003 +0000
+++ b/libmpcodecs/ve_xvid.c	Wed Nov 12 00:43:42 2003 +0000
@@ -12,7 +12,7 @@
 #include "../config.h"
 #include "../mp_msg.h"
 
-#ifdef HAVE_XVID
+#ifdef HAVE_XVID3
 
 #include "codec-cfg.h"
 #include "stream.h"