[FFmpeg-devel] [PATCH] Common ACELP code & G.729 [6/7] - G.729 postfilter

Michael Niedermayer michaelni
Sat May 17 20:21:34 CEST 2008


On Sun, May 18, 2008 at 12:12:52AM +0700, Vladimir Voroshilov wrote:
> 2008/5/14 Michael Niedermayer <michaelni at gmx.at>:
> > On Wed, May 14, 2008 at 12:25:24AM +0700, Vladimir Voroshilov wrote:
> >> 2008/5/12 Michael Niedermayer <michaelni at gmx.at>:
> 
> [...]
> 
> > gain_num <<= sh_gain_num;
> > gain_den <<= sh_gain_den;
> > lt_filt_factor_a = FFMAX((gain_den << 15) / (gain_den + gain_num), 0x10000/3);
> >
> > with 64bit casts if needed.
> 
> Rejected :)
> 
> ===cut===
>        L64_temp0 = ((int64_t)gain_num) << sh_gain_num;
>         L64_temp1 = ((int64_t)gain_den) << sh_gain_den;
>         lt_filt_factor_a = FFMAX((L64_temp1 << 15) / (L64_temp1 +
> L64_temp0), 0x10000/3);
> ===cut===
> 
> Decreases PSNR (ffmpeg<->reference) from bitexact to ~51.
> 
> ===cut===
>        L64_temp0 = ((int64_t)gain_num) << (sh_gain_num - 1);
>         L64_temp1 = ((int64_t)gain_den) << sh_gain_den;
>         lt_filt_factor_a = FFMAX((L64_temp1 << 15) / (L64_temp1 +
> L64_temp0), 0x10000/3);
> ===cut==
> 
> Is better, but of course not bitexact.
> Ok to put old code under G729_BITEXACT ?

yes


> 
> > Also note that the explicit exp/mantisse split (X + sh_X) is completely
> > unacceptable, use float or use fixed point integers but not this float
> > emulation
> 
> I've tried several times to play with fixed point but with no luck yet
> (bad PSNR in all cases).
> And I'm sure that having one floating-point routine in fixed-point decoder
> is not a good idea, even if fixed point implementation uses
> exp/mantissa floating point
> emulation.
> 
> If it is possible i want to ask to focus on common code and decoder core now,
> because decoder can work even without postfilter (with worse quality,
> of course),
> what means it can be committed after all other patches.

ok

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080517/1ca79a0f/attachment.pgp>



More information about the ffmpeg-devel mailing list