summaryrefslogtreecommitdiff
path: root/indra/llkdu/llimagej2ckdu.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-11-03 09:31:15 -0400
committerNat Goodspeed <nat@lindenlab.com>2016-11-03 09:31:15 -0400
commit6cc4a8dcd2a0a320698312fe4775a946a16575e4 (patch)
tree5e3d27eb2cb1bf77cf1b6cd9d77a52b114160f80 /indra/llkdu/llimagej2ckdu.cpp
parent086c1342152895da28d2e0130d09432152604ca8 (diff)
parent6d1032730881e1278bc5df0d2c21e19b81ffe3ed (diff)
Automated merge with ssh://bitbucket.org/lindenlab/viewer-release
Diffstat (limited to 'indra/llkdu/llimagej2ckdu.cpp')
-rw-r--r--indra/llkdu/llimagej2ckdu.cpp26
1 files changed, 19 insertions, 7 deletions
diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp
index aa405362e8..b85e39b452 100644
--- a/indra/llkdu/llimagej2ckdu.cpp
+++ b/indra/llkdu/llimagej2ckdu.cpp
@@ -25,6 +25,12 @@
*/
#include "linden_common.h"
+
+// based on this KDU support group posting:
+// https://groups.yahoo.com/neo/groups/kakadu_jpeg2000/conversations/messages/6691
+// Defining this values seems to fix the linker error that appeared with the 7.8 release
+#define CORESYS_IMPORTS
+
#include "llimagej2ckdu.h"
#include "lltimer.h"
@@ -33,7 +39,11 @@
#include "llkdumem.h"
#include "stringize.h"
-#include "kdu_block_coding.h"
+#define kdu_xxxx "kdu_block_coding.h"
+#include "include_kdu_xxxx.h"
+
+// Avoid ubiquitous necessity of kdu_core:: qualification
+using namespace kdu_core;
#include "llexception.h"
#include <boost/exception/diagnostic_information.hpp>
@@ -94,7 +104,7 @@ std::ostream& operator<<(std::ostream& out, const kdu_dims& dims)
class kdc_flow_control {
public:
- kdc_flow_control(kdu_image_in_base *img_in, kdu_codestream codestream);
+ kdc_flow_control(kdu_supp::kdu_image_in_base *img_in, kdu_codestream codestream);
~kdc_flow_control();
bool advance_components();
void process_components();
@@ -103,7 +113,7 @@ private:
struct kdc_component_flow_control {
public:
- kdu_image_in_base *reader;
+ kdu_supp::kdu_image_in_base *reader;
int vert_subsampling;
int ratio_counter; /* Initialized to 0, decremented by `count_delta';
when < 0, a new line must be processed, after
@@ -143,7 +153,8 @@ std::string LLImageJ2CKDU::getEngineInfo() const
class LLKDUDecodeState
{
public:
- LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap);
+ LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap,
+ kdu_codestream* codestreamp);
~LLKDUDecodeState();
bool processTileDecode(F32 decode_time, bool limit_time = true);
@@ -1247,7 +1258,8 @@ all necessary level shifting, type conversion, rounding and truncation. */
}
}
-LLKDUDecodeState::LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap)
+LLKDUDecodeState::LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap,
+ kdu_codestream* codestreamp)
{
S32 c;
@@ -1293,7 +1305,7 @@ LLKDUDecodeState::LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap)
mEngines[c] = kdu_synthesis(res,&mAllocator,use_shorts);
}
}
- mAllocator.finalize(); // Actually creates buffering resources
+ mAllocator.finalize(*codestreamp); // Actually creates buffering resources
for (c = 0; c < mNumComponents; c++)
{
mLines[c].create(); // Grabs resources from the allocator.
@@ -1351,7 +1363,7 @@ separation between consecutive rows in the real buffer. */
// kdc_flow_control
-kdc_flow_control::kdc_flow_control (kdu_image_in_base *img_in, kdu_codestream codestream)
+kdc_flow_control::kdc_flow_control (kdu_supp::kdu_image_in_base *img_in, kdu_codestream codestream)
{
int n;