[speex-dev] status report on the Windows CE (PocketPC) ACM codec

Christian Buchner Christian.Buchner1 at epost.de
Fri Jan 16 05:36:37 PST 2004



 
> Could you tell me what do i need to compile libspeex under Cygwin with
> "arm-wince-pe"?
> I woul like to compile libspeex with --enable-asm-arm (inpossible in EVC++
> 3.0) and link
> libspeex.lib in my project for EVC++ 3.0.

You need to build a cross-compilation toolchain first. 

I started out with the scripts that are in the "contrib" directory of the Crosstool-0.25
distribution (available here http://www.kegel.com/crosstool/ ). These build a C/C++
compiler using newlib as standard C library.

Warning: I had to hack some header files and configure scripts to make it work on
cygwin. Took an awful lot of time!

peex then compiled nearly out of the box with "configure" and "make".

I believe it may be less work to alter the speex source to compile inline assembly
on EVC++. Sample from MS GSM codec:

It uses code like this. If the speex assembly stuff is an external function instead
of inline code, you might have to wrap it into a C function.

 for (lambda=40; lambda<=120; lambda++)
 {
  pwt = &(wt[0]);
  ppdp = &(psi->dp[120-lambda]);
#if defined(_SHX_)
  __asm(
   "clrs    \n"
   "clrmac    \n"
   "mac.w @R4+, @R5+ \n"
   "mac.w @R4+, @R5+ \n"

    ...

   "sts macl, R3 \n"
   "mov.l R3, @R6  "
   ,pwt  // R4
   ,ppdp  // R5
   ,&l_result // R6
   );
/*#elif defined(_MIPS_)  // No better than compiler produces
  __asm(
   ".set noreorder;"
   "addu $10, $0, $0;"
   "addiu $8, $4, 80;"

   ...

   "addiu $5, $5, 20;"
   "sw  $10, ($6);"
   ".set reorder; "
   ,pwt  // $4
   ,ppdp  // $5
   ,&l_result // $6
  );*/
#else  // Fall back on straight-C
  l_result = 0;
  for (k=0; k<4; k++)
  {
   //l_result += (LONG)(wt[k]) * (LONG)(psi->dp[120-lambda+k]);
   l_result += (LONG)(*(pwt++)) * (LONG)(*(ppdp++));
   l_result += (LONG)(*(pwt++)) * (LONG)(*(ppdp++));

  ...

  }
#endif
  if (l_result > l_max)
  {
   Nc = lambda;
   l_max = l_result;
  }
 }

<p>Christian

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Speex-dev mailing list