Skip to content

Draft: [non-be][rend-non-be][split-non-be][allow-regression] Optimize ivas_filter_process_fx.

Closes #2239

Reason why this change is needed

The current implementation of IVAS filter uses expensive pseudo-float operations: a pure fixed-point implementation might be less computationally expensive.

Description of the change

This non-bit-exact optimisation replaces the ivas_filter_process_fx and ivas_filter_process_exp_fx functions with pure 32/64-bit fixed-point implementations.

Complexity analysis

How to reproduce?

IVAS_cod -sba 3 13200 32 scripts/testv/stv3OA32c.wav enc.bit
IVAS_dec BINAURAL 32 enc.bit dec.wav

Before:

--- Complexity analysis [WMOPS] ---  

                                           |------  SELF  ------|   |---  CUMULATIVE  ---|
                        routine    calls     min     max     avg      min     max     avg 
                ---------------   ------   ------  ------  ------   ------  ------  ------
                ivas_jbm_dec_tc     1.00    1.891   1.915   1.915   26.345  38.997  29.528
               ivas_spar_decode     1.00    1.010   1.041   1.019    2.544   2.684   2.628
               ivas_spar_dec_MD     1.00    1.526   1.665   1.609    1.526   1.665   1.609
                   ivas_sce_dec     1.00    0.246   0.246   0.246   21.794  34.495  24.986
                  ivas_core_dec     1.00    3.152  11.390   7.909   21.548  34.249  24.739
                 acelp_core_dec     0.61   12.851  19.168  14.578   12.851  19.168  14.578
      ivas_dec_prepare_renderer     1.00    7.068   8.724   7.173    7.068   8.724   7.173
                ivas_dec_render     1.00   77.336  88.019  87.518   81.487  92.277  91.775
    ivas_sba_prototype_renderer     4.00    3.922   4.258   4.258    3.922   4.258   4.258
            stereo_tcx_core_dec     0.39   17.651  31.015  20.324   17.651  31.015  20.324
                ---------------   ------   ------  ------  ------
                          total  1000.00  119.955 138.376 128.477

After:

 --- Complexity analysis [WMOPS] ---  

                                           |------  SELF  ------|   |---  CUMULATIVE  ---|
                        routine    calls     min     max     avg      min     max     avg 
                ---------------   ------   ------  ------  ------   ------  ------  ------
                ivas_jbm_dec_tc     1.00    1.891   1.915   1.915   26.345  38.997  29.528
               ivas_spar_decode     1.00    1.010   1.041   1.019    2.544   2.684   2.628
               ivas_spar_dec_MD     1.00    1.526   1.665   1.609    1.526   1.665   1.609
                   ivas_sce_dec     1.00    0.246   0.246   0.246   21.794  34.495  24.986
                  ivas_core_dec     1.00    3.152  11.390   7.909   21.548  34.249  24.739
                 acelp_core_dec     0.61   12.851  19.168  14.578   12.851  19.168  14.578
      ivas_dec_prepare_renderer     1.00    6.054   7.686   6.139    6.054   7.686   6.139
                ivas_dec_render     1.00   77.336  88.019  87.518   81.487  92.277  91.775
    ivas_sba_prototype_renderer     4.00    3.922   4.258   4.258    3.922   4.258   4.258
            stereo_tcx_core_dec     0.39   17.651  31.015  20.324   17.651  31.015  20.324
                ---------------   ------   ------  ------  ------
                          total  1000.00  118.978 137.379 127.443

Regressions/Improvements Analysis

Mixed results: we do have big regressions and big improvements. I have tested the code against single-and-double-precision floating-point implementations, and the optimised fixed-point implementation provides results closer to the double-precision floating-point implementation.

Edited by Nicolas Roussin

Merge request reports

Loading