OSDN Git Service

Update audio primitives for floating point conversion speed
authorAndy Hung <hunga@google.com>
Sat, 18 Nov 2017 00:02:19 +0000 (16:02 -0800)
committerAndy Hung <hunga@google.com>
Tue, 28 Nov 2017 20:41:40 +0000 (12:41 -0800)
commit0ebba4b4d91663d02bd759bdb65ae528e3e78dc7
tree700834e18b8553ae0bb2e2d4f1235e1724cc8713
parent62c3d9faa33b2dfc9cc1a6b6c501190005593715
Update audio primitives for floating point conversion speed

Floats now round-half-up instead of round-half-to-even.
This returns 25% gain in performance for slightly worse rounding.

Also a cosmetic change to convert an if to an add with boolean.

Bug: 69479669
Test: primitives_tests
Change-Id: I15dc17f5732e41594c23831622d0c1642881a711
audio_utils/include/audio_utils/primitives.h
audio_utils/primitives.c