AUDIO Support - Fix Copilot comments#498
AUDIO Support - Fix Copilot comments#498r-abishek merged 4 commits intor-abishek:ar/audio_support_qa_samplesfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the audio processing test suite by splitting a generic AUDIO_MAX_HEIGHT constant into more specific, semantically clear constants for different audio operations.
- Split
AUDIO_MAX_HEIGHTintoMEL_FILTER_BANK_MAX_HEIGHTandSPECTROGRAM_MAX_HEIGHTfor better code clarity - Updated all references to use the appropriate specific constants
- Fixed resample buffer size calculation to use the correct scale factor
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| utilities/test_suite/rpp_test_suite_audio.h | Replaces generic constant with specific constants for mel filter bank and spectrogram operations |
| utilities/test_suite/HOST/Tensor_audio_host.cpp | Updates buffer size calculations to use appropriate specific constants |
| utilities/test_suite/HIP/Tensor_audio_hip.cpp | Updates buffer size calculations and fixes resample buffer calculation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| // compute maximum possible buffer size of resample | ||
| Rpp64u resampleMaxBufferSize = dstDescPtr->n * dstDescPtr->strides.nStride * AUDIO_MAX_HEIGHT; | ||
| Rpp64u resampleMaxBufferSize = dstDescPtr->n * dstDescPtr->strides.nStride * RESAMPLE_BUFFER_SCALE_FACTOR; |
There was a problem hiding this comment.
The resample buffer size calculation appears incorrect. The scale factor (1.16) is being multiplied directly with buffer dimensions, but scale factors are typically used as multipliers of the base buffer size, not as dimensional components. This may result in an undersized buffer.
| Rpp64u resampleMaxBufferSize = dstDescPtr->n * dstDescPtr->strides.nStride * RESAMPLE_BUFFER_SCALE_FACTOR; | |
| Rpp64u resampleMaxBufferSize = static_cast<Rpp64u>(oBufferSize * RESAMPLE_BUFFER_SCALE_FACTOR); |
…access QA golden output from bin files
No description provided.