Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RMN PR #32

Merged
merged 6 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions amd_openvx_extensions/amd_rpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ list(APPEND SOURCES
source/Resizetensor.cpp
source/ResizeCropbatchPD.cpp
source/ResizeCropMirrorPD.cpp
source/ResizeMirrorNormalizeTensor.cpp
source/RotatebatchPD.cpp
source/SaturationbatchPD.cpp
source/ScalebatchPD.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ THE SOFTWARE.
#include "internal_rpp.h"

extern "C" SHARED_PUBLIC vx_status VX_API_CALL vxPublishKernels(vx_context context);
vx_status ADD_KERENEL(std::function<vx_status(vx_context)>);
vx_status ADD_KERNEL(std::function<vx_status(vx_context)>);
vx_status get_kernels_to_publish();

vx_status AbsoluteDifferencebatchPD_Register(vx_context);
Expand Down Expand Up @@ -99,6 +99,7 @@ vx_status remap_Register(vx_context);
vx_status ResizebatchPD_Register(vx_context);
vx_status ResizeCropbatchPD_Register(vx_context);
vx_status ResizeCropMirrorPD_Register(vx_context);
vx_status ResizeMirrorNormalizeTensor_Register(vx_context);
vx_status RotatebatchPD_Register(vx_context);
vx_status SaturationbatchPD_Register(vx_context);
vx_status ScalebatchPD_Register(vx_context);
Expand Down Expand Up @@ -197,6 +198,7 @@ vx_status Resizetensor_Register(vx_context);
#define VX_KERNEL_RPP_CROPMIRRORNORMALIZEBATCHPD_NAME "org.rpp.CropMirrorNormalizebatchPD"
#define VX_KERNEL_RPP_CROPPD_NAME "org.rpp.CropPD"
#define VX_KERNEL_RPP_RESIZECROPMIRRORPD_NAME "org.rpp.ResizeCropMirrorPD"
#define VX_KERNEL_RPP_RESIZEMIRRORNORMALIZETENSOR_NAME "org.rpp.ResizeMirrorNormalizeTensor"
#define VX_KERNEL_RPP_SEQUENCEREARRANGE_NAME "org.rpp.SequenceRearrange"
#define VX_KERNEL_RPP_RESIZETENSOR_NAME "org.rpp.Resizetensor"

Expand Down
3 changes: 2 additions & 1 deletion amd_openvx_extensions/amd_rpp/include/kernels_rpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ extern "C"
VX_KERNEL_RPP_VIGNETTEBATCHPD = VX_KERNEL_BASE(VX_ID_AMD, VX_LIBRARY_RPP) + 0x4f,
VX_KERNEL_RPP_WARPAFFINEBATCHPD = VX_KERNEL_BASE(VX_ID_AMD, VX_LIBRARY_RPP) + 0x50,
VX_KERNEL_RPP_WARPPERSPECTIVEBATCHPD = VX_KERNEL_BASE(VX_ID_AMD, VX_LIBRARY_RPP) + 0x51,
VX_KERNEL_RPP_RESIZETENSOR = VX_KERNEL_BASE(VX_ID_AMD, VX_LIBRARY_RPP) + 0x52
VX_KERNEL_RPP_RESIZETENSOR = VX_KERNEL_BASE(VX_ID_AMD, VX_LIBRARY_RPP) + 0x52,
VX_KERNEL_RPP_RESIZEMIRRORNORMALIZETENSOR = VX_KERNEL_BASE(VX_ID_AMD, VX_LIBRARY_RPP) + 0x53,
};

