summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Lihatskiy <andreylproductengine@lindenlab.com>2016-08-05 00:50:53 +0300
committerAndrey Lihatskiy <andreylproductengine@lindenlab.com>2016-08-05 00:50:53 +0300
commit8ba372c886e43cc591251a233d3bd5370984b83c (patch)
tree34e4ba215e71f0a84881b68f36338a0ba67fe183
parent6de863132756ffdf3778721ec9dd0f3a15bf464a (diff)
parentf459c67faea4bfcbca8e88c6d8b66319b4b461aa (diff)
Merged andreyl_productengine/viewer-427 into default
-rw-r--r--indra/llimage/llimagej2c.h2
-rw-r--r--indra/llkdu/llimagej2ckdu.cpp9
-rw-r--r--indra/llkdu/llimagej2ckdu.h7
3 files changed, 17 insertions, 1 deletions
diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h
index 44aff98494..e196f7479e 100644
--- a/indra/llimage/llimagej2c.h
+++ b/indra/llimage/llimagej2c.h
@@ -130,6 +130,8 @@ protected:
friend class LLImageJ2C;
};
+#define LINDEN_J2C_COMMENT_PREFIX "LL_" // Used by LLAppearanceUtility
+
//
// This class is used for performance data gathering only.
// Tracks the image compression / decompression data,
diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp
index 0863240686..9347e51b85 100644
--- a/indra/llkdu/llimagej2ckdu.cpp
+++ b/indra/llkdu/llimagej2ckdu.cpp
@@ -713,6 +713,8 @@ bool LLImageJ2CKDU::getMetadata(LLImageJ2C &base)
/* STATIC copy_block */
/*****************************************************************************/
+/*==========================================================================*|
+// Only called by copy_tile(), which is itself commented out
static void copy_block(kdu_block *in, kdu_block *out)
{
if (in->K_max_prime != out->K_max_prime)
@@ -741,11 +743,14 @@ static void copy_block(kdu_block *in, kdu_block *out)
out->set_max_bytes(num_bytes,false);
memcpy(out->byte_buffer,in->byte_buffer,(size_t) num_bytes);
}
+|*==========================================================================*/
/*****************************************************************************/
/* STATIC copy_tile */
/*****************************************************************************/
+/*==========================================================================*|
+// Only called by findDiscardLevelsBoundaries(), which is itself commented out
static void
copy_tile(kdu_tile tile_in, kdu_tile tile_out, int tnum_in, int tnum_out,
kdu_params *siz_in, kdu_params *siz_out, int skip_components,
@@ -802,10 +807,13 @@ copy_tile(kdu_tile tile_in, kdu_tile tile_out, int tnum_in, int tnum_out,
}
}
}
+|*==========================================================================*/
// Find the block boundary for each discard level in the input image.
// We parse the input blocks and copy them in a temporary output stream.
// For the moment, we do nothing more that parsing the raw list of blocks and outputing result.
+/*==========================================================================*|
+// See comments in header file for why this is commented out.
void LLImageJ2CKDU::findDiscardLevelsBoundaries(LLImageJ2C &base)
{
// We need the number of levels in that image before starting.
@@ -909,6 +917,7 @@ void LLImageJ2CKDU::findDiscardLevelsBoundaries(LLImageJ2C &base)
}
return;
}
+|*==========================================================================*/
void set_default_colour_weights(kdu_params *siz)
{
diff --git a/indra/llkdu/llimagej2ckdu.h b/indra/llkdu/llimagej2ckdu.h
index 5fb093826e..7d234435a4 100644
--- a/indra/llkdu/llimagej2ckdu.h
+++ b/indra/llkdu/llimagej2ckdu.h
@@ -74,13 +74,18 @@ protected:
virtual bool initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level = -1, int* region = NULL);
virtual bool initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1, int levels = 0);
virtual std::string getEngineInfo() const;
- void findDiscardLevelsBoundaries(LLImageJ2C &base);
private:
bool initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, ECodeStreamMode mode, S32 first_channel, S32 max_channel_count, int discard_level = -1, int* region = NULL);
void setupCodeStream(LLImageJ2C &base, bool keep_codestream, ECodeStreamMode mode);
void cleanupCodeStream();
+ // This method was public, but the only call to it is commented out in our
+ // own initDecode() method. I (nat 2016-08-04) don't know what it does or
+ // why. Even if it should be uncommented, it should probably still be
+ // private.
+// void findDiscardLevelsBoundaries(LLImageJ2C &base);
+
// Helper class to hold a kdu_codestream, which is a handle to the
// underlying implementation object. When CodeStreamHolder is reset() or
// destroyed, it calls kdu_codestream::destroy() -- which kdu_codestream