diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2016-11-03 20:48:41 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2016-11-03 20:48:41 -0400 |
commit | 0413e40d82cc53c1e8180023db36108557b6f21c (patch) | |
tree | bd358b773a730070aa5e5843f76bd57931215a50 | |
parent | 6cc4a8dcd2a0a320698312fe4775a946a16575e4 (diff) |
DRTVWR-418: Update KDU and llimagej2ckdu* with certain clang fixes.
-rwxr-xr-x | autobuild.xml | 30 | ||||
-rw-r--r-- | indra/llkdu/llimagej2ckdu.cpp | 31 | ||||
-rw-r--r-- | indra/llkdu/llimagej2ckdu.h | 6 | ||||
-rw-r--r-- | indra/llkdu/tests/llimagej2ckdu_test.cpp | 6 |
4 files changed, 48 insertions, 25 deletions
diff --git a/autobuild.xml b/autobuild.xml index 8ef4b15f57..9abb327bd9 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -1556,9 +1556,9 @@ <key>archive</key> <map> <key>hash</key> - <string>e62f2fc1ee9ab791d603c5b717b46119</string> + <string>4cf0be904cb67c162c7fcd65213ed299</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/kdu_3p-update-kdu/rev/296932/arch/Darwin/installer/kdu-7.2.296932-darwin-296932.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/954/2178/kdu-7.8.500943-darwin-500943.tar.bz2</string> </map> <key>name</key> <string>darwin</string> @@ -1568,9 +1568,9 @@ <key>archive</key> <map> <key>hash</key> - <string>3c2e7b7c76024ceb231c43fdce21b475</string> + <string>faba0f7070198aa7b60da51d3d506895</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/p64_3p-kdu/rev/314311/arch/Darwin/installer/kdu-7.8.314311-darwin64-314311.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/955/2181/kdu-7.8.500943-darwin64-500943.tar.bz2</string> </map> <key>name</key> <string>darwin64</string> @@ -1587,14 +1587,26 @@ <key>name</key> <string>linux</string> </map> + <key>linux64</key> + <map> + <key>archive</key> + <map> + <key>hash</key> + <string>c97c81c730a15c98a68ebf303ed83cb1</string> + <key>url</key> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/953/2186/kdu-7.8.500943-linux64-500943.tar.bz2</string> + </map> + <key>name</key> + <string>linux64</string> + </map> <key>windows</key> <map> <key>archive</key> <map> <key>hash</key> - <string>c5383c48398d4383729f1d215b82d505</string> + <string>42239e5382e62f04228581651e1b3696</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/p64_3p-kdu/rev/314311/arch/CYGWIN/installer/kdu-7.8.314311-windows-314311.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/956/2189/kdu-7.8.500943-windows-500943.tar.bz2</string> </map> <key>name</key> <string>windows</string> @@ -1604,16 +1616,16 @@ <key>archive</key> <map> <key>hash</key> - <string>3b2d4acf9deec3ec99ce5b67eb30d003</string> + <string>f3450d443d27f279a3df71c0f1247c5a</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/p64_3p-kdu/rev/314311/arch/CYGWIN/installer/kdu-7.8.314311-windows64-314311.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/957/2190/kdu-7.8.500943-windows64-500943.tar.bz2</string> </map> <key>name</key> <string>windows64</string> </map> </map> <key>version</key> - <string>7.8.314311</string> + <string>7.8.500943</string> </map> <key>libhunspell</key> <map> diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index b85e39b452..0540e55e07 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -37,7 +37,6 @@ #include "llpointer.h" #include "llmath.h" #include "llkdumem.h" -#include "stringize.h" #define kdu_xxxx "kdu_block_coding.h" #include "include_kdu_xxxx.h" @@ -50,6 +49,18 @@ using namespace kdu_core; #include <sstream> #include <iomanip> +// stream kdu_dims to std::ostream +// Turns out this must NOT be in the anonymous namespace! +// It must also precede #include "stringize.h". +inline +std::ostream& operator<<(std::ostream& out, const kdu_dims& dims) +{ + return out << "(" << dims.pos.x << "," << dims.pos.y << ")," + "[" << dims.size.x << "x" << dims.size.y << "]"; +} + +#include "stringize.h" + namespace { // Failure to load an image shouldn't crash the whole viewer. struct KDUError: public LLContinueError @@ -92,15 +103,6 @@ std::string report_kdu_exception(kdu_exception mb) } } // anonymous namespace -// stream kdu_dims to std::ostream -// Turns out this must NOT be in the anonymous namespace! -inline -std::ostream& operator<<(std::ostream& out, const kdu_dims& dims) -{ - return out << "(" << dims.pos.x << "," << dims.pos.y << ")," - "[" << dims.size.x << "x" << dims.size.y << "]"; -} - class kdc_flow_control { public: @@ -356,9 +358,9 @@ void LLImageJ2CKDU::setupCodeStream(LLImageJ2C &base, bool keep_codestream, ECod // This method is only called from methods that catch KDUError. // We want to fail the image load, not crash the viewer. LLTHROW(KDUError(STRINGIZE("Component " << idx << " dimensions " - << other_dims - << " do not match component 0 dimensions " - << dims << "!"))); + << stringize(other_dims) + << " do not match component 0 dimensions " + << stringize(dims) << "!"))); } } @@ -570,7 +572,8 @@ bool LLImageJ2CKDU::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 deco kdu_coords offset = tile_dims.pos - dims.pos; int row_gap = channels*dims.size.x; // inter-row separation kdu_byte *buf = buffer + offset.y*row_gap + offset.x*channels; - mDecodeState.reset(new LLKDUDecodeState(tile, buf, row_gap)); + mDecodeState.reset(new LLKDUDecodeState(tile, buf, row_gap, + mCodeStreamp.get())); } // Do the actual processing F32 remaining_time = decode_time - decode_timer.getElapsedTimeF32(); diff --git a/indra/llkdu/llimagej2ckdu.h b/indra/llkdu/llimagej2ckdu.h index fd9a396722..b57e4cc40e 100644 --- a/indra/llkdu/llimagej2ckdu.h +++ b/indra/llkdu/llimagej2ckdu.h @@ -104,10 +104,12 @@ private: } } - kdu_codestream* operator->() { return &mCodeStream; } + // for those few times when you need a raw kdu_codestream* + kdu_core::kdu_codestream* get() { return &mCodeStream; } + kdu_core::kdu_codestream* operator->() { return &mCodeStream; } private: - kdu_codestream mCodeStream; + kdu_core::kdu_codestream mCodeStream; }; // Encode variable diff --git a/indra/llkdu/tests/llimagej2ckdu_test.cpp b/indra/llkdu/tests/llimagej2ckdu_test.cpp index 1407da3aa2..ae6138d4c6 100644 --- a/indra/llkdu/tests/llimagej2ckdu_test.cpp +++ b/indra/llkdu/tests/llimagej2ckdu_test.cpp @@ -29,7 +29,13 @@ // Class to test #include "llimagej2ckdu.h" +#if LL_DARWIN +// For this source, it's true that private fields in llkdumem.h are unused. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-private-field" #include "llkdumem.h" +#pragma clang diagnostic pop +#endif #include "kdu_block_coding.h" // Tut header #include "lltut.h" |