summaryrefslogtreecommitdiff
path: root/indra/llimage/llimagej2c.h
diff options
context:
space:
mode:
authorBill Curtis <bill.curtis@gmail.com>2010-11-19 14:11:42 -0800
committerBill Curtis <bill.curtis@gmail.com>2010-11-19 14:11:42 -0800
commit066d8c39cae11d25dcf72f98bfccd4339973ed42 (patch)
tree8debcaecdd87271f618daeb8500e7032968c5202 /indra/llimage/llimagej2c.h
parentcb8b30864f08947a23379eabcac63c2ceee62f7c (diff)
parent3337ef16cee97e26b45aa07518d34d031bdc75fa (diff)
Automated merge with file:///Users/Bill/Projects/viewer-release
Diffstat (limited to 'indra/llimage/llimagej2c.h')
-rw-r--r--indra/llimage/llimagej2c.h45
1 files changed, 44 insertions, 1 deletions
diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h
index cdb3faa207..cc3dabd7d8 100644
--- a/indra/llimage/llimagej2c.h
+++ b/indra/llimage/llimagej2c.h
@@ -29,8 +29,11 @@
#include "llimage.h"
#include "llassettype.h"
+#include "llmetricperformancetester.h"
class LLImageJ2CImpl;
+class LLImageCompressionTester ;
+
class LLImageJ2C : public LLImageFormatted
{
protected:
@@ -72,11 +75,12 @@ public:
static void openDSO();
static void closeDSO();
static std::string getEngineInfo();
-
+
protected:
friend class LLImageJ2CImpl;
friend class LLImageJ2COJ;
friend class LLImageJ2CKDU;
+ friend class LLImageCompressionTester;
void decodeFailed();
void updateRawDiscardLevel();
@@ -90,6 +94,9 @@ protected:
BOOL mReversible;
LLImageJ2CImpl *mImpl;
std::string mLastError;
+
+ // Image compression/decompression tester
+ static LLImageCompressionTester* sTesterp;
};
// Derive from this class to implement JPEG2000 decoding
@@ -118,4 +125,40 @@ protected:
#define LINDEN_J2C_COMMENT_PREFIX "LL_"
+//
+// This class is used for performance data gathering only.
+// Tracks the image compression / decompression data,
+// records and outputs them to the log file.
+//
+class LLImageCompressionTester : public LLMetricPerformanceTesterBasic
+{
+ public:
+ LLImageCompressionTester();
+ ~LLImageCompressionTester();
+
+ void updateDecompressionStats(const F32 deltaTime) ;
+ void updateDecompressionStats(const S32 bytesIn, const S32 bytesOut) ;
+ void updateCompressionStats(const F32 deltaTime) ;
+ void updateCompressionStats(const S32 bytesIn, const S32 bytesOut) ;
+
+ protected:
+ /*virtual*/ void outputTestRecord(LLSD* sd);
+
+ private:
+ //
+ // Data size
+ //
+ U32 mTotalBytesInDecompression; // Total bytes fed to decompressor
+ U32 mTotalBytesOutDecompression; // Total bytes produced by decompressor
+ U32 mTotalBytesInCompression; // Total bytes fed to compressor
+ U32 mTotalBytesOutCompression; // Total bytes produced by compressor
+ U32 mRunBytesInDecompression; // Bytes fed to decompressor in this run
+ U32 mRunBytesInCompression; // Bytes fed to compressor in this run
+ //
+ // Time
+ //
+ F32 mTotalTimeDecompression; // Total time spent in computing decompression
+ F32 mTotalTimeCompression; // Total time spent in computing compression
+ };
+
#endif