Thanks to visit codestin.com
Credit goes to github.com

Skip to content

AUDIO Support - Fix Copilot comments#498

Merged
r-abishek merged 4 commits intor-abishek:ar/audio_support_qa_samplesfrom
HazarathKumarM:audio_qa
Oct 2, 2025
Merged

AUDIO Support - Fix Copilot comments#498
r-abishek merged 4 commits intor-abishek:ar/audio_support_qa_samplesfrom
HazarathKumarM:audio_qa

Conversation

@HazarathKumarM
Copy link
Collaborator

No description provided.

@r-abishek r-abishek requested a review from Copilot September 26, 2025 16:31
@r-abishek r-abishek added the enhancement New feature or request label Sep 26, 2025
Copy link

Copilot AI left a 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 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_HEIGHT into MEL_FILTER_BANK_MAX_HEIGHT and SPECTROGRAM_MAX_HEIGHT for 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;
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
Rpp64u resampleMaxBufferSize = dstDescPtr->n * dstDescPtr->strides.nStride * RESAMPLE_BUFFER_SCALE_FACTOR;
Rpp64u resampleMaxBufferSize = static_cast<Rpp64u>(oBufferSize * RESAMPLE_BUFFER_SCALE_FACTOR);

Copilot uses AI. Check for mistakes.
Copy link
Owner

Choose a reason for hiding this comment

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

@HazarathKumarM pls check

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@r-abishek r-abishek merged commit 881fcda into r-abishek:ar/audio_support_qa_samples Oct 2, 2025
ManasaDattaT pushed a commit to ManasaDattaT/rpp that referenced this pull request Dec 10, 2025
ManasaDattaT pushed a commit to ManasaDattaT/rpp that referenced this pull request Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants