Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fd62bd0

Browse filesBrowse files
committed
Relax the loop condition to process the final batch.
1 parent 71fe903 commit fd62bd0
Copy full SHA for fd62bd0

File tree

Expand file treeCollapse file tree

3 files changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+7
-7
lines changed

‎modules/core/src/matmul.simd.hpp

Copy file name to clipboardExpand all lines: modules/core/src/matmul.simd.hpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2544,7 +2544,7 @@ double dotProd_32s(const int* src1, const int* src2, int len)
25442544
#if CV_SIMD_WIDTH == 16
25452545
const int wstep = step * 2;
25462546
v_float64 v_sum1 = vx_setzero_f64();
2547-
for (; i < len - wstep; i += wstep, src1 += wstep, src2 += wstep)
2547+
for (; i <= len - wstep; i += wstep, src1 += wstep, src2 += wstep)
25482548
{
25492549
v_int32 v_src10 = vx_load(src1);
25502550
v_int32 v_src20 = vx_load(src2);
@@ -2555,7 +2555,7 @@ double dotProd_32s(const int* src1, const int* src2, int len)
25552555
}
25562556
v_sum0 = v_add(v_sum0, v_sum1);
25572557
#endif
2558-
for (; i < len - step; i += step, src1 += step, src2 += step)
2558+
for (; i <= len - step; i += step, src1 += step, src2 += step)
25592559
{
25602560
v_int32 v_src1 = vx_load(src1);
25612561
v_int32 v_src2 = vx_load(src2);

‎modules/imgproc/src/color_lab.cpp

Copy file name to clipboardExpand all lines: modules/imgproc/src/color_lab.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,7 +1953,7 @@ struct RGB2Lab_f
19531953
{
19541954
const int vsize = VTraits<v_float32>::vlanes();
19551955
static const int nPixels = vsize*2;
1956-
for(; i < n - 3*nPixels; i += 3*nPixels, src += scn*nPixels)
1956+
for(; i <= n - 3*nPixels; i += 3*nPixels, src += scn*nPixels)
19571957
{
19581958
v_float32 rvec0, gvec0, bvec0, rvec1, gvec1, bvec1;
19591959
if(scn == 3)
@@ -3297,7 +3297,7 @@ struct RGB2Luvinterpolate
32973297
{
32983298
const int vsize = VTraits<v_uint16>::vlanes();
32993299
static const int nPixels = vsize*2;
3300-
for(; i < n - 3*nPixels; i += 3*nPixels, src += scn*nPixels)
3300+
for(; i <= n - 3*nPixels; i += 3*nPixels, src += scn*nPixels)
33013301
{
33023302
/*
33033303
int R = src[bIdx], G = src[1], B = src[bIdx^2];

‎modules/imgproc/src/resize.cpp

Copy file name to clipboardExpand all lines: modules/imgproc/src/resize.cpp
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ struct VResizeLinearVec_32s8u
13251325
v_store(dst + x, v_rshr_pack_u<2>(v_add(v_mul_hi(v_pack(v_shr<4>(vx_load(S0 + x)), v_shr<4>(vx_load(S0 + x + VTraits<v_int32>::vlanes()))), b0), v_mul_hi(v_pack(v_shr<4>(vx_load(S1 + x)), v_shr<4>(vx_load(S1 + x + VTraits<v_int32>::vlanes()))), b1)),
13261326
v_add(v_mul_hi(v_pack(v_shr<4>(vx_load(S0 + x + 2 * VTraits<v_int32>::vlanes())), v_shr<4>(vx_load(S0 + x + 3 * VTraits<v_int32>::vlanes()))), b0), v_mul_hi(v_pack(v_shr<4>(vx_load(S1 + x + 2 * VTraits<v_int32>::vlanes())), v_shr<4>(vx_load(S1 + x + 3 * VTraits<v_int32>::vlanes()))), b1))));
13271327

1328-
for( ; x < width - VTraits<v_int16>::vlanes(); x += VTraits<v_int16>::vlanes())
1328+
for( ; x <= width - VTraits<v_int16>::vlanes(); x += VTraits<v_int16>::vlanes())
13291329
v_rshr_pack_u_store<2>(dst + x, v_add(v_mul_hi(v_pack(v_shr<4>(vx_load(S0 + x)), v_shr<4>(vx_load(S0 + x + VTraits<v_int32>::vlanes()))), b0), v_mul_hi(v_pack(v_shr<4>(vx_load(S1 + x)), v_shr<4>(vx_load(S1 + x + VTraits<v_int32>::vlanes()))), b1)));
13301330

13311331
return x;
@@ -1349,7 +1349,7 @@ struct VResizeLinearVec_32f16u
13491349
for (; x <= width - VTraits<v_uint16>::vlanes(); x += VTraits<v_uint16>::vlanes())
13501350
v_store(dst + x, v_pack_u(v_round(v_muladd(vx_load(S0 + x ), b0, v_mul(vx_load(S1 + x), b1))),
13511351
v_round(v_muladd(vx_load(S0 + x + VTraits<v_float32>::vlanes()), b0, v_mul(vx_load(S1 + x + VTraits<v_float32>::vlanes()), b1)))));
1352-
for( ; x < width - VTraits<v_float32>::vlanes(); x += VTraits<v_float32>::vlanes())
1352+
for( ; x <= width - VTraits<v_float32>::vlanes(); x += VTraits<v_float32>::vlanes())
13531353
{
13541354
v_int32 t0 = v_round(v_muladd(vx_load(S0 + x), b0, v_mul(vx_load(S1 + x), b1)));
13551355
v_store_low(dst + x, v_pack_u(t0, t0));
@@ -1376,7 +1376,7 @@ struct VResizeLinearVec_32f16s
13761376
for (; x <= width - VTraits<v_int16>::vlanes(); x += VTraits<v_int16>::vlanes())
13771377
v_store(dst + x, v_pack(v_round(v_muladd(vx_load(S0 + x ), b0, v_mul(vx_load(S1 + x), b1))),
13781378
v_round(v_muladd(vx_load(S0 + x + VTraits<v_float32>::vlanes()), b0, v_mul(vx_load(S1 + x + VTraits<v_float32>::vlanes()), b1)))));
1379-
for( ; x < width - VTraits<v_float32>::vlanes(); x += VTraits<v_float32>::vlanes())
1379+
for( ; x <= width - VTraits<v_float32>::vlanes(); x += VTraits<v_float32>::vlanes())
13801380
{
13811381
v_int32 t0 = v_round(v_muladd(vx_load(S0 + x), b0, v_mul(vx_load(S1 + x), b1)));
13821382
v_store_low(dst + x, v_pack(t0, t0));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.