Commit 1c73e66e authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #12131 from alalek:issue_12083

parents 2dbb5871 3082ea82
...@@ -36,13 +36,14 @@ vecmerge_( const T** src, T* dst, int len, int cn ) ...@@ -36,13 +36,14 @@ vecmerge_( const T** src, T* dst, int len, int cn )
const T* src0 = src[0]; const T* src0 = src[0];
const T* src1 = src[1]; const T* src1 = src[1];
const int dstElemSize = cn * sizeof(T);
int r = (int)((size_t)(void*)dst % (VECSZ*sizeof(T))); int r = (int)((size_t)(void*)dst % (VECSZ*sizeof(T)));
hal::StoreMode mode = hal::STORE_ALIGNED_NOCACHE; hal::StoreMode mode = hal::STORE_ALIGNED_NOCACHE;
if( r != 0 ) if( r != 0 )
{ {
mode = hal::STORE_UNALIGNED; mode = hal::STORE_UNALIGNED;
if( r % cn == 0 && len > VECSZ ) if (r % dstElemSize == 0 && len > VECSZ)
i0 = VECSZ - (r / cn); i0 = VECSZ - (r / dstElemSize);
} }
if( cn == 2 ) if( cn == 2 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment