From b3ac02ee7d60d925e6313d1957cf5bea79d6e18c Mon Sep 17 00:00:00 2001 From: atmos4 Date: Wed, 6 Mar 2002 02:22:46 +0000 Subject: DivX5 Build support, not usefull because current divx5linux from avifile.sf.net only decodes black/green image git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4945 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 35 +++++++++++++++++++++++++++++++++-- dec_video.c | 8 ++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 2d6ba796c5..937133e9b7 100755 --- a/configure +++ b/configure @@ -2605,7 +2605,8 @@ else fi -echocheck "XviD/DivX4linux/OpenDivX decore" +echocheck "XviD/DivX4linux/DivX5linux/OpenDivX decore" +# DivX5: DEC_OPT_MEMORY_REQS - DivX4: DEC_OPT_FRAME_311 cat > $TMPC << EOF #include int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_FRAME_311; } @@ -2617,6 +2618,7 @@ if test "$_xvidcore" && cc_check -lm "$_xvidcore" ; then _ld_decore="$_xvidcore" _def_decore='#define NEW_DECORE 1' _def_divx='#define USE_DIVX' + _def_divx5='#undef DECORE_DIVX5' _def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS' _codecmodules="xvid $_codecmodules" echores "XviD (with $_xvidcore)" @@ -2627,6 +2629,7 @@ elif test "$_xvid" != no && cc_check -lm -lxvidcore ; then _ld_decore='-lxvidcore' _def_decore='#define NEW_DECORE 1' _def_divx='#define USE_DIVX' + _def_divx5='#undef DECORE_DIVX5' _def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS' _codecmodules="xvid $_codecmodules" echores "XviD (with libxvidcore.so)" @@ -2637,9 +2640,31 @@ elif test "$_divx4linux" != no && cc_check -lm -ldivxdecore -lm ; then _ld_decore='-ldivxdecore opendivx/postprocess.o' _def_decore='#define NEW_DECORE 1' _def_divx='#define USE_DIVX' + _def_divx5='#undef DECORE_DIVX5' _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1' _codecmodules="divx4linux $_codecmodules" - echores "Divx4linux (with libdivxdecore.so)" + echores "DivX4linux (with libdivxdecore.so)" +elif test "$_divx4linux" != no ; then +# DivX5 check +# OdivxPP disabled because of: +# ld: Warning: type of symbol `dering' changed from 1 to 2 in opendivx/postprocess.o +cat > $TMPC << EOF +#include +int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_MEMORY_REQS; } +EOF +if cc_check -lm -ldivxdecore -lm ; then + _xvid=no + _divx4linux=yes + _opendivx=no +# _ld_decore='-ldivxdecore opendivx/postprocess.o' + _ld_decore='-ldivxdecore' + _def_decore='#define NEW_DECORE 1' + _def_divx='#define USE_DIVX' + _def_divx5='#define DECORE_DIVX5 1' +# _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1' + _def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS' + _codecmodules="divx5linux $_codecmodules" + echores "DivX5linux (with libdivxdecore.so)" elif test "$_opendivx" != no ; then _xvid=no _divx4linux=no @@ -2647,6 +2672,7 @@ elif test "$_opendivx" != no ; then _ld_decore='-Lopendivx -ldecore' _def_decore='#undef NEW_DECORE' _def_divx='#define USE_DIVX' + _def_divx5='#undef DECORE_DIVX5' _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1' _codecmodules="opendivx $_codecmodules" echores "OpenDivX" @@ -2657,8 +2683,10 @@ else _ld_decore='' _def_decore='#undef NEW_DECORE' _def_divx='#undef USE_DIVX' + _def_divx5='#undef DECORE_DIVX5' _def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS' echores "no" +fi # DivX5 check fi @@ -3126,6 +3154,9 @@ $_def_divx /* You have to change DECORE_LIBS in config.mak too! */ $_def_decore +/* Define if you are using DivX5Linux Decore library */ +$_def_divx5 + /* If build mencoder */ $_mencoder_flag diff --git a/dec_video.c b/dec_video.c index 94b62fa3f4..0f81cd54f8 100644 --- a/dec_video.c +++ b/dec_video.c @@ -897,7 +897,11 @@ switch(sh_video->codec->driver){ #ifdef NEW_DECORE dec_frame.bmp=&dec_pic; dec_pic.y=dec_pic.u=dec_pic.v=NULL; +#ifdef DECORE_DIVX5 + decore(0x123, DEC_OPT_FRAME, &dec_frame, NULL); +#else decore(0x123, (sh_video->format==mmioFOURCC('D','I','V','3'))?DEC_OPT_FRAME_311:DEC_OPT_FRAME, &dec_frame, NULL); +#endif #else opendivx_src[0]=NULL; decore(0x123, 0, &dec_frame, NULL); @@ -943,7 +947,11 @@ switch(sh_video->codec->driver){ dec_frame.bmp=sh_video->our_out_buffer; dec_frame.stride=sh_video->disp_w; // printf("Decoding DivX4 frame\n"); +#ifdef DECORE_DIVX5 + decore(0x123, DEC_OPT_FRAME, &dec_frame, NULL); +#else decore(0x123, (sh_video->format==mmioFOURCC('D','I','V','3'))?DEC_OPT_FRAME_311:DEC_OPT_FRAME, &dec_frame, NULL); +#endif if(!drop_frame) blit_frame=3; break; } -- cgit v1.2.3