[XviD-devel] Division by zero in VFW

Milan Cutka xvid-devel@xvid.org
Thu, 24 Oct 2002 09:13:51 +0200


Hi,

yesterday I've tried to convert VOBs to AVI in graphedt. ffdshow was
used to decode VOB and process it and XVID to compress. First pass
went OK, but when in second pass almost all frames were compressed
with quantizer 31 ignoring all desired size settings.

This is caused by wrong initialization of codec->twopass.max_framesize
(codec.c line 272 in current dev-api-3 CVS). codec->fbase and
codec->fincr and both 0. Maybe it's ffdshow bug, but as it seems Ligos
MPEG2 decoder doesn't provide correct values too (haven't tried other
decoding filters). Anyway, it means that max_framesize is 0 too
(0/0=0?) and two pass code always sets quantizer 31. This happens only
in release builds.

Could you please set max_framesize to some sane value when
codec->fbase==0 && codec->fincr==0?

Thank you

   Milan