diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-09-23 23:26:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 23:26:54 +0300 |
commit | 38916ebf367aa400d8151d78204e714d40e8c323 (patch) | |
tree | 2fe671253d83620fba0e0b1c6c488997b558a7ef /indra/llimage | |
parent | 4274eb591a1b0806f8c73ca16df65ade60db2200 (diff) | |
parent | 0b7548c6b69f8259aae987c479a85a9d0fd04d89 (diff) |
Merge pull request #2657 from secondlife/marchcat/b-develop
develop → Maint B sync
Diffstat (limited to 'indra/llimage')
-rw-r--r-- | indra/llimage/llimage.h | 2 | ||||
-rw-r--r-- | indra/llimage/llimagej2c.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 8b966b8ea3..6b14b68c78 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -179,7 +179,7 @@ private: public: template<bool SHARED> - class DataLock : LLSharedMutexLockTemplate<SHARED> + class DataLock : public LLSharedMutexLockTemplate<SHARED> { public: DataLock(const LLImageBase* image) diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index 753e5d24df..aa161709a1 100644 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -281,7 +281,7 @@ S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 r S32 height = (h > 0) ? h : 2048; S32 max_dimension = llmax(width, height); // Find largest dimension S32 block_area = MAX_BLOCK_SIZE * MAX_BLOCK_SIZE; // Calculated initial block area from established max block size (currently 64) - block_area *= (max_dimension / MAX_BLOCK_SIZE / max_components); // Adjust initial block area by ratio of largest dimension to block size per component + block_area *= llmax((max_dimension / MAX_BLOCK_SIZE / max_components), 1); // Adjust initial block area by ratio of largest dimension to block size per component S32 totalbytes = (S32) (block_area * max_components * precision); // First block layer computed before loop without compression rate S32 block_layers = 1; // Start at layer 1 since first block layer is computed outside loop while (block_layers < 6) // Walk five layers for the five discards in JPEG2000 |