Hi all,

The second path is a simple syntax error, the first is rather odd -
commenting out the preemphasis block causes the encoder to stick in the
outer loop on my small test track, even though preemphasis is not enabled -
!(notdone[0] || notdone[1]) never becomes true. This only happens with
optimisation switched on - something uninitialised somewhere?

=====

diff -r1.1.1.1 loopold.c
443d442
<     /*
450d448
<     */

=====

diff -r1.5 quantize-pvt.c
860c860
<       temp0 = 0.0946;
---
>       FLOAT8 temp0 = 0.0946;

=====

Acy's (hey, at least two EAers on the list now ;) full asm long block
implementation gives 2.2x speed vs. 2.1x for the old version. We might see
larger gains on the new (and more complex) non-linear quantization routines,
so maybe a gcc version is worthwhile.

Acy's code owes its speed partly to manual loop unrolling. This is easy
enough to do in C with the new quantize_xrpow - try this for the long block
inner loop

      for (j=576/4;j>0;j--) { /* 4x manual unroll */
        x = istep_l * *xr++;
        XRPOW_FTOI(x-.5, rx);
        XRPOW_FTOI(x + QUANTFAC(rx), *(ix++));
        x = istep_l * *xr++;
        XRPOW_FTOI(x-.5, rx);
        XRPOW_FTOI(x + QUANTFAC(rx), *(ix++));
        x = istep_l * *xr++;
        XRPOW_FTOI(x-.5, rx);
        XRPOW_FTOI(x + QUANTFAC(rx), *(ix++));
        x = istep_l * *xr++;
        XRPOW_FTOI(x-.5, rx);
        XRPOW_FTOI(x + QUANTFAC(rx), *(ix++));
      }

I get 1.39x with this vs. 1.25x with the previous version.

-- Mat.


--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to