ipc4: mixin: Add "mix with gain" HiFi5 impl#9795
Merged
kv2019i merged 5 commits intothesofproject:mainfrom Feb 6, 2025
Merged
Conversation
Corrections to misleading comments in the HiFi3 implementation of mixin. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Fixes HiFi5 impl of mix_s24() and mix_s32(). Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
kv2019i
approved these changes
Jan 28, 2025
softwarecki
approved these changes
Jan 28, 2025
abonislawski
approved these changes
Jan 29, 2025
singalsu
requested changes
Jan 29, 2025
Collaborator
singalsu
left a comment
There was a problem hiding this comment.
Can your check my comments, not 100% sure but I recall those operations are not needed.
| /* cir_buf_wrap() is required and is done below in a loop */ | ||
| ae_int16 *dst = (ae_int16 *)sink->ptr + start_sample; | ||
| ae_int16 *src = source->ptr; | ||
| ae_f16x4 gain_vec; |
Collaborator
There was a problem hiding this comment.
Nit: I'd arrange the variables with ae types first, from largest (128 bits) to smallest.
Clearing of AE_VALIGN registers with AE_ZALIGN128() is only necessary when they are used for memory write operations. There is no need to do this for registers used for memory read. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
AE_ADD24S() expects input arguments to be Q9.23 values. Therefore, negative 24-bit values in a 32-bit container should have their sign extended to the upper 8 bits. Our other implementations of 24-bit mixing all perform sign extension prior to mixing and do not rely on samples being already sign-extended. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Adds HiFi5 implementation of "mix with gain" functions. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
9da5676 to
fad27a2
Compare
singalsu
approved these changes
Jan 30, 2025
Collaborator
singalsu
left a comment
There was a problem hiding this comment.
Thanks, looks very good!
Contributor
Author
|
@kv2019i , @lgirdwood , this seems like a mature enough PR. Can it be merged? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds HiFi5 implementation of "mix with gain" functions.
Adds sign-extension to HiFi5 implementation of 24-bit mixing (similarly as it was done recently for HiFi3).
AE_ADD24S() expects input arguments to be Q9.23 values. Therefore, negative 24-bit values in a 32-bit container should have their sign extended to the upper 8 bits. Our other implementations of 24-bit mixing all perform sign extension prior to mixing and do not rely on samples being already sign-extended.
Fixes to HiFi5 implementation of mix functions and correcting comments.