#ifdef __cplusplus
Expand Down
1 change: 1 addition & 0 deletions amd_openvx_extensions/amd_rpp/include/vx_ext_rpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ extern "C" SHARED_PUBLIC vx_node VX_API_CALL vxExtrppNode_remap(vx_graph graph,
extern "C" SHARED_PUBLIC vx_node VX_API_CALL vxExtrppNode_ResizebatchPD(vx_graph graph,vx_image pSrc,vx_array srcImgWidth,vx_array srcImgHeight,vx_image pDst,vx_array dstImgWidth,vx_array dstImgHeight,vx_uint32 nbatchSize);
extern "C" SHARED_PUBLIC vx_node VX_API_CALL vxExtrppNode_ResizeCropbatchPD(vx_graph graph,vx_image pSrc,vx_array srcImgWidth,vx_array srcImgHeight,vx_image pDst,vx_array dstImgWidth,vx_array dstImgHeight,vx_array x1,vx_array y1,vx_array x2,vx_array y2,vx_uint32 nbatchSize);
extern "C" SHARED_PUBLIC vx_node VX_API_CALL vxExtrppNode_ResizeCropMirrorPD(vx_graph graph,vx_image pSrc,vx_array srcImgWidth,vx_array srcImgHeight,vx_image pDst,vx_array dstImgWidth,vx_array dstImgHeight,vx_array x1,vx_array y1,vx_array x2,vx_array y2, vx_array mirrorFlag, vx_uint32 nbatchSize);
extern "C" SHARED_PUBLIC vx_node VX_API_CALL vxExtrppNode_ResizeMirrorNormalizeTensor(vx_graph graph,vx_image pSrc,vx_array srcImgWidth,vx_array srcImgHeight,vx_image pDst,vx_array dstImgWidth,vx_array dstImgHeight,vx_array mean,vx_array std_dev,vx_array flip,vx_scalar chnShift,vx_uint32 nbatchSize);
extern "C" SHARED_PUBLIC vx_node VX_API_CALL vxExtrppNode_RotatebatchPD(vx_graph graph,vx_image pSrc,vx_array srcImgWidth,vx_array srcImgHeight,vx_image pDst,vx_array dstImgWidth,vx_array dstImgHeight,vx_array angle,vx_uint32 nbatchSize);
extern "C" SHARED_PUBLIC vx_node VX_API_CALL vxExtrppNode_SaturationbatchPD(vx_graph graph,vx_image pSrc,vx_array srcImgWidth,vx_array srcImgHeight,vx_image pDst,vx_array saturationFactor,vx_uint32 nbatchSize);
extern "C" SHARED_PUBLIC vx_node VX_API_CALL vxExtrppNode_ScalebatchPD(vx_graph graph,vx_image pSrc,vx_array srcImgWidth,vx_array srcImgHeight,vx_image pDst,vx_array dstImgWidth,vx_array dstImgHeight,vx_array percentage,vx_uint32 nbatchSize);
Expand Down
337 changes: 337 additions & 0 deletions amd_openvx_extensions/amd_rpp/source/ResizeMirrorNormalizeTensor.cpp

Large diffs are not rendered by default.

165 changes: 83 additions & 82 deletions amd_openvx_extensions/amd_rpp/source/internal_publishKernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,94 +44,95 @@ vx_status get_kernels_to_publish()
vx_status status = VX_SUCCESS;

Kernel_List = new Kernellist(MAX_KERNELS);
STATUS_ERROR_CHECK(ADD_KERENEL(BrightnessbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(GammaCorrectionbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(BlendbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(BlurbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(ContrastbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(PixelatebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(JitterbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(SnowbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(NoisebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(RandomShadowbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(FogbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(RainbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(RandomCropLetterBoxbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(ExposurebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(HistogramBalancebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(AbsoluteDifferencebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(AccumulateWeightedbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(AccumulatebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(AddbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(SubtractbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(MagnitudebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(MultiplybatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(PhasebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(AccumulateSquaredbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(BitwiseANDbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(BitwiseNOTbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(ExclusiveORbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(InclusiveORbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(Histogram_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(ThresholdingbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(MaxbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(MinbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(MinMaxLoc_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(HistogramEqualizebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(MeanStddev_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(FlipbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(ResizebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(ResizeCropbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(RotatebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(WarpAffinebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(FisheyebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(LensCorrectionbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(ScalebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(WarpPerspectivebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(DilatebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(ErodebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(HuebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(SaturationbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(ColorTemperaturebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(VignettebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(ChannelExtractbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(ChannelCombinebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(LookUpTablebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(BoxFilterbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(SobelbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(MedianFilterbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(CustomConvolutionbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(NonMaxSupressionbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(GaussianFilterbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(NonLinearFilterbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(LocalBinaryPatternbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(DataObjectCopybatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(GaussianImagePyramidbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(LaplacianImagePyramid_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(CannyEdgeDetector_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(HarrisCornerDetector_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(FastCornerDetector_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(remap_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(TensorAdd_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(TensorSubtract_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(TensorMultiply_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(TensorMatrixMultiply_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(TensorLookup_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(ColorTwistbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(CropMirrorNormalizePD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(CropPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(ResizeCropMirrorPD_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(Copy_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(Nop_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(SequenceRearrange_Register));
STATUS_ERROR_CHECK(ADD_KERENEL(Resizetensor_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(BrightnessbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(GammaCorrectionbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(BlendbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(BlurbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ContrastbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(PixelatebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(JitterbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(SnowbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(NoisebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(RandomShadowbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(FogbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(RainbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(RandomCropLetterBoxbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ExposurebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(HistogramBalancebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(AbsoluteDifferencebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(AccumulateWeightedbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(AccumulatebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(AddbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(SubtractbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(MagnitudebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(MultiplybatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(PhasebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(AccumulateSquaredbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(BitwiseANDbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(BitwiseNOTbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ExclusiveORbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(InclusiveORbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(Histogram_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ThresholdingbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(MaxbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(MinbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(MinMaxLoc_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(HistogramEqualizebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(MeanStddev_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(FlipbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ResizebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ResizeCropbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(RotatebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(WarpAffinebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(FisheyebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(LensCorrectionbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ScalebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(WarpPerspectivebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(DilatebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ErodebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(HuebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(SaturationbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ColorTemperaturebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(VignettebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ChannelExtractbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ChannelCombinebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(LookUpTablebatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(BoxFilterbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(SobelbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(MedianFilterbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(CustomConvolutionbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(NonMaxSupressionbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(GaussianFilterbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(NonLinearFilterbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(LocalBinaryPatternbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(DataObjectCopybatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(GaussianImagePyramidbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(LaplacianImagePyramid_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(CannyEdgeDetector_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(HarrisCornerDetector_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(FastCornerDetector_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(remap_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(TensorAdd_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(TensorSubtract_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(TensorMultiply_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(TensorMatrixMultiply_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(TensorLookup_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ColorTwistbatchPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(CropMirrorNormalizePD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(CropPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ResizeCropMirrorPD_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(Copy_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(Nop_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(ResizeMirrorNormalizeTensor_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(SequenceRearrange_Register));
STATUS_ERROR_CHECK(ADD_KERNEL(Resizetensor_Register));
return status;
}

/************************************************************************************************************
Add Kernels to the Kernel List
*************************************************************************************************************/
vx_status ADD_KERENEL(std::function<vx_status(vx_context)> func)
vx_status ADD_KERNEL(std::function<vx_status(vx_context)> func)
{
vx_status status = VX_SUCCESS;
STATUS_ERROR_CHECK(Kernel_List->ADD(func));
Expand Down
27 changes: 27 additions & 0 deletions amd_openvx_extensions/amd_rpp/source/kernel_rpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1790,6 +1790,33 @@ VX_API_ENTRY vx_node VX_API_CALL vxExtrppNode_ResizeCropMirrorPD(vx_graph graph,
return node;
}

VX_API_ENTRY vx_node VX_API_CALL vxExtrppNode_ResizeMirrorNormalizeTensor(vx_graph graph, vx_image pSrc, vx_array srcImgWidth, vx_array srcImgHeight,vx_image pDst,vx_array dstImgWidth,vx_array dstImgHeight,vx_array mean, vx_array std_dev, vx_array flip, vx_scalar chnShift, vx_uint32 nbatchSize)
{
vx_node node = NULL;
vx_context context = vxGetContext((vx_reference)graph);
if(vxGetStatus((vx_reference)context) == VX_SUCCESS) {
vx_uint32 dev_type = getGraphAffinity(graph);
vx_scalar DEV_TYPE = vxCreateScalar(vxGetContext((vx_reference)graph), VX_TYPE_UINT32, &dev_type);
vx_scalar NBATCHSIZE = vxCreateScalar(vxGetContext((vx_reference)graph), VX_TYPE_UINT32, &nbatchSize);
vx_reference params[] = {
(vx_reference) pSrc,
(vx_reference) srcImgWidth,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please align with other params

Copy link
Owner

Choose a reason for hiding this comment

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

Some are in tab and some in space. Convert everything to tab/space.

(vx_reference) srcImgHeight,
(vx_reference) pDst,
(vx_reference) dstImgWidth,
(vx_reference) dstImgHeight,
(vx_reference) mean,
(vx_reference) std_dev,
(vx_reference) flip,
(vx_reference) chnShift,
(vx_reference) NBATCHSIZE,
(vx_reference) DEV_TYPE
};
node = createNode(graph, VX_KERNEL_RPP_RESIZEMIRRORNORMALIZETENSOR, params, 12);
}
return node;
}

VX_API_ENTRY vx_node VX_API_CALL vxExtrppNode_Copy(vx_graph graph, vx_image pSrc, vx_image pDst)
{
vx_node node = NULL;
Expand Down
17 changes: 17 additions & 0 deletions rocAL/rocAL/include/api/rocal_api_augmentation.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,23 @@ extern "C" RocalImage ROCAL_API_CALL rocalResize(RocalContext context, RocalIm
unsigned resize_longer = 0,
RocalResizeInterpolationType interpolation_type = ROCAL_LINEAR_INTERPOLATION);

/// Accepts U8 and RGB24 input.
/// \param context Rocal context
/// \param input Input Rocal Image
/// \param dest_width The output width
/// \param dest_height The output height
/// \param mean The channel mean values
/// \param std_dev The channel standard deviation values
/// \param is_output True: the output image is needed by user and will be copied to output buffers using the data
/// transfer API calls. False: the output image is just an intermediate image, user is not interested in
/// using it directly. This option allows certain optimizations to be achieved.
/// \param p_mirror Parameter to enable horizontal flip for output image.
/// \return
extern "C" RocalImage ROCAL_API_CALL rocalResizeMirrorNormalize(RocalContext p_context, RocalImage p_input,
unsigned dest_width, unsigned dest_height,
std::vector<float> &mean, std::vector<float> &std_dev,
bool is_output, RocalIntParam p_mirror = NULL);

/// Accepts U8 and RGB24 input.
/// \param context
/// \param input
Expand Down
1 change: 1 addition & 0 deletions rocAL/rocAL/include/augmentations/augmentations_nodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ THE SOFTWARE.
#include "node_hue.h"
#include "node_saturation.h"
#include "node_crop_mirror_normalize.h"
#include "node_resize_mirror_normalize.h"
#include "node_resize_crop_mirror.h"
#include "node_ssd_random_crop.h"
#include "node_crop.h"
Expand Down
Loading