Commit 375e417
committed
Audio: Use generic saturation logic for improved efficiency
Introduce `sat_generic` for optimizing saturation across integer sizes
(8, 16, 24, 32 bits) in the processing block. Consolidating saturation
logic into a single function aims to:
- Reduce code duplication and enhance maintainability.
- Use bitwise operations to remove conditional branches, boosting
execution speed.
- Possibly lower cycle costs on supported architectures by streamlining the
saturation process.
This modification is poised to enhance efficiency without compromising
functionality.
Signed-off-by: Shriram Shastry <malladi.sastry@intel.com>1 parent fa8b4db commit 375e417
1 file changed
+17
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 17 | + | |
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 22 | + | |
31 | 23 | | |
32 | 24 | | |
33 | 25 | | |
34 | 26 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 27 | + | |
41 | 28 | | |
42 | 29 | | |
43 | 30 | | |
44 | 31 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
51 | 44 | | |
52 | 45 | | |
53 | 46 | | |
0 commit comments