From 0c5bd3675babb0cbe6f3c7312350b71b8229e5d3 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 24 Dec 2010 11:36:15 -0800 Subject: STORM-744 : Took code review into account, moving stuff back in protected or even private, fix things to work in debug mode, some clean up in j2coj also --- indra/llkdu/llimagej2ckdu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llkdu/llimagej2ckdu.cpp') diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index 1a286d1406..efa75e4ebd 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -1017,7 +1017,7 @@ kdc_flow_control::kdc_flow_control (kdu_image_in_base *img_in, kdu_codestream co comp->ratio_counter = 0; comp->remaining_lines = comp->initial_lines = dims.size.y; } - assert(num_components > 0); + assert(num_components >= 0); tile.set_components_of_interest(num_components); max_buffer_memory = engine.create(codestream,tile,false,NULL,false,1,NULL,NULL,false); -- cgit v1.2.3 From 5ed4046df5562d4a48a4cb42229f3eb8f59b669b Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 28 Dec 2010 18:32:07 -0800 Subject: STORM-744 : Throw exception consistently so llkdu fails consistently --- indra/llkdu/llimagej2ckdu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llkdu/llimagej2ckdu.cpp') diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index efa75e4ebd..c0db63a85b 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -231,13 +231,13 @@ void LLImageJ2CKDU::setupCodeStream(LLImageJ2C &base, BOOL keep_codestream, ECod if (!mInputp) { - llassert(base.getData()); + llassert_always(base.getData()); // The compressed data has been loaded // Setup the source for the codestrea mInputp = new LLKDUMemSource(base.getData(), data_size); } - llassert(mInputp); + llassert_always(mInputp); mInputp->reset(); mCodeStreamp = new kdu_codestream; -- cgit v1.2.3 From bf1d42ff96cbccff8f4a802b2c609fac15502365 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 28 Dec 2010 20:00:06 -0800 Subject: STORM-744 : Make getMetaData pass when all is stubbed --- indra/llkdu/llimagej2ckdu.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/llkdu/llimagej2ckdu.cpp') diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index c0db63a85b..10ea5685e8 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -229,16 +229,17 @@ void LLImageJ2CKDU::setupCodeStream(LLImageJ2C &base, BOOL keep_codestream, ECod mCodeStreamp = NULL; } - if (!mInputp) + if (!mInputp && base.getData()) { - llassert_always(base.getData()); // The compressed data has been loaded - // Setup the source for the codestrea + // Setup the source for the codestream mInputp = new LLKDUMemSource(base.getData(), data_size); } - llassert_always(mInputp); - mInputp->reset(); + if (mInputp) + { + mInputp->reset(); + } mCodeStreamp = new kdu_codestream; mCodeStreamp->create(mInputp); -- cgit v1.2.3