Skip to content

Commit

Permalink
Fixed bugs (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reza authored Nov 1, 2019
1 parent 1137fe4 commit 543437a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 40 deletions.
7 changes: 6 additions & 1 deletion src/imgaug/cpu/host_color_model_conversions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ RppStatus vignette_host(T* srcPtr, RppiSize srcSize, T* dstPtr,
}

compute_multiply_host(srcPtr, maskFinal, srcSize, dstPtr, channel);


free(maskFinal);
free(kernelRows);
free(kernelColumns);
free(mask);

return RPP_SUCCESS;
}
3 changes: 2 additions & 1 deletion src/imgaug/cpu/host_image_augmentations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ RppStatus blur_host(T* srcPtr, RppiSize srcSize, T* dstPtr,
rppiKernelSize.height = kernelSize;
rppiKernelSize.width = kernelSize;
convolve_image_host(srcPtrMod, srcSizeMod, dstPtr, srcSize, kernel, rppiKernelSize, chnFormat, channel);

free(kernel);
free(srcPtrMod);
return RPP_SUCCESS;
}

Expand Down
40 changes: 2 additions & 38 deletions src/include/cpu/rpp_cpu_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,23 +406,6 @@ inline RppStatus generate_sobel_kernel_host(Rpp32f* kernel, Rpp32u type)
return RPP_SUCCESS;
}


















// Kernels for functions

template<typename T, typename U>
Expand Down Expand Up @@ -589,6 +572,7 @@ inline RppStatus resize_crop_kernel_host(T* srcPtr, RppiSize srcSize, T* dstPtr,

resize_kernel_host(srcPtrResize, srcSizeSubImage, dstPtr, dstSize, chnFormat, channel);

free(srcPtrResize);
return RPP_SUCCESS;

}
Expand Down Expand Up @@ -727,7 +711,7 @@ inline RppStatus median_filter_kernel_host(T* srcPtrWindow, T* dstPtrPixel, Rppi
std::sort(kernel, kernel + (kernelSize * kernelSize));

*dstPtrPixel = *(kernel + (((kernelSize * kernelSize) - 1) / 2));

free(kernel);
return RPP_SUCCESS;
}

Expand Down Expand Up @@ -900,26 +884,6 @@ inline RppStatus non_max_suppression_kernel_host(T* srcPtrWindow, T* dstPtrPixel

return RPP_SUCCESS;
}




















// Convolution Functions

template<typename T, typename U>
Expand Down

0 comments on commit 543437a

Please sign in to comment.