Difference between revisions of "Llimage libtest"

From Second Life Wiki
Jump to navigation Jump to search
Line 24: Line 24:


== Command Line Syntax ==
== Command Line Syntax ==
=== List of Arguments ===
<code>llimage_libtest</code> has only x optional arguments. Here's the list as given by the <code>--help</code> argument:
<pre>
-h, --help
      Print this help
-i, --input <file1 .. file2>
      List of image files to load and convert, patterns can be used
-o, --output <file1 .. file2> OR <type>
      List of image files to create (assumes same order as for input files)
      OR 3 letters file type extension to convert each input file into
-log, --logmetrics <metric>
      Log performance metric and data for <metric>
-r, --analyzeperformance
      Create report comparing baseline with current for <metric> provided in --logmetrics
-s, --image-stats
      Output stats for each input and output image
</pre>
=== Use Examples ===
Get help
Get help
<pre>
<pre>
Line 30: Line 49:
Convert a jpg image into a j2c image
Convert a jpg image into a j2c image
<pre>
<pre>
./llimage_libtest --in image.jpg --out image.j2c
./llimage_libtest --input image.jpg --output image.j2c
</pre>
</pre>
Convert a jpg image into a j2c image and output image statistics
Convert a jpg image into a j2c image and output image statistics
<pre>
<pre>
./llimage_libtest --in image.jpg --out image.j2c --image_stats
./llimage_libtest --input image.jpg --output image.j2c --image-stats
</pre>
</pre>
Convert all j2c images in a folder to png images in the same folder
Convert all j2c images in a folder to png images in the same folder
<pre>
<pre>
./llimage_libtest --in path/*.j2c --out png
./llimage_libtest -i path/*.j2c -o png
</pre>
</pre>
Load all j2c images in a folder and gather decompression perf data
Load all j2c images in a folder and gather decompression perf data
<pre>
<pre>
./llimage_libtest --in path/*.j2c --logmetrics ImageCompressionTester
./llimage_libtest --input path/*.j2c --logmetrics ImageCompressionTester
</pre>
</pre>
Convert a set of images to j2c
Convert a set of images to j2c
<pre>
<pre>
./llimage_libtest --in image1.jpg image2.jpg image3.png --out j2c
./llimage_libtest -i image1.jpg image2.jpg image3.png -o j2c
</pre>
</pre>
Convert all j2c and jpg images from a folder into png
Convert all j2c and jpg images from a folder into png
<pre>
<pre>
./llimage_libtest --in ../../../images/*.j?? --out png
./llimage_libtest -i ../../../images/*.j?? -o png
</pre>
</pre>
Load all j2c images in a folder, gather decompression perf data, compare with baseline and create a report
Load all j2c images in a folder, gather decompression perf data, compare with baseline and create a report
<pre>
<pre>
./llimage_libtest --in path/*.j2c --logmetrics ImageCompressionTester --analyzeperformance
./llimage_libtest -in path/*.j2c -log ImageCompressionTester -r
</pre>
</pre>


== Links ==
== Links ==
* STORM-987
* STORM-987

Revision as of 21:44, 9 March 2011

Introduction

Looking into STORM-746, we realized we needed an applet to quickly and reliably test JPEG2000 compression/decompression strategies. We also realized that we could use such an applet to run texture compression/decompression tests as part of the set of integration tests we're running when building the viewer.

So, instead of doing a quick independent hack, we decided to build an llimage_libtest applet that can be run as part of the test suite.

Objectives

  • Allow on-going test of texture compression/decompression code without having to launch the viewer
  • Allow consistent compression/decompression performance measurements
  • Allow quick test of alternative compress/decompress strategies and techniques
  • Allow simple j2c/jpg image conversion

Quick Spec

  • [DONE] Add llimage_libtest as part of the integration test suite: indra/integration_tests/llimage_libtest/llimage_libtest.cpp
  • [DONE] Command line only executable (no display window after decompression)
  • [DONE] Accept a variety of arguments on the command line
  • [DONE] Allow bulk processing of images using file patterns on the command line (wild cards)
  • [DONE] Support all image file format provided by llimage, namely: j2c (JPEG2000), jpeg, png, bmp, tga
  • [DONE] Read images in any format and output them back in any format
  • [DONE] Output compress/decompress performances
  • Output image properties: size, components, histograms and other stats
  • Build automatically as part of the viewer
  • Runs on all supported platforms, namely: Mac OS X, Windows, Linux

Command Line Syntax

List of Arguments

llimage_libtest has only x optional arguments. Here's the list as given by the --help argument:

-h, --help
       Print this help
-i, --input <file1 .. file2>
       List of image files to load and convert, patterns can be used
-o, --output <file1 .. file2> OR <type>
       List of image files to create (assumes same order as for input files)
       OR 3 letters file type extension to convert each input file into
-log, --logmetrics <metric>
       Log performance metric and data for <metric>
-r, --analyzeperformance
       Create report comparing baseline with current for <metric> provided in --logmetrics
-s, --image-stats
       Output stats for each input and output image

Use Examples

Get help

./llimage_libtest --help

Convert a jpg image into a j2c image

./llimage_libtest --input image.jpg --output image.j2c

Convert a jpg image into a j2c image and output image statistics

./llimage_libtest --input image.jpg --output image.j2c --image-stats

Convert all j2c images in a folder to png images in the same folder

./llimage_libtest -i path/*.j2c -o png

Load all j2c images in a folder and gather decompression perf data

./llimage_libtest --input path/*.j2c --logmetrics ImageCompressionTester

Convert a set of images to j2c

./llimage_libtest -i image1.jpg image2.jpg image3.png -o j2c

Convert all j2c and jpg images from a folder into png

./llimage_libtest -i ../../../images/*.j?? -o png

Load all j2c images in a folder, gather decompression perf data, compare with baseline and create a report

./llimage_libtest -in path/*.j2c -log ImageCompressionTester -r

Links

  • STORM-987