diff options
author | Kitty Barnett <develop@catznip.com> | 2024-09-17 19:16:25 +0200 |
---|---|---|
committer | Kitty Barnett <develop@catznip.com> | 2024-09-17 19:16:25 +0200 |
commit | 25f8cbece402c0987e2035eb7721e21a9d2761c3 (patch) | |
tree | f2408e7d1f7b58f49f8cefc5dda7dd56d08c98f8 /indra/llimage | |
parent | 6f4d7c2d6d363aee60d2f3d1fe4ed4a251aaa11b (diff) | |
parent | f378d2f95ad751ccf7456f79baba61d6c39f5c36 (diff) |
Merge branch 'develop' into rlva/base
Diffstat (limited to 'indra/llimage')
-rw-r--r-- | indra/llimage/llimagej2c.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 |