Skip to content

Commit

Permalink
separate 8u and 16u
Browse files Browse the repository at this point in the history
  • Loading branch information
Rostislav Vasilikhin committed May 7, 2024
1 parent 330e249 commit 9828e4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/core/src/arithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1029,11 +1029,11 @@ void multiply(InputArray src1, InputArray src2,
{
CV_INSTRUMENT_REGION();

static bool halMul8to16available = (cv_hal_mul8u16u != hal_ni_mul8u16u) && (cv_hal_mul8s16s != hal_ni_mul8s16s);
static bool hal8u16uAvailable = cv_hal_mul8u16u != hal_ni_mul8u16u;
static bool hal8s16sAvailable = cv_hal_mul8s16s != hal_ni_mul8s16s;

bool extendMul = ((src1.depth() == CV_8U) && (src2.depth() == CV_8U) && (dtype == CV_16U)) ||
((src1.depth() == CV_8S) && (src2.depth() == CV_8S) && (dtype == CV_16S));
extendMul = extendMul && halMul8to16available;
bool extendMul = (hal8u16uAvailable && (src1.depth() == CV_8U) && (src2.depth() == CV_8U) && (dtype == CV_16U)) ||
(hal8s16sAvailable && (src1.depth() == CV_8S) && (src2.depth() == CV_8S) && (dtype == CV_16S));

arithm_op(src1, src2, dst, noArray(), dtype, getMulTab(extendMul),
/* muldiv */ true, &scale, std::abs(scale - 1.0) < DBL_EPSILON ? OCL_OP_MUL : OCL_OP_MUL_SCALE,
Expand Down

0 comments on commit 9828e4b

Please sign in to comment.