/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/develop/projects/rpp/api/rppt_tensor_effects_augmentations.h Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/develop/projects/rpp/api/rppt_tensor_effects_augmentations.h Source File#

RPP: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/develop/projects/rpp/api/rppt_tensor_effects_augmentations.h Source File
rppt_tensor_effects_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_EFFECTS_AUGMENTATIONS_H
26 #define RPPT_TENSOR_EFFECTS_AUGMENTATIONS_H
27 
28 #include "rpp.h"
29 #include "rppdefs.h"
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
76  RpptDescPtr dstDescPtr, Rpp32u tileWidth, Rpp32f gridRatio,
77  Rpp32f gridAngle, RpptUintVector2D translateVector,
78  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle,
79  RppBackend executionBackend);
80 
109  RpptDescPtr dstDescPtr, RpptRGB spatterColor, RpptROIPtr roiTensorPtrSrc,
110  RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend);
111 
147  RpptDescPtr dstDescPtr, Rpp32f* noiseProbabilityTensor,
148  Rpp32f* saltProbabilityTensor, Rpp32f* saltValueTensor,
149  Rpp32f* pepperValueTensor, Rpp32u seed,
150  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
151  rppHandle_t rppHandle, RppBackend executionBackend);
152 
181  RpptDescPtr dstDescPtr, Rpp32f* shotNoiseFactorTensor, Rpp32u seed,
182  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle,
183  RppBackend executionBackend);
184 
216  RpptDescPtr dstDescPtr, Rpp32f* meanTensor, Rpp32f* stdDevTensor,
217  Rpp32u seed, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
218  rppHandle_t rppHandle, RppBackend executionBackend);
219 
249  RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f* stdDevTensor,
250  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
251  rppHandle_t rppHandle, RppBackend executionBackend);
252 
285 RppStatus rppt_water(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
286  RpptDescPtr dstDescPtr, Rpp32f* amplitudeXTensor, Rpp32f* amplitudeYTensor,
287  Rpp32f* frequencyXTensor, Rpp32f* frequencyYTensor, Rpp32f* phaseXTensor,
288  Rpp32f* phaseYTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
289  rppHandle_t rppHandle, RppBackend executionBackend);
290 
319 RppStatus rppt_ricap(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
320  RpptDescPtr dstDescPtr, Rpp32u* permutationTensor,
321  RpptROIPtr roiPtrInputCropRegion, RpptRoiType roiType, rppHandle_t rppHandle,
322  RppBackend executionBackend);
323 
347 // NOTE: Pixel mismatch of 5% is expected between HIP and HOST Tensor variations due to usage of
348 // fastexpavx() instead of exp() in HOST Tensor.
350  RpptDescPtr dstDescPtr, Rpp32f* vignetteIntensityTensor,
351  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle,
352  RppBackend executionBackend);
353 
378 RppStatus rppt_jitter(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
379  RpptDescPtr dstDescPtr, Rpp32u* kernelSizeTensor, Rpp32u seed,
380  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle,
381  RppBackend executionBackend);
382 
406  RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr,
407  Rpp32f* meanTensor, Rpp32f* stdDevTensor, Rpp32u seed,
408  RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType,
409  rppHandle_t rppHandle, RppBackend executionBackend);
410 
449 RppStatus rppt_erase(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
450  RpptDescPtr dstDescPtr, RpptRoiLtrb* anchorBoxInfoTensor,
451  RppPtr_t colorsTensor, Rpp32u* numBoxesTensor, RpptROIPtr roiTensorPtrSrc,
452  RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend);
453 
478 RppStatus rppt_glitch(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
479  RpptDescPtr dstDescPtr, RpptChannelOffsets* rgbOffsets,
480  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle,
481  RppBackend executionBackend);
482 
515 RppStatus rppt_rain(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
516  RpptDescPtr dstDescPtr, Rpp32f rainPercentage, Rpp32u rainWidth,
517  Rpp32u rainHeight, Rpp32f slantAngle, Rpp32f* alpha, RpptROIPtr roiTensorPtrSrc,
518  RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend);
519 
547  RpptDescPtr dstDescPtr, RppPtr_t intermediateScratchBufferPtr,
548  Rpp32f pixelationPercentage, RpptROIPtr roiTensorPtrSrc,
549  RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend);
550 
579 RppStatus rppt_fog(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr,
580  Rpp32f* intensityFactor, Rpp32f* greyFactor, RpptROIPtr roiTensorPtrSrc,
581  RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend);
582 
608  RpptDescPtr dstDescPtr, Rpp8u* posterizeLevelBits,
609  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle,
610  RppBackend executionBackend);
611 
637  RpptDescPtr dstDescPtr, Rpp32f* thresholdTensor, RpptROIPtr roiTensorPtrSrc,
638  RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend);
639 
669 RppStatus rppt_snow(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
670  RpptDescPtr dstDescPtr, Rpp32f* brightnessCoefficient, Rpp32f* snowThreshold,
671  Rpp32s* darkMode, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
672  rppHandle_t rppHandle, RppBackend executionBackend);
673 
700  RpptDescPtr dstDescPtr, Rpp8u* dropoutTensor,
701  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
702  rppHandle_t rppHandle, RppBackend executionBackend);
703 
735  RpptDescPtr dstDescPtr, RpptRoiLtrb* anchorBoxInfoTensor,
736  RppPtr_t colorsTensor, Rpp32u* numBoxesTensor,
737  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
738  rppHandle_t rppHandle, RppBackend executionBackend);
739 
768  RpptDescPtr dstDescPtr, RpptRoiLtrb* anchorBoxInfoTensor,
769  Rpp32u boxesInEachImage, Rpp32u maxHoleW, Rpp32u maxHoleH,
770  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle,
771  RppBackend executionBackend);
772 
809  RpptDescPtr dstDescPtr, RpptRoiLtrb* anchorBoxInfoTensor,
810  RppPtr_t noiseBuffer, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
811  rppHandle_t rppHandle, RppBackend executionBackend);
812 
851  RpptDescPtr dstDescPtr, RpptRoiLtrb* anchorBoxInfoTensor,
852  Rpp32u* numBoxesTensor, Rpp32u maxBoxesPerImage,
853  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
854  rppHandle_t rppHandle, RppBackend executionBackend);
855 
859 #ifdef __cplusplus
860 }
861 #endif
862 #endif // RPPT_TENSOR_EFFECTS_AUGMENTATIONS_H
unsigned int Rpp32u
32 bit unsigned int
Definition: rppdefs.h:147
int Rpp32s
32 bit signed int
Definition: rppdefs.h:149
unsigned char Rpp8u
8 bit unsigned char
Definition: rppdefs.h:139
void * RppPtr_t
void pointer
Definition: rppdefs.h:159
RpptRoiType
RPPT Tensor 2D ROI type enum.
Definition: rppdefs.h:460
RppStatus
RPP RppStatus type enums.
Definition: rppdefs.h:166
RpptRoi3DType
RPPT Tensor 3D ROI type enum.
Definition: rppdefs.h:468
float Rpp32f
32 bit float
Definition: rppdefs.h:155
RppBackend
RPP RppBackend type enums.
Definition: rppdefs.h:331
RppStatus rppt_channel_dropout(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp8u *dropoutTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Channel dropout augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_shot_noise(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *shotNoiseFactorTensor, Rpp32u seed, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Shot noise augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_pixelate(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RppPtr_t intermediateScratchBufferPtr, Rpp32f pixelationPercentage, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Pixelate augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_posterize(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp8u *posterizeLevelBits, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Posterize augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_random_erase(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptRoiLtrb *anchorBoxInfoTensor, RppPtr_t noiseBuffer, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Random Erase augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_rain(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f rainPercentage, Rpp32u rainWidth, Rpp32u rainHeight, Rpp32f slantAngle, Rpp32f *alpha, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Rain augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_salt_and_pepper_noise(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *noiseProbabilityTensor, Rpp32f *saltProbabilityTensor, Rpp32f *saltValueTensor, Rpp32f *pepperValueTensor, Rpp32u seed, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Salt and pepper noise augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_snow(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *brightnessCoefficient, Rpp32f *snowThreshold, Rpp32s *darkMode, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Snow augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_vignette(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *vignetteIntensityTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Vignette augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_fog(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *intensityFactor, Rpp32f *greyFactor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Fog augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_solarize(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *thresholdTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Solarize augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_non_linear_blend(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *stdDevTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Non linear blend augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_water(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *amplitudeXTensor, Rpp32f *amplitudeYTensor, Rpp32f *frequencyXTensor, Rpp32f *frequencyYTensor, Rpp32f *phaseXTensor, Rpp32f *phaseYTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Water augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_grid_dropout(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptRoiLtrb *anchorBoxInfoTensor, Rpp32u boxesInEachImage, Rpp32u maxHoleW, Rpp32u maxHoleH, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Grid dropout augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_coarse_dropout(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptRoiLtrb *anchorBoxInfoTensor, Rpp32u *numBoxesTensor, Rpp32u maxBoxesPerImage, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Coarse dropout augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_glitch(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptChannelOffsets *rgbOffsets, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Glitch augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_jitter(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u *kernelSizeTensor, Rpp32u seed, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Jitter augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_spatter(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptRGB spatterColor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Spatter augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_gridmask(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u tileWidth, Rpp32f gridRatio, Rpp32f gridAngle, RpptUintVector2D translateVector, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Gridmask augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_gaussian_noise(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *meanTensor, Rpp32f *stdDevTensor, Rpp32u seed, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Gaussian noise augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_gaussian_noise_voxel(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32f *meanTensor, Rpp32f *stdDevTensor, Rpp32u seed, RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Gaussian noise augmentation on HIP/HOST backend.
RppStatus rppt_cutout_dropout(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptRoiLtrb *anchorBoxInfoTensor, RppPtr_t colorsTensor, Rpp32u *numBoxesTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Cutout dropout augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_erase(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptRoiLtrb *anchorBoxInfoTensor, RppPtr_t colorsTensor, Rpp32u *numBoxesTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Erase augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_ricap(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u *permutationTensor, RpptROIPtr roiPtrInputCropRegion, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
RICAP (Random Image Crop And Patch) augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RPP top-level header with RPP handle API.
RPP common HOST/GPU typedef, enum and structure definitions.
RPPT Tensor Channel Offsets struct.
Definition: rppdefs.h:546
RPPT Tensor descriptor type struct.
Definition: rppdefs.h:609
RPPT Tensor Generic descriptor type struct.
Definition: rppdefs.h:650
RPPT Tensor 8-bit uchar RGB type struct.
Definition: rppdefs.h:662
RPPT Tensor 2D ROI LTRB struct.
Definition: rppdefs.h:538
RPPT Tensor 2D 32-bit uint vector type struct.
Definition: rppdefs.h:680
RPPT Tensor 3D ROI union.
Definition: rppdefs.h:590
RPPT Tensor 2D ROI union.
Definition: rppdefs.h:581