[XviD-devel] Questions / Bug fixes / Patches
Marcin Jaworski
indrid at o2.pl
Fri Aug 27 15:40:51 CEST 2010
Quoting Michael Militzer:
> Hi,
>
> I don't agree. According to my understanding, the allowed value range for
> frame_drop_ratio is [0, 100] in xvid API (see xvid.h). Negative values are
> not legal and are clipped to zero in l. 264 of encoder.c. Therefore, your
> proposed patch will have no effect.
>
> If we want to disable the creation of N_VOPs for frame_drop_ratio=0 we
> should apply the patch that was earlier proposed by Carl Eric Codere.
>
> Best regards,
> Michael
>
Sorry, I forgot to include line 264 of encoder.c in the patch I posted.
It was copy'n'paste from a larger patch. Here's a corrected patch:
http://pastebin.com/Sq2uPiHj
I've been using something like that for months and it seems to work
perfectly (even with artificially created dupes that otherwise caused
N-VOPs).
Line 1178 of encoder.c uses frame_drop_ratio == -1 to force a coded VOP
(it causes the "<=" in line 1887 to be always false, which results in a
coded VOP). Hence my conclusion about "-1" ;-)
So it's not really an official part of the API, but just a hack. Thank
you for clearing that up.
Best regards,
Marcin Jaworski
More information about the Xvid-devel
mailing list