Log in

View Full Version : Init the xvid_gbl_init_t structure


snopa
1st May 2007, 17:50
Hi,

I want use the XVID code to encode frames VGA (640x480x32bits)

-----------------------------------------------
* XviD core initialization
STRUCTURE: xvid_gbl_init_t

xvid_gbl_init_t xvid_gbl_init; //define structure

xvid_gbl_init.debug = ? /* [in : opt] debug level */

What value should I put in the DEBUG variable ?? What is your function?

THANKS IN ADVANCE
Albert

foxyshadis
2nd May 2007, 01:33
From xvid.h:

#define XVID_DEBUG_ERROR (1<< 0)
#define XVID_DEBUG_STARTCODE (1<< 1)
#define XVID_DEBUG_HEADER (1<< 2)
#define XVID_DEBUG_TIMECODE (1<< 3)
#define XVID_DEBUG_MB (1<< 4)
#define XVID_DEBUG_COEFF (1<< 5)
#define XVID_DEBUG_MV (1<< 6)
#define XVID_DEBUG_RC (1<< 7)
#define XVID_DEBUG_DEBUG (1<<31)

These only do anything in debug mode, and in msvc will only show up on the debug console, with other compilers it goes to stderr.

plugh
2nd May 2007, 03:30
Actually, with msvc it goes to both the 'debug console' AND stderr - see the macro in portab.h

snopa
6th May 2007, 15:46
Ok.

Thanks for you reply.

I must choose one of these 9 "XVID_DEBUG_..." values, but which one?
And why?

THANKS IN ADVANCE.

Albert.

plugh
6th May 2007, 15:52
Use a value of zero - ie no flags set - unless you (a) are using a 'debug build' of xvidcore and (b) want to see the embedded debug prints enabled in such a build.