mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -453,9 +453,9 @@ struct Cvt_SIMD<int, uchar>
|
||||
{
|
||||
v_int32x4 v_src1 = v_load(src + x), v_src2 = v_load(src + x + cWidth);
|
||||
v_int32x4 v_src3 = v_load(src + x + cWidth * 2), v_src4 = v_load(src + x + cWidth * 3);
|
||||
v_uint16x8 v_dst1 = v_pack_u(v_src1, v_src2);
|
||||
v_uint16x8 v_dst2 = v_pack_u(v_src3, v_src4);
|
||||
v_store(dst + x, v_pack(v_dst1, v_dst2));
|
||||
v_int16x8 v_dst1 = v_pack(v_src1, v_src2);
|
||||
v_int16x8 v_dst2 = v_pack(v_src3, v_src4);
|
||||
v_store(dst + x, v_pack_u(v_dst1, v_dst2));
|
||||
}
|
||||
}
|
||||
return x;
|
||||
|
||||
@@ -2779,7 +2779,7 @@ cvGraphAddEdgeByPtr( CvGraph* graph,
|
||||
|
||||
if( start_vtx == end_vtx )
|
||||
CV_Error( start_vtx ? CV_StsBadArg : CV_StsNullPtr,
|
||||
"vertex pointers coinside (or set to NULL)" );
|
||||
"vertex pointers coincide (or set to NULL)" );
|
||||
|
||||
edge = (CvGraphEdge*)cvSetNew( (CvSet*)(graph->edges) );
|
||||
assert( edge->flags >= 0 );
|
||||
|
||||
@@ -36,13 +36,14 @@ vecmerge_( const T** src, T* dst, int len, int cn )
|
||||
const T* src0 = src[0];
|
||||
const T* src1 = src[1];
|
||||
|
||||
const int dstElemSize = cn * sizeof(T);
|
||||
int r = (int)((size_t)(void*)dst % (VECSZ*sizeof(T)));
|
||||
hal::StoreMode mode = hal::STORE_ALIGNED_NOCACHE;
|
||||
if( r != 0 )
|
||||
{
|
||||
mode = hal::STORE_UNALIGNED;
|
||||
if( r % cn == 0 && len > VECSZ )
|
||||
i0 = VECSZ - (r / cn);
|
||||
if (r % dstElemSize == 0 && len > VECSZ*2)
|
||||
i0 = VECSZ - (r / dstElemSize);
|
||||
}
|
||||
|
||||
if( cn == 2 )
|
||||
|
||||
@@ -1063,7 +1063,7 @@ cvReadRawDataSlice( const CvFileStorage* fs, CvSeqReader* reader,
|
||||
CV_Error( CV_StsNullPtr, "Null pointer to reader or destination array" );
|
||||
|
||||
if( !reader->seq && len != 1 )
|
||||
CV_Error( CV_StsBadSize, "The readed sequence is a scalar, thus len must be 1" );
|
||||
CV_Error( CV_StsBadSize, "The read sequence is a scalar, thus len must be 1" );
|
||||
|
||||
fmt_pair_count = icvDecodeFormat( dt, fmt_pairs, CV_FS_MAX_FMT_PAIRS );
|
||||
size_t step = ::icvCalcStructSize(dt, 0);
|
||||
|
||||
@@ -27,8 +27,8 @@ vecsplit_( const T* src, T** dst, int len, int cn )
|
||||
if( (r0|r1|r2|r3) != 0 )
|
||||
{
|
||||
mode = hal::STORE_UNALIGNED;
|
||||
if( r0 == r1 && r0 == r2 && r0 == r3 && r0 % cn == 0 && len > VECSZ )
|
||||
i0 = VECSZ - (r0 / cn);
|
||||
if( r0 == r1 && r0 == r2 && r0 == r3 && r0 % sizeof(T) == 0 && len > VECSZ*2 )
|
||||
i0 = VECSZ - (r0 / sizeof(T));
|
||||
}
|
||||
|
||||
if( cn == 2 )
|
||||
|
||||
@@ -469,7 +469,32 @@ cv::String getCacheDirectory(const char* sub_directory_name, const char* configu
|
||||
{
|
||||
if (utils::fs::isDirectory(default_cache_path))
|
||||
{
|
||||
default_cache_path = utils::fs::join(default_cache_path, utils::fs::join("opencv", CV_VERSION));
|
||||
cv::String default_cache_path_base = utils::fs::join(default_cache_path, "opencv");
|
||||
default_cache_path = utils::fs::join(default_cache_path_base, "4.0" CV_VERSION_STATUS);
|
||||
if (utils::getConfigurationParameterBool("OPENCV_CACHE_SHOW_CLEANUP_MESSAGE", true)
|
||||
&& !utils::fs::isDirectory(default_cache_path))
|
||||
{
|
||||
std::vector<cv::String> existedCacheDirs;
|
||||
try
|
||||
{
|
||||
utils::fs::glob_relative(default_cache_path_base, "*", existedCacheDirs, false, true);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
if (!existedCacheDirs.empty())
|
||||
{
|
||||
CV_LOG_WARNING(NULL, "Creating new OpenCV cache directory: " << default_cache_path);
|
||||
CV_LOG_WARNING(NULL, "There are several neighbour directories, probably created by old OpenCV versions.");
|
||||
CV_LOG_WARNING(NULL, "Feel free to cleanup these unused directories:");
|
||||
for (size_t i = 0; i < existedCacheDirs.size(); i++)
|
||||
{
|
||||
CV_LOG_WARNING(NULL, " - " << existedCacheDirs[i]);
|
||||
}
|
||||
CV_LOG_WARNING(NULL, "Note: This message is showed only once.");
|
||||
}
|
||||
}
|
||||
if (sub_directory_name && sub_directory_name[0] != '\0')
|
||||
default_cache_path = utils::fs::join(default_cache_path, cv::String(sub_directory_name) + native_separator);
|
||||
if (!utils::fs::createDirectories(default_cache_path))
|
||||
|
||||
Reference in New Issue
Block a user