Codebase list ilmbase / upstream/2.5.5
New upstream version 2.5.5 Matteo F. Vescovi 2 years ago
21 changed file(s) with 248 addition(s) and 89 deletion(s). Raw diff Collapse all Expand all
00 # OpenEXR Release Notes
11
2 * [Version 2.5.5](#version-255-february-12-2021) February 12, 2021
23 * [Version 2.5.4](#version-254-december-31-2020) December 31, 2020
34 * [Version 2.5.3](#version-253-august-12-2020) August 12, 2020
45 * [Version 2.5.2](#version-252-june-15-2020) June 15, 2020
3738 * [Version 1.0.1](#version-101)
3839 * [Version 1.0](#version-10)
3940
41 ## Version 2.5.5 (February 12, 2021)
42
43 Patch release with various bug/sanitizer/security fixes, primarily
44 related to reading corrupted input files, but also a fix for universal
45 build support on macOS.
46
47 Specific OSS-fuzz issues include:
48
49 * OSS-fuzz [#30291](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30291)
50 * OSS-fuzz [#29106](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29106)
51 * OSS-fuzz [#28971](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28971)
52 * OSS-fuzz [#29829](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29829)
53 * OSS-fuzz [#30121](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30121)
54
55 ### Merged Pull Requests
56
57 * [#914](https://github.com/AcademySoftwareFoundation/openexr/pull/914) additional verification of DWA data sizes
58 * [#910](https://github.com/AcademySoftwareFoundation/openexr/pull/910) update tileoffset sanitycheck to handle ripmaps
59 * [#903](https://github.com/AcademySoftwareFoundation/openexr/pull/903) prevent overflows by using Int64 for all vars in DWA initialize
60 * [#901](https://github.com/AcademySoftwareFoundation/openexr/pull/901) Use size_t for DWA buffersize calculation
61 * [#897](https://github.com/AcademySoftwareFoundation/openexr/pull/897) prevent overflow in RgbaFile cachePadding
62 * [#896](https://github.com/AcademySoftwareFoundation/openexr/pull/896) add buffer size validation to FastHuf decode
63 * [#893](https://github.com/AcademySoftwareFoundation/openexr/pull/893) Include <limits> where required by newer compilers
64 * [#889](https://github.com/AcademySoftwareFoundation/openexr/pull/889) Add explicit #include <limits> for numeric_limits
65 * [#854](https://github.com/AcademySoftwareFoundation/openexr/pull/854) Fix Apple Universal 2 (arm64/x86_64) builds
66
4067 ## Version 2.5.4 (December 31, 2020)
41
68
4269 Patch release with various bug/sanitizer/security fixes, primarily
4370 related to reading corrupted input files.
4471
7171 _thread.join ();
7272 }
7373
74 void
75 Thread::join()
76 {
77 if ( _thread.joinable () )
78 _thread.join ();
79 }
80
81 bool
82 Thread::joinable() const
83 {
84 return _thread.joinable();
85 }
7486
7587 void
7688 Thread::start ()
107119 {
108120 throw IEX_NAMESPACE::NoImplExc ("Threads not supported on this platform.");
109121 }
122
123 void
124 Thread::join ()
125 {
126 throw IEX_NAMESPACE::NoImplExc ("Threads not supported / enabled on this platform.");
127 }
128
129 bool
130 Thread::joinable () const
131 {
132 throw IEX_NAMESPACE::NoImplExc ("Threads not supported / enabled on this platform.");
133 }
134
110135 # endif
111136 #endif
112137
128128 ILMTHREAD_EXPORT void start ();
129129 ILMTHREAD_EXPORT virtual void run () = 0;
130130
131 //
132 // wait for thread to exit - must be called before deleting thread
133 //
134 void join();
135 bool joinable() const;
136
131137 private:
132138
133139 #ifdef ILMBASE_FORCE_CXX03
422422 size_t curT = _data.threads.size();
423423 for (size_t i = 0; i != curT; ++i)
424424 {
425 _data.taskSemaphore.post();
426 _data.threadSemaphore.wait();
425 if (_data.threads[i]->joinable())
426 {
427 _data.taskSemaphore.post();
428 _data.threadSemaphore.wait();
429 }
427430 }
428431
429432 //
430433 // Join all the threads
431434 //
432435 for (size_t i = 0; i != curT; ++i)
436 {
437 if (_data.threads[i]->joinable())
438 _data.threads[i]->join();
439
433440 delete _data.threads[i];
434
441 }
442
435443 Lock lock1 (_data.taskMutex);
436444 #ifdef ILMBASE_FORCE_CXX03
437445 Lock lock2 (_data.stopMutex);
33 dnl
44
55 dnl Process this file with autoconf to produce a configure script.
6 AC_INIT(IlmBase, 2.5.4)
6 AC_INIT(IlmBase, 2.5.5)
77
88 AC_SUBST(ILMBASE_VERSION_MAJOR, 2)
99 AC_SUBST(ILMBASE_VERSION_MINOR, 5)
10 AC_SUBST(ILMBASE_VERSION_PATCH, 4)
10 AC_SUBST(ILMBASE_VERSION_PATCH, 5)
1111
1212 AC_SUBST(ILMBASE_VERSION, ${ILMBASE_VERSION_MAJOR}.${ILMBASE_VERSION_MINOR}.${ILMBASE_VERSION_PATCH})
1313 AC_SUBST(ILMBASE_VERSION_API, ${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR})
2121
2222
2323 LIBTOOL_CURRENT=25
24 LIBTOOL_REVISION=3
24 LIBTOOL_REVISION=4
2525 LIBTOOL_AGE=0
2626 LIBTOOL_VERSION=$LIBTOOL_CURRENT:$LIBTOOL_REVISION:$LIBTOOL_AGE
2727 AC_SUBST(LIBTOOL_VERSION)
6464
6565 #include "Iex.h"
6666
67 #include <algorithm>
68 #include <assert.h>
6769 #include <string>
6870 #include <vector>
69 #include <assert.h>
7071 #include <limits>
71 #include <algorithm>
72
7372
7473 #include "ImfNamespace.h"
7574 OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER
6363 #include <vector>
6464 #include <algorithm>
6565 #include <assert.h>
66 #include <string>
67 #include <vector>
6668 #include <limits>
6769
6870 #include "ImfNamespace.h"
155155 #include <cctype>
156156 #include <cassert>
157157 #include <algorithm>
158 #include <limits>
158159
159160 #include <cstddef>
160161
26042605 throw IEX_NAMESPACE::BaseExc("DC data corrupt.");
26052606 }
26062607 }
2608 else
2609 {
2610 // if the compressed size is 0, then the uncompressed size must also be zero
2611 if (totalDcUncompressedCount!=0)
2612 {
2613 throw IEX_NAMESPACE::BaseExc("DC data corrupt.");
2614 }
2615 }
26072616
26082617 //
26092618 // Uncompress the RLE data into _rleBuffer, then unRLE the results
29302939 // of channels we have.
29312940 //
29322941
2933 int maxOutBufferSize = 0;
2934 int numLossyDctChans = 0;
2935 int unknownBufferSize = 0;
2936 int rleBufferSize = 0;
2937
2938 int maxLossyDctAcSize = (int)ceil ((float)numScanLines() / 8.0f) *
2939 (int)ceil ((float)(_max[0] - _min[0] + 1) / 8.0f) *
2942 Int64 maxOutBufferSize = 0;
2943 Int64 numLossyDctChans = 0;
2944 Int64 unknownBufferSize = 0;
2945 Int64 rleBufferSize = 0;
2946
2947 Int64 maxLossyDctAcSize = static_cast<Int64>(ceil ((float)numScanLines() / 8.0f)) *
2948 static_cast<Int64>(ceil ((float)(_max[0] - _min[0] + 1) / 8.0f)) *
29402949 63 * sizeof (unsigned short);
29412950
2942 int maxLossyDctDcSize = (int)ceil ((float)numScanLines() / 8.0f) *
2943 (int)ceil ((float)(_max[0] - _min[0] + 1) / 8.0f) *
2951 Int64 maxLossyDctDcSize = static_cast<Int64>(ceil ((float)numScanLines() / 8.0f)) *
2952 static_cast<Int64>(ceil ((float)(_max[0] - _min[0] + 1) / 8.0f)) *
29442953 sizeof (unsigned short);
2954
2955 Int64 pixelCount = static_cast<Int64>(numScanLines()) * static_cast<Int64>(_max[0] - _min[0] + 1);
29452956
29462957 for (unsigned int chan = 0; chan < _channelData.size(); ++chan)
29472958 {
29572968 //
29582969
29592970 maxOutBufferSize += std::max(
2960 (int)(2 * maxLossyDctAcSize + 65536),
2961 (int)compressBound (maxLossyDctAcSize) );
2971 2lu * maxLossyDctAcSize + 65536lu,
2972 static_cast<Int64>(compressBound (maxLossyDctAcSize)) );
29622973 numLossyDctChans++;
29632974 break;
29642975
29692980 // of the source data.
29702981 //
29712982
2972 int rleAmount = 2 * numScanLines() * (_max[0] - _min[0] + 1) *
2973 OPENEXR_IMF_NAMESPACE::pixelTypeSize (_channelData[chan].type);
2983 Int64 rleAmount = 2 * pixelCount * OPENEXR_IMF_NAMESPACE::pixelTypeSize (_channelData[chan].type);
29742984
29752985 rleBufferSize += rleAmount;
29762986 }
29792989
29802990 case UNKNOWN:
29812991
2982 unknownBufferSize += numScanLines() * (_max[0] - _min[0] + 1) *
2983 OPENEXR_IMF_NAMESPACE::pixelTypeSize (_channelData[chan].type);
2992 unknownBufferSize += pixelCount * OPENEXR_IMF_NAMESPACE::pixelTypeSize (_channelData[chan].type);
29842993 break;
29852994
29862995 default:
29973006 // which could take slightly more space
29983007 //
29993008
3000 maxOutBufferSize += (int)compressBound ((uLongf)rleBufferSize);
3009 maxOutBufferSize += static_cast<Int64>(compressBound (rleBufferSize));
30013010
30023011 //
30033012 // And the same goes for the UNKNOWN data
30043013 //
30053014
3006 maxOutBufferSize += (int)compressBound ((uLongf)unknownBufferSize);
3015 maxOutBufferSize += static_cast<Int64>(compressBound (unknownBufferSize));
30073016
30083017 //
30093018 // Allocate a zip/deflate compressor big enought to hold the DC data
30503059 // to Huffman encoding
30513060 //
30523061
3053 if (static_cast<size_t>(maxLossyDctAcSize * numLossyDctChans) > _packedAcBufferSize)
3062 if (maxLossyDctAcSize * numLossyDctChans > _packedAcBufferSize)
30543063 {
30553064 _packedAcBufferSize = maxLossyDctAcSize * numLossyDctChans;
30563065 if (_packedAcBuffer != 0)
30623071 // _packedDcBuffer holds one quantized DCT coef per 8x8 block
30633072 //
30643073
3065 if (static_cast<size_t>(maxLossyDctDcSize * numLossyDctChans) > _packedDcBufferSize)
3074 if (maxLossyDctDcSize * numLossyDctChans > _packedDcBufferSize)
30663075 {
30673076 _packedDcBufferSize = maxLossyDctDcSize * numLossyDctChans;
30683077 if (_packedDcBuffer != 0)
30703079 _packedDcBuffer = new char[_packedDcBufferSize];
30713080 }
30723081
3073 if (static_cast<size_t>(rleBufferSize) > _rleBufferSize)
3082 if ( rleBufferSize > _rleBufferSize )
30743083 {
30753084 _rleBufferSize = rleBufferSize;
30763085 if (_rleBuffer != 0)
30893098 // all in one swoop (for each compression scheme).
30903099 //
30913100
3092 int planarUncBufferSize[NUM_COMPRESSOR_SCHEMES];
3101 Int64 planarUncBufferSize[NUM_COMPRESSOR_SCHEMES];
30933102 for (int i=0; i<NUM_COMPRESSOR_SCHEMES; ++i)
30943103 planarUncBufferSize[i] = 0;
30953104
31013110 break;
31023111
31033112 case RLE:
3104 planarUncBufferSize[RLE] +=
3105 numScanLines() * (_max[0] - _min[0] + 1) *
3113 planarUncBufferSize[RLE] += pixelCount *
31063114 OPENEXR_IMF_NAMESPACE::pixelTypeSize (_channelData[chan].type);
31073115 break;
31083116
31093117 case UNKNOWN:
3110 planarUncBufferSize[UNKNOWN] +=
3111 numScanLines() * (_max[0] - _min[0] + 1) *
3118 planarUncBufferSize[UNKNOWN] += pixelCount *
31123119 OPENEXR_IMF_NAMESPACE::pixelTypeSize (_channelData[chan].type);
31133120 break;
31143121
31253132
31263133 if (planarUncBufferSize[UNKNOWN] > 0)
31273134 {
3128 planarUncBufferSize[UNKNOWN] =
3129 compressBound ((uLongf)planarUncBufferSize[UNKNOWN]);
3135 planarUncBufferSize[UNKNOWN] =
3136 static_cast<Int64>( compressBound (planarUncBufferSize[UNKNOWN]) );
31303137 }
31313138
31323139 for (int i = 0; i < NUM_COMPRESSOR_SCHEMES; ++i)
31333140 {
3134 if (static_cast<size_t>(planarUncBufferSize[i]) > _planarUncBufferSize[i])
3141 if ( planarUncBufferSize[i] > _planarUncBufferSize[i])
31353142 {
31363143 _planarUncBufferSize[i] = planarUncBufferSize[i];
31373144 if (_planarUncBuffer[i] != 0)
31383145 delete[] _planarUncBuffer[i];
3146
3147 if (planarUncBufferSize[i] > std::numeric_limits<size_t>::max())
3148 {
3149 throw IEX_NAMESPACE::ArgExc("DWA buffers too large");
3150 }
3151
31393152 _planarUncBuffer[i] = new char[planarUncBufferSize[i]];
31403153 }
31413154 }
168168 std::vector<CscChannelSet> _cscSets;
169169 std::vector<Classifier> _channelRules;
170170
171 char *_packedAcBuffer;
172 size_t _packedAcBufferSize;
173 char *_packedDcBuffer;
174 size_t _packedDcBufferSize;
175 char *_rleBuffer;
176 size_t _rleBufferSize;
177 char *_outBuffer;
178 size_t _outBufferSize;
179 char *_planarUncBuffer[NUM_COMPRESSOR_SCHEMES];
180 size_t _planarUncBufferSize[NUM_COMPRESSOR_SCHEMES];
171 char* _packedAcBuffer;
172 Int64 _packedAcBufferSize;
173 char* _packedDcBuffer;
174 Int64 _packedDcBufferSize;
175 char* _rleBuffer;
176 Int64 _rleBufferSize;
177 char* _outBuffer;
178 Int64 _outBufferSize;
179 char* _planarUncBuffer[NUM_COMPRESSOR_SCHEMES];
180 Int64 _planarUncBufferSize[NUM_COMPRESSOR_SCHEMES];
181181
182182 Zip *_zip;
183183 float _dwaCompressionLevel;
5858 #define _SSE_ALIGNMENT 32
5959 #define _SSE_ALIGNMENT_MASK 0x0F
6060 #define _AVX_ALIGNMENT_MASK 0x1F
61
62 //
63 // Test if we should enable GCC inline asm paths for AVX
64 //
65
66 #ifdef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
67
68 #define IMF_HAVE_GCC_INLINEASM
69
70 #ifdef __LP64__
71 #define IMF_HAVE_GCC_INLINEASM_64
72 #endif /* __LP64__ */
73
74 #endif /* OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX */
7561
7662 //
7763 // A simple 64-element array, aligned properly for SIMD access.
466452 // I'll take the asm.
467453 //
468454
469 #if defined IMF_HAVE_GCC_INLINEASM
455 #if defined IMF_HAVE_GCC_INLINEASM_X86
470456 __asm__
471457 ("vmovaps (%0), %%ymm0 \n"
472458 "vmovaps 0x20(%0), %%ymm1 \n"
505491 );
506492 #else
507493 convertFloatToHalf64_scalar (dst, src);
508 #endif /* IMF_HAVE_GCC_INLINEASM */
494 #endif /* IMF_HAVE_GCC_INLINEASM_X86 */
509495 }
510496
511497
682668 void
683669 fromHalfZigZag_f16c (unsigned short *src, float *dst)
684670 {
685 #if defined IMF_HAVE_GCC_INLINEASM_64
671 #if defined IMF_HAVE_GCC_INLINEASM_X86_64
686672 __asm__
687673
688674 /* x3 <- 0
834820
835821 #else
836822 fromHalfZigZag_scalar(src, dst);
837 #endif /* defined IMF_HAVE_GCC_INLINEASM_64 */
823 #endif /* defined IMF_HAVE_GCC_INLINEASM_X86_64 */
838824 }
839825
840826
16061592 void
16071593 dctInverse8x8_avx (float *data)
16081594 {
1609 #if defined IMF_HAVE_GCC_INLINEASM_64
1595 #if defined IMF_HAVE_GCC_INLINEASM_X86_64
16101596
16111597 /* The column-major version of M1, followed by the
16121598 * column-major version of M2:
17341720 } else {
17351721 assert(false); // Invalid template instance parameter
17361722 }
1737 #else /* IMF_HAVE_GCC_INLINEASM_64 */
1723 #else /* IMF_HAVE_GCC_INLINEASM_X86_64 */
17381724
17391725 dctInverse8x8_scalar<zeroedRows>(data);
17401726
1741 #endif /* IMF_HAVE_GCC_INLINEASM_64 */
1727 #endif /* IMF_HAVE_GCC_INLINEASM_X86_64 */
17421728 }
17431729
17441730
11181118 if (FastHufDecoder::enabled() && nBits > 128)
11191119 {
11201120 FastHufDecoder fhd (ptr, nCompressed - (ptr - compressed), im, iM, iM);
1121
1122 // must be nBytes remaining in buffer
1123 if( ptr-compressed + nBytes > nCompressed)
1124 {
1125 notEnoughData();
1126 return;
1127 }
1128
11211129 fhd.decode ((unsigned char*)ptr, nBits, raw, nRaw);
11221130 }
11231131 else
171171
172172 static int LOG2_CACHE_LINE_SIZE = 8;
173173
174 int i = LOG2_CACHE_LINE_SIZE + 2;
174 size_t i = LOG2_CACHE_LINE_SIZE + 2;
175175
176176 while ((size >> i) > 1)
177177 ++i;
178178
179 if (size > (1 << (i + 1)) - 64)
180 return 64 + ((1 << (i + 1)) - size);
181
182 if (size < (1 << i) + 64)
183 return 64 + ((1 << i) - size);
179 if (size > (1ll << (i + 1)) - 64ll)
180 return 64ll + ((1ll << (i + 1ll)) - size);
181
182 if (size < (1ll << i) + 64ll)
183 return 64ll + ((1ll << i) - size);
184184
185185 return 0;
186186 }
6262 #endif // IMF_HAVE_SSE2 && __GNUC__
6363
6464
65 #ifdef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
65 #ifdef IMF_HAVE_GCC_INLINEASM_X86
6666
6767 void xgetbv(int n, int &eax, int &edx)
6868 {
7373 : /* Clobber */);
7474 }
7575
76 #else // OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
76 #else // IMF_HAVE_GCC_INLINEASM_X86
7777
7878 void xgetbv(int n, int &eax, int &edx)
7979 {
8080 eax = edx = 0;
8181 }
8282
83 #endif // OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
83 #endif // IMF_HAVE_GCC_INLINEASM_X86
8484
8585 } // namespace
8686
3838 #include "ImfSimd.h"
3939 #include <stdlib.h>
4040 #include "ImfExport.h"
41 #include "OpenEXRConfig.h"
42 #include "OpenEXRConfigInternal.h"
4143
4244 OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
4345
46 //
47 // Test if we should enable GCC inline asm paths for AVX
48 //
49
50 #if defined(OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX) && (defined(_M_X64) || defined(__x86_64__))
51
52 #define IMF_HAVE_GCC_INLINEASM_X86
53
54 #ifdef __LP64__
55 #define IMF_HAVE_GCC_INLINEASM_X86_64
56 #endif /* __LP64__ */
57
58 #endif /* OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX */
4459
4560 static unsigned long systemEndianCheckValue = 0x12345678;
4661 static unsigned long* systemEndianCheckPointer = &systemEndianCheckValue;
252252 Data (Data&& other) = delete;
253253 Data& operator = (Data&& other) = delete;
254254
255 static const int gLargeChunkTableSize = 1024*1024;
256 void validateStreamSize(); // throw an exception if the file is significantly
257 // smaller than the data/tile geometry would require
258
259
255260 inline TileBuffer * getTileBuffer (int number);
256261 // hash function from tile indices
257262 // into our vector of tile buffers
298303 }
299304
300305
306
307 //
308 // avoid allocating excessive memory due to large lineOffsets table size.
309 // If the chunktablesize claims to be large,
310 // check the file is big enough to contain the table before allocating memory
311 // in the bytesPerLineTable and the lineOffsets table.
312 // Attempt to read the last entry in the first level of the table. Either the seekg() or the read()
313 // call will throw an exception if the file is much too small to contain the table.
314 //
315
316 // assumes the input stream pointer is at (or before) the beginning of the chunk table
317
318
319 void
320 TiledInputFile::Data::validateStreamSize()
321 {
322 const TileDescription& td = header.tileDescription();
323 Int64 chunkCount;
324
325 if (td.mode==RIPMAP_LEVELS)
326 {
327 // use slow function to calculate exact size of ripmap
328 chunkCount = getTiledChunkOffsetTableSize(header);
329 }
330 else
331 {
332 // for ONE_LEVEL image, calculate exact number of tiles
333 // MIPMAP_LEVELS images will have roughly 1/3 more tiles than this
334 // but 'chunkCount' can be less than the real offset table size for a meaningful sanity check
335 //
336 const Box2i &dataWindow = header.dataWindow();
337 Int64 tileWidth = td.xSize;
338 Int64 tileHeight = td.ySize;
339
340 Int64 tilesX = (static_cast<Int64>(dataWindow.max.x+1-dataWindow.min.x) + tileWidth -1) / tileWidth;
341 Int64 tilesY = (static_cast<Int64>(dataWindow.max.y+1-dataWindow.min.y) + tileHeight -1) / tileHeight;
342
343 chunkCount = tilesX*tilesY;
344 }
345
346 if (chunkCount > gLargeChunkTableSize)
347 {
348
349 Int64 pos = _streamData->is->tellg();
350 _streamData->is->seekg(pos + (chunkCount-1)*sizeof(Int64));
351 Int64 temp;
352 OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read <OPENEXR_IMF_INTERNAL_NAMESPACE::StreamIO> (*_streamData->is, temp);
353 _streamData->is->seekg(pos);
354 }
355
356 }
357
301358 namespace {
302359
303360 void
608665 // The frame buffer contains a slice for this channel.
609666 //
610667
611 char *writePtr = slice.base +
668 intptr_t base = reinterpret_cast<intptr_t>(slice.base);
669 char *writePtr = reinterpret_cast<char*>(base +
612670 (y - yOffset) * slice.yStride +
613671 (tileRange.min.x - xOffset) *
614 slice.xStride;
672 slice.xStride);
615673
616674 char *endPtr = writePtr +
617675 (numPixelsPerScanLine - 1) * slice.xStride;
730788 _data->_streamData = new InputStreamMutex();
731789 _data->_streamData->is = is;
732790 _data->header.readFrom (*_data->_streamData->is, _data->version);
791
733792 initialize();
734793 //read tile offsets - we are not multipart or deep
735794 _data->tileOffsets.readFrom (*(_data->_streamData->is), _data->fileIsComplete,false,false);
9721031
9731032 _data->header.sanityCheck (true);
9741033
1034 //
1035 // before allocating memory for tile offsets, confirm file is large enough
1036 // to contain tile offset table
1037 // (for multipart files, the chunk offset table has already been read)
1038 //
1039 if (!isMultiPart(_data->version))
1040 {
1041 _data->validateStreamSize();
1042 }
9751043 _data->tileDesc = _data->header.tileDescription();
9761044 _data->lineOrder = _data->header.lineOrder();
9771045
4444 #include <ImfChannelList.h>
4545 #include <ImfTileDescription.h>
4646 #include <algorithm>
47 #include <limits>
4748
4849 #include "ImfNamespace.h"
4950
3939 #include "ImfStandardAttributes.h"
4040 #include <algorithm>
4141 #include <iostream>
42 #include <limits>
4243 #include <assert.h>
4344 #include <IlmThread.h>
4445 #include <ImathBox.h>
4343 #include "ImfStandardAttributes.h"
4444 #include <algorithm>
4545 #include <iostream>
46 #include <limits>
4647 #include <assert.h>
4748 #include <IlmThread.h>
4849 #include <ImathBox.h>
1818 sysconf(_SC_NPROCESSORS_ONLN);
1919 }
2020 " OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN
21 )
21 )
2222
2323 check_cxx_source_compiles(
2424 "
2525 int main()
2626 {
27 #if defined(_M_X64) || defined(__x86_64__)
2728 #if defined(__SSE2__)
2829 int n = 0;
2930 int eax = 0;
3435 : \"=a\"(eax), \"=d\"(edx) : \"c\"(n) : );
3536 #else
3637 # error No SSE support enabled to query AVX support
38 #endif
3739 #endif
3840 }
3941 " OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
4648
4749 if(APPLE)
4850 set(OPENEXR_IMF_HAVE_DARWIN TRUE)
49 if (${CMAKE_OSX_ARCHITECTURES} MATCHES arm64)
50 set(OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX FALSE)
51 endif()
5251 endif()
5352
5453 configure_file(OpenEXRConfig.h.in_cmake ${CMAKE_CURRENT_BINARY_DIR}/OpenEXRConfig.h)
44
55 dnl Process this file with autoconf to produce a configure script.
66
7 AC_INIT(OpenEXR, 2.5.4)
7 AC_INIT(OpenEXR, 2.5.5)
88 AC_CONFIG_MACRO_DIR([m4])
99
1010 AC_SUBST(OPENEXR_VERSION_MAJOR, 2)
1111 AC_SUBST(OPENEXR_VERSION_MINOR, 5)
12 AC_SUBST(OPENEXR_VERSION_PATCH, 4)
12 AC_SUBST(OPENEXR_VERSION_PATCH, 5)
1313
1414 AC_SUBST(OPENEXR_VERSION, ${OPENEXR_VERSION_MAJOR}.${OPENEXR_VERSION_MINOR}.${OPENEXR_VERSION_PATCH})
1515 AC_SUBST(OPENEXR_VERSION_API, ${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR})
2323
2424
2525 LIBTOOL_CURRENT=25
26 LIBTOOL_REVISION=3
26 LIBTOOL_REVISION=4
2727 LIBTOOL_AGE=0
2828 LIBTOOL_VERSION=$LIBTOOL_CURRENT:$LIBTOOL_REVISION:$LIBTOOL_AGE
2929 AC_SUBST(LIBTOOL_VERSION)
33 dnl
44
55 dnl Process this file with autoconf to produce a configure script.
6 AC_INIT(PyIlmBase, 2.5.4)
6 AC_INIT(PyIlmBase, 2.5.5)
77 AC_SUBST(PYILMBASE_VERSION, 2.5.4)
88 AC_CANONICAL_HOST
99 AC_CONFIG_SRCDIR(PyIex/iexmodule.cpp)
1616
1717
1818 LIBTOOL_CURRENT=25
19 LIBTOOL_REVISION=3
19 LIBTOOL_REVISION=4
2020 LIBTOOL_AGE=0
2121 LIBTOOL_VERSION=$LIBTOOL_CURRENT:$LIBTOOL_REVISION:$LIBTOOL_AGE
2222 AC_SUBST(LIBTOOL_VERSION)