[Ffmpeg-devel] [PATCH] 2 % faster wma_decode_block and init simplification

Benjamin Larsson banan
Mon Mar 6 00:41:49 CET 2006


Hi,

Michael Niedermayer wrote:

>Hi
>
>On Sun, Mar 05, 2006 at 08:43:49PM +0000, Benjamin Larsson wrote:
>  
>
>>This patch replaces some pow calculations with precalculated tables and
>>some float to fixedpoint conversion in the init.
>>    
>>
>
>ok, here are a few questions and issues which MUST be dealt with before
>theres any hope to apply this
>
>1. why should we remove floats in the init code, it makes the code less
>   readable
>2. some results from float computations are feed into if(x>1.23) style code
>   differnt rounding from integer math will probably cause serious issues,
>   again this is init code, where speed is irrelevant 
>  
>
Ok. Lets scrap 1 and 2 for now.

>3. every change which does not lead to binary identical decoding must be 
>   tested with some testsamples (max difference, mean squared error, PSNR)
>   i know from messing with the mp3 decoder that tiny changes (32bit vs. 64bit
>   multiplies at the wrong spot) do lead to audible issues
>   (basically expect anything which is non optional and causes >+-1 max error 
>   to be rejected)
>  
>
It's difficult to get binary identical decoding when dealing with floats.

I tested the attached patch with a sample and got a RMS value of
3.0519e-07. (http://www.underbit.com/resources/mpeg/audio/compliance/)
So this patch cause a max error >+-1 even though it to me looks totally ok.
And here I just replace the pow calculations with tables.

MvH
Benjamin Larsson

-- 
"incorrect information" is an oxymoron. Information is, by definition, factual, correct.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: wma3.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060305/7c1afec7/attachment.asc>



More information about the ffmpeg-devel mailing list