Skip to content

Commit

Permalink
fix openvx wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
berak committed Jan 16, 2019
1 parent fd08d0d commit 53c2ebf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions 3rdparty/openvx/hal/openvx_hal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ int ovx_hal_mul(const T *a, size_t astep, const T *b, size_t bstep, T *c, size_t
refineStep(w, h, ivx::TypeToEnum<T>::imgType, astep);
refineStep(w, h, ivx::TypeToEnum<T>::imgType, bstep);
refineStep(w, h, ivx::TypeToEnum<T>::imgType, cstep);
#ifdef _MSC_VER
const float MAGIC_SCALE = 0x0.01010102;
#ifdef _WIN32
const float MAGIC_SCALE = 0x0.01010102p0;
#else
const float MAGIC_SCALE = 0x1.010102p-8;
#endif
Expand Down
5 changes: 2 additions & 3 deletions 3rdparty/openvx/include/ivx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1718,8 +1718,7 @@ static const vx_enum
}

#ifdef IVX_USE_OPENCV
/// Convert image format (fourcc) to cv::Mat type
/// \return CV_USRTYPE1 for unknown image formats
/// Convert image format (fourcc) to cv::Mat type, throws WrapperError if not possible
static int formatToMatType(vx_df_image format, vx_uint32 planeIdx = 0)
{
switch (format)
Expand All @@ -1739,7 +1738,7 @@ static const vx_enum
case VX_DF_IMAGE_YUYV: return CV_8UC2;
case VX_DF_IMAGE_NV12:
case VX_DF_IMAGE_NV21: return planeIdx == 0 ? CV_8UC1 : CV_8UC2;
default: return CV_USRTYPE1;
default: throw WrapperError(std::string(__func__)+"(): unsupported image format");
}
}

Expand Down
2 changes: 2 additions & 0 deletions modules/imgproc/src/median_blur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -990,9 +990,11 @@ static bool ocl_medianFilter(InputArray _src, OutputArray _dst, int m)
#endif

#ifdef HAVE_OPENVX
} // close anonymous namespace #13634
namespace ovx {
template <> inline bool skipSmallImages<VX_KERNEL_MEDIAN_3x3>(int w, int h) { return w*h < 1280 * 720; }
}
namespace { // reopen it
static bool openvx_medianFilter(InputArray _src, OutputArray _dst, int ksize)
{
if (_src.type() != CV_8UC1 || _dst.type() != CV_8U
Expand Down

0 comments on commit 53c2ebf

Please sign in to comment.