mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 16:25:52 +03:00
[PR #965] [MERGED] Quantum Realm level normalisation optimization #1166
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#1166
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/librespot-org/librespot/pull/965
Author: @JasonLG1979
Created: 2/5/2022
Status: ✅ Merged
Merged: 2/13/2022
Merged by: @roderickvd
Base:
dev← Head:Quantum-Realm📝 Commits (6)
9221694Quantum Realm level normalisation optimizationc01ecd6Streamline code in convert.rsb0c30aaGet rid of duplicate NUM_CHANNELS const in dither.rsb2d0272Misc cleanup0ce6fb0Revert one of the changes to convert.rs7586aa0Merge branch 'librespot-org:dev' into Quantum-Realm📊 Changes
3 files changed (+98 additions, -99 deletions)
View changed files
📝
playback/src/convert.rs(+17 -23)📝
playback/src/dither.rs(+3 -3)📝
playback/src/player.rs(+78 -73)📄 Description
We don't need to test against EPSILON. The factor will never be over 1.0 in basic normalisation mode.
Don't check the normalisation mode EVERY sample.
Do as little math as possible by simplfiying all equations as much as possible (while still retaining the textbook equations in comments).
This saves up to 1-2% CPU useage on a PI 4 depending on how much normalisation is actually being done.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.