[roll] Roll fuchsia [audio] Mixer optimizations

3 very targeted optimizations that improve AudioCore mixing,
resampling and gain-scaling performance by an average of 10%
across a diverse range of scenarios. Specifically:

(1) An adjustment to the float-to-float StreamConverter.

(2) A significant amount of code for debug display and
consistency checks are moved behind a constexpr flag,
eliminating them from the performance-critical execution
path for release builds.

(3) CHECKs in this same performance-critical execution path
are converted to DCHECKs.

Overall mixing performance is improved by 8-14 % (0.860-0.920)
with certain specialized operations speeded by even more.

Nelson: below are a few of the 60/79 microbenchmarks where we
measured improvement:
 mixer_output: F32/Normal/Chans_1                         0.661-0.876
 mixing: Point/F32/Chans_1:1/Rates_048000:048000/Unity-   0.860-0.979
 mixing: Point/I16/Chans_2:2/Rates_048000:048000/Mute+    0.783-0.821
 mixing: Point/I24/Chans_2:2/Rates_048000:048000/Scaled+  0.947-0.996
 mixing: Point/Un8/Chans_1:1/Rates_048000:048000/Unity-   0.914-0.936
 mixing: WSinc/F32/Chans_1:1/Rates_001000:192000/Unity-   0.875-0.913
 mixing: WSinc/F32/Chans_1:1/Rates_048000:096000/Unity-   0.871-0.890
 mixing: WSinc/F32/Chans_1:1/Rates_096000:016000/Unity-   0.921-0.947
 mixing: WSinc/F32/Chans_1:2/Rates_048000:048000/Unity-   0.851-0.870
 mixing: WSinc/I16/Chans_2:2/Rates_096000:016000/Scaled+  0.935-0.944
 mixing: WSinc/I16/Chans_2:2/Rates_192000:001000/Scaled+  0.953-1.000
 mixing: WSinc/I16/Chans_4:4/Rates_044100:048000/Scaled+  0.869-0.886
 mixing: WSinc/I24/Chans_1:1/Rates_048000:048000/Unity-   0.860-0.891

Sherlock: 31/79 cases improved, including:
 mixing: Point/F32/Chans_1:1/Rates_048000:048000/Mute-   0.824-0.856
 mixing: Point/Un8/Chans_1:1/Rates_048000:048000/Unity-  0.908-0.929
 mixing: WSinc/F32/Chans_1:1/Rates_192000:001000/Unity-  0.950-0.982
 mixing: WSinc/F32/Chans_2:2/Rates_044100:048000/Scaled+ 0.880-0.900
 mixing: WSinc/I24/Chans_2:2/Rates_044100:048000/Scaled+ 0.889-0.912

Astro-LTO: 64/79 cases improved. Examples include:
 mixer_output: F32/Normal/Chans_1                        0.716-0.778
 mixing: Point/F32/Chans_1:1/Rates_048000:048000/Mute-   0.810-0.860
 mixing: Point/F32/Chans_1:1/Rates_048000:048000/Unity+  0.918-0.950
 mixing: Point/F32/Chans_2:1/Rates_048000:048000/Unity-  0.890-0.938
 mixing: Point/I16/Chans_1:2/Rates_048000:048000/Scaled+ 0.941-0.965
 mixing: Point/I24/Chans_1:1/Rates_048000:048000/Unity-  0.919-0.975
 mixing: Point/Un8/Chans_1:1/Rates_048000:048000/Unity-  0.832-0.905
 mixing: WSinc/F32/Chans_1:1/Rates_001000:192000/Unity-  0.867-0.890
 mixing: WSinc/F32/Chans_1:1/Rates_096000:048000/Unity-  0.883-0.885
 mixing: WSinc/F32/Chans_4:4/Rates_048000:048000/Unity-  0.824-0.872
 mixing: WSinc/I16/Chans_2:2/Rates_044100:048000/Ramped+ 0.855-0.882
 mixing: WSinc/I16/Chans_2:2/Rates_192000:001000/Scaled+ 0.957-0.981
 mixing: WSinc/I24/Chans_2:2/Rates_044100:048000/Scaled+ 0.873-0.885

x64: 55/79 cases improved, including double-digit wins such as:
 mixer_output: F32/Normal/Chans_1                        0.492-0.603
 mixing: Point/F32/Chans_2:1/Rates_048000:048000/Unity-  0.870-0.963
 mixing: WSinc/F32/Chans_1:1/Rates_048000:048000/Mute-   0.789-0.865
... but core resampling improved by only about 5 %:
 mixing: WSinc/F32/Chans_1:1/Rates_096000:016000/Unity-  0.936-0.963
 mixing: WSinc/F32/Chans_2:2/Rates_044100:048000/Scaled+ 0.934-0.960
 mixing: WSinc/I16/Chans_2:2/Rates_048000:096000/Scaled+ 0.928-0.982
 mixing: WSinc/I24/Chans_2:2/Rates_044100:048000/Scaled+ 0.934-0.964

Overall LTO perfcompare results are similar -- with a slightly
broader variance, but overall better by 7-17 %.

Test: fx test audio_lib_processing_unittests

Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/993055
Original-Revision: 8e05f877274f26edb12a8f47e938f21ecdeb0d4b
GitOrigin-RevId: 42fb287b04bae353e220d0e907f3e43c24998fa1
Change-Id: Iaf7e1c496323ac954d7203515c0484d37edd4ce5
1 file changed
tree: 657ffef5837600c873e19fa2ab1b581da3d1a1e1
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.