Llimage libtest

From Second Life Wiki
Jump to navigation Jump to search

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

  • Add llimage_libtest as part of the integration test suite: indra/integration_tests/llimage_libtest/llimage_libtest.cpp
  • Command line only executable (no display window after decompression)
  • Accept a variety of arguments on the command line
  • Read jpeg or png images and output j2c
  • Read j2c images and output a jpeg or png
  • Output image properties: size, components, histograms and other stats
  • Output compress/decompress performances

Command Line Syntax

Get help

./llimage_libtest --help

Convert a jpg image into a j2c image

./llimage_libtest --in image.jpg --out image.j2c

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

./llimage_libtest --in image.jpg --out image.j2c --image_stats

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

./llimage_libtest --in path/*.j2c --out png

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

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

Convert a set of images to j2c

./llimage_libtest --in image1.jpg image2.jpg image3.png --out j2c

Convert all j2c and jpg images from a folder into png

./llimage_libtest --in ../../../images/*.j?? --out png

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

./llimage_libtest --in path/*.j2c --logmetrics ImageCompressionTester --analyzeperformance

TODO

Links

  • STORM-987