diff options
author | Merov Linden <merov@lindenlab.com> | 2012-04-02 19:05:32 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-04-02 19:05:32 -0700 |
commit | df09fd8e8b5b73330e4942c2cb218a216d7aca99 (patch) | |
tree | 7b945cde73ff1cc666c1f2b03d522452d2102eea /indra/llkdu | |
parent | 792943c211f90738e245b11e128525190ff1b107 (diff) |
SH-3060 : Preliminary implementation of the new byte range computation, implement setting to turn it on or off
Diffstat (limited to 'indra/llkdu')
-rw-r--r-- | indra/llkdu/llimagej2ckdu.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index fdfab5506a..4468b8563b 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -294,6 +294,13 @@ void LLImageJ2CKDU::setupCodeStream(LLImageJ2C &base, BOOL keep_codestream, ECod // Get the number of resolution levels in that image mLevels = mCodeStreamp->get_min_dwt_levels(); + + //kdu_coords idx; idx.x = 0; idx.y = 0; + //kdu_dims tile_indices_in; + //mCodeStreamp->get_valid_tiles(tile_indices_in); + //mCodeStreamp->create_tile(idx+tile_indices_in.pos); + //int layers = mCodeStreamp->get_max_tile_layers(); + //llinfos << "Merov debug : setupCodeStream, levels = " << mLevels << ", layers = " << layers << llendl; // Set the base dimensions base.setSize(dims.size.x, dims.size.y, components); @@ -390,7 +397,7 @@ BOOL LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 deco region_kdu->size.y = region[3] - region[1]; } int discard = (discard_level != -1 ? discard_level : base.getRawDiscardLevel()); - + llinfos << "Merov debug : initDecode, discard used = " << discard << ", asked = " << discard_level << llendl; // Apply loading restrictions mCodeStreamp->apply_input_restrictions( first_channel, max_channel_count, discard, 0, region_kdu); @@ -468,6 +475,9 @@ BOOL LLImageJ2CKDU::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 deco { kdu_tile tile = mCodeStreamp->open_tile(*(mTPosp)+mTileIndicesp->pos); + int layers = mCodeStreamp->get_max_tile_layers(); + llinfos << "Merov debug : decodeImpl, levels = " << mLevels << ", layers = " << layers << llendl; + // Find the region of the buffer occupied by this // tile. Note that we have no control over // sub-sampling factors which might have been used @@ -675,7 +685,7 @@ BOOL LLImageJ2CKDU::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, co std::string blocks_string = llformat("Cblk={%d,%d}",mBlocksSize,mBlocksSize); codestream.access_siz()->parse_string(blocks_string.c_str()); } - std::string ordering_string = llformat("Corder=RPCL"); + std::string ordering_string = llformat("Corder=LRCP"); codestream.access_siz()->parse_string(ordering_string.c_str()); std::string PLT_string = llformat("ORGgen_plt=yes"); codestream.access_siz()->parse_string(PLT_string.c_str()); |