diff --git a/Makefile b/Makefile index 6a4557e5ab..ac9e9e6b6d 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ OBJS_MPLAYER = $(SRCS_MPLAYER:.c=.o) VO_LIBS = $(AA_LIB) $(X_LIB) $(SDL_LIB) $(GGI_LIB) $(MP1E_LIB) $(MLIB_LIB) $(SVGA_LIB) $(DIRECTFB_LIB) AO_LIBS = $(ARTS_LIB) $(ESD_LIB) $(NAS_LIB) $(SGIAUDIO_LIB) -CODEC_LIBS = $(AV_LIB) $(FAME_LIB) $(MAD_LIB) $(VORBIS_LIB) $(FAAD_LIB) $(LIBLZO_LIB) $(DECORE_LIB) $(XVID_LIB) $(PNG_LIB) $(Z_LIB) $(JPEG_LIB) $(ALSA_LIB) $(XMMS_LIB) $(MATROSKA_LIB) +CODEC_LIBS = $(AV_LIB) $(FAME_LIB) $(MAD_LIB) $(VORBIS_LIB) $(THEORA_LIB) $(FAAD_LIB) $(LIBLZO_LIB) $(DECORE_LIB) $(XVID_LIB) $(PNG_LIB) $(Z_LIB) $(JPEG_LIB) $(ALSA_LIB) $(XMMS_LIB) $(MATROSKA_LIB) COMMON_LIBS = libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(CSS_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(STREAMING_LIB) $(WIN32_LIB) $(GIF_LIB) $(MACOSX_FRAMEWORKS) $(SMBSUPPORT_LIB) $(FRIBIDI_LIB) CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(FREETYPE_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(SDL_INC) $(FRIBIDI_INC) # -Wall diff --git a/configure b/configure index 3c27fa66b9..5a259a47c0 100755 --- a/configure +++ b/configure @@ -189,6 +189,7 @@ Codecs: --enable-libfame enable libfame realtime encoder [autodetect] --enable-vorbis build with OggVorbis support [autodetect] --enable-tremor build with integer-only OggVorbis support [disabled] + --enable-theora build with OggTheora support [autodetect] --enable-matroska build with Matroska support [autodetect] --enable-faad build with FAAD2 (MP4/AAC) support [autodetect] --disable-libdv disable libdv 0.9.5 en/decoding support [autodetect] @@ -1026,6 +1027,7 @@ _esd=auto _liblzo=auto _mad=auto _vorbis=auto +_theora=auto _matroska=auto _tremor=no _faad=auto @@ -1180,6 +1182,8 @@ for ac_option do --disable-vorbis) _vorbis=no ;; --enable-tremor) _tremor=yes ;; --disable-tremor) _tremor=no ;; + --enable-theora) _theora=yes ;; + --disable-theora) _theora=no ;; --enable-matroska) _matroska=yes ;; --disable-matroska) _matroska=no ;; --enable-faad) _faad=yes ;; @@ -4028,6 +4032,25 @@ else fi echores "$_vorbis" +echocheck "OggTheora support" +if test "$_theora" = auto ; then + _theora=no + cat > $TMPC << EOF +#include +int main(void) { theora_version_number (); return 0; } +EOF + cc_check -ltheora -logg -lm && _theora=yes +fi +if test "$_theora" = yes ; then + _def_theora='#define HAVE_OGGTHEORA 1' + _codecmodules="libtheora $_codecmodules" + _ld_theora="-ltheora" +else + _def_theora='#undef HAVE_OGGTHEORA' + _nocodecmodules="libtheora $_nocodecmodules" +fi +echores "$_theora" + echocheck "Matroska support" if test "$_matroska" != no ; then @@ -5272,6 +5295,7 @@ FRIBIDI_LIB = $_ld_fribidi LIBLZO_LIB= $_ld_liblzo MAD_LIB = $_ld_mad VORBIS_LIB = $_ld_vorbis $_ld_libdv +THEORA_LIB = $_ld_theora FAAD_LIB = $_ld_faad SMBSUPPORT_LIB = $_ld_smb XMMS_PLUGINS = $_xmms @@ -5687,6 +5711,9 @@ $_def_vorbis /* enable Tremor as vorbis decoder */ $_def_tremor +/* enable OggTheora support */ +$_def_theora + /* enable Matroska support */ $_def_matroska $_def_matroska_gcc2 diff --git a/etc/codecs.conf b/etc/codecs.conf index 6f2c0a102a..9c98d10d4a 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -12,6 +12,15 @@ release 20030119 ; mpeg 1/2 decoding: ; Note: mpegpes is preferred for hw decoders: +videocodec theora + info "Theora (free, reworked VP3)" + status working + fourcc theo + format 0xFFFC + driver theora + dll libtheora + out YV12 + videocodec mpegpes info "Mpeg PES output (.mpg or Dxr3/DVB card)" comment "for hardware decoding" @@ -958,6 +967,14 @@ videocodec ffrv10 dll rv10 out YV12,I420,IYUV +videocodec ffvp3 + info "FFmpeg's VP3-Codec" + status untested + fourcc VP30,vp30,VP31,vp31 + driver ffmpeg + dll "vp3" + out YV12 + videocodec vp3 info "On2 OpenSource VP3-Codec" status working diff --git a/libmpcodecs/Makefile b/libmpcodecs/Makefile index 2eff8a6b5f..81d5caf11c 100644 --- a/libmpcodecs/Makefile +++ b/libmpcodecs/Makefile @@ -11,7 +11,7 @@ AUDIO_SRCS=dec_audio.c ad.c $(AUDIO_SRCS_LIB) $(AUDIO_SRCS_NAT) $(AUDIO_SRCS_OPT 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_msvidc.c vd_fli.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c vd_cyuv.c vd_msrle.c vd_huffyuv.c vd_mpegpes.c vd_svq1.c vd_lcl.c vd_mtga.c vd_sgi.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_xanim.c vd_xvid.c vd_libdv.c vd_qtvideo.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_xanim.c vd_xvid.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_pp.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 diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c index 8a14f4ec8b..3646ce07c6 100644 --- a/libmpcodecs/vd.c +++ b/libmpcodecs/vd.c @@ -2,6 +2,8 @@ #include #include +#define USE_THEORA + #include "config.h" #include "mp_msg.h" #include "help_mp.h" @@ -29,6 +31,7 @@ extern vd_functions_t mpcodecs_vd_null; extern vd_functions_t mpcodecs_vd_cinepak; extern vd_functions_t mpcodecs_vd_qtrpza; extern vd_functions_t mpcodecs_vd_ffmpeg; +extern vd_functions_t mpcodecs_vd_theora; extern vd_functions_t mpcodecs_vd_dshow; extern vd_functions_t mpcodecs_vd_dmo; extern vd_functions_t mpcodecs_vd_vfw; @@ -67,6 +70,9 @@ vd_functions_t* mpcodecs_vd_drivers[] = { #ifdef USE_LIBAVCODEC &mpcodecs_vd_ffmpeg, #endif +#ifdef HAVE_OGGTHEORA + &mpcodecs_vd_theora, +#endif #ifdef USE_WIN32DLL #ifdef USE_DIRECTSHOW &mpcodecs_vd_dshow,