[FFmpeg-devel] [PATCH][RFC] Lagarith Decoder.
Måns Rullgård
mans
Thu Sep 17 17:36:45 CEST 2009
Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> 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.
> Adding a volatile float or volatile double at the right place might
> be all that is necessary to make it work (well as far as it can be
> called "working" while using floating point).
WTF? How would adding volatile change anything whatsoever? If it
does, it's an accidental side-effect and NOT THE RIGHT SOLUTION. 98%
of all "solutions" involving volatile are wrong.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list