[tremor] MIPS optimization

eliterr at sysattack.com eliterr at sysattack.com
Mon Feb 23 04:58:51 PST 2004


Hello, everybody at the Tremor list!

I've made MIPS II (and optional NEC VR41* family) processors assembly
optimization of Tremor decoder based on asm_arm.h.
I didn't dig it more deep than rewriting of lsp_loop_asm, lsp_norm_asm
and XPROD32-like functions, sorry.

I think porting this assembly code for using with GNU C would not be too
difficult task because MS compiler is using the same calling convention
for inline assembly as for usual assembler functions.

Files included are:
  asm_mips.h   (needs to be included into misc.h)
  asm_mips.S   (assembler source of lsp_loop_asm. I used to place it into
                single file because MS compiler refused to compile
                so big inline assembly block)
  VorbisTest.c (test program)

<p><p><p>I have tested optimized code so results of testing is also here.

All test was done on 'Ghost of a Rose' of Blackmore's Night encoded at
quality=2 using CDEX with ogg encoder from
http://rarewares.hydrogenaudio.org/ogg.html. It's info:
---------------------------------------------
Vendor: Xiph.Org libVorbis I 20030909 (1.0.1)
Channels: 2
Rate: 44100

Nominal bitrate: 96,001000 kb/s
Total data length: 3628648 bytes
Playback length: 5m:45s
Average bitrate: 84,058164 kbps
---------------------------------------------

<p>Decoding was done on CASIO BE-300 machine (NEC VR 4131, Windows CE 3.0).
Test program reads the complete file into memory and just decodes it
without any further processing or DSP output. Decoding is done using
realtime priority to minimize other program influence.
Program was compiled by Microsft Embedded Visual Tools C++ compiler.

Quality   WideMath   VR 2x2 matrix   ASM clipping   ASM LSP  time,sec
---------------------------------------------------------------------
   Low                                    -           -       74.03
   Low                                    -           +       74.18
   Low                                    +           -       74.69
   Low                                    +           +       74.73

  High      +             +               -           -       81.32
  High      +             +               -           +       81.21
  High      +             +               +           -       81.82
  High      +             +               +           +       81.47
  High      +             -               -           -       96.58
  High      -             -               -           -      167.11
---------------------------------------------------------------------

<p>I think small time deviation was braught to testing due to some system events.
Also some possible performance gain was not acieved because of strange approach
of fu^H^Hsurprising MS compiler to embedding inline assembler instructions into
result code.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: VorbisTest.c.gz
Type: application/x-gzip
Size: 1672 bytes
Desc: VorbisTest.c.gz
Url : http://lists.xiph.org/pipermail/tremor/attachments/20040223/c8eba3c9/VorbisTest.c-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asm_mips.h.gz
Type: application/x-gzip
Size: 1632 bytes
Desc: asm_mips.h.gz
Url : http://lists.xiph.org/pipermail/tremor/attachments/20040223/c8eba3c9/asm_mips.h-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asm_mips.S.gz
Type: application/x-gzip
Size: 1156 bytes
Desc: asm_mips.S.gz
Url : http://lists.xiph.org/pipermail/tremor/attachments/20040223/c8eba3c9/asm_mips.S-0001.bin


More information about the Tremor mailing list