[XviD-devel] Questions / Bug fixes / Patches how to do?

Carl Eric Codere cecodere at yahoo.ca
Wed Aug 18 07:07:01 CEST 2010


Greetings,
         Hello there, good and excellent codec you have there!! I have been playing around with mencoder, which uses xvid and found a few quirks in some of the code. I would like to help out where I can.

- I have found the following quirks in the xvid codec:
   According to some places in the code frame_drop_ratio, when set to -1 indicates that no N-VOP will ever be added to the stream. The problem is that somewhere else the value is reset to 0, therefore the -1 option is unusable. Because of this mp4box cannot directly import the mp4 stream as is and must convert it to a variable frame rate if there are n-vops inserted,am i correct in assuming the above statement? 

In encoder.c:
	/* frame drop ratio */
	pEnc->mbParam.frame_drop_ratio = MAX(create->frame_drop_ratio, 0);
should be replaced by:
	/* frame drop ratio */
	pEnc->mbParam.frame_drop_ratio = MAX(create->frame_drop_ratio, -1);

In encoder.c (around line 1891), the code should be replaced by as follows (to validate by you if this is correct or not - I just check that the frame_drop_ratio >= 0 to continue in the frame dropping algorithm, is that correct?

	if ((pParam->frame_drop_ratio >= 0) && (current->sStat.kblks + current->sStat.mblks <=
		(pParam->frame_drop_ratio * mb_width * mb_height) / 100 &&
		( (pEnc->bframenum_head >= pEnc->bframenum_tail) || !(pEnc->mbParam.global_flags & XVID_GLOBAL_CLOSED_GOP)) ))

  feature request: I would like to modify config.c of vfw to add the following pre-defined profile levels: SP at L4a SP at L5 (and maybe SP at L6), as defined in ISO Amendments.

Let me know how i can submit these patches to you and if they are acceptable!
Thanks
Best regards 
Carl Eric Codere


 
   



More information about the Xvid-devel mailing list