pixelshift: Fixed a crash caused by division by zero when Show motion was enabled
This commit is contained in:
@@ -51,7 +51,7 @@ float colourDiff(float a, float b, bool adaptive, float stddevFactor, float eper
|
|||||||
if(!showMotion) {
|
if(!showMotion) {
|
||||||
return result;
|
return result;
|
||||||
} else if(result > 0.f) { // for the motion mask
|
} else if(result > 0.f) { // for the motion mask
|
||||||
return std::fabs(a - b) / std::max(a, b) + 0.01f;
|
return std::fabs(a - b) / (std::max(a, b) + 0.01f);
|
||||||
} else {
|
} else {
|
||||||
return 0.f;
|
return 0.f;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user