summaryrefslogtreecommitdiff
path: root/indra/llimage/llimage.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-05-09 11:55:47 -0700
committerRichard Linden <none@none>2011-05-09 11:55:47 -0700
commite1f2b2b3e82a2415abe9d2c0e548319284e0f2bf (patch)
tree9af4e7f3950c1859d6757a933d827d60205e925f /indra/llimage/llimage.h
parenta5118ccd6721afdf4f8c71cba6007eb7be4d7c19 (diff)
parent1e0d3fc7bc1102faaa98ea6753c4366d9cef7379 (diff)
Automated merge with bundle:F:\code\viewer-experience+c:\users\richard\appdata\local\temp\thg.4vsiw5\ssh__richard@hg.lindenlab.com_richard_viewer-experience-merge_qwnptv.hg
Diffstat (limited to 'indra/llimage/llimage.h')
-rw-r--r--indra/llimage/llimage.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index 18444f3934..c464c3b2b6 100644
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -35,8 +35,21 @@
const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2
const S32 MAX_IMAGE_MIP = 11; // 2048x2048
+
+// *TODO : Use MAX_IMAGE_MIP as max discard level and modify j2c management so that the number
+// of levels is read from the header's file, not inferred from its size.
const S32 MAX_DISCARD_LEVEL = 5;
+// JPEG2000 size constraints
+// Those are declared here as they are germane to other image constraints used in the viewer
+// and declared right here. Some come from the JPEG2000 spec, some conventions specific to SL.
+const S32 MAX_DECOMPOSITION_LEVELS = 32; // Number of decomposition levels cannot exceed 32 according to jpeg2000 spec
+const S32 MIN_DECOMPOSITION_LEVELS = 5; // the SL viewer will *crash* trying to decode images with fewer than 5 decomposition levels (unless image is small that is)
+const S32 MAX_PRECINCT_SIZE = 2048; // No reason to be bigger than MAX_IMAGE_SIZE
+const S32 MIN_PRECINCT_SIZE = 4; // Can't be smaller than MIN_BLOCK_SIZE
+const S32 MAX_BLOCK_SIZE = 64; // Max total block size is 4096, hence 64x64 when using square blocks
+const S32 MIN_BLOCK_SIZE = 4; // Min block dim is 4 according to jpeg2000 spec
+
const S32 MIN_IMAGE_SIZE = (1<<MIN_IMAGE_MIP); // 4, only used for expand/contract power of 2
const S32 MAX_IMAGE_SIZE = (1<<MAX_IMAGE_MIP); // 2048
const S32 MIN_IMAGE_AREA = MIN_IMAGE_SIZE * MIN_IMAGE_SIZE;