projects/rpp/api/rppt_tensor_geometric_augmentations.h Source File

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

RPP: projects/rpp/api/rppt_tensor_geometric_augmentations.h Source File
rppt_tensor_geometric_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_GEOMETRIC_AUGMENTATIONS_H
26 #define RPPT_TENSOR_GEOMETRIC_AUGMENTATIONS_H
27 
28 #include "rpp.h"
29 #include "rppdefs.h"
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
67 RppStatus rppt_crop(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
68  RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
69  rppHandle_t rppHandle, RppBackend executionBackend);
70 
101  RpptDescPtr dstDescPtr, Rpp32f* offsetTensor,
102  Rpp32f* multiplierTensor, Rpp32u* mirrorTensor,
103  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
104  rppHandle_t rppHandle, RppBackend executionBackend);
105 
131  RpptDescPtr dstDescPtr, Rpp32f* affineTensor,
132  RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc,
133  RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend);
134 
160 RppStatus rppt_flip(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
161  RpptDescPtr dstDescPtr, Rpp32u* horizontalTensor, Rpp32u* verticalTensor,
162  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle,
163  RppBackend executionBackend);
164 
190 RppStatus rppt_resize(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
191  RpptDescPtr dstDescPtr, RpptImagePatchPtr dstImgSizes,
192  RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc,
193  RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend);
194 
229  RpptDescPtr dstDescPtr, RpptImagePatchPtr dstImgSizes,
230  RpptInterpolationType interpolationType, Rpp32f* meanTensor,
231  Rpp32f* stdDevTensor, Rpp32u* mirrorTensor,
232  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
233  rppHandle_t rppHandle, RppBackend executionBackend);
234 
263  RpptDescPtr dstDescPtr, RpptImagePatchPtr dstImgSizes,
264  RpptInterpolationType interpolationType, Rpp32u* mirrorTensor,
265  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
266  rppHandle_t rppHandle, RppBackend executionBackend);
267 
294 RppStatus rppt_rotate(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
295  RpptDescPtr dstDescPtr, Rpp32f* angle,
296  RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc,
297  RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend);
298 
323 RppStatus rppt_phase(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
324  RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
325  rppHandle_t rppHandle, RppBackend executionBackend);
326 
348 RppStatus rppt_slice(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr,
349  RpptGenericDescPtr dstGenericDescPtr, Rpp32s* anchorTensor,
350  Rpp32s* shapeTensor, RppPtr_t fillValue, bool enablePadding, Rpp32u* roiTensor,
351  rppHandle_t rppHandle, RppBackend executionBackend);
352 
391  RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrDst,
392  RpptROIPtr cropRoiTensor, RpptROIPtr patchRoiTensor,
393  RpptRoiType roiType, rppHandle_t rppHandle,
394  RppBackend executionBackend);
395 
426  RpptGenericDescPtr dstGenericDescPtr, Rpp32u* horizontalTensor,
427  Rpp32u* verticalTensor, Rpp32u* depthTensor,
428  RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType,
429  rppHandle_t rppHandle, RppBackend executionBackend);
430 
463 RppStatus rppt_remap(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr,
464  RpptDescPtr dstDescPtr, Rpp32f* rowRemapTable, Rpp32f* colRemapTable,
465  RpptDescPtr tableDescPtr, RpptInterpolationType interpolationType,
466  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle,
467  RppBackend executionBackend);
468 
504  RpptDescPtr dstDescPtr, Rpp32f* rowRemapTable, Rpp32f* colRemapTable,
505  RpptDescPtr tableDescPtr, Rpp32f* cameraMatrixTensor,
506  Rpp32f* distortionCoeffsTensor, RpptROIPtr roiTensorPtrSrc,
507  RpptRoiType roiType, rppHandle_t rppHandle,
508  RppBackend executionBackend);
509 
525 RppStatus rppt_transpose(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr,
526  RpptGenericDescPtr dstGenericDescPtr, Rpp32u* permTensor,
527  Rpp32u* roiTensor, rppHandle_t rppHandle, RppBackend executionBackend);
528 
555  RpptDescPtr dstDescPtr, Rpp32f* perspectiveTensor,
556  RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc,
557  RpptRoiType roiType, rppHandle_t rppHandle,
558  RppBackend executionBackend);
559 
578 RppStatus rppt_concat(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptGenericDescPtr srcPtr1GenericDescPtr,
579  RpptGenericDescPtr srcPtr2GenericDescPtr, RppPtr_t dstPtr,
580  RpptGenericDescPtr dstGenericDescPtr, Rpp32u axisMask,
581  Rpp32u* srcPtr1roiTensor, Rpp32u* srcPtr2roiTensor, rppHandle_t rppHandle,
582  RppBackend executionBackend);
583 
609  RpptDescPtr dstDescPtr, Rpp32s* qualityTensor,
610  RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
611  rppHandle_t rppHandle, RppBackend executionBackend);
612 
636  RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType,
637  rppHandle_t rppHandle, RppBackend executionBackend);
638 
642 #ifdef __cplusplus
643 }
644 #endif
645 #endif // RPPT_TENSOR_GEOMETRIC_AUGMENTATIONS_H
unsigned int Rpp32u
32 bit unsigned int
Definition: rppdefs.h:125
int Rpp32s
32 bit signed int
Definition: rppdefs.h:127
void * RppPtr_t
void pointer
Definition: rppdefs.h:137
RpptRoiType
RPPT Tensor 2D ROI type enum.
Definition: rppdefs.h:360
RppStatus
RPP RppStatus type enums.
Definition: rppdefs.h:144
RpptRoi3DType
RPPT Tensor 3D ROI type enum.
Definition: rppdefs.h:368
RpptInterpolationType
RPPT Tensor interpolation type enum.
Definition: rppdefs.h:381
float Rpp32f
32 bit float
Definition: rppdefs.h:133
RppBackend
RPP RppBackend type enums.
Definition: rppdefs.h:231
RppStatus rppt_resize_mirror_normalize(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptImagePatchPtr dstImgSizes, RpptInterpolationType interpolationType, Rpp32f *meanTensor, Rpp32f *stdDevTensor, Rpp32u *mirrorTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Resize mirror normalize augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_crop_and_patch(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrDst, RpptROIPtr cropRoiTensor, RpptROIPtr patchRoiTensor, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Crop and Patch augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_resize_crop_mirror(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptImagePatchPtr dstImgSizes, RpptInterpolationType interpolationType, Rpp32u *mirrorTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Resize crop mirror augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_flip_voxel(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *horizontalTensor, Rpp32u *verticalTensor, Rpp32u *depthTensor, RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Flip voxel augmentation on HIP/HOST backend.
RppStatus rppt_transpose(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *permTensor, Rpp32u *roiTensor, rppHandle_t rppHandle, RppBackend executionBackend)
Transpose Generic augmentation on HIP/HOST backend.
RppStatus rppt_fisheye(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Fisheye augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_crop_mirror_normalize(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *offsetTensor, Rpp32f *multiplierTensor, Rpp32u *mirrorTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Crop mirror normalize augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_jpeg_compression_distortion(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32s *qualityTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
JPEG Compression Distortion on HIP/HOST backend.
RppStatus rppt_flip(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u *horizontalTensor, Rpp32u *verticalTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Flip augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_warp_affine(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *affineTensor, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Warp affine augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_concat(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptGenericDescPtr srcPtr1GenericDescPtr, RpptGenericDescPtr srcPtr2GenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u axisMask, Rpp32u *srcPtr1roiTensor, Rpp32u *srcPtr2roiTensor, rppHandle_t rppHandle, RppBackend executionBackend)
Concat Generic augmentation on HIP/HOST backend.
RppStatus rppt_resize(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptImagePatchPtr dstImgSizes, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Resize augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_remap(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *rowRemapTable, Rpp32f *colRemapTable, RpptDescPtr tableDescPtr, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Remap augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_warp_perspective(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *perspectiveTensor, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Warp perspective augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_lens_correction(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *rowRemapTable, Rpp32f *colRemapTable, RpptDescPtr tableDescPtr, Rpp32f *cameraMatrixTensor, Rpp32f *distortionCoeffsTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Lens correction transformation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_slice(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32s *anchorTensor, Rpp32s *shapeTensor, RppPtr_t fillValue, bool enablePadding, Rpp32u *roiTensor, rppHandle_t rppHandle, RppBackend executionBackend)
Slice augmentation on HIP/HOST backend.
RppStatus rppt_phase(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Phase augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_rotate(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *angle, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Rotate augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_crop(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Crop 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 descriptor type struct.
Definition: rppdefs.h:509
RPPT Tensor Generic descriptor type struct.
Definition: rppdefs.h:550
RPPT Tensor 2D image patch dimensions type struct.
Definition: rppdefs.h:596
RPPT Tensor 3D ROI union.
Definition: rppdefs.h:490
RPPT Tensor 2D ROI union.
Definition: rppdefs.h:481