[XviD-devel] Fill the "xvid gbl init t" and "xvid enc create t" structures

A AP snopa at freeuk.com
Sun Apr 29 20:42:04 CEST 2007


I want use the XVID code to encode frames VGA (640x480x32bits) and I'm 
initializing the XVID core and encode part.
I'm using the xvid_encraw.c as reference but I have some doubts about what 
values I must put in the "xvid_gbl_init_t" and "xvid_enc_create_t" 

* 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 */ 

* XviD encoder initialization
STRUCTURE: xvid_enc_create_t 

	xvid_enc_create_t xvid_enc_create;  //define structure 

	xvid_enc_create.profile = XVID_PROFILE_AS_L4; 

// Well, I know the purpose of this variable, but I'm interested in the
// Advanced Simple L5 profile (720x576)
// (L4 -> 352x576) but it isn't defined in xvid.h
	xvid_enc_create.zones = VOID/ZONES;
	xvid_enc_create.num_zones = 0/1; ? 	 

// I also know the purpose. In my aplication will only have one part. In
// this case, Should I put 0 or 1?
// Should I put a reference in the zones variable?
	xvid_enc_create.plugins = plugins;
	xvid_enc_create.num_plugins = 0;	 

// In this two variable, I can specify the Encoding type
// if (ARG_SINGLE) / if (ARG_PASS2) / if (ARG_PASS1) ...
// It means that you can define more than one in the plugins varible.
// Which of them will be used ? (It will just apply one, in theory)
// Would be correct If I put just one (ARG_PASS2) ?
	xvid_enc_create.max_bframes = 1; 	
	xvid_enc_create.bquant_ratio = 1.50; 	
	xvid_enc_create.bquant_offset = 1.00; 

// These values are from a XVID encode configuration example
// Although it's not possible because both values are INTEGER
//...then what values do I must put?		
 xvid_enc_create.global |= XVID_GLOBAL_PACKED;    //if (ARG_PACKED)
 xvid_enc_create.global |= XVID_GLOBAL_CLOSED_GOP; //if (ARG_CLOSED_GOP)
 xvid_enc_create.global |= XVID_GLOBAL_EXTRASTATS_ENABLE; // if(ARG_STATS) 

//Which of them should I use? Why?
	int min_quant[3];            // [in:opt]
	int max_quant[3];            // [in:opt] 	 

// Both variables are not used in the example.
// They are not important, are they? In some XVID encode configuration
// examples exist both values (minim and maxim Quantization)
// "(Min Max) (I-frame P-frame B-frame) quantizer". Are they refer to this? 

I hope someone can help me. 


More information about the XviD-devel mailing list