[XviD-devel] Division by zero in VFW

daniel smith xvid-devel@xvid.org
Thu, 24 Oct 2002 15:32:55 +0800


i committed a patch of sorts into dev-api-3, if it works with your setup it can go into stable as well.

this is a sub-optimal solution anyway, frame rate is now assumed to be 25 when it could be 15, 24, 25, 29.97 or whatever the buggy input is originally.  this will affect both rate control performance and the frame rate written to the bitstream (but only if fbase or fincr is 0).

i guess vfw could have an "assume input fps" entry box, but it seems a bit much.

dan

----- Original Message -----
From: Milan Cutka <cutka@szm.sk>
Date: Thu, 24 Oct 2002 09:13:51 +0200 
To: xvid-devel@xvid.org
Subject: [XviD-devel] Division by zero in VFW


> 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


-- 
_______________________________________________
Get your free email from http://www.astroboymail.com

Powered by Outblaze