From e90f197bebb2cac8afa05d726803a6e6547671ad Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Mon, 27 Dec 2010 12:01:38 +0000 Subject: [PATCH] merged fix for x64 MSVC compile errors in highgui into trunk --- modules/highgui/CMakeLists.txt | 2 +- modules/highgui/src/cap_dshow.cpp | 1 + modules/imgproc/src/utils.cpp | 12 ++++++------ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt index 2a33cead67..78e20d36f9 100644 --- a/modules/highgui/CMakeLists.txt +++ b/modules/highgui/CMakeLists.txt @@ -257,7 +257,7 @@ set_target_properties(${the_target} PROPERTIES ) if(MSVC) - set_target_properties(${the_target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib") + set_target_properties(${the_target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib") endif(MSVC) # Dependencies of this target: diff --git a/modules/highgui/src/cap_dshow.cpp b/modules/highgui/src/cap_dshow.cpp index 20320ce2c8..9a950a77da 100644 --- a/modules/highgui/src/cap_dshow.cpp +++ b/modules/highgui/src/cap_dshow.cpp @@ -184,6 +184,7 @@ CvCapture* cvCreateCameraCapture_DShow( int index ) } #ifdef _MSC_VER +#pragma comment(lib, "strmiids.lib") #if defined _M_X64 #pragma comment(lib, "videoInput64.lib") #else diff --git a/modules/imgproc/src/utils.cpp b/modules/imgproc/src/utils.cpp index 88d489db35..5609d6f68f 100644 --- a/modules/imgproc/src/utils.cpp +++ b/modules/imgproc/src/utils.cpp @@ -74,8 +74,8 @@ CV_IMPL CvSeq* cvPointSeqFromMat( int seq_kind, const CvArr* arr, namespace cv { -static void copyMakeBorder_8u( const uchar* src, int srcstep, Size srcroi, - uchar* dst, int dststep, Size dstroi, +static void copyMakeBorder_8u( const uchar* src, size_t srcstep, Size srcroi, + uchar* dst, size_t dststep, Size dstroi, int top, int left, int cn, int borderType ) { const int isz = (int)sizeof(int); @@ -155,8 +155,8 @@ static void copyMakeBorder_8u( const uchar* src, int srcstep, Size srcroi, } -static void copyMakeConstBorder_8u( const uchar* src, int srcstep, Size srcroi, - uchar* dst, int dststep, Size dstroi, +static void copyMakeConstBorder_8u( const uchar* src, size_t srcstep, Size srcroi, + uchar* dst, size_t dststep, Size dstroi, int top, int left, int cn, const uchar* value ) { int i, j; @@ -205,14 +205,14 @@ void copyMakeBorder( const Mat& src, Mat& dst, int top, int bottom, if( borderType != BORDER_CONSTANT ) copyMakeBorder_8u( src.data, src.step, src.size(), dst.data, dst.step, dst.size(), - top, left, src.elemSize(), borderType ); + top, left, (int)src.elemSize(), borderType ); else { double buf[4]; scalarToRawData(value, buf, src.type()); copyMakeConstBorder_8u( src.data, src.step, src.size(), dst.data, dst.step, dst.size(), - top, left, src.elemSize(), (uchar*)buf ); + top, left, (int)src.elemSize(), (uchar*)buf ); } } -- GitLab