From 057da807ac55f9b0583ff334cd12b3568ab81a18 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 20 Jan 2012 13:51:46 -0800 Subject: removed LLXUIXML library moved LLInitParam, and LLRegistry to llcommon moved LLUIColor, LLTrans, and LLXUIParser to llui reviewed by Nat --- indra/integration_tests/llui_libtest/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/integration_tests') diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index 1180460f4b..633ad84159 100644 --- a/indra/integration_tests/llui_libtest/CMakeLists.txt +++ b/indra/integration_tests/llui_libtest/CMakeLists.txt @@ -18,7 +18,6 @@ include(LLWindow) include(LLUI) include(LLVFS) # ugh, needed for LLDir include(LLXML) -include(LLXUIXML) include(Linking) # include(Tut) @@ -32,7 +31,6 @@ include_directories( ${LLVFS_INCLUDE_DIRS} ${LLWINDOW_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} - ${LLXUIXML_INCLUDE_DIRS} ) set(llui_libtest_SOURCE_FILES -- cgit v1.2.3 From cf370a8dcde5ae77c27aa4fdd105d399c60c3d53 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 11 Apr 2012 13:31:06 -0400 Subject: add hunspell libraries in unit test build --- indra/integration_tests/llui_libtest/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/integration_tests') diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index 1180460f4b..ba6b318cb8 100644 --- a/indra/integration_tests/llui_libtest/CMakeLists.txt +++ b/indra/integration_tests/llui_libtest/CMakeLists.txt @@ -33,6 +33,7 @@ include_directories( ${LLWINDOW_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} ${LLXUIXML_INCLUDE_DIRS} + ${LIBS_PREBUILD_DIR}/include/hunspell ) set(llui_libtest_SOURCE_FILES @@ -80,6 +81,7 @@ target_link_libraries(llui_libtest ${LLIMAGEJ2COJ_LIBRARIES} ${OS_LIBRARIES} ${GOOGLE_PERFTOOLS_LIBRARIES} + ${HUNSPELL_LIBRARY} ) if (WINDOWS) -- cgit v1.2.3 From bc6f669ff41db304723428746868d79d3f3b48da Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 15 Mar 2012 13:01:14 -0700 Subject: SH-3047 : Read the number of levels from the j2c image header instead of relying on hacked computation based on width / height. --- indra/integration_tests/llimage_libtest/llimage_libtest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/integration_tests') diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 48e876429d..9d524367ed 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -104,9 +104,9 @@ void output_image_stats(LLPointer image, const std::string &fi // Print out some statistical data on the image std::cout << "Image stats for : " << filename << ", extension : " << image->getExtension() << std::endl; - std::cout << " with : " << (int)(image->getWidth()) << ", height : " << (int)(image->getHeight()) << std::endl; - std::cout << " comp : " << (int)(image->getComponents()) << ", levels : " << (int)(image->getDiscardLevel()) << std::endl; - std::cout << " head : " << (int)(image->calcHeaderSize()) << ", data : " << (int)(image->getDataSize()) << std::endl; + std::cout << " with : " << (int)(image->getWidth()) << ", height : " << (int)(image->getHeight()) << std::endl; + std::cout << " comp : " << (int)(image->getComponents()) << ", levels : " << (int)(image->getLevels()) << std::endl; + std::cout << " head : " << (int)(image->calcHeaderSize()) << ", data : " << (int)(image->getDataSize()) << std::endl; return; } -- cgit v1.2.3 From fe7a4d0183bfb19784b61124ef4c377c9a5d42d2 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 15 Mar 2012 14:07:54 -0700 Subject: SH-3047 : Add a load_size argument to llimage_libtest and allow partial image file to be loaded. --- .../llimage_libtest/llimage_libtest.cpp | 28 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'indra/integration_tests') diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 9d524367ed..50dde971af 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -54,6 +54,11 @@ static const char USAGE[] = "\n" " -o, --output OR \n" " List of image files to create (assumes same order as for input files)\n" " OR 3 letters file type extension to convert each input file into.\n" +" -load, --load_size \n" +" Portion of the input image to load, in bytes." +" Will load the whole image if 0 or if the size requested is more than the file size." +" This parameter will be applied to any input image type but really makes sense only" +" for j2c images." " -r, --region \n" " Crop region applied to the input files in pixels.\n" " Only used for j2c images. Default is no region cropping.\n" @@ -112,12 +117,12 @@ void output_image_stats(LLPointer image, const std::string &fi } // Load an image from file and return a raw (decompressed) instance of its data -LLPointer load_image(const std::string &src_filename, int discard_level, int* region, bool output_stats) +LLPointer load_image(const std::string &src_filename, int discard_level, int* region, int load_size, bool output_stats) { LLPointer image = create_image(src_filename); // This just loads the image file stream into a buffer. No decoding done. - if (!image->load(src_filename)) + if (!image->load(src_filename, load_size)) { return NULL; } @@ -310,6 +315,7 @@ int main(int argc, char** argv) bool image_stats = false; int* region = NULL; int discard_level = -1; + int load_size = 0; int precincts_size = -1; int blocks_size = -1; int levels = 0; @@ -396,6 +402,22 @@ int main(int argc, char** argv) discard_level = llclamp(discard_level,0,5); } } + else if (!strcmp(argv[arg], "--load_size") || !strcmp(argv[arg], "-load")) + { + std::string value_str; + if ((arg + 1) < argc) + { + value_str = argv[arg+1]; + } + if (((arg + 1) >= argc) || (value_str[0] == '-')) + { + std::cout << "No valid --load_size argument given, load_size ignored" << std::endl; + } + else + { + load_size = atoi(value_str.c_str()); + } + } else if (!strcmp(argv[arg], "--precincts") || !strcmp(argv[arg], "-p")) { std::string value_str; @@ -510,7 +532,7 @@ int main(int argc, char** argv) for (; in_file != in_end; ++in_file, ++out_file) { // Load file - LLPointer raw_image = load_image(*in_file, discard_level, region, image_stats); + LLPointer raw_image = load_image(*in_file, discard_level, region, load_size, image_stats); if (!raw_image) { std::cout << "Error: Image " << *in_file << " could not be loaded" << std::endl; -- cgit v1.2.3 From 4f19eb3951366ca6a3db9de4a72cb0c1f8bc89d1 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 15 Mar 2012 21:59:37 -0700 Subject: EXP-3049 : Implement partial loading using the calcDataSize(discard_level) computation found in the viewer. --- .../llimage_libtest/llimage_libtest.cpp | 44 ++++++++++++++++++---- 1 file changed, 37 insertions(+), 7 deletions(-) (limited to 'indra/integration_tests') diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 50dde971af..36c5b67826 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -55,10 +55,10 @@ static const char USAGE[] = "\n" " List of image files to create (assumes same order as for input files)\n" " OR 3 letters file type extension to convert each input file into.\n" " -load, --load_size \n" -" Portion of the input image to load, in bytes." -" Will load the whole image if 0 or if the size requested is more than the file size." -" This parameter will be applied to any input image type but really makes sense only" -" for j2c images." +" Portion of the input file to load, in bytes." +" If (load == 0), it will load the whole file." +" If (load == -1), it will load the size relevant to reach the requested discard level (see -d)." +" Only valid for j2c images. Default is 0 (load whole file).\n" " -r, --region \n" " Crop region applied to the input files in pixels.\n" " Only used for j2c images. Default is no region cropping.\n" @@ -121,10 +121,40 @@ LLPointer load_image(const std::string &src_filename, int discard_le { LLPointer image = create_image(src_filename); - // This just loads the image file stream into a buffer. No decoding done. - if (!image->load(src_filename, load_size)) + // We support partial loading only for j2c images + if (image->getCodec() == IMG_CODEC_J2C) { - return NULL; + // Load the header + if (!image->load(src_filename, 600)) + { + return NULL; + } + S32 h = ((LLImageJ2C*)(image.get()))->calcHeaderSize(); + S32 d = (load_size > 0 ? ((LLImageJ2C*)(image.get()))->calcDiscardLevelBytes(load_size) : 0); + S8 r = ((LLImageJ2C*)(image.get()))->getRawDiscardLevel(); + std::cout << "Merov debug : header = " << h << ", load_size = " << load_size << ", discard level = " << d << ", raw discard level = " << r << std::endl; + for (d = 0; d < MAX_DISCARD_LEVEL; d++) + { + S32 data_size = ((LLImageJ2C*)(image.get()))->calcDataSize(d); + std::cout << "Merov debug : discard_level = " << d << ", data_size = " << data_size << std::endl; + } + if (load_size < 0) + { + load_size = (discard_level != -1 ? ((LLImageJ2C*)(image.get()))->calcDataSize(discard_level) : 0); + } + // Load the requested byte range + if (!image->load(src_filename, load_size)) + { + return NULL; + } + } + else + { + // This just loads the image file stream into a buffer. No decoding done. + if (!image->load(src_filename)) + { + return NULL; + } } if( (image->getComponents() != 3) && (image->getComponents() != 4) ) -- cgit v1.2.3 From 8f0bd4b388ac74d5528fbbb83527e173c5624eec Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 13 Apr 2012 15:33:39 -0400 Subject: add cmake configuration for hunspell to llui integration test --- indra/integration_tests/llui_libtest/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/integration_tests') diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index ba6b318cb8..4332261739 100644 --- a/indra/integration_tests/llui_libtest/CMakeLists.txt +++ b/indra/integration_tests/llui_libtest/CMakeLists.txt @@ -19,6 +19,7 @@ include(LLUI) include(LLVFS) # ugh, needed for LLDir include(LLXML) include(LLXUIXML) +include(Hunspell) include(Linking) # include(Tut) -- cgit v1.2.3