Fix gcc error, and MAC error (no pow).

This commit is contained in:
nissim.hadar 2017-11-25 11:41:05 -08:00
parent fcd8a47bec
commit 2911b7dec6
2 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@ SET(CMAKE_AUTOMOC ON)
setup_hifi_project(Core Widgets)
# Add compiler flags for building executables (-fPIE)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
# Qt includes
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

View file

@ -22,8 +22,8 @@ double ImageComparer::compareImages(QImage resultImage, QImage expectedImage) co
}
const int L = 255; // (2^number of bits per pixel) - 1
const double c1 = pow((K1 * L), 2);
const double c2 = pow((K2 * L), 2);
const double c1 = (K1 * L) * (K1 * L);
const double c2 = (K2 * L) * (K2 * L);
// Coefficients for luminosity calculation
const double RED_COEFFICIENT = 0.212655f;