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

Vitor Sessak vitor1001
Fri Sep 18 09:06:20 CEST 2009

Nathan Caldwell wrote:
> 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

So I suppose the attached file reproduces your problem, no? Does using 
func2() in the decoder makes it bitexact (no, using it is not ok, but it 
helps debugging)?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: func.c
Type: text/x-csrc
Size: 319 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090918/c8e712db/attachment.c>

More information about the ffmpeg-devel mailing list