-
Notifications
You must be signed in to change notification settings - Fork 48
Audio support - Replace Audio QA samples #616
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
base: develop
Are you sure you want to change the base?
Conversation
Audio QA with New Audio Input Samples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the audio test suite to support new MIVisionX-data samples by replacing input audio samples and regenerating golden outputs for RPP audio functionality. The changes include updating input parameters to match new audio sample dimensions and standardizing buffer calculations.
- Replace hardcoded buffer sizes with defined constants for better maintainability
- Update golden output values for Non Silent Region Detection to match new audio samples
- Modify input parameters (dimensions, sample rates) to align with new test dataset
- Standardize error return codes across HOST and HIP implementations
Reviewed Changes
Copilot reviewed 3 out of 17 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
utilities/test_suite/rpp_test_suite_audio.h | Defines new constants and updates golden output values for new audio samples |
utilities/test_suite/HOST/Tensor_audio_host.cpp | Updates buffer calculations, sample rates, and tensor dimensions for new dataset |
utilities/test_suite/HIP/Tensor_audio_hip.cpp | Applies similar updates to HIP implementation with consistent changes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #616 +/- ##
===========================================
- Coverage 88.39% 88.38% -0.01%
===========================================
Files 195 195
Lines 82768 82768
===========================================
- Hits 73156 73148 -8
- Misses 9612 9620 +8 🚀 New features to boost your workflow:
|
descriptorPtr3D->dataType = RpptDataType::F32; | ||
descriptorPtr3D->dims[0] = batchSize; | ||
descriptorPtr3D->dims[1] = maxSrcWidth; | ||
descriptorPtr3D->dims[1] = (maxSrcWidth / 8) * 8 + 8; // Ensure a consistent dimension order between generic and typed descriptors to prevent errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was to ensure descriptor dims[1] is maxSrcWidth or higher, but a multiple of 8 for vectorized versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then (maxSrcWidth + 8) & ^7 would be better and more efficient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address review comments
{ | ||
iBufferSize = (Rpp64u)MEL_FILTER_BANK_MAX_HEIGHT * (Rpp64u)srcDescPtr->w * (Rpp64u)srcDescPtr->c * (Rpp64u)srcDescPtr->n; | ||
oBufferSize = (Rpp64u)MEL_FILTER_BANK_MAX_HEIGHT * (Rpp64u)dstDescPtr->w * (Rpp64u)dstDescPtr->c * (Rpp64u)dstDescPtr->n; | ||
iBufferSize = (Rpp64u)AUDIO_MAX_HEIGHT * (Rpp64u)srcDescPtr->w * (Rpp64u)srcDescPtr->c * (Rpp64u)srcDescPtr->n; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think MEL_FILTER_BANK_MAX_HEIGHT is better name here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
inRateTensor[i] = 16000; | ||
outRateTensor[i] = 16000 * 1.15f; | ||
inRateTensor[i] = 44100; | ||
outRateTensor[i] = 44100 * 1.15f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is 1.15 stand for? Please write comment and use ENUM. I think we need to take sample_rate as a parameter instead of hardcoding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these have been changed to #defines -> SAMPLE_RATE * RESAMPLE_BUFFER_SCALE_FACTOR
{"sample1", {0, 35840}}, | ||
{"sample2", {0, 33680}}, | ||
{"sample3", {0, 34160}} | ||
{"sample1", {0, 507150}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this hardcoded numbers stand for. If this depends on the input. we need to extract it from there or user has to provide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are now removed
…access QA golden output from bin files
AUDIO Support - Fix Copilot comments
{ | ||
inRateTensor[i] = 16000; | ||
outRateTensor[i] = 16000 * 1.15f; | ||
inRateTensor[i] = SAMPLE_RATE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we take these as parameters instead? What if a user want to use different audio samples with different sample_rate and scale_factor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added few more comments
Audio QA support - review comments resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment
Audio QA PR: Review comments resolution
This is a audio test suite QA PR to: