Changes between Version 2 and Version 3 of Tone_Generator


Ignore:
Timestamp:
Sep 18, 2008 1:21:15 PM (11 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tone_Generator

    v2 v3  
    88 - {{{PJMEDIA_TONEGEN_SINE}}}: The good-old generation using math's sine(), floating point. This has very good precision but it's the slowest and requires floating point support and linking with the math library. 
    99 - {{{PJMEDIA_TONEGEN_FLOATING_POINT}}}: Floating point approximation of sine(). This has relatively good precision and much faster than plain sine(), but it requires floating-point support and linking with the math library. 
    10  - {{{PJMEDIA_TONEGEN_FIXED_POINT_CORDIC}}} (new in 1.0-rc3): Fixed point using sine signal generated by Cordic algorithm. This algorithm can be tuned to provide balance between precision and performance by tuning the {{{PJMEDIA_TONEGEN_FIXED_POINT_CORDIC_LOOP}}} setting, and may be suitable for platforms that lack floating-point support. 
     10 - {{{PJMEDIA_TONEGEN_FIXED_POINT_CORDIC}}} (new in 1.0-rc3): Fixed point using sine signal generated by Cordic algorithm. This algorithm can be tuned to provide balance between precision and performance by tuning the {{{PJMEDIA_TONEGEN_FIXED_POINT_CORDIC_LOOP}}} setting, and may be suitable for platforms that lack floating-point support. The default setting for {{{PJMEDIA_TONEGEN_FIXED_POINT_CORDIC_LOOP}}} is 8. 
    1111 - {{{PJMEDIA_TONEGEN_FAST_FIXED_POINT}}}: Fast fixed point using some approximation to generate sine waves. The tone generated by this algorithm is not very precise, however the algorithm is very fast. 
    1212 
     
    3131 
    3232|| PJMEDIA_TONEGEN_SINE:[[BR]] [[Image(sine.JPG)]] || PJMEDIA_TONEGEN_FLOATING_POINT:[[BR]] [[Image(float.JPG)]] || 
    33 || PJMEDIA_TONEGEN_FIXED_POINT_CORDIC with 10 iterations:[[BR]] [[Image(cordic10.JPG)]] || PJMEDIA_TONEGEN_FIXED_POINT_CORDIC with 8 iterations:[[BR]][[Image(cordic8.JPG)]] || 
     33|| PJMEDIA_TONEGEN_FIXED_POINT_CORDIC with 10 iterations:[[BR]] [[Image(cordic10.JPG)]] || PJMEDIA_TONEGEN_FIXED_POINT_CORDIC with 8 iterations (default):[[BR]][[Image(cordic8.JPG)]] || 
    3434|| PJMEDIA_TONEGEN_FIXED_POINT_CORDIC with 7 iterations:[[BR]] [[Image(cordic7.JPG)]] || PJMEDIA_TONEGEN_FAST_FIXED_POINT: [[BR]][[Image(fast-fixed-point.JPG)]] || 
    3535 
    3636 
     37== Performance == 
     38 
     39Below is the time measurements of the algorithms. The test measures the generation of 1 second worth of dual-tone at 8KHz sampling rate. For single-tone, just divide the results by two, and for 16KHz dual-tone, just multiply the results by two. 
     40 
     41The MIPS value uses the same convention as in [PJMEDIA-MIPS PJMEDIA Performance Measurement] page. 
     42 
     43=== Linux, ARM9 (ARM926EJ-S), gcc === 
     44 
     45On this platform we use {{{-O3 -msoft-float -DNDEBUG -DPJ_HAS_FLOATING_POINT=0}}} flags. 
     46 
     47||                || time (usec) || CPU (%) || MIPS || 
     48|| PJMEDIA_TONEGEN_SINE           || 506,535 || 50.653 || 100.29 || 
     49|| PJMEDIA_TONEGEN_FLOATING_POINT ||  18,037 || 1.804 || 3.57 || 
     50|| PJMEDIA_TONEGEN_FIXED_POINT_CORDIC with 10 iterations || 11,662 || 1.166 || 2.31 || 
     51|| PJMEDIA_TONEGEN_FIXED_POINT_CORDIC with 8 iterations (default) || 9,872 || 0.987 || 1.95 || 
     52|| PJMEDIA_TONEGEN_FIXED_POINT_CORDIC with 7 iterations || 8,943 || 0.894 || 1.77 || 
     53|| PJMEDIA_TONEGEN_FAST_FIXED_POINT || 1,449 || 0.145 || 0.29 || 
     54