Merge branch 'master' into gtk3
This commit is contained in:
@@ -1,36 +1,38 @@
|
||||
# cmakefile executed within a makefile target
|
||||
|
||||
# If we find ReleaseInfo.cmake we use the info from there and don't need Mercurial to be installed
|
||||
# If we find ReleaseInfo.cmake we use the info from there and don't need Git to be installed
|
||||
find_file(REL_INFO_FILE ReleaseInfo.cmake PATHS "${PROJECT_SOURCE_DIR}" NO_DEFAULT_PATH)
|
||||
if (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
|
||||
# we look for the hg command in this paths by order of preference
|
||||
# we look for the git command in this paths by order of preference
|
||||
if (WIN32)
|
||||
find_file(HG_CMD hg.exe HINTS ENV Path PATH_SUFFIXES ../)
|
||||
find_file(GIT_CMD git.exe HINTS ENV Path PATH_SUFFIXES ../)
|
||||
elseif (APPLE)
|
||||
find_file(HG_CMD hg PATHS "/opt/local/bin" "/usr/local/bin" "/usr/bin")
|
||||
find_file(HG_CMD hg)
|
||||
find_file(GIT_CMD git PATHS "/opt/local/bin" "/usr/local/bin" "/usr/bin")
|
||||
find_file(GIT_CMD git)
|
||||
set (SHELL "/bin/bash")
|
||||
else (WIN32) # Linux
|
||||
find_file(HG_CMD hg)
|
||||
find_file(GIT_CMD git)
|
||||
set (SHELL "/bin/bash")
|
||||
endif (WIN32)
|
||||
|
||||
# Fail if Mercurial is not installed
|
||||
if (HG_CMD STREQUAL HG_CMD-NOTFOUND)
|
||||
message(FATAL_ERROR "hg command not found!")
|
||||
# Fail if Git is not installed
|
||||
if (GIT_CMD STREQUAL GIT_CMD-NOTFOUND)
|
||||
message(FATAL_ERROR "git command not found!")
|
||||
else ()
|
||||
message(STATUS "hg command found: ${HG_CMD}")
|
||||
message(STATUS "git command found: ${GIT_CMD}")
|
||||
endif ()
|
||||
|
||||
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" branch OUTPUT_VARIABLE HG_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttag}.{latesttagdistance} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={node|short} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_CHANGESET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttagdistance} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_TAGDISTANCE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${GIT_CMD} symbolic-ref --short -q HEAD OUTPUT_VARIABLE GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
|
||||
execute_process(COMMAND ${GIT_CMD} describe --tags --always OUTPUT_VARIABLE GIT_VERSION_WHOLE OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
|
||||
string(REGEX REPLACE "-g.*" "" GIT_VERSION ${GIT_VERSION_WHOLE})
|
||||
string(REPLACE "-" "." GIT_VERSION ${GIT_VERSION})
|
||||
execute_process(COMMAND ${GIT_CMD} rev-parse --verify HEAD OUTPUT_VARIABLE GIT_CHANGESET OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
|
||||
string(REGEX REPLACE ".*-(.*)-g.*" "\\1" GIT_TAGDISTANCE ${GIT_VERSION_WHOLE})
|
||||
if (NOT DEFINED CACHE_NAME_SUFFIX)
|
||||
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttag} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE CACHE_NAME_SUFFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REGEX REPLACE "-.*" "" CACHE_NAME_SUFFIX ${GIT_VERSION_WHOLE})
|
||||
message(STATUS "CACHE_NAME_SUFFIX was not defined, it is now \"${CACHE_NAME_SUFFIX}\"")
|
||||
elseif (CACHE_NAME_SUFFIX STREQUAL "latesttag")
|
||||
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttag} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE CACHE_NAME_SUFFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REGEX REPLACE "-.*" "" CACHE_NAME_SUFFIX ${GIT_VERSION_WHOLE})
|
||||
message(STATUS "CACHE_NAME_SUFFIX was \"latesttag\", it is now \"${CACHE_NAME_SUFFIX}\"")
|
||||
else ()
|
||||
message(STATUS "CACHE_NAME_SUFFIX is \"${CACHE_NAME_SUFFIX}\"")
|
||||
@@ -40,9 +42,9 @@ else (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
|
||||
endif (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
|
||||
|
||||
if (VERSION_SUFFIX STREQUAL "")
|
||||
set (HG_VERSION_SUFFIX "${HG_VERSION}")
|
||||
set (GIT_VERSION_SUFFIX "${GIT_VERSION}")
|
||||
else ()
|
||||
set (HG_VERSION_SUFFIX "${HG_VERSION} ${VERSION_SUFFIX}")
|
||||
set (GIT_VERSION_SUFFIX "${GIT_VERSION} ${VERSION_SUFFIX}")
|
||||
endif ()
|
||||
|
||||
# build version.h from template
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Branch: ${HG_BRANCH}
|
||||
Version: ${HG_VERSION_SUFFIX}
|
||||
Changeset: ${HG_CHANGESET}
|
||||
Branch: ${GIT_BRANCH}
|
||||
Version: ${GIT_VERSION_SUFFIX}
|
||||
Changeset: ${GIT_CHANGESET}
|
||||
Compiler: ${COMPILER_INFO}
|
||||
Processor: ${PROC_LABEL}
|
||||
System: ${SYSTEM}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
if (WIN32)
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_policy(SET CMP0015 OLD)
|
||||
else (WIN32)
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
endif (WIN32)
|
||||
@@ -14,6 +13,16 @@ endif ()
|
||||
|
||||
string (TOUPPER ${CMAKE_BUILD_TYPE} UPPER_CMAKE_BUILD_TYPE)
|
||||
|
||||
# assuming that Linux and Apple users will have gtk2 built by their installed gcc
|
||||
if (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
|
||||
if (GCC_VERSION VERSION_GREATER 5.0 OR GCC_VERSION VERSION_EQUAL 5.0)
|
||||
message(STATUS "Gcc Version >= 5.0 ; adding -D_GLIBCXX_USE_CXX11_ABI=0 to build with Gtk2")
|
||||
add_definitions (-D_GLIBCXX_USE_CXX11_ABI=0)
|
||||
# see here : https://gcc.gnu.org/gcc-5/changes.html#libstdcxx
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (UPPER_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
|
||||
add_definitions (-D_DEBUG)
|
||||
else ()
|
||||
@@ -352,7 +361,6 @@ add_custom_target(AboutFile ALL
|
||||
COMMAND ${ABOUT_COMMAND_WITH_ARGS}
|
||||
COMMENT "Creating the about file")
|
||||
|
||||
add_dependencies(AboutFile Debug Release MinSizeRel RelWithDebInfo)
|
||||
## END: Generating AboutThisBuild.txt
|
||||
|
||||
install (FILES AUTHORS.txt DESTINATION "${CREDITSDIR}")
|
||||
|
||||
@@ -19,16 +19,6 @@ else (WIN32)
|
||||
endif (WIN32)
|
||||
|
||||
if (WIN32)
|
||||
find_file(HG_CMD hg.exe HINTS ENV Path PATH_SUFFIXES ../)
|
||||
# Fail if Mercurial is not installed
|
||||
if (HG_CMD STREQUAL HG_CMD-NOTFOUND)
|
||||
message(FATAL_ERROR "hg command not found!")
|
||||
else (HG_CMD STREQUAL HG_CMD-NOTFOUND)
|
||||
message(STATUS "hg command found: ${HG_CMD}")
|
||||
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttag} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${HG_CMD} -R "${PROJECT_SOURCE_DIR}" parents --template={latesttagdistance} WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE HG_TAGDISTANCE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif (HG_CMD STREQUAL HG_CMD-NOTFOUND)
|
||||
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set(BUILD_BIT_DEPTH 32)
|
||||
# 32 bits builds has to be installable on 64 bits system, to support WinXP/64.
|
||||
@@ -46,6 +36,27 @@ if (WIN32)
|
||||
# set part of the output archive name
|
||||
set(SYSTEM_NAME "WinVista")
|
||||
endif (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
|
||||
# If we find ReleaseInfo.cmake we use the info from there and don't need Git to be installed
|
||||
find_file(REL_INFO_FILE ReleaseInfo.cmake PATHS "${PROJECT_SOURCE_DIR}" NO_DEFAULT_PATH)
|
||||
if (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
|
||||
# we look for the git command in this paths by order of preference
|
||||
find_file(GIT_CMD git.exe HINTS ENV Path PATH_SUFFIXES ../)
|
||||
|
||||
# Fail if Git is not installed
|
||||
if (GIT_CMD STREQUAL GIT_CMD-NOTFOUND)
|
||||
message(FATAL_ERROR "git command not found!")
|
||||
else ()
|
||||
message(STATUS "git command found: ${GIT_CMD}")
|
||||
endif ()
|
||||
|
||||
execute_process(COMMAND ${GIT_CMD} describe --tags --always OUTPUT_VARIABLE GIT_VERSION_WHOLE OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
|
||||
string(REGEX REPLACE "-.*" "" GIT_VERSION ${GIT_VERSION_WHOLE})
|
||||
string(REGEX REPLACE ".*-(.*)-g.*" "\\1" GIT_TAGDISTANCE ${GIT_VERSION_WHOLE})
|
||||
else (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
|
||||
include("${PROJECT_SOURCE_DIR}/ReleaseInfo.cmake")
|
||||
endif (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
|
||||
|
||||
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/win/InnoSetup/WindowsInnoSetup.iss.in" "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss")
|
||||
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss" DESTINATION ${BINDIR})
|
||||
endif (WIN32)
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
|
||||
#define MyAppName "RawTherapee"
|
||||
#define MyAppVersion "${HG_VERSION}"
|
||||
#define MyAppFullVersion "${HG_VERSION}.${HG_TAGDISTANCE}"
|
||||
#define MyAppVersion "${GIT_VERSION}"
|
||||
#define MyAppFullVersion "${GIT_VERSION}.${GIT_TAGDISTANCE}"
|
||||
#define MyAppPublisher "rawtherapee.com"
|
||||
#define MyAppURL "http://www.rawtherapee.com/"
|
||||
#define MyAppExeName "rawtherapee.exe"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- dcraw.c 2015-05-29 16:41:35 +0000
|
||||
+++ dcraw.cc 2015-06-01 11:04:42 +0000
|
||||
--- dcraw.c 2015-08-15 15:35:27 +0000
|
||||
+++ dcraw.cc 2015-08-16 13:46:33 +0000
|
||||
@@ -1,3 +1,15 @@
|
||||
+/*RT*/#include <glib.h>
|
||||
+/*RT*/#include <glib/gstdio.h>
|
||||
@@ -681,7 +681,8 @@
|
||||
- int code[16][16][32], size=16, *ip, sum[4];
|
||||
- int f, c, i, x, y, row, col, shift, color;
|
||||
- ushort *pix;
|
||||
-
|
||||
+/* RT: delete interpolation functions */
|
||||
|
||||
- if (verbose) fprintf (stderr,_("Bilinear interpolation...\n"));
|
||||
- if (filters == 9) size = 6;
|
||||
- border_interpolate(1);
|
||||
@@ -864,8 +865,7 @@
|
||||
- int dir[5] = { 1, width, -1, -width, 1 };
|
||||
- int row, col, diff[2], guess[2], c, d, i;
|
||||
- ushort (*pix)[4];
|
||||
+/* RT: delete interpolation functions */
|
||||
|
||||
-
|
||||
- border_interpolate(3);
|
||||
- if (verbose) fprintf (stderr,_("PPG interpolation...\n"));
|
||||
-
|
||||
@@ -931,7 +931,7 @@
|
||||
- char (*homo)[TS][TS], *buffer;
|
||||
-
|
||||
- if (verbose) fprintf (stderr,_("AHD interpolation...\n"));
|
||||
-
|
||||
|
||||
- cielab (0,0);
|
||||
- border_interpolate(5);
|
||||
- buffer = (char *) malloc (26*TS*TS);
|
||||
@@ -942,7 +942,7 @@
|
||||
-
|
||||
- for (top=2; top < height-5; top += TS-6)
|
||||
- for (left=2; left < width-5; left += TS-6) {
|
||||
|
||||
-
|
||||
-/* Interpolate green horizontally and vertically: */
|
||||
- for (row=top; row < top+TS && row < height-2; row++) {
|
||||
- col = left + (FC(row,left) & 1);
|
||||
@@ -1053,7 +1053,7 @@
|
||||
if (tag == 0x1d)
|
||||
while ((c = fgetc(ifp)) && c != EOF)
|
||||
serial = serial*10 + (isdigit(c) ? c - '0' : c % 10);
|
||||
@@ -5613,28 +5581,31 @@
|
||||
@@ -5613,28 +5581,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1070,7 +1070,9 @@
|
||||
char software[64], *cbuf, *cp;
|
||||
uchar cfa_pat[16], cfa_pc[] = { 0,1,2,3 }, tab[256];
|
||||
- double cc[4][4], cm[4][3], cam_xyz[4][3], num;
|
||||
+ double cc[2][4][4], cm[2][4][3], cam_xyz[4][3], num;
|
||||
+ double cc[2][4][4];
|
||||
+ double cm[2][4][3] = {NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN,NAN};
|
||||
+ double cam_xyz[4][3], num;
|
||||
double ab[]={ 1,1,1,1 }, asn[] = { 0,0,0,0 }, xyz[] = { 1,1,1 };
|
||||
unsigned sony_curve[] = { 0,0,0,0,0,4095 };
|
||||
unsigned *buf, sony_offset=0, sony_length=0, sony_key=0;
|
||||
@@ -1091,7 +1093,7 @@
|
||||
entries = get2();
|
||||
if (entries > 512) return 1;
|
||||
while (entries--) {
|
||||
@@ -5702,7 +5673,8 @@
|
||||
@@ -5702,7 +5675,8 @@
|
||||
fgets (make, 64, ifp);
|
||||
break;
|
||||
case 272: /* Model */
|
||||
@@ -1101,7 +1103,7 @@
|
||||
break;
|
||||
case 280: /* Panasonic RW2 offset */
|
||||
if (type != 4) break;
|
||||
@@ -5762,6 +5734,9 @@
|
||||
@@ -5762,6 +5736,9 @@
|
||||
case 315: /* Artist */
|
||||
fread (artist, 64, 1, ifp);
|
||||
break;
|
||||
@@ -1111,7 +1113,7 @@
|
||||
case 322: /* TileWidth */
|
||||
tiff_ifd[ifd].tile_width = getint(type);
|
||||
break;
|
||||
@@ -5777,6 +5752,9 @@
|
||||
@@ -5777,6 +5754,9 @@
|
||||
is_raw = 5;
|
||||
}
|
||||
break;
|
||||
@@ -1121,7 +1123,7 @@
|
||||
case 330: /* SubIFDs */
|
||||
if (!strcmp(model,"DSLR-A100") && tiff_ifd[ifd].width == 3872) {
|
||||
load_raw = &CLASS sony_arw_load_raw;
|
||||
@@ -5790,6 +5768,9 @@
|
||||
@@ -5790,6 +5770,9 @@
|
||||
fseek (ifp, i+4, SEEK_SET);
|
||||
}
|
||||
break;
|
||||
@@ -1131,7 +1133,7 @@
|
||||
case 400:
|
||||
strcpy (make, "Sarnoff");
|
||||
maximum = 0xfff;
|
||||
@@ -5971,6 +5952,9 @@
|
||||
@@ -5971,6 +5954,9 @@
|
||||
if (!make[0]) strcpy (make, "DNG");
|
||||
is_raw = 1;
|
||||
break;
|
||||
@@ -1141,7 +1143,7 @@
|
||||
case 50710: /* CFAPlaneColor */
|
||||
if (filters == 9) break;
|
||||
if (len > 4) len = 4;
|
||||
@@ -6002,12 +5986,21 @@
|
||||
@@ -6002,12 +5988,21 @@
|
||||
case 61450:
|
||||
cblack[4] = cblack[5] = MIN(sqrt(len),64);
|
||||
case 50714: /* BlackLevel */
|
||||
@@ -1169,7 +1171,7 @@
|
||||
case 50715: /* BlackLevelDeltaH */
|
||||
case 50716: /* BlackLevelDeltaV */
|
||||
for (num=i=0; i < len; i++)
|
||||
@@ -6024,13 +6017,13 @@
|
||||
@@ -6024,13 +6019,13 @@
|
||||
case 50721: /* ColorMatrix1 */
|
||||
case 50722: /* ColorMatrix2 */
|
||||
FORCC for (j=0; j < 3; j++)
|
||||
@@ -1185,7 +1187,7 @@
|
||||
break;
|
||||
case 50727: /* AnalogBalance */
|
||||
FORCC ab[c] = getreal(type);
|
||||
@@ -6053,6 +6046,11 @@
|
||||
@@ -6053,6 +6048,11 @@
|
||||
case 50752:
|
||||
read_shorts (cr2_slice, 3);
|
||||
break;
|
||||
@@ -1197,7 +1199,7 @@
|
||||
case 50829: /* ActiveArea */
|
||||
top_margin = getint(type);
|
||||
left_margin = getint(type);
|
||||
@@ -6085,21 +6083,24 @@
|
||||
@@ -6085,21 +6085,27 @@
|
||||
fread (buf, sony_length, 1, ifp);
|
||||
sony_decrypt (buf, sony_length/4, 1, sony_key);
|
||||
sfp = ifp;
|
||||
@@ -1219,10 +1221,13 @@
|
||||
ifp = sfp;
|
||||
free (buf);
|
||||
}
|
||||
+
|
||||
for (i=0; i < colors; i++)
|
||||
- FORCC cc[i][c] *= ab[i];
|
||||
+ FORCC cc[cm_D65][i][c] *= ab[i];
|
||||
if (use_cm) {
|
||||
+ if(cm_D65 == 1 && std::isnan(cm[1][0][0]))
|
||||
+ cm_D65 = 0;
|
||||
FORCC for (i=0; i < 3; i++)
|
||||
for (cam_xyz[c][i]=j=0; j < colors; j++)
|
||||
- cam_xyz[c][i] += cc[c][j] * cm[j][i] * xyz[i];
|
||||
@@ -1230,7 +1235,7 @@
|
||||
cam_xyz_coeff (cmatrix, cam_xyz);
|
||||
}
|
||||
if (asn[0]) {
|
||||
@@ -6107,13 +6108,14 @@
|
||||
@@ -6107,13 +6113,14 @@
|
||||
FORCC cam_mul[c] = 1 / asn[c];
|
||||
}
|
||||
if (!use_cm)
|
||||
@@ -1246,7 +1251,7 @@
|
||||
|
||||
fseek (ifp, base, SEEK_SET);
|
||||
order = get2();
|
||||
@@ -6191,7 +6193,7 @@
|
||||
@@ -6191,7 +6198,7 @@
|
||||
case 8: load_raw = &CLASS eight_bit_load_raw; break;
|
||||
case 12: if (tiff_ifd[raw].phint == 2)
|
||||
load_flags = 6;
|
||||
@@ -1255,7 +1260,7 @@
|
||||
case 14: load_flags = 0;
|
||||
case 16: load_raw = &CLASS unpacked_load_raw;
|
||||
if (!strncmp(make,"OLYMPUS",7) &&
|
||||
@@ -6230,6 +6232,7 @@
|
||||
@@ -6230,6 +6237,7 @@
|
||||
case 32803: load_raw = &CLASS kodak_65000_load_raw;
|
||||
}
|
||||
case 32867: case 34892: break;
|
||||
@@ -1263,7 +1268,7 @@
|
||||
default: is_raw = 0;
|
||||
}
|
||||
if (!dng_version)
|
||||
@@ -6315,7 +6318,7 @@
|
||||
@@ -6315,7 +6323,7 @@
|
||||
{
|
||||
const char *file, *ext;
|
||||
char *jname, *jfile, *jext;
|
||||
@@ -1272,7 +1277,7 @@
|
||||
|
||||
ext = strrchr (ifname, '.');
|
||||
file = strrchr (ifname, '/');
|
||||
@@ -6337,13 +6340,14 @@
|
||||
@@ -6337,13 +6345,14 @@
|
||||
} else
|
||||
while (isdigit(*--jext)) {
|
||||
if (*jext != '9') {
|
||||
@@ -1289,7 +1294,7 @@
|
||||
if (verbose)
|
||||
fprintf (stderr,_("Reading metadata from %s ...\n"), jname);
|
||||
parse_tiff (12);
|
||||
@@ -6620,6 +6624,7 @@
|
||||
@@ -6620,6 +6629,7 @@
|
||||
load_raw = ph1.format < 3 ?
|
||||
&CLASS phase_one_load_raw : &CLASS phase_one_load_raw_c;
|
||||
maximum = 0xffff;
|
||||
@@ -1297,7 +1302,7 @@
|
||||
strcpy (make, "Phase One");
|
||||
if (model[0]) return;
|
||||
switch (raw_height) {
|
||||
@@ -6688,7 +6693,11 @@
|
||||
@@ -6688,7 +6698,11 @@
|
||||
order = get2();
|
||||
hlen = get4();
|
||||
if (get4() == 0x48454150) /* "HEAP" */
|
||||
@@ -1309,7 +1314,7 @@
|
||||
if (parse_tiff (save+6)) apply_tiff();
|
||||
fseek (ifp, save+len, SEEK_SET);
|
||||
}
|
||||
@@ -6960,7 +6969,8 @@
|
||||
@@ -6960,7 +6974,8 @@
|
||||
{
|
||||
static const struct {
|
||||
const char *prefix;
|
||||
@@ -1319,7 +1324,7 @@
|
||||
} table[] = {
|
||||
{ "AgfaPhoto DC-833m", 0, 0, /* DJC */
|
||||
{ 11438,-3762,-1115,-2409,9914,2497,-1227,2295,5300 } },
|
||||
@@ -7919,6 +7929,33 @@
|
||||
@@ -7919,6 +7934,33 @@
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1353,7 +1358,7 @@
|
||||
}
|
||||
|
||||
void CLASS simple_coeff (int index)
|
||||
@@ -8229,7 +8266,7 @@
|
||||
@@ -8229,7 +8271,7 @@
|
||||
tiff_flip = flip = filters = UINT_MAX; /* unknown */
|
||||
raw_height = raw_width = fuji_width = fuji_layout = cr2_slice[0] = 0;
|
||||
maximum = height = width = top_margin = left_margin = 0;
|
||||
@@ -1362,7 +1367,7 @@
|
||||
iso_speed = shutter = aperture = focal_len = unique_id = 0;
|
||||
tiff_nifds = 0;
|
||||
memset (tiff_ifd, 0, sizeof tiff_ifd);
|
||||
@@ -8261,13 +8298,20 @@
|
||||
@@ -8261,13 +8303,20 @@
|
||||
fread (head, 1, 32, ifp);
|
||||
fseek (ifp, 0, SEEK_END);
|
||||
flen = fsize = ftell(ifp);
|
||||
@@ -1385,7 +1390,7 @@
|
||||
parse_ciff (hlen, flen-hlen, 0);
|
||||
load_raw = &CLASS canon_load_raw;
|
||||
} else if (parse_tiff(0)) apply_tiff();
|
||||
@@ -8313,6 +8357,7 @@
|
||||
@@ -8313,6 +8362,7 @@
|
||||
fseek (ifp, 100+28*(shot_select > 0), SEEK_SET);
|
||||
parse_tiff (data_offset = get4());
|
||||
parse_tiff (thumb_offset+12);
|
||||
@@ -1393,7 +1398,7 @@
|
||||
apply_tiff();
|
||||
} else if (!memcmp (head,"RIFF",4)) {
|
||||
fseek (ifp, 0, SEEK_SET);
|
||||
@@ -8426,9 +8471,10 @@
|
||||
@@ -8426,9 +8476,10 @@
|
||||
if (make[0] == 0) parse_smal (0, flen);
|
||||
if (make[0] == 0) {
|
||||
parse_jpeg(0);
|
||||
@@ -1407,7 +1412,7 @@
|
||||
strcpy (make, "OmniVision");
|
||||
data_offset = ftell(ifp) + 0x8000-32;
|
||||
width = raw_width;
|
||||
@@ -8437,6 +8483,7 @@
|
||||
@@ -8437,6 +8488,7 @@
|
||||
filters = 0x16161616;
|
||||
} else is_raw = 0;
|
||||
}
|
||||
@@ -1415,7 +1420,7 @@
|
||||
|
||||
for (i=0; i < sizeof corp / sizeof *corp; i++)
|
||||
if (strcasestr (make, corp[i])) /* Simplify company names */
|
||||
@@ -8468,7 +8515,7 @@
|
||||
@@ -8468,7 +8520,7 @@
|
||||
if (height == 3136 && width == 4864) /* Pentax K20D and Samsung GX20 */
|
||||
{ height = 3124; width = 4688; filters = 0x16161616; }
|
||||
if (width == 4352 && (!strcmp(model,"K-r") || !strcmp(model,"K-x")))
|
||||
@@ -1424,7 +1429,7 @@
|
||||
if (width >= 4960 && !strncmp(model,"K-5",3))
|
||||
{ left_margin = 10; width = 4950; filters = 0x16161616; }
|
||||
if (width == 4736 && !strcmp(model,"K-7"))
|
||||
@@ -8487,6 +8534,7 @@
|
||||
@@ -8487,6 +8539,7 @@
|
||||
switch (tiff_compress) {
|
||||
case 1: load_raw = &CLASS packed_dng_load_raw; break;
|
||||
case 7: load_raw = &CLASS lossless_dng_load_raw; break;
|
||||
@@ -1432,7 +1437,7 @@
|
||||
case 34892: load_raw = &CLASS lossy_dng_load_raw; break;
|
||||
default: load_raw = 0;
|
||||
}
|
||||
@@ -8541,6 +8589,7 @@
|
||||
@@ -8541,6 +8594,7 @@
|
||||
if (height > width) pixel_aspect = 2;
|
||||
filters = 0;
|
||||
simple_coeff(0);
|
||||
@@ -1440,7 +1445,7 @@
|
||||
} else if (!strcmp(make,"Canon") && tiff_bps == 15) {
|
||||
switch (width) {
|
||||
case 3344: width -= 66;
|
||||
@@ -8846,24 +8895,53 @@
|
||||
@@ -8846,24 +8900,53 @@
|
||||
if (load_raw == &CLASS lossless_jpeg_load_raw)
|
||||
load_raw = &CLASS hasselblad_load_raw;
|
||||
if (raw_width == 7262) {
|
||||
@@ -1499,7 +1504,7 @@
|
||||
} else if (raw_width == 4090) {
|
||||
strcpy (model, "V96C");
|
||||
height -= (top_margin = 6);
|
||||
@@ -8921,6 +8999,7 @@
|
||||
@@ -8921,6 +9004,7 @@
|
||||
filters = 0x16161616;
|
||||
}
|
||||
} else if (!strcmp(make,"Leica") || !strcmp(make,"Panasonic")) {
|
||||
@@ -1507,7 +1512,7 @@
|
||||
if ((flen - data_offset) / (raw_width*8/7) == raw_height)
|
||||
load_raw = &CLASS panasonic_load_raw;
|
||||
if (!load_raw) {
|
||||
@@ -8938,6 +9017,7 @@
|
||||
@@ -8938,6 +9022,7 @@
|
||||
}
|
||||
filters = 0x01010101 * (uchar) "\x94\x61\x49\x16"
|
||||
[((filters-1) ^ (left_margin & 1) ^ (top_margin << 1)) & 3];
|
||||
@@ -1515,7 +1520,7 @@
|
||||
} else if (!strcmp(model,"C770UZ")) {
|
||||
height = 1718;
|
||||
width = 2304;
|
||||
@@ -9155,6 +9235,14 @@
|
||||
@@ -9155,6 +9240,14 @@
|
||||
memcpy (rgb_cam, cmatrix, sizeof cmatrix);
|
||||
raw_color = 0;
|
||||
}
|
||||
@@ -1530,7 +1535,7 @@
|
||||
if (raw_color) adobe_coeff (make, model);
|
||||
if (load_raw == &CLASS kodak_radc_load_raw)
|
||||
if (raw_color) adobe_coeff ("Apple","Quicktake");
|
||||
@@ -9169,9 +9257,9 @@
|
||||
@@ -9169,9 +9262,9 @@
|
||||
if (raw_width < width ) raw_width = width;
|
||||
}
|
||||
if (!tiff_bps) tiff_bps = 12;
|
||||
@@ -1542,7 +1547,7 @@
|
||||
is_raw = 0;
|
||||
#ifdef NO_JASPER
|
||||
if (load_raw == &CLASS redcine_load_raw) {
|
||||
@@ -9250,194 +9338,249 @@
|
||||
@@ -9250,194 +9343,249 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1971,7 +1976,7 @@
|
||||
|
||||
struct tiff_tag {
|
||||
ushort tag, type;
|
||||
@@ -9461,590 +9604,11 @@
|
||||
@@ -9461,590 +9609,11 @@
|
||||
char desc[512], make[64], model[64], soft[32], date[20], artist[64];
|
||||
};
|
||||
|
||||
|
||||
@@ -22,19 +22,19 @@ typedef __m128i vint2;
|
||||
|
||||
//
|
||||
#ifdef __GNUC__
|
||||
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4
|
||||
#define LVF(x) _mm_load_ps(&x)
|
||||
#define LVFU(x) _mm_loadu_ps(&x)
|
||||
#define STVF(x,y) _mm_store_ps(&x,y)
|
||||
#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3
|
||||
#define LVF(x) _mm_loadu_ps(&x)
|
||||
#define LVFU(x) _mm_loadu_ps(&x)
|
||||
#define STVF(x,y) _mm_storeu_ps(&x,y)
|
||||
#endif
|
||||
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4
|
||||
#define LVF(x) _mm_load_ps(&x)
|
||||
#define LVFU(x) _mm_loadu_ps(&x)
|
||||
#define STVF(x,y) _mm_store_ps(&x,y)
|
||||
#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3
|
||||
#define LVF(x) _mm_loadu_ps(&x)
|
||||
#define LVFU(x) _mm_loadu_ps(&x)
|
||||
#define STVF(x,y) _mm_storeu_ps(&x,y)
|
||||
#endif
|
||||
#else
|
||||
#define LVF(x) _mm_load_ps(&x)
|
||||
#define LVFU(x) _mm_loadu_ps(&x)
|
||||
#define STVF(x,y) _mm_store_ps(&x,y)
|
||||
#define LVF(x) _mm_load_ps(&x)
|
||||
#define LVFU(x) _mm_loadu_ps(&x)
|
||||
#define STVF(x,y) _mm_store_ps(&x,y)
|
||||
#endif
|
||||
|
||||
// Load 8 floats from a and combine a[0],a[2],a[4] and a[6] into a vector of 4 floats
|
||||
|
||||
@@ -6405,7 +6405,7 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (EditBuffer *editBuffer,
|
||||
}
|
||||
|
||||
// t2e.set();
|
||||
// printf("Chromil took %d <EFBFBD>sec\n",t2e.etime(t1e));
|
||||
// printf("Chromil took %d nsec\n",t2e.etime(t1e));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,56 +20,56 @@
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef OPTHELPER_H
|
||||
#define OPTHELPER_H
|
||||
#define OPTHELPER_H
|
||||
|
||||
#ifdef __SSE2__
|
||||
#include "sleefsseavx.c"
|
||||
#ifdef __GNUC__
|
||||
#if defined(WIN32) && !defined( __x86_64__ )
|
||||
// needed for actual versions of GCC with 32-Bit Windows
|
||||
#define SSEFUNCTION __attribute__((force_align_arg_pointer))
|
||||
#else
|
||||
#define SSEFUNCTION
|
||||
#endif
|
||||
#else
|
||||
#define SSEFUNCTION
|
||||
#endif
|
||||
#else
|
||||
#ifdef __SSE__
|
||||
#ifdef __GNUC__
|
||||
#if defined(WIN32) && !defined( __x86_64__ )
|
||||
// needed for actual versions of GCC with 32-Bit Windows
|
||||
#define SSEFUNCTION __attribute__((force_align_arg_pointer))
|
||||
#else
|
||||
#define SSEFUNCTION
|
||||
#endif
|
||||
#else
|
||||
#define SSEFUNCTION
|
||||
#endif
|
||||
#else
|
||||
#define SSEFUNCTION
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __SSE2__
|
||||
#include "sleefsseavx.c"
|
||||
#ifdef __GNUC__
|
||||
#if defined(WIN32) && !defined( __x86_64__ )
|
||||
// needed for actual versions of GCC with 32-Bit Windows
|
||||
#define SSEFUNCTION __attribute__((force_align_arg_pointer))
|
||||
#else
|
||||
#define SSEFUNCTION
|
||||
#endif
|
||||
#else
|
||||
#define SSEFUNCTION
|
||||
#endif
|
||||
#else
|
||||
#ifdef __SSE__
|
||||
#ifdef __GNUC__
|
||||
#if defined(WIN32) && !defined( __x86_64__ )
|
||||
// needed for actual versions of GCC with 32-Bit Windows
|
||||
#define SSEFUNCTION __attribute__((force_align_arg_pointer))
|
||||
#else
|
||||
#define SSEFUNCTION
|
||||
#endif
|
||||
#else
|
||||
#define SSEFUNCTION
|
||||
#endif
|
||||
#else
|
||||
#define SSEFUNCTION
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define RESTRICT __restrict__
|
||||
#define LIKELY(x) __builtin_expect (!!(x), 1)
|
||||
#define UNLIKELY(x) __builtin_expect (!!(x), 0)
|
||||
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4
|
||||
#define ALIGNED64 __attribute__ ((aligned (64)))
|
||||
#define ALIGNED16 __attribute__ ((aligned (16)))
|
||||
#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3
|
||||
#define ALIGNED64
|
||||
#define ALIGNED16
|
||||
#endif
|
||||
#else
|
||||
#define RESTRICT
|
||||
#define LIKELY(x) (x)
|
||||
#define UNLIKELY(x) (x)
|
||||
#define ALIGNED64
|
||||
#define ALIGNED16
|
||||
#endif
|
||||
#ifndef __clang__
|
||||
#define _RT_NESTED_OPENMP _OPENMP
|
||||
#endif
|
||||
#ifdef __GNUC__
|
||||
#define RESTRICT __restrict__
|
||||
#define LIKELY(x) __builtin_expect (!!(x), 1)
|
||||
#define UNLIKELY(x) __builtin_expect (!!(x), 0)
|
||||
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4
|
||||
#define ALIGNED64 __attribute__ ((aligned (64)))
|
||||
#define ALIGNED16 __attribute__ ((aligned (16)))
|
||||
#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3
|
||||
#define ALIGNED64
|
||||
#define ALIGNED16
|
||||
#endif
|
||||
#else
|
||||
#define RESTRICT
|
||||
#define LIKELY(x) (x)
|
||||
#define UNLIKELY(x) (x)
|
||||
#define ALIGNED64
|
||||
#define ALIGNED16
|
||||
#endif
|
||||
#ifndef __clang__
|
||||
#define _RT_NESTED_OPENMP _OPENMP
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
#ifndef _VERSION_
|
||||
#define _VERSION_
|
||||
|
||||
#define VERSION "${HG_VERSION}"
|
||||
#define VERSION "${GIT_VERSION}"
|
||||
#define VERSION_SUFFIX "${VERSION_SUFFIX}"
|
||||
#define TAGDISTANCE ${HG_TAGDISTANCE}
|
||||
#define TAGDISTANCE ${GIT_TAGDISTANCE}
|
||||
#define CACHEFOLDERNAME "RawTherapee${CACHE_NAME_SUFFIX}"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
hgBranch="`hg branch`"
|
||||
hgLatesttag="`hg parents --template '{latesttag}'`"
|
||||
hgLatesttagdistance="`hg parents --template '{latesttagdistance}'`"
|
||||
hgChangeset="`hg parents --template '{node|short}'`"
|
||||
gitBranch="`git symbolic-ref --short -q HEAD`"
|
||||
gitVersion="`git describe --tags --always`"
|
||||
gitLatesttag="`echo $gitVersion | sed 's/-.*//'`"
|
||||
gitLatesttagdistance="`echo $gitVersion | sed 's/.*-\(.*\)-g.*/\1/'`"
|
||||
gitChangeset="`git rev-parse --verify HEAD`"
|
||||
|
||||
echo "set(HG_BRANCH $hgBranch)
|
||||
set(HG_VERSION $hgLatesttag.$hgLatesttagdistance)
|
||||
set(HG_CHANGESET $hgChangeset)
|
||||
set(HG_TAGDISTANCE $hgLatesttagdistance)" > ReleaseInfo.cmake
|
||||
echo "set(GIT_BRANCH $gitBranch)
|
||||
set(GIT_VERSION $gitLatesttag.$gitLatesttagdistance)
|
||||
set(GIT_CHANGESET $gitChangeset)
|
||||
set(GIT_TAGDISTANCE $gitLatesttagdistance)" > ReleaseInfo.cmake
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
@echo off
|
||||
for /f "tokens=*" %%a in ('hg branch') do @set hgBranch=%%a
|
||||
for /f "tokens=*" %%a in ('hg parents --template "{latesttag}"') do @set hgLatesttag=%%a
|
||||
for /f "tokens=*" %%a in ('hg parents --template "{latesttagdistance}"') do @set hgLatesttagdistance=%%a
|
||||
for /f "tokens=*" %%a in ('hg parents --template "{node|short}"') do @set hgChangeset=%%a
|
||||
|
||||
echo set(HG_BRANCH %hgBranch%) > ReleaseInfo.cmake
|
||||
echo set(HG_VERSION %hgLatesttag%.%hgLatesttagdistance%) >> ReleaseInfo.cmake
|
||||
echo set(HG_CHANGESET %hgChangeset%) >> ReleaseInfo.cmake
|
||||
echo set(HG_TAGDISTANCE %hgLatesttagdistance%) >> ReleaseInfo.cmake
|
||||
|
||||
Reference in New Issue
Block a user