[Ffmpeg-devel] few remarks for h264 decoder

Gábor Kovács picard
Sat Dec 31 04:10:27 CET 2005


Hi,

From: "Michael Niedermayer" <michaelni at gmx.at>
> On Fri, Dec 30, 2005 at 04:00:14PM -0800, Loren Merritt wrote:
>> The code is right, the comment was wrong.
>> I have not performed a detailed error analysis of the loss in precision, 
>> but since it does not appear to introduce any deviation from JM, I have 
>> to assume that those lsbs don't actually matter.
> 
> they dont matter, the trick is that (4*x + y)>>2 == x + (y>>2) and
> 
> (20*c - 5*b + a + 512)>>10
> (4*(5*c - b + 128) + a - b)>>10
> (5*c - b + 128 + ((a - b)>>2))>>8
> (4*c + c - b + 128 + ((a - b)>>2))>>8
> (c + ((c - b + 128 + ((a - b)>>2)))>>2))>>6

Very nice. Thanks!
Sorry for the unneccessary trouble.

bye, Picard





More information about the ffmpeg-devel mailing list