Add libjpeg-turbo submodule

This commit is contained in:
Jack Andersen 2016-03-05 15:19:32 -10:00
parent cdd40a14df
commit ae81e66aa6
4 changed files with 30 additions and 0 deletions

4
hecl/.gitmodules vendored
View File

@ -7,3 +7,7 @@
[submodule "extern/boo"]
path = extern/boo
url = https://github.com/AxioDL/boo.git
[submodule "extern/libjpeg-turbo"]
path = extern/libjpeg-turbo
url = https://github.com/jackoalan/libjpeg-turbo.git
branch = thp

View File

@ -3,3 +3,4 @@ add_subdirectory(libSquish)
add_subdirectory(xxhash)
add_subdirectory(athena)
add_subdirectory(libpng)
add_subdirectory(libjpeg-turbo)

1
hecl/extern/libjpeg-turbo vendored Submodule

@ -0,0 +1 @@
Subproject commit 51d62f5cdf7bd2a9dc0c41f9e7eddd6c186c2cc1

View File

@ -1205,6 +1205,16 @@ static inline int32_t SBig(int32_t val) {return bswap32(val);}
static inline uint32_t SBig(uint32_t val) {return bswap32(val);}
static inline int64_t SBig(int64_t val) {return bswap64(val);}
static inline uint64_t SBig(uint64_t val) {return bswap64(val);}
static inline float SBig(float val)
{
int32_t ival = bswap32(*((int32_t*)(&val)));
return *((float*)(&ival));
}
static inline double SBig(double val)
{
int64_t ival = bswap64(*((int64_t*)(&val)));
return *((double*)(&ival));
}
#define SBIG(q) ( ( (q) & 0x000000FF ) << 24 | ( (q) & 0x0000FF00 ) << 8 \
| ( (q) & 0x00FF0000 ) >> 8 | ( (q) & 0xFF000000 ) >> 24 )
@ -1214,6 +1224,8 @@ static inline int32_t SLittle(int32_t val) {return val;}
static inline uint32_t SLittle(uint32_t val) {return val;}
static inline int64_t SLittle(int64_t val) {return val;}
static inline uint64_t SLittle(uint64_t val) {return val;}
static inline float SLittle(float val) {return val;}
static inline double SLittle(double val) {return val;}
#define SLITTLE(q) (q)
#else
static inline int16_t SLittle(int16_t val) {return bswap16(val);}
@ -1222,6 +1234,16 @@ static inline int32_t SLittle(int32_t val) {return bswap32(val);}
static inline uint32_t SLittle(uint32_t val) {return bswap32(val);}
static inline int64_t SLittle(int64_t val) {return bswap64(val);}
static inline uint64_t SLittle(uint64_t val) {return bswap64(val);}
static inline float SLittle(float val)
{
int32_t ival = bswap32(*((int32_t*)(&val)));
return *((float*)(&ival));
}
static inline double SLittle(double val)
{
int64_t ival = bswap64(*((int64_t*)(&val)));
return *((double*)(&ival));
}
#define SLITTLE(q) ( ( (q) & 0x000000FF ) << 24 | ( (q) & 0x0000FF00 ) << 8 \
| ( (q) & 0x00FF0000 ) >> 8 | ( (q) & 0xFF000000 ) >> 24 )
@ -1231,6 +1253,8 @@ static inline int32_t SBig(int32_t val) {return val;}
static inline uint32_t SBig(uint32_t val) {return val;}
static inline int64_t SBig(int64_t val) {return val;}
static inline uint64_t SBig(uint64_t val) {return val;}
static inline float SBig(float val) {return val;}
static inline double SBig(double val) {return val;}
#define SBIG(q) (q)
#endif