[MPlayer-dev-eng] PATCH: XviD/OpenDivX vs mplayer namespace clash
Chris Bednar
cjb at AdvancedDataSolutions.com
Sun Jan 6 00:09:39 CET 2002
Hi
This is not really an mplayer issue, but I noticed it in that
context. The OpenDivX/XviD/whatever decore library (and I think the
last source you could get from Mayo before they decided to pretend
that they're trying to fix their CVS server :/ ) has some namespace
issues; this patch changes a couple of variable names:
idct -> idct_func
postprocess -> postprocess_func
to allow it to work with mplayer. As usual with my work, it's just
the bare minimum to get the job done.
Otherwise, I seem to be able to encode and play movies with
mplayer using this library. I haven't looked at the mplayer configure
setup yet, but if it's not already done, I'll probably hack in something
to let it build and use a local static version of this lib if it's
placed in the source tree, as with ffmpeg.
Anyone interested? Anyone know a reason it shouldn't be done?
---- ``Windows: It does that sometimes.'' -mattdm
Chris J. Bednar
Director, Distributed Computing Product Group
http://AdvancedDataSolutions.com/
--------------------------
--- decore/src/generic/init.c.idctclash Sat Jan 5 16:35:49 2002
+++ decore/src/generic/init.c Sat Jan 5 16:38:43 2002
@@ -39,7 +39,7 @@
clearblock=clearblock_generic;
- idct=idct_generic;
+ idct_func=idct_generic;
YV12toRGB32=YV12toRGB32_generic;
YV12toRGB24=YV12toRGB24_generic;
@@ -48,4 +48,4 @@
YV12toYV12=YV12toYV12_generic;
YV12toYUY2=YV12toYUY2_generic;
YV12toUYVY=YV12toUYVY_generic;
-}
\ No newline at end of file
+}
--- decore/src/intel_mmx/idct_mmx.c.idctclash Tue Aug 7 15:47:54 2001
+++ decore/src/intel_mmx/idct_mmx.c Sat Jan 5 16:38:48 2002
@@ -26,7 +26,7 @@
if you are not setting the name of you MMX idct function with compile flag MMX_IDCT_NAME,
then you need to choose a name to insert in here:
*/
-#define DEFAULT_FUNCTION_NAME idct
+#define DEFAULT_FUNCTION_NAME idct_func
--- decore/src/mmx/init.c.idctclash Sat Jan 5 16:35:49 2002
+++ decore/src/mmx/init.c Sat Jan 5 16:58:35 2002
@@ -11,7 +11,6 @@
#include "portab.h"
#include "accel.h"
-
/*
* flags for accelerations
*
@@ -208,12 +207,12 @@
clearblock=clearblock_generic;
- postprocess=postprocess_generic;
+ postprocess_func=postprocess_generic;
// idct_inter=idct_inter_generic;
// idct_intra=idct_intra_generic;
- idct = idct_generic;
+ idct_func = idct_generic;
YV12toRGB32=YV12toRGB32_generic;
YV12toRGB24=YV12toRGB24_generic;
@@ -246,9 +245,9 @@
clearblock=clearblock_mmx;
#ifndef GENERIC_PP
- postprocess=postprocess_mmx;
+ postprocess_func=postprocess_mmx;
#endif
- idct=idct_mmx;
+ idct_func=idct_mmx;
}
else
{
@@ -273,7 +272,7 @@
clearblock=clearblock_generic;
- postprocess=postprocess_generic;
+ postprocess_func=postprocess_generic;
/* [Review][Not Uploaded on CVS]
idct_intra=idct_intra_mmx;
@@ -282,7 +281,7 @@
// idct_intra=idct_intra_generic;
// idct_inter=idct_inter_generic;
- idct = idct_generic;
+ idct_func = idct_generic;
YV12toRGB32=YV12toRGB32_mmx;
YV12toRGB24=YV12toRGB24_mmx;
--- decore/src/powerpc/idct_ppc.c.idctclash Tue Aug 7 15:47:54 2001
+++ decore/src/powerpc/idct_ppc.c Sat Jan 5 16:39:20 2002
@@ -104,7 +104,7 @@
// Function Pointers
//
-idctProc idct;
+idctProc idct_func;
@@ -814,11 +814,11 @@
if (gHasAltivec )
{
- idct = avec_idct;
+ idct_func = avec_idct;
}
else
{
- idct = ppc_idct;
+ idct_func = ppc_idct;
}
}
--- decore/src/idct.c.idctclash Fri Aug 24 13:42:48 2001
+++ decore/src/idct.c Sat Jan 5 16:38:24 2002
@@ -221,4 +221,4 @@
idctcol (block + i);
}
-idctProcPtr idct;
+idctProcPtr idct_func;
--- decore/src/idct.h.idctclash Tue Aug 7 15:47:53 2001
+++ decore/src/idct.h Sat Jan 5 16:38:30 2002
@@ -44,12 +44,12 @@
typedef idctProc* idctProcPtr;
extern idctProc idct_generic;
extern idctProc idct_mmx;
-extern idctProcPtr idct;
+extern idctProcPtr idct_func;
#else
typedef void (*idctProc)(short *block); // function pointer prototypes
-extern idctProc idct;
+extern idctProc idct_func;
extern idctProc idct_mmx;
#endif // !POWERPC
--- decore/src/mp4_block.c.idctclash Tue Aug 7 15:47:53 2001
+++ decore/src/mp4_block.c Sat Jan 5 16:38:38 2002
@@ -281,7 +281,7 @@
// inverse dct
start_timer();
- idct(block);
+ idct_func(block);
stop_dct_timer();
#ifdef _DEBUG_IDCT
@@ -408,7 +408,7 @@
// inverse dct
start_timer();
- idct(block);
+ idct_func(block);
stop_dct_timer();
return 1;
--- decore/src/powerpc/postprocess/postprocess_ppc.c.orig Tue Aug 7 15:47:54 2001
+++ decore/src/powerpc/postprocess/postprocess_ppc.c Sat Jan 5 16:49:57 2002
@@ -66,7 +66,7 @@
// Function Pointers
//
-postprocessProc postprocess;
+postprocessProc postprocess_func;
@@ -583,11 +583,11 @@
if (gHasAltivec )
{
- postprocess = avec_postprocess;
+ postprocess_func = avec_postprocess;
}
else
{
- postprocess = ppc_postprocess;
+ postprocess_func = ppc_postprocess;
}
}
--- decore/src/powerpc/postprocess_ppc.c.orig Tue Aug 7 15:47:54 2001
+++ decore/src/powerpc/postprocess_ppc.c Sat Jan 5 16:48:39 2002
@@ -67,7 +67,7 @@
// Function Pointers
//
-postprocessProc postprocess;
+postprocessProc postprocess_func;
@@ -463,11 +463,11 @@
if (0) // gHasAltivec )
{
- postprocess = avec_postprocess;
+ postprocess_func = avec_postprocess;
}
else
{
- postprocess = ppc_postprocess;
+ postprocess_func = ppc_postprocess;
}
}
--- decore/src/mp4_picture.c.orig Tue Aug 7 15:47:53 2001
+++ decore/src/mp4_picture.c Sat Jan 5 16:46:04 2002
@@ -313,7 +313,7 @@
{
if (mp4_state->post_flag)
{
- postprocess(ref->frame_ref, mp4_state->coded_picture_width,
+ postprocess_func(ref->frame_ref, mp4_state->coded_picture_width,
ref->display_frame, mp4_state->horizontal_size,
mp4_state->horizontal_size, mp4_state->vertical_size,
&mp4_state->quant_store[1][1], (DEC_MBC+1), mp4_state->pp_options, mp4_state);
--- decore/src/postprocess.c.orig Thu Sep 13 04:56:28 2001
+++ decore/src/postprocess.c Sat Jan 5 16:46:42 2002
@@ -881,7 +881,7 @@
}
-postprocessProcPtr postprocess;
+postprocessProcPtr postprocess_func;
--- decore/src/postprocess.h.orig Sun Aug 19 13:25:14 2001
+++ decore/src/postprocess.h Sat Jan 5 16:47:00 2002
@@ -93,7 +93,7 @@
typedef postprocessProc* postprocessProcPtr;
-extern postprocessProcPtr postprocess;
+extern postprocessProcPtr postprocess_func;
#ifndef GENERIC_PP
extern postprocessProc postprocess_mmx;
More information about the MPlayer-dev-eng
mailing list