{
for( i = 0; i < width + cn; i++ )
{
- D[i] = (ST)(S[i] + S[i+cn] + S[i+cn*2]);
+ D[i] = (ST)S[i] + (ST)S[i+cn] + (ST)S[i+cn*2];
}
}
else if( ksize == 5 )
{
for( i = 0; i < width + cn; i++ )
{
- D[i] = (ST)(S[i] + S[i+cn] + S[i+cn*2] + S[i + cn*3] + S[i + cn*4]);
+ D[i] = (ST)S[i] + (ST)S[i+cn] + (ST)S[i+cn*2] + (ST)S[i + cn*3] + (ST)S[i + cn*4];
}
}
else if( cn == 1 )
{
ST s = 0;
for( i = 0; i < ksz_cn; i++ )
- s += S[i];
+ s += (ST)S[i];
D[0] = s;
for( i = 0; i < width; i++ )
{
- s += S[i + ksz_cn] - S[i];
+ s += (ST)S[i + ksz_cn] - (ST)S[i];
D[i+1] = s;
}
}
ST s0 = 0, s1 = 0, s2 = 0;
for( i = 0; i < ksz_cn; i += 3 )
{
- s0 += S[i];
- s1 += S[i+1];
- s2 += S[i+2];
+ s0 += (ST)S[i];
+ s1 += (ST)S[i+1];
+ s2 += (ST)S[i+2];
}
D[0] = s0;
D[1] = s1;
D[2] = s2;
for( i = 0; i < width; i += 3 )
{
- s0 += S[i + ksz_cn] - S[i];
- s1 += S[i + ksz_cn + 1] - S[i + 1];
- s2 += S[i + ksz_cn + 2] - S[i + 2];
+ s0 += (ST)S[i + ksz_cn] - (ST)S[i];
+ s1 += (ST)S[i + ksz_cn + 1] - (ST)S[i + 1];
+ s2 += (ST)S[i + ksz_cn + 2] - (ST)S[i + 2];
D[i+3] = s0;
D[i+4] = s1;
D[i+5] = s2;
ST s0 = 0, s1 = 0, s2 = 0, s3 = 0;
for( i = 0; i < ksz_cn; i += 4 )
{
- s0 += S[i];
- s1 += S[i+1];
- s2 += S[i+2];
- s3 += S[i+3];
+ s0 += (ST)S[i];
+ s1 += (ST)S[i+1];
+ s2 += (ST)S[i+2];
+ s3 += (ST)S[i+3];
}
D[0] = s0;
D[1] = s1;
D[3] = s3;
for( i = 0; i < width; i += 4 )
{
- s0 += S[i + ksz_cn] - S[i];
- s1 += S[i + ksz_cn + 1] - S[i + 1];
- s2 += S[i + ksz_cn + 2] - S[i + 2];
- s3 += S[i + ksz_cn + 3] - S[i + 3];
+ s0 += (ST)S[i + ksz_cn] - (ST)S[i];
+ s1 += (ST)S[i + ksz_cn + 1] - (ST)S[i + 1];
+ s2 += (ST)S[i + ksz_cn + 2] - (ST)S[i + 2];
+ s3 += (ST)S[i + ksz_cn + 3] - (ST)S[i + 3];
D[i+4] = s0;
D[i+5] = s1;
D[i+6] = s2;
{
ST s = 0;
for( i = 0; i < ksz_cn; i += cn )
- s += S[i];
+ s += (ST)S[i];
D[0] = s;
for( i = 0; i < width; i += cn )
{
- s += S[i + ksz_cn] - S[i];
+ s += (ST)S[i + ksz_cn] - (ST)S[i];
D[i+cn] = s;
}
}
virtual void operator()(const uchar** src, uchar* dst, int dststep, int count, int width)
{
- int i;
int* SUM;
bool haveScale = scale != 1;
double _scale = scale;
for( ; sumCount < ksize - 1; sumCount++, src++ )
{
const int* Sp = (const int*)src[0];
- i = 0;
+ int i = 0;
#if CV_SSE2
if(haveSSE2)
{
uchar* D = (uchar*)dst;
if( haveScale )
{
- i = 0;
+ int i = 0;
#if CV_SSE2
if(haveSSE2)
{
}
else
{
- i = 0;
+ int i = 0;
#if CV_SSE2
if(haveSSE2)
{
if( scale != 1 )
{
int d = cvRound(1./scale);
- double scalef = (1 << 16)/d;
+ double scalef = ((double)(1 << 16))/d;
divScale = cvFloor(scalef);
scalef -= divScale;
divDelta = d/2;
virtual void operator()(const uchar** src, uchar* dst, int dststep, int count, int width)
{
- int i, ds = divScale, dd = divDelta;
+ const int ds = divScale;
+ const int dd = divDelta;
ushort* SUM;
- bool haveScale = scale != 1;
+ const bool haveScale = scale != 1;
#if CV_SSE2
bool haveSSE2 = checkHardwareSupport(CV_CPU_SSE2);
for( ; sumCount < ksize - 1; sumCount++, src++ )
{
const ushort* Sp = (const ushort*)src[0];
- i = 0;
+ int i = 0;
#if CV_SSE2
if(haveSSE2)
{
uchar* D = (uchar*)dst;
if( haveScale )
{
- i = 0;
+ int i = 0;
#if CV_SSE2
if(haveSSE2)
{
}
else
{
- i = 0;
+ int i = 0;
for( ; i < width; i++ )
{
int s0 = SUM[i] + Sp[i];
virtual void operator()(const uchar** src, uchar* dst, int dststep, int count, int width)
{
- int i;
int* SUM;
bool haveScale = scale != 1;
double _scale = scale;
for( ; sumCount < ksize - 1; sumCount++, src++ )
{
const int* Sp = (const int*)src[0];
- i = 0;
+ int i = 0;
#if CV_SSE2
if(haveSSE2)
{
ushort* D = (ushort*)dst;
if( haveScale )
{
- i = 0;
+ int i = 0;
#if CV_SSE2
if(haveSSE2)
{
}
else
{
- i = 0;
- #if CV_SSE2
+ int i = 0;
+ #if CV_SSE2
if(haveSSE2)
{
const __m128i delta0 = _mm_set1_epi32(0x8000);
virtual void operator()(const uchar** src, uchar* dst, int dststep, int count, int width)
{
- int i;
int* SUM;
bool haveScale = scale != 1;
double _scale = scale;
for( ; sumCount < ksize - 1; sumCount++, src++ )
{
const int* Sp = (const int*)src[0];
- i = 0;
+ int i = 0;
#if CV_SSE2
if(haveSSE2)
{
int* D = (int*)dst;
if( haveScale )
{
- i = 0;
+ int i = 0;
#if CV_SSE2
if(haveSSE2)
{
}
else
{
- i = 0;
+ int i = 0;
#if CV_SSE2
if(haveSSE2)
{
virtual void operator()(const uchar** src, uchar* dst, int dststep, int count, int width)
{
- int i;
int* SUM;
bool haveScale = scale != 1;
double _scale = scale;
for( ; sumCount < ksize - 1; sumCount++, src++ )
{
const int* Sp = (const int*)src[0];
- i = 0;
+ int i = 0;
#if CV_SSE2
if(haveSSE2)
{
float* D = (float*)dst;
if( haveScale )
{
- i = 0;
+ int i = 0;
#if CV_SSE2
if(haveSSE2)
}
else
{
- i = 0;
+ int i = 0;
#if CV_SSE2
if(haveSSE2)