1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-07 01:53:06 +00:00

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
This commit is contained in:
atmos4 2002-03-06 02:22:46 +00:00
parent 67b1c950ad
commit b3ac02ee7d
2 changed files with 41 additions and 2 deletions

35
configure vendored
View File

@ -2605,7 +2605,8 @@ else
fi 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 cat > $TMPC << EOF
#include <decore.h> #include <decore.h>
int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_FRAME_311; } 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" _ld_decore="$_xvidcore"
_def_decore='#define NEW_DECORE 1' _def_decore='#define NEW_DECORE 1'
_def_divx='#define USE_DIVX' _def_divx='#define USE_DIVX'
_def_divx5='#undef DECORE_DIVX5'
_def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS' _def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
_codecmodules="xvid $_codecmodules" _codecmodules="xvid $_codecmodules"
echores "XviD (with $_xvidcore)" echores "XviD (with $_xvidcore)"
@ -2627,6 +2629,7 @@ elif test "$_xvid" != no && cc_check -lm -lxvidcore ; then
_ld_decore='-lxvidcore' _ld_decore='-lxvidcore'
_def_decore='#define NEW_DECORE 1' _def_decore='#define NEW_DECORE 1'
_def_divx='#define USE_DIVX' _def_divx='#define USE_DIVX'
_def_divx5='#undef DECORE_DIVX5'
_def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS' _def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
_codecmodules="xvid $_codecmodules" _codecmodules="xvid $_codecmodules"
echores "XviD (with libxvidcore.so)" 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' _ld_decore='-ldivxdecore opendivx/postprocess.o'
_def_decore='#define NEW_DECORE 1' _def_decore='#define NEW_DECORE 1'
_def_divx='#define USE_DIVX' _def_divx='#define USE_DIVX'
_def_divx5='#undef DECORE_DIVX5'
_def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1' _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
_codecmodules="divx4linux $_codecmodules" _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 <decore.h>
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 elif test "$_opendivx" != no ; then
_xvid=no _xvid=no
_divx4linux=no _divx4linux=no
@ -2647,6 +2672,7 @@ elif test "$_opendivx" != no ; then
_ld_decore='-Lopendivx -ldecore' _ld_decore='-Lopendivx -ldecore'
_def_decore='#undef NEW_DECORE' _def_decore='#undef NEW_DECORE'
_def_divx='#define USE_DIVX' _def_divx='#define USE_DIVX'
_def_divx5='#undef DECORE_DIVX5'
_def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1' _def_odivx_postprocess='#define HAVE_ODIVX_POSTPROCESS 1'
_codecmodules="opendivx $_codecmodules" _codecmodules="opendivx $_codecmodules"
echores "OpenDivX" echores "OpenDivX"
@ -2657,8 +2683,10 @@ else
_ld_decore='' _ld_decore=''
_def_decore='#undef NEW_DECORE' _def_decore='#undef NEW_DECORE'
_def_divx='#undef USE_DIVX' _def_divx='#undef USE_DIVX'
_def_divx5='#undef DECORE_DIVX5'
_def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS' _def_odivx_postprocess='#undef HAVE_ODIVX_POSTPROCESS'
echores "no" echores "no"
fi # DivX5 check
fi fi
@ -3126,6 +3154,9 @@ $_def_divx
/* You have to change DECORE_LIBS in config.mak too! */ /* You have to change DECORE_LIBS in config.mak too! */
$_def_decore $_def_decore
/* Define if you are using DivX5Linux Decore library */
$_def_divx5
/* If build mencoder */ /* If build mencoder */
$_mencoder_flag $_mencoder_flag

View File

@ -897,7 +897,11 @@ switch(sh_video->codec->driver){
#ifdef NEW_DECORE #ifdef NEW_DECORE
dec_frame.bmp=&dec_pic; dec_frame.bmp=&dec_pic;
dec_pic.y=dec_pic.u=dec_pic.v=NULL; 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); decore(0x123, (sh_video->format==mmioFOURCC('D','I','V','3'))?DEC_OPT_FRAME_311:DEC_OPT_FRAME, &dec_frame, NULL);
#endif
#else #else
opendivx_src[0]=NULL; opendivx_src[0]=NULL;
decore(0x123, 0, &dec_frame, 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.bmp=sh_video->our_out_buffer;
dec_frame.stride=sh_video->disp_w; dec_frame.stride=sh_video->disp_w;
// printf("Decoding DivX4 frame\n"); // 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); 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; if(!drop_frame) blit_frame=3;
break; break;
} }