Merge pull request #2966 from bobobo1618/cpluspluseleven
Add explicit type conversions to satisfy C++11 requirements.
This commit is contained in:
commit
8f489d5cae
@ -1937,9 +1937,11 @@ void CLASS hasselblad_correct()
|
|||||||
const ushort corners_shift[9] = { 2, 1, 2, 1, 0, 1, 2, 1, 2 };
|
const ushort corners_shift[9] = { 2, 1, 2, 1, 0, 1, 2, 1, 2 };
|
||||||
for (row = 0; row < bh; row++) {
|
for (row = 0; row < bh; row++) {
|
||||||
const ushort maxdist = bw < bh ? bw/2-1 : bh/2-1;
|
const ushort maxdist = bw < bh ? bw/2-1 : bh/2-1;
|
||||||
const unsigned corners[9][2] = {{0,0}, {0,bw/2}, {0,bw-1},
|
const unsigned bwu = (unsigned)bw;
|
||||||
{bh/2,0},{bh/2,bw/2},{bh/2,bw-1},
|
const unsigned bhu = (unsigned)bh;
|
||||||
{bh-1,0},{bh-1,bw/2},{bh-1,bw-1}};
|
const unsigned corners[9][2] = {{0,0}, {0,bwu/2}, {0,bwu-1},
|
||||||
|
{bhu/2,0},{bhu/2,bwu/2},{bhu/2,bwu-1},
|
||||||
|
{bhu-1,0},{bhu-1,bwu/2},{bhu-1,bwu-1}};
|
||||||
for (col = 0; col < bw; col++) {
|
for (col = 0; col < bw; col++) {
|
||||||
for (i = 0; i < 9; i++) {
|
for (i = 0; i < 9; i++) {
|
||||||
ushort dist = (ushort)sqrt(abs(corners[i][0] - row) * abs(corners[i][0] - row) + abs(corners[i][1] - col) * abs(corners[i][1] - col));
|
ushort dist = (ushort)sqrt(abs(corners[i][0] - row) * abs(corners[i][0] - row) + abs(corners[i][1] - col) * abs(corners[i][1] - col));
|
||||||
|
@ -2004,9 +2004,9 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int
|
|||||||
//matrix for current working space
|
//matrix for current working space
|
||||||
TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params->icm.working);
|
TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params->icm.working);
|
||||||
const float wip[3][3] = {
|
const float wip[3][3] = {
|
||||||
{wiprof[0][0], wiprof[0][1], wiprof[0][2]},
|
{(float)wiprof[0][0], (float)wiprof[0][1], (float)wiprof[0][2]},
|
||||||
{wiprof[1][0], wiprof[1][1], wiprof[1][2]},
|
{(float)wiprof[1][0], (float)wiprof[1][1], (float)wiprof[1][2]},
|
||||||
{wiprof[2][0], wiprof[2][1], wiprof[2][2]}
|
{(float)wiprof[2][0], (float)wiprof[2][1], (float)wiprof[2][2]}
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __SSE2__
|
#ifdef __SSE2__
|
||||||
|
@ -2745,7 +2745,9 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile
|
|||||||
*/
|
*/
|
||||||
void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, RawImage *riDark, RawImage *riFlatFile )
|
void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, RawImage *riDark, RawImage *riFlatFile )
|
||||||
{
|
{
|
||||||
unsigned short black[4] = {ri->get_cblack(0), ri->get_cblack(1), ri->get_cblack(2), ri->get_cblack(3)};
|
unsigned short black[4] = {
|
||||||
|
(unsigned short)ri->get_cblack(0), (unsigned short)ri->get_cblack(1),
|
||||||
|
(unsigned short)ri->get_cblack(2), (unsigned short)ri->get_cblack(3)};
|
||||||
|
|
||||||
if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) {
|
if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) {
|
||||||
if (!rawData) {
|
if (!rawData) {
|
||||||
@ -4218,7 +4220,10 @@ void RawImageSource::getRAWHistogram (LUTu & histRedRaw, LUTu & histGreenRaw, LU
|
|||||||
histRedRaw.clear();
|
histRedRaw.clear();
|
||||||
histGreenRaw.clear();
|
histGreenRaw.clear();
|
||||||
histBlueRaw.clear();
|
histBlueRaw.clear();
|
||||||
const float mult[4] = { 65535.0 / ri->get_white(0), 65535.0 / ri->get_white(1), 65535.0 / ri->get_white(2), 65535.0 / ri->get_white(3) };
|
const float mult[4] = { 65535.0f / ri->get_white(0),
|
||||||
|
65535.0f / ri->get_white(1),
|
||||||
|
65535.0f / ri->get_white(2),
|
||||||
|
65535.0f / ri->get_white(3) };
|
||||||
|
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
int numThreads;
|
int numThreads;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user