[Ffmpeg-devel] [PATCH][RFC] ac3enc window generation
Michael Niedermayer
michaelni
Thu Apr 20 15:33:46 CEST 2006
Hi
On Thu, Apr 20, 2006 at 02:54:34PM +0000, Benjamin Larsson wrote:
> The following patch generates the ac3 window used by the ac3 encoder.
> The patch is based on code posted by Justin Ruggles. This also gives the
> opportunity to use a diffrent rounding for the mdct window
> (truncating/rounding/whatever, truncation is used now). The attached
> octave script gives the following values for me:
>
> max_rounderror = 3.8178e-05
> max_floorerror = 7.3856e-05
> round_bits = 14.677
> floor_bits = 13.725
> roundsse = 7.3792e-08
> floorsse = 4.6057e-07
>
> >From these values one can see that rounding gives lower error on
> average. But from the resulting plot one can see that truncation results
> in the gain to always be under 1 while rounding results in the gain to
> be centered around 1. So with rounding one would get a (very) slightly
> lower error but the window gain could overflow the result in (very)
> extream situations.
>
> So, apply with/without rounding or patch rejected.
assuming i understand everything the problem is that
the window when shifted squared and summed must be <= 1
so the solution would be not to round the values independantly but
to choose the pairs so that their summed squares are <=1 and the
error is minimized
so simply try a few pairs surounding the rounded one and choose the
best
[...]
--
Michael
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel
mailing list