Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dsp: utils: Added macros to shift and convert float/fixed types #82439

Conversation

mrcamilletti
Copy link
Contributor

The DSP library does not provide functions to shift and convert fixed representations in Q7, Q15, and Q31 formats to float or double and vice versa. This commit implements those macros using a shift argument to indicate the number of decimal places.

Copy link

github-actions bot commented Dec 2, 2024

Hello @mrcamilletti, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@mrcamilletti mrcamilletti force-pushed the dsp_add_fixed_float_conversions branch 3 times, most recently from f96ef15 to e3d9bb1 Compare December 6, 2024 14:08
@mrcamilletti
Copy link
Contributor Author

Hi @yperess, @stephanosio. Is there any possibility to review this?
Cheers!

Copy link
Collaborator

@yperess yperess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit on the documentation of the macros. But overall LGTM

include/zephyr/dsp/utils.h Outdated Show resolved Hide resolved
@mrcamilletti mrcamilletti force-pushed the dsp_add_fixed_float_conversions branch from e3d9bb1 to 5bc1e24 Compare December 16, 2024 16:35
@mrcamilletti mrcamilletti requested a review from yperess December 16, 2024 17:17
yperess
yperess previously approved these changes Dec 16, 2024
tests/subsys/dsp/utils/prj.conf Outdated Show resolved Hide resolved
The DSP library does not provide functions to convert fixed
representations (Q7,Q15,Q31) to float or double and viceversa. This commit
implements those functions using a shift argument to indicate the number
of decimal places.

Signed-off-by: Matías Román Camilletti <[email protected]>
@kartben kartben requested a review from yperess December 17, 2024 13:18
@kartben kartben merged commit 4ca5aca into zephyrproject-rtos:main Dec 17, 2024
24 checks passed
Copy link

Hi @mrcamilletti!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

@mrcamilletti mrcamilletti deleted the dsp_add_fixed_float_conversions branch December 17, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants