diff options
Diffstat (limited to 'indra/integration_tests')
43 files changed, 1234 insertions, 4 deletions
diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt index 36a7d38bb7..8a83ac498f 100755 --- a/indra/integration_tests/llimage_libtest/CMakeLists.txt +++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt @@ -7,6 +7,7 @@ project (llimage_libtest) include(00-Common) include(LLCommon) include(LLImage) +include(LLMath) include(LLImageJ2COJ) include(LLKDU) include(LLVFS) @@ -15,6 +16,7 @@ include_directories( ${LLCOMMON_INCLUDE_DIRS} ${LLVFS_INCLUDE_DIRS} ${LLIMAGE_INCLUDE_DIRS} + ${LLMATH_INCLUDE_DIRS} ) include_directories(SYSTEM ${LLCOMMON_SYSTEM_INCLUDE_DIRS} @@ -64,6 +66,7 @@ endif (DARWIN) target_link_libraries(llimage_libtest ${LLCOMMON_LIBRARIES} ${LLVFS_LIBRARIES} + ${LLMATH_LIBRARIES} ${LLIMAGE_LIBRARIES} ${LLKDU_LIBRARIES} ${KDU_LIBRARY} diff --git a/indra/integration_tests/llimage_libtest/filters/1970colorize.xml b/indra/integration_tests/llimage_libtest/filters/1970colorize.xml new file mode 100644 index 0000000000..0dab2489a0 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/1970colorize.xml @@ -0,0 +1,41 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>0.8</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.5</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>blend</string> + <real>10.0</real> + <real>0.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.1</real> + <real>0.1</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/autocontrast.xml b/indra/integration_tests/llimage_libtest/filters/autocontrast.xml new file mode 100755 index 0000000000..ec3d7561bd --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/autocontrast.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.01</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/badtrip.xml b/indra/integration_tests/llimage_libtest/filters/badtrip.xml new file mode 100755 index 0000000000..14ee0baff3 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/badtrip.xml @@ -0,0 +1,36 @@ +<llsd> + <array> + <array> + <string>grayscale</string> + </array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>posterize</string> + <real>10.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>gradient</string> + </array> + <array> + <string>colorize</string> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.15</real> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/blowhighlights.xml b/indra/integration_tests/llimage_libtest/filters/blowhighlights.xml new file mode 100644 index 0000000000..2474a1b953 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/blowhighlights.xml @@ -0,0 +1,25 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>uniform</string> + <string>add</string> + <real>0.0</real> + <real>1.0</real> + </array> + <array> + <string>gamma</string> + <real>0.25</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/blur.xml b/indra/integration_tests/llimage_libtest/filters/blur.xml new file mode 100644 index 0000000000..addd056855 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/blur.xml @@ -0,0 +1,7 @@ +<llsd> + <array> + <array> + <string>blur</string> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/brighten.xml b/indra/integration_tests/llimage_libtest/filters/brighten.xml new file mode 100755 index 0000000000..9b4232229f --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/brighten.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>brighten</string> + <real>0.5</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/colorize.xml b/indra/integration_tests/llimage_libtest/filters/colorize.xml new file mode 100644 index 0000000000..72e58b0ffe --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/colorize.xml @@ -0,0 +1,24 @@ +<llsd> + <array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>10.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.5</real> + <real>0.5</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/colortransform.xml b/indra/integration_tests/llimage_libtest/filters/colortransform.xml new file mode 100644 index 0000000000..de4bebcce2 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/colortransform.xml @@ -0,0 +1,16 @@ +<llsd> + <array> + <array> + <string>colortransform</string> + <real>0.2125</real> + <real>0.7154</real> + <real>0.0721</real> + <real>0.2125</real> + <real>0.7154</real> + <real>0.0721</real> + <real>0.2125</real> + <real>0.7154</real> + <real>0.0721</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/contrast.xml b/indra/integration_tests/llimage_libtest/filters/contrast.xml new file mode 100644 index 0000000000..00746b8a9e --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/contrast.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>contrast</string> + <real>1.5</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/convolve.xml b/indra/integration_tests/llimage_libtest/filters/convolve.xml new file mode 100644 index 0000000000..6e65b5f88a --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/convolve.xml @@ -0,0 +1,18 @@ +<llsd> + <array> + <array> + <string>convolve</string> + <real>1.0</real> + <real>0.0</real> + <real>4.0</real> + <real>1.0</real> + <real>4.0</real> + <real>1.0</real> + <real>0.0</real> + <real>1.0</real> + <real>4.0</real> + <real>1.0</real> + <real>4.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/darken.xml b/indra/integration_tests/llimage_libtest/filters/darken.xml new file mode 100755 index 0000000000..5cec3589b6 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/darken.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>darken</string> + <real>0.5</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/dodgeandburn.xml b/indra/integration_tests/llimage_libtest/filters/dodgeandburn.xml new file mode 100644 index 0000000000..0e2e0ad68c --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/dodgeandburn.xml @@ -0,0 +1,47 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.4</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>2.0</real> + </array> + <array> + <string>contrast</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>-0.8</real> + <real>0.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>2.0</real> + </array> + <array> + <string>contrast</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/edges.xml b/indra/integration_tests/llimage_libtest/filters/edges.xml new file mode 100644 index 0000000000..a66b81d01e --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/edges.xml @@ -0,0 +1,24 @@ +<llsd> + <array> + <array> + <string>gradient</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>2.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/focus.xml b/indra/integration_tests/llimage_libtest/filters/focus.xml new file mode 100644 index 0000000000..d8525fea62 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/focus.xml @@ -0,0 +1,39 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>0.0</real> + <real>0.4</real> + <real>0.0</real> + <real>0.0</real> + <real>0.5</real> + <real>2.0</real> + </array> + <array> + <string>sharpen</string> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.5</real> + <real>2.0</real> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/gamma.xml b/indra/integration_tests/llimage_libtest/filters/gamma.xml new file mode 100644 index 0000000000..19af09b046 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/gamma.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>gamma</string> + <real>1.7</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/grayscale.xml b/indra/integration_tests/llimage_libtest/filters/grayscale.xml new file mode 100644 index 0000000000..984312c4fd --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/grayscale.xml @@ -0,0 +1,14 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>grayscale</string> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/heatwave.xml b/indra/integration_tests/llimage_libtest/filters/heatwave.xml new file mode 100644 index 0000000000..a99f41c833 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/heatwave.xml @@ -0,0 +1,38 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>0.8</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>fade</string> + <real>0.5</real> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>4.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>0.0</real> + <real>1.0</real> + <real>0.4</real> + <real>0.0</real> + <real>0.2</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/horizontalscreen.xml b/indra/integration_tests/llimage_libtest/filters/horizontalscreen.xml new file mode 100644 index 0000000000..21cab70e54 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/horizontalscreen.xml @@ -0,0 +1,20 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>grayscale</string> + </array> + <array> + <string>screen</string> + <string>line</string> + <real>0.015</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/julesverne.xml b/indra/integration_tests/llimage_libtest/filters/julesverne.xml new file mode 100644 index 0000000000..981e221da9 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/julesverne.xml @@ -0,0 +1,20 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>grayscale</string> + </array> + <array> + <string>screen</string> + <string>line</string> + <real>0.02</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/lensflare.xml b/indra/integration_tests/llimage_libtest/filters/lensflare.xml new file mode 100644 index 0000000000..0b5af9c82b --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/lensflare.xml @@ -0,0 +1,131 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.01</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>gradient</string> + <string>add</string> + <real>1.0</real> + <real>0.0</real> + <real>-1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>-1.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.1</real> + <real>0.1</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>1.0</real> + <real>-1.0</real> + <real>1.0</real> + <real>1.5</real> + <real>5.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.6</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>1.0</real> + <real>-1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>5.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.6</real> + <real>0.6</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + <real>0.5</real> + <real>-0.5</real> + <real>0.10</real> + <real>20.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.7</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + <real>0.6</real> + <real>-0.6</real> + <real>0.05</real> + <real>20.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.7</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + <real>0.4</real> + <real>-0.4</real> + <real>0.025</real> + <real>20.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.7</real> + <real>0.0</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/lightleak.xml b/indra/integration_tests/llimage_libtest/filters/lightleak.xml new file mode 100755 index 0000000000..6fe496506e --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/lightleak.xml @@ -0,0 +1,78 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.01</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>brighten</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>gradient</string> + <string>add</string> + <real>1.0</real> + <real>0.0</real> + <real>-1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>-1.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.1</real> + <real>0.1</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>1.0</real> + <real>-1.0</real> + <real>1.0</real> + <real>1.5</real> + <real>5.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.8</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>1.0</real> + <real>-1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>5.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.8</real> + <real>0.8</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/linearize.xml b/indra/integration_tests/llimage_libtest/filters/linearize.xml new file mode 100755 index 0000000000..23d0290e07 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/linearize.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/miniature.xml b/indra/integration_tests/llimage_libtest/filters/miniature.xml new file mode 100755 index 0000000000..9aa8a87c6f --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/miniature.xml @@ -0,0 +1,118 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.02</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>1.02</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>saturate</string> + <real>1.2</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>0.0</real> + <real>0.25</real> + <real>0.0</real> + <real>0.0</real> + <real>0.25</real> + <real>2.0</real> + </array> + <array> + <string>sharpen</string> + </array> + <array> + <string>stencil</string> + <string>gradient</string> + <string>blend</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>-1.0</real> + <real>0.0</real> + <real>-0.25</real> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>stencil</string> + <string>gradient</string> + <string>blend</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.25</real> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd>
\ No newline at end of file diff --git a/indra/integration_tests/llimage_libtest/filters/newsscreen.xml b/indra/integration_tests/llimage_libtest/filters/newsscreen.xml new file mode 100755 index 0000000000..50ed27c6db --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/newsscreen.xml @@ -0,0 +1,20 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>grayscale</string> + </array> + <array> + <string>screen</string> + <string>2Dsine</string> + <real>0.015</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/overcast.xml b/indra/integration_tests/llimage_libtest/filters/overcast.xml new file mode 100644 index 0000000000..dce5ab3e9e --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/overcast.xml @@ -0,0 +1,24 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.3</real> + <real>0.0</real> + </array> + <array> + <string>saturate</string> + <real>0.35</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/pixelate.xml b/indra/integration_tests/llimage_libtest/filters/pixelate.xml new file mode 100755 index 0000000000..f643419aa0 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/pixelate.xml @@ -0,0 +1,35 @@ +<llsd> + <array> + <array> + <string>blur</string> + </array> + <array> + <string>darken</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>0.9</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>linearize</string> + <real>0.01</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>posterize</string> + <real>4.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd>
\ No newline at end of file diff --git a/indra/integration_tests/llimage_libtest/filters/posterize.xml b/indra/integration_tests/llimage_libtest/filters/posterize.xml new file mode 100755 index 0000000000..4d03df3c66 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/posterize.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>posterize</string> + <real>10.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/rotatecolors180.xml b/indra/integration_tests/llimage_libtest/filters/rotatecolors180.xml new file mode 100644 index 0000000000..e25029720f --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/rotatecolors180.xml @@ -0,0 +1,8 @@ +<llsd> + <array> + <array> + <string>rotate</string> + <real>180.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/saturate.xml b/indra/integration_tests/llimage_libtest/filters/saturate.xml new file mode 100644 index 0000000000..b77f07a037 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/saturate.xml @@ -0,0 +1,8 @@ +<llsd> + <array> + <array> + <string>saturate</string> + <real>3.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/sepia.xml b/indra/integration_tests/llimage_libtest/filters/sepia.xml new file mode 100644 index 0000000000..0304ead015 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/sepia.xml @@ -0,0 +1,14 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>sepia</string> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/sharpen.xml b/indra/integration_tests/llimage_libtest/filters/sharpen.xml new file mode 100644 index 0000000000..6d3f9ae1a2 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/sharpen.xml @@ -0,0 +1,7 @@ +<llsd> + <array> + <array> + <string>sharpen</string> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/slantedscreen.xml b/indra/integration_tests/llimage_libtest/filters/slantedscreen.xml new file mode 100644 index 0000000000..6cd1a96185 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/slantedscreen.xml @@ -0,0 +1,20 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>grayscale</string> + </array> + <array> + <string>screen</string> + <string>line</string> + <real>0.015</real> + <real>45.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/spotlight.xml b/indra/integration_tests/llimage_libtest/filters/spotlight.xml new file mode 100644 index 0000000000..203130bdee --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/spotlight.xml @@ -0,0 +1,45 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>0.8</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>saturate</string> + <real>1.5</real> + </array> + <array> + <string>fade</string> + <real>1.0</real> + <real>0.25</real> + </array> + <array> + <string>saturate</string> + <real>0.8</real> + </array> + <array> + <string>contrast</string> + <real>1.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>brighten</string> + <real>30</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/stencilgradient.xml b/indra/integration_tests/llimage_libtest/filters/stencilgradient.xml new file mode 100644 index 0000000000..d22809a9bf --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/stencilgradient.xml @@ -0,0 +1,24 @@ +<llsd> + <array> + <array> + <string>stencil</string> + <string>gradient</string> + <string>blend</string> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>-1.0</real> + <real>0.0</real> + <real>1.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/stencilscanlines.xml b/indra/integration_tests/llimage_libtest/filters/stencilscanlines.xml new file mode 100644 index 0000000000..3ce428503d --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/stencilscanlines.xml @@ -0,0 +1,22 @@ +<llsd> + <array> + <array> + <string>stencil</string> + <string>scanlines</string> + <string>blend</string> + <real>0.0</real> + <real>0.5</real> + <real>0.1</real> + <real>45.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/stenciluniform.xml b/indra/integration_tests/llimage_libtest/filters/stenciluniform.xml new file mode 100644 index 0000000000..7d72f0ed93 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/stenciluniform.xml @@ -0,0 +1,20 @@ +<llsd> + <array> + <array> + <string>stencil</string> + <string>uniform</string> + <string>blend</string> + <real>0.0</real> + <real>0.5</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/stencilvignette.xml b/indra/integration_tests/llimage_libtest/filters/stencilvignette.xml new file mode 100644 index 0000000000..d30637fef5 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/stencilvignette.xml @@ -0,0 +1,24 @@ +<llsd> + <array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>0.0</real> + <real>0.5</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>10.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/thematrix.xml b/indra/integration_tests/llimage_libtest/filters/thematrix.xml new file mode 100755 index 0000000000..af9a5eced8 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/thematrix.xml @@ -0,0 +1,42 @@ +<llsd> + <array> + <array> + <string>grayscale</string> + </array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>posterize</string> + <real>50.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>gradient</string> + </array> + <array> + <string>screen</string> + <string>line</string> + <real>0.025</real> + <real>90.0</real> + </array> + <array> + <string>colorize</string> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.1</real> + <real>0.2</real> + <real>0.2</real> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd>
\ No newline at end of file diff --git a/indra/integration_tests/llimage_libtest/filters/toycamera.xml b/indra/integration_tests/llimage_libtest/filters/toycamera.xml new file mode 100755 index 0000000000..4e76f6b2fb --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/toycamera.xml @@ -0,0 +1,46 @@ +<llsd> + <array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>fade</string> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.2</real> + <real>3.0</real> + </array> + <array> + <string>linearize</string> + <real>0.05</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>grayscale</string> + </array> + <array> + <string>contrast</string> + <real>1.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.5</real> + <real>2.0</real> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd>
\ No newline at end of file diff --git a/indra/integration_tests/llimage_libtest/filters/verticalscreen.xml b/indra/integration_tests/llimage_libtest/filters/verticalscreen.xml new file mode 100644 index 0000000000..0768d1d7e1 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/verticalscreen.xml @@ -0,0 +1,20 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>grayscale</string> + </array> + <array> + <string>screen</string> + <string>line</string> + <real>0.015</real> + <real>90.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/video.xml b/indra/integration_tests/llimage_libtest/filters/video.xml new file mode 100755 index 0000000000..fe17f3950a --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/video.xml @@ -0,0 +1,44 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>darken</string> + <real>0.15</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>uniform</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + </array> + <array> + <string>screen</string> + <string>line</string> + <real>0.02</real> + <real>0.0</real> + </array> + <array> + <string>gamma</string> + <real>0.25</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 034c816742..3d27b4a5b5 100755 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -32,6 +32,7 @@ // Linden library includes #include "llimage.h" +#include "llimagefilter.h" #include "llimagejpeg.h" #include "llimagepng.h" #include "llimagebmp.h" @@ -39,6 +40,8 @@ #include "llimagej2c.h" #include "lldir.h" #include "lldiriterator.h" +#include "v4coloru.h" +#include "llsdserialize.h" // system libraries #include <iostream> @@ -83,6 +86,8 @@ static const char USAGE[] = "\n" " -rev, --reversible\n" " Set the compression to be lossless (reversible in j2c parlance).\n" " Only valid for output j2c images.\n" +" -f, --filter <file>\n" +" Apply the filter <file> to the input images.\n" " -log, --logmetrics <metric>\n" " Log performance data for <metric>. Results in <metric>.slp\n" " Note: so far, only ImageCompressionTester has been tested.\n" @@ -99,7 +104,7 @@ static bool sAllDone = false; // Create an empty formatted image instance of the correct type from the filename LLPointer<LLImageFormatted> create_image(const std::string &filename) { - std::string exten = gDirUtilp->getExtension(filename); + std::string exten = gDirUtilp->getExtension(filename); LLPointer<LLImageFormatted> image = LLImageFormatted::createFromExtension(exten); return image; } @@ -350,6 +355,7 @@ int main(int argc, char** argv) int blocks_size = -1; int levels = 0; bool reversible = false; + std::string filter_name = ""; // Init whatever is necessary ll_init_apr(); @@ -523,7 +529,26 @@ int main(int argc, char** argv) break; } } - else if (!strcmp(argv[arg], "--analyzeperformance") || !strcmp(argv[arg], "-a")) + else if (!strcmp(argv[arg], "--filter") || !strcmp(argv[arg], "-f")) + { + // '--filter' needs to be specified with a named filter argument + if ((arg + 1) < argc) + { + filter_name = argv[arg+1]; + } + if (((arg + 1) >= argc) || (filter_name[0] == '-')) + { + // We don't have an argument left in the arg list or the next argument is another option + std::cout << "No --filter argument given, no filter will be applied" << std::endl; + } + else + { + arg += 1; // Skip that arg now we know it's a valid test name + if ((arg + 1) == argc) // Break out of the loop if we reach the end of the arg list + break; + } + } + else if (!strcmp(argv[arg], "--analyzeperformance") || !strcmp(argv[arg], "-a")) { analyze_performance = true; } @@ -553,7 +578,10 @@ int main(int argc, char** argv) fast_timer_log_thread = new LogThread(LLFastTimer::sLogName); fast_timer_log_thread->start(); } - + + // Load the filter once and for all + LLImageFilter filter(filter_name); + // Perform action on each input file std::list<std::string>::iterator in_file = input_filenames.begin(); std::list<std::string>::iterator out_file = output_filenames.begin(); @@ -568,7 +596,10 @@ int main(int argc, char** argv) std::cout << "Error: Image " << *in_file << " could not be loaded" << std::endl; continue; } - + + // Apply the filter + filter.executeFilter(raw_image); + // Save file if (out_file != out_end) { |