diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-21 13:47:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-21 13:47:30 +0400 |
commit | c250ab893c0b0086011d44848b66e53adcff8cad (patch) | |
tree | 0131eb22eb0726c995a4ecf6c6fa2022f7846cd9 /extern/libopenjpeg/opj_includes.h | |
parent | 11cb213d4509b6a2733210fce934395a86543bae (diff) |
update libopenjpeg from 1.3 to 1.5, since 1.3 has a bug saving alpha channels.
the patches/ dir is NOT applied but perhaps we can get OSX and BSD working using the opj_config.h
Diffstat (limited to 'extern/libopenjpeg/opj_includes.h')
-rw-r--r-- | extern/libopenjpeg/opj_includes.h | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/extern/libopenjpeg/opj_includes.h b/extern/libopenjpeg/opj_includes.h index 3464cfcf9ed..2b5866a9990 100644 --- a/extern/libopenjpeg/opj_includes.h +++ b/extern/libopenjpeg/opj_includes.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * Copyright (c) 2005, Herve Drolon, FreeImage Team * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -65,7 +65,7 @@ Most compilers implement their own version of this keyword ... */ #ifndef INLINE #if defined(_MSC_VER) - #define INLINE __inline + #define INLINE __forceinline #elif defined(__GNUC__) #define INLINE __inline__ #elif defined(__MWERKS__) @@ -86,30 +86,28 @@ Most compilers implement their own version of this keyword ... #endif #endif -/* MSVC does not have lrintf */ -#ifdef _MSC_VER +/* MSVC and Borland C do not have lrintf */ +#if defined(_MSC_VER) || defined(__BORLANDC__) +static INLINE long lrintf(float f){ #ifdef _M_X64 -#include <emmintrin.h> -static INLINE long lrintf(float f) { - return _mm_cvtss_si32(_mm_load_ss(&f)); -} + return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f)); #else -static INLINE long lrintf(float f){ - int i; - - _asm{ - fld f - fistp i - }; - - return i; -} + int i; + + _asm{ + fld f + fistp i + }; + + return i; #endif +} #endif #include "j2k_lib.h" #include "opj_malloc.h" #include "event.h" +#include "bio.h" #include "cio.h" #include "image.h" @@ -130,9 +128,12 @@ static INLINE long lrintf(float f){ #include "int.h" #include "fix.h" +#include "cidx_manager.h" +#include "indexbox_manager.h" + /* JPWL>> */ #ifdef USE_JPWL -#include "../jpwl/jpwl.h" +#include "./jpwl/jpwl.h" #endif /* USE_JPWL */ /* <<JPWL */ |