Skip to content
Snippets Groups Projects
Commit 5782c0f4 authored by Drake Arconis's avatar Drake Arconis
Browse files

Change for our KDU

parent e544d0e6
No related branches found
No related tags found
No related merge requests found
......@@ -187,7 +187,7 @@ public:
// const kdu_uint16* to a std::ostream will display only the hex value
// of the pointer.
LL_INFOS() << "KDU " << mType << ": "
<< utf16str_to_utf8str(llutf16string(s)) << LL_ENDL;
<< utf16str_to_utf8str(llutf16string((utf16strtype*) s)) << LL_ENDL;
}
private:
......@@ -233,7 +233,7 @@ struct LLKDUMessageError : public LLKDUMessage
// shutdown will NOT engage the behavior described above.
if (end_of_message)
{
LLTHROW(KDUError("LLKDUMessageError::flush()"));
//LLTHROW(KDUError("LLKDUMessageError::flush()"));
}
}
};
......@@ -567,7 +567,7 @@ 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();
......
......@@ -33,6 +33,7 @@
// KDU core header files
//
#define KDU_NO_THREADS
#define KDU_X86_INTRINSICS
#define KDU_NO_AVX
#define KDU_NO_AVX2
#if LL_CLANG
......@@ -53,7 +54,6 @@
#include "kdu_sample_processing.h"
#include <boost/scoped_ptr.hpp>
#include <boost/noncopyable.hpp>
class LLKDUDecodeState;
class LLKDUMemSource;
......@@ -99,9 +99,13 @@ private:
//
// Every RAII class must be noncopyable. For this we don't need move
// support.
class CodeStreamHolder: public boost::noncopyable
class CodeStreamHolder
{
public:
CodeStreamHolder() : mCodeStream() {}
CodeStreamHolder(const CodeStreamHolder&) = delete;
CodeStreamHolder& operator=(const CodeStreamHolder&) = delete;
~CodeStreamHolder()
{
reset();
......@@ -115,17 +119,22 @@ private:
}
}
kdu_codestream* operator->() { return &mCodeStream; }
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
boost::scoped_ptr<LLKDUMemSource> mInputp;
CodeStreamHolder mCodeStreamp;
boost::scoped_ptr<kdu_coords> mTPosp; // tile position
boost::scoped_ptr<kdu_dims> mTileIndicesp;
boost::scoped_ptr<kdu_core::kdu_coords> mTPosp; // tile position
boost::scoped_ptr<kdu_core::kdu_dims> mTileIndicesp;
int mBlocksSize;
int mPrecinctsSize;
int mLevels;
......
......@@ -39,6 +39,7 @@
// Support classes for reading and writing from memory buffers in KDU
#define KDU_NO_THREADS
#define KDU_X86_INTRINSICS
#define KDU_NO_AVX
#define KDU_NO_AVX2
#include "kdu_image.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment