[FFmpeg-devel] [PATCH][RFC] Lagarith Decoder.

Nathan Caldwell saintdev
Fri Sep 18 03:43:59 CEST 2009

On Thu, Sep 17, 2009 at 9:24 AM, Reimar D?ffinger
<Reimar.Doeffinger at gmx.de> wrote:
> On Thu, Sep 17, 2009 at 02:46:07AM -0600, Nathan Caldwell wrote:
>> 2009/9/5 Loren Merritt <lorenm at u.washington.edu>:
>> > On Tue, 1 Sep 2009, Nathan Caldwell wrote:
>> >
>> >> Here are the latest lagarith patches.
>> >
>> > Your decoder disagrees with the official version on the 2nd frame of http://akuvian.org/stuff/lagarith_bork.avi
>> Finally got a chance to look into this, and found the problem, but I'm
>> not sure how to fix it.
>> What happens is on this clip when the probabilities get scaled in
>> lag_read_prob_header(), one of the values gets rounded up instead of
>> rounding down like reference does. For the offending value reference
>> gives 0x6ff while the code below gives 0x700.
> Besides a "told you so" as to using floating point giving no end of
> issues for lossless, the exact input values would be the minimum
> necessary to help out.

Ok, so the values that cause this are:
rac->prob[i] = 0x6eb
scale_factor = 16
cumul_prob = 0xfd00

-Nathan Caldwell

More information about the ffmpeg-devel mailing list