Commit 62da509f authored by Thiago Santini's avatar Thiago Santini

Updates uvcengine, libuvc, libusb, and libjpeg-turbo (Windows)

uvcengine:     b9d1231756de064a85749136c2efe14d894bd1ea
libuvc:        d6a23a386a0a433d02ff5a5df2bb4303444c98de
libusb:        70ceeb5790522646a23ba08001a4fac13522c7ab
libjpeg-turbo: c80ddef7a4ce21ace9e3ca0fd190d320cc8cdaeb
parent 9dbaa466
...@@ -14,6 +14,7 @@ win32: RC_ICONS = $${TOP}/icons/eyerectoo.ico ...@@ -14,6 +14,7 @@ win32: RC_ICONS = $${TOP}/icons/eyerectoo.ico
#TEMPLATE = vcapp #TEMPLATE = vcapp
DEFINES += TURBOJPEG DEFINES += TURBOJPEG
TURBOJPEGPATH="$${TOP}/deps/libjpeg-turbo-1.5.90/"
# Note: Starburst and Swirski are not currently included in the repository; do not enable # Note: Starburst and Swirski are not currently included in the repository; do not enable
#DEFINES += STARBURST #DEFINES += STARBURST
...@@ -124,11 +125,11 @@ LIBS += \ ...@@ -124,11 +125,11 @@ LIBS += \
# JPEG-TURBO # JPEG-TURBO
contains(DEFINES, TURBOJPEG) { contains(DEFINES, TURBOJPEG) {
INCLUDEPATH += "$${TOP}/deps/libjpeg-turbo-1.5.1/libjpeg-turbo64/include/" INCLUDEPATH += "$${TURBOJPEGPATH}/include/"
win32:contains(QMAKE_HOST.arch, x86_64) { win32:contains(QMAKE_HOST.arch, x86_64) {
LIBS += "-L$${TOP}/deps/libjpeg-turbo-1.5.1/libjpeg-turbo64/lib/" LIBS += "-L$${TURBOJPEGPATH}/lib/"
} else { } else {
LIBS += "-L$${TOP}/deps/libjpeg-turbo-1.5.1/libjpeg-turbo32/lib/" LIBS += "-L$${TURBOJPEGPATH}/lib/"
} }
LIBS += -lturbojpeg LIBS += -lturbojpeg
} }
...@@ -175,8 +176,8 @@ unix{ ...@@ -175,8 +176,8 @@ unix{
} }
system("git --version"):{ system("git --version"):{
GIT_VERSION=$$system(git --git-dir $${TOP}/../.git --work-tree $$TOP describe --always --tags) GIT_VERSION=$$system(git --git-dir $${TOP}/../.git --work-tree $$TOP describe --always --tags)
DEFINES += GIT_VERSION=\\\"$$GIT_VERSION\\\" DEFINES += GIT_VERSION=\\\"$$GIT_VERSION\\\"
} else { } else {
GIT_VERSION="" GIT_VERSION=""
} }
/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ #define JPEG_LIB_VERSION 62
/* see jconfig.txt for explanations */ #define LIBJPEG_TURBO_VERSION 1.5.90
#define LIBJPEG_TURBO_VERSION_NUMBER 1005090
#define JPEG_LIB_VERSION 62
#define LIBJPEG_TURBO_VERSION 1.5.1
#define LIBJPEG_TURBO_VERSION_NUMBER 1005001
#define C_ARITH_CODING_SUPPORTED #define C_ARITH_CODING_SUPPORTED
#define D_ARITH_CODING_SUPPORTED #define D_ARITH_CODING_SUPPORTED
#define MEM_SRCDST_SUPPORTED #define MEM_SRCDST_SUPPORTED
#define WITH_SIMD
/*
* Define BITS_IN_JSAMPLE as either
* 8 for 8-bit sample values (the usual setting)
* 12 for 12-bit sample values
* Only 8 and 12 are legal data precisions for lossy JPEG according to the
* JPEG standard, and the IJG code does not support anything else!
* We do not support run-time selection of data precision, sorry.
*/
#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ #define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
#define HAVE_UNSIGNED_CHAR
#define HAVE_UNSIGNED_SHORT
/* #define void char */
/* #define const */
#undef __CHAR_UNSIGNED__
#define HAVE_STDDEF_H #define HAVE_STDDEF_H
#define HAVE_STDLIB_H #define HAVE_STDLIB_H
#undef NEED_BSD_STRINGS
#undef NEED_SYS_TYPES_H #undef NEED_SYS_TYPES_H
#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ #undef NEED_BSD_STRINGS
#define HAVE_UNSIGNED_CHAR
#define HAVE_UNSIGNED_SHORT
#undef INCOMPLETE_TYPES_BROKEN #undef INCOMPLETE_TYPES_BROKEN
#undef RIGHT_SHIFT_IS_UNSIGNED
#undef __CHAR_UNSIGNED__
/* Define "boolean" as unsigned char, not int, per Windows custom */ /* Define "boolean" as unsigned char, not int, per Windows custom */
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
typedef unsigned char boolean; typedef unsigned char boolean;
#endif #endif
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
/* Define "INT32" as int, not long, per Windows custom */ /* Define "INT32" as int, not long, per Windows custom */
#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */ #if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */
...@@ -43,9 +32,3 @@ typedef short INT16; ...@@ -43,9 +32,3 @@ typedef short INT16;
typedef signed int INT32; typedef signed int INT32;
#endif #endif
#define XMD_H /* prevent jmorecfg.h from redefining it */ #define XMD_H /* prevent jmorecfg.h from redefining it */
#ifdef JPEG_INTERNALS
#undef RIGHT_SHIFT_IS_UNSIGNED
#endif /* JPEG_INTERNALS */
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Copyright (C) 1994-1997, Thomas G. Lane. * Copyright (C) 1994-1997, Thomas G. Lane.
* Modified 1997-2009 by Guido Vollbeding. * Modified 1997-2009 by Guido Vollbeding.
* libjpeg-turbo Modifications: * libjpeg-turbo Modifications:
* Copyright (C) 2014, D. R. Commander. * Copyright (C) 2014, 2017, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg * For conditions of distribution and use, see the accompanying README.ijg
* file. * file.
* *
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#define JMAKE_ENUM_LIST #define JMAKE_ENUM_LIST
#else #else
/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ /* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
#define JMESSAGE(code,string) #define JMESSAGE(code, string)
#endif /* JERROR_H */ #endif /* JERROR_H */
#endif /* JMESSAGE */ #endif /* JMESSAGE */
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
typedef enum { typedef enum {
#define JMESSAGE(code,string) code , #define JMESSAGE(code, string) code,
#endif /* JMAKE_ENUM_LIST */ #endif /* JMAKE_ENUM_LIST */
...@@ -44,8 +44,7 @@ JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ ...@@ -44,8 +44,7 @@ JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */
/* For maintenance convenience, list is alphabetical by message code name */ /* For maintenance convenience, list is alphabetical by message code name */
#if JPEG_LIB_VERSION < 70 #if JPEG_LIB_VERSION < 70
JMESSAGE(JERR_ARITH_NOTIMPL, JMESSAGE(JERR_ARITH_NOTIMPL, "Sorry, arithmetic coding is not implemented")
"Sorry, arithmetic coding is not implemented")
#endif #endif
JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix")
JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix")
...@@ -154,8 +153,7 @@ JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") ...@@ -154,8 +153,7 @@ JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d")
JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d")
JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE,
"Warning: thumbnail image size does not match data length %u") "Warning: thumbnail image size does not match data length %u")
JMESSAGE(JTRC_JFIF_EXTENSION, JMESSAGE(JTRC_JFIF_EXTENSION, "JFIF extension marker: type 0x%02x, length %u")
"JFIF extension marker: type 0x%02x, length %u")
JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image")
JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u")
JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x")
...@@ -208,6 +206,7 @@ JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") ...@@ -208,6 +206,7 @@ JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined")
JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code")
#endif #endif
#endif #endif
JMESSAGE(JWRN_BOGUS_ICC, "Corrupt JPEG data: bad ICC marker")
#ifdef JMAKE_ENUM_LIST #ifdef JMAKE_ENUM_LIST
...@@ -228,90 +227,90 @@ JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") ...@@ -228,90 +227,90 @@ JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code")
/* The first parameter is either type of cinfo pointer */ /* The first parameter is either type of cinfo pointer */
/* Fatal errors (print message and exit) */ /* Fatal errors (print message and exit) */
#define ERREXIT(cinfo,code) \ #define ERREXIT(cinfo, code) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
#define ERREXIT1(cinfo,code,p1) \ #define ERREXIT1(cinfo, code, p1) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
#define ERREXIT2(cinfo,code,p1,p2) \ #define ERREXIT2(cinfo, code, p1, p2) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[1] = (p2), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
#define ERREXIT3(cinfo,code,p1,p2,p3) \ #define ERREXIT3(cinfo, code, p1, p2, p3) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[1] = (p2), \
(cinfo)->err->msg_parm.i[2] = (p3), \ (cinfo)->err->msg_parm.i[2] = (p3), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ #define ERREXIT4(cinfo, code, p1, p2, p3, p4) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[1] = (p2), \
(cinfo)->err->msg_parm.i[2] = (p3), \ (cinfo)->err->msg_parm.i[2] = (p3), \
(cinfo)->err->msg_parm.i[3] = (p4), \ (cinfo)->err->msg_parm.i[3] = (p4), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
#define ERREXITS(cinfo,code,str) \ #define ERREXITS(cinfo, code, str) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
(*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
#define MAKESTMT(stuff) do { stuff } while (0) #define MAKESTMT(stuff) do { stuff } while (0)
/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ /* Nonfatal errors (we can keep going, but the data is probably corrupt) */
#define WARNMS(cinfo,code) \ #define WARNMS(cinfo, code) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1))
#define WARNMS1(cinfo,code,p1) \ #define WARNMS1(cinfo, code, p1) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1))
#define WARNMS2(cinfo,code,p1,p2) \ #define WARNMS2(cinfo, code, p1, p2) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[1] = (p2), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1))
/* Informational/debugging messages */ /* Informational/debugging messages */
#define TRACEMS(cinfo,lvl,code) \ #define TRACEMS(cinfo, lvl, code) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)))
#define TRACEMS1(cinfo,lvl,code,p1) \ #define TRACEMS1(cinfo, lvl, code, p1) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)))
#define TRACEMS2(cinfo,lvl,code,p1,p2) \ #define TRACEMS2(cinfo, lvl, code, p1, p2) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
(cinfo)->err->msg_parm.i[0] = (p1), \ (cinfo)->err->msg_parm.i[0] = (p1), \
(cinfo)->err->msg_parm.i[1] = (p2), \ (cinfo)->err->msg_parm.i[1] = (p2), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)))
#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ #define TRACEMS3(cinfo, lvl, code, p1, p2, p3) \
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \
(cinfo)->err->msg_code = (code); \ (cinfo)->err->msg_code = (code); \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); )
#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ #define TRACEMS4(cinfo, lvl, code, p1, p2, p3, p4) \
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
(cinfo)->err->msg_code = (code); \ (cinfo)->err->msg_code = (code); \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); )
#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \ #define TRACEMS5(cinfo, lvl, code, p1, p2, p3, p4, p5) \
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
_mp[4] = (p5); \ _mp[4] = (p5); \
(cinfo)->err->msg_code = (code); \ (cinfo)->err->msg_code = (code); \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); )
#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ #define TRACEMS8(cinfo, lvl, code, p1, p2, p3, p4, p5, p6, p7, p8) \
MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \
_mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
_mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \
(cinfo)->err->msg_code = (code); \ (cinfo)->err->msg_code = (code); \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); )
#define TRACEMSS(cinfo,lvl,code,str) \ #define TRACEMSS(cinfo, lvl, code, str) \
((cinfo)->err->msg_code = (code), \ ((cinfo)->err->msg_code = (code), \
strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
(*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)))
#endif /* JERROR_H */ #endif /* JERROR_H */
...@@ -49,15 +49,15 @@ ...@@ -49,15 +49,15 @@
#ifdef HAVE_UNSIGNED_CHAR #ifdef HAVE_UNSIGNED_CHAR
typedef unsigned char JSAMPLE; typedef unsigned char JSAMPLE;
#define GETJSAMPLE(value) ((int) (value)) #define GETJSAMPLE(value) ((int)(value))
#else /* not HAVE_UNSIGNED_CHAR */ #else /* not HAVE_UNSIGNED_CHAR */
typedef char JSAMPLE; typedef char JSAMPLE;
#ifdef __CHAR_UNSIGNED__ #ifdef __CHAR_UNSIGNED__
#define GETJSAMPLE(value) ((int) (value)) #define GETJSAMPLE(value) ((int)(value))
#else #else
#define GETJSAMPLE(value) ((int) (value) & 0xFF) #define GETJSAMPLE(value) ((int)(value) & 0xFF)
#endif /* __CHAR_UNSIGNED__ */ #endif /* __CHAR_UNSIGNED__ */
#endif /* HAVE_UNSIGNED_CHAR */ #endif /* HAVE_UNSIGNED_CHAR */
...@@ -74,7 +74,7 @@ typedef char JSAMPLE; ...@@ -74,7 +74,7 @@ typedef char JSAMPLE;
*/ */
typedef short JSAMPLE; typedef short JSAMPLE;
#define GETJSAMPLE(value) ((int) (value)) #define GETJSAMPLE(value) ((int)(value))
#define MAXJSAMPLE 4095 #define MAXJSAMPLE 4095
#define CENTERJSAMPLE 2048 #define CENTERJSAMPLE 2048
...@@ -173,9 +173,9 @@ typedef short INT16; ...@@ -173,9 +173,9 @@ typedef short INT16;
*/ */
#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ #ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */
#ifndef _BASETSD_H /* MinGW is slightly different */ #ifndef _BASETSD_H /* MinGW is slightly different */
#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ #ifndef QGLOBAL_H /* Qt defines it in qglobal.h */
typedef long INT32; typedef long INT32;
#endif #endif
#endif #endif
...@@ -220,7 +220,7 @@ typedef unsigned int JDIMENSION; ...@@ -220,7 +220,7 @@ typedef unsigned int JDIMENSION;
* software out there that uses it. * software out there that uses it.
*/ */
#define JMETHOD(type,methodname,arglist) type (*methodname) arglist #define JMETHOD(type, methodname, arglist) type (*methodname) arglist
/* libjpeg-turbo no longer supports platforms that have far symbols (MS-DOS), /* libjpeg-turbo no longer supports platforms that have far symbols (MS-DOS),
...@@ -333,37 +333,37 @@ typedef int boolean; ...@@ -333,37 +333,37 @@ typedef int boolean;
#define RGB_BLUE 2 /* Offset of Blue */ #define RGB_BLUE 2 /* Offset of Blue */
#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ #define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */
#define JPEG_NUMCS 17 #define JPEG_NUMCS 17
#define EXT_RGB_RED 0 #define EXT_RGB_RED 0
#define EXT_RGB_GREEN 1 #define EXT_RGB_GREEN 1
#define EXT_RGB_BLUE 2 #define EXT_RGB_BLUE 2
#define EXT_RGB_PIXELSIZE 3 #define EXT_RGB_PIXELSIZE 3
#define EXT_RGBX_RED 0 #define EXT_RGBX_RED 0
#define EXT_RGBX_GREEN 1 #define EXT_RGBX_GREEN 1
#define EXT_RGBX_BLUE 2 #define EXT_RGBX_BLUE 2
#define EXT_RGBX_PIXELSIZE 4 #define EXT_RGBX_PIXELSIZE 4
#define EXT_BGR_RED 2 #define EXT_BGR_RED 2
#define EXT_BGR_GREEN 1 #define EXT_BGR_GREEN 1
#define EXT_BGR_BLUE 0 #define EXT_BGR_BLUE 0
#define EXT_BGR_PIXELSIZE 3 #define EXT_BGR_PIXELSIZE 3
#define EXT_BGRX_RED 2 #define EXT_BGRX_RED 2
#define EXT_BGRX_GREEN 1 #define EXT_BGRX_GREEN 1
#define EXT_BGRX_BLUE 0 #define EXT_BGRX_BLUE 0
#define EXT_BGRX_PIXELSIZE 4 #define EXT_BGRX_PIXELSIZE 4
#define EXT_XBGR_RED 3 #define EXT_XBGR_RED 3
#define EXT_XBGR_GREEN 2 #define EXT_XBGR_GREEN 2
#define EXT_XBGR_BLUE 1 #define EXT_XBGR_BLUE 1
#define EXT_XBGR_PIXELSIZE 4 #define EXT_XBGR_PIXELSIZE 4
#define EXT_XRGB_RED 1 #define EXT_XRGB_RED 1
#define EXT_XRGB_GREEN 2 #define EXT_XRGB_GREEN 2
#define EXT_XRGB_BLUE 3 #define EXT_XRGB_BLUE 3
#define EXT_XRGB_PIXELSIZE 4 #define EXT_XRGB_PIXELSIZE 4
static const int rgb_red[JPEG_NUMCS] = { static const int rgb_red[JPEG_NUMCS] = {
-1, -1, RGB_RED, -1, -1, -1, EXT_RGB_RED, EXT_RGBX_RED, -1, -1, RGB_RED, -1, -1, -1, EXT_RGB_RED, EXT_RGBX_RED,
...@@ -404,7 +404,7 @@ static const int rgb_pixelsize[JPEG_NUMCS] = { ...@@ -404,7 +404,7 @@ static const int rgb_pixelsize[JPEG_NUMCS] = {
#ifndef WITH_SIMD #ifndef WITH_SIMD
#define MULTIPLIER int /* type for fastest integer multiply */ #define MULTIPLIER int /* type for fastest integer multiply */
#else #else
#define MULTIPLIER short /* prefer 16-bit with SIMD for parellelism */ #define MULTIPLIER short /* prefer 16-bit with SIMD for parellelism */
#endif #endif
#endif #endif
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Copyright (C) 1991-1998, Thomas G. Lane. * Copyright (C) 1991-1998, Thomas G. Lane.
* Modified 2002-2009 by Guido Vollbeding. * Modified 2002-2009 by Guido Vollbeding.
* libjpeg-turbo Modifications: * libjpeg-turbo Modifications:
* Copyright (C) 2009-2011, 2013-2014, 2016, D. R. Commander. * Copyright (C) 2009-2011, 2013-2014, 2016-2017, D. R. Commander.
* Copyright (C) 2015, Google, Inc. * Copyright (C) 2015, Google, Inc.
* For conditions of distribution and use, see the accompanying README.ijg * For conditions of distribution and use, see the accompanying README.ijg
* file. * file.
...@@ -211,8 +211,8 @@ struct jpeg_marker_struct { ...@@ -211,8 +211,8 @@ struct jpeg_marker_struct {
/* Known color spaces. */ /* Known color spaces. */
#define JCS_EXTENSIONS 1 #define JCS_EXTENSIONS 1
#define JCS_ALPHA_EXTENSIONS 1 #define JCS_ALPHA_EXTENSIONS 1
typedef enum { typedef enum {
JCS_UNKNOWN, /* error/unspecified */ JCS_UNKNOWN, /* error/unspecified */
...@@ -268,11 +268,11 @@ typedef enum { ...@@ -268,11 +268,11 @@ typedef enum {
/* Common fields between JPEG compression and decompression master structs. */ /* Common fields between JPEG compression and decompression master structs. */
#define jpeg_common_fields \ #define jpeg_common_fields \
struct jpeg_error_mgr *err; /* Error handler module */\ struct jpeg_error_mgr *err; /* Error handler module */ \
struct jpeg_memory_mgr *mem; /* Memory manager module */\ struct jpeg_memory_mgr *mem; /* Memory manager module */ \
struct jpeg_progress_mgr *progress; /* Progress monitor, or NULL if none */\ struct jpeg_progress_mgr *progress; /* Progress monitor, or NULL if none */ \
void *client_data; /* Available for use by application */\ void *client_data; /* Available for use by application */ \
boolean is_decompressor; /* So common code can tell which is which */\ boolean is_decompressor; /* So common code can tell which is which */ \
int global_state /* For checking call sequence validity */ int global_state /* For checking call sequence validity */
/* Routines that are to be used by both halves of the library are declared /* Routines that are to be used by both halves of the library are declared
...@@ -822,9 +822,9 @@ struct jpeg_source_mgr { ...@@ -822,9 +822,9 @@ struct jpeg_source_mgr {
* successful. * successful.
*/ */
#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ #define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */
#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ #define JPOOL_IMAGE 1 /* lasts until done with image/datastream */
#define JPOOL_NUMPOOLS 2 #define JPOOL_NUMPOOLS 2
typedef struct jvirt_sarray_control *jvirt_sarray_ptr; typedef struct jvirt_sarray_control *jvirt_sarray_ptr;
typedef struct jvirt_barray_control *jvirt_barray_ptr; typedef struct jvirt_barray_control *jvirt_barray_ptr;
...@@ -888,7 +888,7 @@ typedef boolean (*jpeg_marker_parser_method) (j_decompress_ptr cinfo); ...@@ -888,7 +888,7 @@ typedef boolean (*jpeg_marker_parser_method) (j_decompress_ptr cinfo);