mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge branch 4.x
This commit is contained in:
@@ -898,14 +898,14 @@ void copyMakeBorder_8u( const uchar* src, size_t srcstep, cv::Size srcroi,
|
||||
}
|
||||
|
||||
dstroi.width *= elemSize;
|
||||
dst += dststep*top;
|
||||
|
||||
for( i = 0; i < top; i++ )
|
||||
{
|
||||
j = cv::borderInterpolate(i - top, srcroi.height, borderType);
|
||||
memcpy(dst + (i - top)*dststep, dst + j*dststep, dstroi.width);
|
||||
memcpy(dst + i*dststep, dst + (top+j)*dststep, dstroi.width);
|
||||
}
|
||||
|
||||
dst += dststep*top;
|
||||
for( i = 0; i < bottom; i++ )
|
||||
{
|
||||
j = cv::borderInterpolate(i + srcroi.height, srcroi.height, borderType);
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
|
||||
#if defined(__clang__) && defined(__has_feature)
|
||||
#if __has_feature(memory_sanitizer)
|
||||
#include <sanitizer/msan_interface.h>
|
||||
#define CV_ANNOTATE_MEMORY_IS_INITIALIZED(address, size) \
|
||||
__msan_unpoison(address, size)
|
||||
#endif
|
||||
|
||||
@@ -1158,11 +1158,11 @@ Mat& Mat::adjustROI( int dtop, int dbottom, int dleft, int dright )
|
||||
std::swap(col1, col2);
|
||||
|
||||
if (dims == 1) {
|
||||
data += (col1 - ofs.x)*esz;
|
||||
data += (col1 - ofs.x)*(std::ptrdiff_t)esz;
|
||||
cols = col2 - col1;
|
||||
size.p[0] = cols;
|
||||
} else {
|
||||
data += (row1 - ofs.y)*step + (col1 - ofs.x)*esz;
|
||||
data += (row1 - ofs.y)*(std::ptrdiff_t)step + (col1 - ofs.x)*(std::ptrdiff_t)esz;
|
||||
rows = row2 - row1; cols = col2 - col1;
|
||||
size.p[0] = rows; size.p[1] = cols;
|
||||
updateContinuityFlag();
|
||||
|
||||
@@ -580,8 +580,11 @@ void ThreadPool::run(const Range& range, const ParallelLoopBody& body, double ns
|
||||
pthread_mutex_unlock(&mutex);
|
||||
|
||||
CV_LOG_VERBOSE(NULL, 5, "MainThread: wake worker threads...");
|
||||
for (size_t i = 0; i < threads.size(); ++i)
|
||||
size_t num_threads_to_wake = std::min(static_cast<size_t>(range.size()), threads.size());
|
||||
for (size_t i = 0; i < num_threads_to_wake; ++i)
|
||||
{
|
||||
if (job->current_task >= job->range.size())
|
||||
break;
|
||||
WorkerThread& thread = *(threads[i].get());
|
||||
if (
|
||||
#if defined(__clang__) && defined(__has_feature)
|
||||
|
||||
Reference in New Issue
Block a user