more castings
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -17,7 +17,7 @@ namespace ImageProcessingAtom
|
||||
{
|
||||
float round(float x)
|
||||
{
|
||||
return ((x) >= 0) ? floor((x) + 0.5) : ceil((x)-0.5);
|
||||
return ((x) >= 0.f) ? floor((x) + 0.5f) : ceil((x) - 0.5f);
|
||||
}
|
||||
|
||||
void calculateFilterRange(unsigned int srcFactor, int& srcFirst, int& srcLast,
|
||||
@@ -220,7 +220,7 @@ namespace ImageProcessingAtom
|
||||
|
||||
/* normalize against the peak sumWeights, because the sums are not allowed to leave -32768/32767 */
|
||||
fWeight = fWeight * nrmWeights;
|
||||
iWeight = int(round(fWeight));
|
||||
iWeight = int(round(static_cast<float>(fWeight)));
|
||||
|
||||
/* find first nonzero */
|
||||
if (stillzero && (iWeight == 0))
|
||||
@@ -246,7 +246,7 @@ namespace ImageProcessingAtom
|
||||
/* add weight to table, interleaved sign */
|
||||
for (n = 0; n < -numRepetitions; n++)
|
||||
{
|
||||
*weightsPtr++ = sgnextend(n, -iWeight);
|
||||
*weightsPtr++ = static_cast<signed short int>(sgnextend(n, -iWeight));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -254,7 +254,7 @@ namespace ImageProcessingAtom
|
||||
/* add weight to table */
|
||||
for (n = 0; n < numRepetitions; n++)
|
||||
{
|
||||
*weightsPtr++ = -iWeight;
|
||||
*weightsPtr++ = static_cast<signed short int>(-iWeight);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ namespace ImageProcessingAtom
|
||||
|
||||
for (n = 0, weightsPtr = weightsMem + (i - i0) * numRepetitions; n < numRepetitions; n++)
|
||||
{
|
||||
*weightsPtr++ -= iWeight;
|
||||
*weightsPtr++ -= static_cast<signed short int>(iWeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user