projects/rpp/api/rppt_tensor_audio_augmentations.h Source File

projects/rpp/api/rppt_tensor_audio_augmentations.h Source File#

RPP: projects/rpp/api/rppt_tensor_audio_augmentations.h Source File
rppt_tensor_audio_augmentations.h
Go to the documentation of this file.
1 /*
2 MIT License
3 
4 Copyright (c) 2019 - 2025 Advanced Micro Devices, Inc.
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 The above copyright notice and this permission notice shall be included in all
14 copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 SOFTWARE.
23 */
24 
25 #ifndef RPPT_TENSOR_AUDIO_AUGMENTATIONS_H
26 #define RPPT_TENSOR_AUDIO_AUGMENTATIONS_H
27 
28 #ifdef AUDIO_SUPPORT
29 
30 #include "rpp.h"
31 #include "rppdefs.h"
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
72  Rpp32s* srcLengthTensor, Rpp32s* detectedIndexTensor,
73  Rpp32s* detectionLengthTensor, Rpp32f cutOffDB,
74  Rpp32s windowLength, Rpp32f referencePower,
75  Rpp32s resetInterval, rppHandle_t rppHandle,
76  RppBackend executionBackend);
77 
95  RpptDescPtr dstDescPtr, RpptImagePatchPtr srcDims, Rpp32f cutOffDB,
96  Rpp32f multiplier, Rpp32f referenceMagnitude, rppHandle_t rppHandle,
97  RppBackend executionBackend);
98 
114  RpptDescPtr dstDescPtr, Rpp32s* srcLengthTensor,
115  Rpp32f* coeffTensor, RpptAudioBorderType borderType,
116  rppHandle_t rppHandle, RppBackend executionBackend);
117 
133  RpptDescPtr dstDescPtr, Rpp32s* srcDimsTensor, bool normalizeWeights,
134  rppHandle_t rppHandle, RppBackend executionBackend);
135 
157  RpptDescPtr dstDescPtr, Rpp32s* srcLengthTensor, bool centerWindows,
158  bool reflectPadding, Rpp32f* windowFunction, Rpp32s nfft, Rpp32s power,
159  Rpp32s windowLength, Rpp32s windowStep, rppHandle_t rppHandle,
160  RppBackend executionBackend);
161 
181  RpptDescPtr dstDescPtr, Rpp32s* srcDims, Rpp32f maxFreq,
182  Rpp32f minFreq, RpptMelScaleFormula melFormula, Rpp32s numFilter,
183  Rpp32f sampleRate, bool normalize, rppHandle_t rppHandle,
184  RppBackend executionBackend);
185 
204  RpptDescPtr dstDescPtr, Rpp32f* inRateTensor, Rpp32f* outRateTensor,
205  Rpp32s* srcDimsTensor, RpptResamplingWindow& window, rppHandle_t rppHandle,
206  RppBackend executionBackend);
207 
228  RppPtr_t dstPtr, RpptDescPtr dstDescPtr,
229  Rpp32s* srcLengthTensor, rppHandle_t rppHandle,
230  RppBackend executionBackend);
231 
250  RppPtr_t dstPtr, RpptDescPtr dstDescPtr,
251  Rpp32s* srcLengthTensor, rppHandle_t rppHandle,
252  RppBackend executionBackend);
253 
257 #ifdef __cplusplus
258 }
259 #endif
260 
261 #endif // AUDIO_SUPPORT
262 
263 #endif // RPPT_TENSOR_AUDIO_AUGMENTATIONS_H
int Rpp32s
32 bit signed int
Definition: rppdefs.h:127
RpptMelScaleFormula
RPPT Mel Scale Formula.
Definition: rppdefs.h:412
void * RppPtr_t
void pointer
Definition: rppdefs.h:137
RpptAudioBorderType
RPPT Audio Border Type.
Definition: rppdefs.h:393
RppStatus
RPP RppStatus type enums.
Definition: rppdefs.h:144
float Rpp32f
32 bit float
Definition: rppdefs.h:133
RppBackend
RPP RppBackend type enums.
Definition: rppdefs.h:231
RppStatus rppt_resample(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *inRateTensor, Rpp32f *outRateTensor, Rpp32s *srcDimsTensor, RpptResamplingWindow &window, rppHandle_t rppHandle, RppBackend executionBackend)
Resample augmentation on HIP/HOST backend.
RppStatus rppt_audio_tensor_add_tensor(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32s *srcLengthTensor, rppHandle_t rppHandle, RppBackend executionBackend)
Audio Tensor Add Tensor augmentation on HIP/HOST backend.
RppStatus rppt_audio_tensor_mul_scalar(RppPtr_t srcPtr, Rpp32f scalarValue, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32s *srcLengthTensor, rppHandle_t rppHandle, RppBackend executionBackend)
Audio Tensor Multiply Scalar augmentation on HIP/HOST backend.
RppStatus rppt_spectrogram(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32s *srcLengthTensor, bool centerWindows, bool reflectPadding, Rpp32f *windowFunction, Rpp32s nfft, Rpp32s power, Rpp32s windowLength, Rpp32s windowStep, rppHandle_t rppHandle, RppBackend executionBackend)
Produces a spectrogram from a 1D audio buffer on HIP/HOST backend.
RppStatus rppt_pre_emphasis_filter(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32s *srcLengthTensor, Rpp32f *coeffTensor, RpptAudioBorderType borderType, rppHandle_t rppHandle, RppBackend executionBackend)
Pre Emphasis Filter augmentation on HIP/HOST backend.
RppStatus rppt_to_decibels(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptImagePatchPtr srcDims, Rpp32f cutOffDB, Rpp32f multiplier, Rpp32f referenceMagnitude, rppHandle_t rppHandle, RppBackend executionBackend)
To Decibels augmentation on HIP/HOST backend.
RppStatus rppt_mel_filter_bank(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32s *srcDims, Rpp32f maxFreq, Rpp32f minFreq, RpptMelScaleFormula melFormula, Rpp32s numFilter, Rpp32f sampleRate, bool normalize, rppHandle_t rppHandle, RppBackend executionBackend)
Mel filter bank augmentation HIP/HOST backend.
RppStatus rppt_down_mixing(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32s *srcDimsTensor, bool normalizeWeights, rppHandle_t rppHandle, RppBackend executionBackend)
Down Mixing augmentation on HIP/HOST backend.
RppStatus rppt_non_silent_region_detection(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, Rpp32s *srcLengthTensor, Rpp32s *detectedIndexTensor, Rpp32s *detectionLengthTensor, Rpp32f cutOffDB, Rpp32s windowLength, Rpp32f referencePower, Rpp32s resetInterval, rppHandle_t rppHandle, RppBackend executionBackend)
Non Silent Region Detection augmentation on HIP/HOST backend.
RPP top-level header with RPP handle API.
RPP common HOST/GPU typedef, enum and structure definitions.
RPPT Tensor descriptor type struct.
Definition: rppdefs.h:509
RPPT Tensor 2D image patch dimensions type struct.
Definition: rppdefs.h:596
RPPT Tensor RpptResamplingWindow type struct.
Definition: rppdefs.h:688