summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/integration_tests/llimage_libtest/filters/1970colorize.xml (renamed from indra/integration_tests/llimage_libtest/1970colorize.xml)0
-rw-r--r--indra/integration_tests/llimage_libtest/filters/blur.xml (renamed from indra/integration_tests/llimage_libtest/blur.xml)0
-rwxr-xr-xindra/integration_tests/llimage_libtest/filters/brighten.xml (renamed from indra/integration_tests/llimage_libtest/brighten.xml)0
-rw-r--r--indra/integration_tests/llimage_libtest/filters/colorize.xml (renamed from indra/integration_tests/llimage_libtest/colorize.xml)0
-rw-r--r--indra/integration_tests/llimage_libtest/filters/contrast.xml (renamed from indra/integration_tests/llimage_libtest/contrast.xml)0
-rwxr-xr-xindra/integration_tests/llimage_libtest/filters/darken.xml (renamed from indra/integration_tests/llimage_libtest/darken.xml)0
-rw-r--r--indra/integration_tests/llimage_libtest/filters/edges.xml (renamed from indra/integration_tests/llimage_libtest/edges.xml)0
-rw-r--r--indra/integration_tests/llimage_libtest/filters/gamma.xml (renamed from indra/integration_tests/llimage_libtest/gamma.xml)0
-rw-r--r--indra/integration_tests/llimage_libtest/filters/grayscale.xml (renamed from indra/integration_tests/llimage_libtest/grayscale.xml)0
-rw-r--r--indra/integration_tests/llimage_libtest/filters/horizontalscreen.xml (renamed from indra/integration_tests/llimage_libtest/horizontalscreen.xml)9
-rwxr-xr-xindra/integration_tests/llimage_libtest/filters/linearize.xml (renamed from indra/integration_tests/llimage_libtest/linearize.xml)0
-rwxr-xr-xindra/integration_tests/llimage_libtest/filters/newsscreen.xml (renamed from indra/integration_tests/llimage_libtest/newsscreen.xml)9
-rwxr-xr-xindra/integration_tests/llimage_libtest/filters/posterize.xml11
-rw-r--r--indra/integration_tests/llimage_libtest/filters/rotatecolors180.xml (renamed from indra/integration_tests/llimage_libtest/rotatecolors180.xml)0
-rw-r--r--indra/integration_tests/llimage_libtest/filters/saturate.xml (renamed from indra/integration_tests/llimage_libtest/saturate.xml)0
-rw-r--r--indra/integration_tests/llimage_libtest/filters/sepia.xml (renamed from indra/integration_tests/llimage_libtest/sepia.xml)0
-rw-r--r--indra/integration_tests/llimage_libtest/filters/sharpen.xml (renamed from indra/integration_tests/llimage_libtest/sharpen.xml)0
-rw-r--r--indra/integration_tests/llimage_libtest/filters/slantedscreen.xml (renamed from indra/integration_tests/llimage_libtest/slantedscreen.xml)9
-rw-r--r--indra/integration_tests/llimage_libtest/filters/spotlight.xml (renamed from indra/integration_tests/llimage_libtest/spotlight.xml)0
-rw-r--r--indra/integration_tests/llimage_libtest/filters/stencilgradient.xml24
-rw-r--r--indra/integration_tests/llimage_libtest/filters/stencilscanlines.xml22
-rw-r--r--[-rwxr-xr-x]indra/integration_tests/llimage_libtest/filters/stenciluniform.xml (renamed from indra/integration_tests/llimage_libtest/posterize.xml)14
-rw-r--r--indra/integration_tests/llimage_libtest/filters/stencilvignette.xml24
-rw-r--r--indra/integration_tests/llimage_libtest/filters/verticalscreen.xml (renamed from indra/integration_tests/llimage_libtest/verticalscreen.xml)9
-rwxr-xr-xindra/integration_tests/llimage_libtest/filters/video.xml (renamed from indra/integration_tests/llimage_libtest/video.xml)0
-rwxr-xr-xindra/llimage/llimagefilter.cpp70
-rwxr-xr-xindra/llimage/llimagefilter.h4
27 files changed, 110 insertions, 95 deletions
diff --git a/indra/integration_tests/llimage_libtest/1970colorize.xml b/indra/integration_tests/llimage_libtest/filters/1970colorize.xml
index 0dab2489a0..0dab2489a0 100644
--- a/indra/integration_tests/llimage_libtest/1970colorize.xml
+++ b/indra/integration_tests/llimage_libtest/filters/1970colorize.xml
diff --git a/indra/integration_tests/llimage_libtest/blur.xml b/indra/integration_tests/llimage_libtest/filters/blur.xml
index addd056855..addd056855 100644
--- a/indra/integration_tests/llimage_libtest/blur.xml
+++ b/indra/integration_tests/llimage_libtest/filters/blur.xml
diff --git a/indra/integration_tests/llimage_libtest/brighten.xml b/indra/integration_tests/llimage_libtest/filters/brighten.xml
index 9b4232229f..9b4232229f 100755
--- a/indra/integration_tests/llimage_libtest/brighten.xml
+++ b/indra/integration_tests/llimage_libtest/filters/brighten.xml
diff --git a/indra/integration_tests/llimage_libtest/colorize.xml b/indra/integration_tests/llimage_libtest/filters/colorize.xml
index 72e58b0ffe..72e58b0ffe 100644
--- a/indra/integration_tests/llimage_libtest/colorize.xml
+++ b/indra/integration_tests/llimage_libtest/filters/colorize.xml
diff --git a/indra/integration_tests/llimage_libtest/contrast.xml b/indra/integration_tests/llimage_libtest/filters/contrast.xml
index 00746b8a9e..00746b8a9e 100644
--- a/indra/integration_tests/llimage_libtest/contrast.xml
+++ b/indra/integration_tests/llimage_libtest/filters/contrast.xml
diff --git a/indra/integration_tests/llimage_libtest/darken.xml b/indra/integration_tests/llimage_libtest/filters/darken.xml
index 5cec3589b6..5cec3589b6 100755
--- a/indra/integration_tests/llimage_libtest/darken.xml
+++ b/indra/integration_tests/llimage_libtest/filters/darken.xml
diff --git a/indra/integration_tests/llimage_libtest/edges.xml b/indra/integration_tests/llimage_libtest/filters/edges.xml
index a66b81d01e..a66b81d01e 100644
--- a/indra/integration_tests/llimage_libtest/edges.xml
+++ b/indra/integration_tests/llimage_libtest/filters/edges.xml
diff --git a/indra/integration_tests/llimage_libtest/gamma.xml b/indra/integration_tests/llimage_libtest/filters/gamma.xml
index 19af09b046..19af09b046 100644
--- a/indra/integration_tests/llimage_libtest/gamma.xml
+++ b/indra/integration_tests/llimage_libtest/filters/gamma.xml
diff --git a/indra/integration_tests/llimage_libtest/grayscale.xml b/indra/integration_tests/llimage_libtest/filters/grayscale.xml
index 984312c4fd..984312c4fd 100644
--- a/indra/integration_tests/llimage_libtest/grayscale.xml
+++ b/indra/integration_tests/llimage_libtest/filters/grayscale.xml
diff --git a/indra/integration_tests/llimage_libtest/horizontalscreen.xml b/indra/integration_tests/llimage_libtest/filters/horizontalscreen.xml
index ddff4d1977..21cab70e54 100644
--- a/indra/integration_tests/llimage_libtest/horizontalscreen.xml
+++ b/indra/integration_tests/llimage_libtest/filters/horizontalscreen.xml
@@ -2,7 +2,7 @@
<array>
<array>
<string>linearize</string>
- <real>0.1</real>
+ <real>0.0</real>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
@@ -11,14 +11,9 @@
<string>grayscale</string>
</array>
<array>
- <string>blend</string>
- <real>0.0</real>
- <real>0.0</real>
- </array>
- <array>
<string>screen</string>
<string>line</string>
- <real>5.0</real>
+ <real>0.015</real>
<real>0.0</real>
</array>
</array>
diff --git a/indra/integration_tests/llimage_libtest/linearize.xml b/indra/integration_tests/llimage_libtest/filters/linearize.xml
index 23d0290e07..23d0290e07 100755
--- a/indra/integration_tests/llimage_libtest/linearize.xml
+++ b/indra/integration_tests/llimage_libtest/filters/linearize.xml
diff --git a/indra/integration_tests/llimage_libtest/newsscreen.xml b/indra/integration_tests/llimage_libtest/filters/newsscreen.xml
index 8247c34500..50ed27c6db 100755
--- a/indra/integration_tests/llimage_libtest/newsscreen.xml
+++ b/indra/integration_tests/llimage_libtest/filters/newsscreen.xml
@@ -2,7 +2,7 @@
<array>
<array>
<string>linearize</string>
- <real>0.1</real>
+ <real>0.0</real>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
@@ -11,14 +11,9 @@
<string>grayscale</string>
</array>
<array>
- <string>blend</string>
- <real>0.0</real>
- <real>0.0</real>
- </array>
- <array>
<string>screen</string>
<string>2Dsine</string>
- <real>5.0</real>
+ <real>0.015</real>
<real>0.0</real>
</array>
</array>
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/rotatecolors180.xml b/indra/integration_tests/llimage_libtest/filters/rotatecolors180.xml
index e25029720f..e25029720f 100644
--- a/indra/integration_tests/llimage_libtest/rotatecolors180.xml
+++ b/indra/integration_tests/llimage_libtest/filters/rotatecolors180.xml
diff --git a/indra/integration_tests/llimage_libtest/saturate.xml b/indra/integration_tests/llimage_libtest/filters/saturate.xml
index b77f07a037..b77f07a037 100644
--- a/indra/integration_tests/llimage_libtest/saturate.xml
+++ b/indra/integration_tests/llimage_libtest/filters/saturate.xml
diff --git a/indra/integration_tests/llimage_libtest/sepia.xml b/indra/integration_tests/llimage_libtest/filters/sepia.xml
index 0304ead015..0304ead015 100644
--- a/indra/integration_tests/llimage_libtest/sepia.xml
+++ b/indra/integration_tests/llimage_libtest/filters/sepia.xml
diff --git a/indra/integration_tests/llimage_libtest/sharpen.xml b/indra/integration_tests/llimage_libtest/filters/sharpen.xml
index 6d3f9ae1a2..6d3f9ae1a2 100644
--- a/indra/integration_tests/llimage_libtest/sharpen.xml
+++ b/indra/integration_tests/llimage_libtest/filters/sharpen.xml
diff --git a/indra/integration_tests/llimage_libtest/slantedscreen.xml b/indra/integration_tests/llimage_libtest/filters/slantedscreen.xml
index 63ad01d51d..6cd1a96185 100644
--- a/indra/integration_tests/llimage_libtest/slantedscreen.xml
+++ b/indra/integration_tests/llimage_libtest/filters/slantedscreen.xml
@@ -2,7 +2,7 @@
<array>
<array>
<string>linearize</string>
- <real>0.1</real>
+ <real>0.0</real>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
@@ -11,14 +11,9 @@
<string>grayscale</string>
</array>
<array>
- <string>blend</string>
- <real>0.0</real>
- <real>0.0</real>
- </array>
- <array>
<string>screen</string>
<string>line</string>
- <real>5.0</real>
+ <real>0.015</real>
<real>45.0</real>
</array>
</array>
diff --git a/indra/integration_tests/llimage_libtest/spotlight.xml b/indra/integration_tests/llimage_libtest/filters/spotlight.xml
index 203130bdee..203130bdee 100644
--- a/indra/integration_tests/llimage_libtest/spotlight.xml
+++ b/indra/integration_tests/llimage_libtest/filters/spotlight.xml
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/posterize.xml b/indra/integration_tests/llimage_libtest/filters/stenciluniform.xml
index f026278f9e..7d72f0ed93 100755..100644
--- a/indra/integration_tests/llimage_libtest/posterize.xml
+++ b/indra/integration_tests/llimage_libtest/filters/stenciluniform.xml
@@ -1,15 +1,17 @@
<llsd>
<array>
<array>
- <string>linearize</string>
+ <string>stencil</string>
+ <string>uniform</string>
+ <string>blend</string>
<real>0.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
+ <real>0.5</real>
</array>
<array>
- <string>posterize</string>
- <real>10.0</real>
+ <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>
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/verticalscreen.xml b/indra/integration_tests/llimage_libtest/filters/verticalscreen.xml
index 71e48df656..0768d1d7e1 100644
--- a/indra/integration_tests/llimage_libtest/verticalscreen.xml
+++ b/indra/integration_tests/llimage_libtest/filters/verticalscreen.xml
@@ -2,7 +2,7 @@
<array>
<array>
<string>linearize</string>
- <real>0.1</real>
+ <real>0.0</real>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
@@ -11,14 +11,9 @@
<string>grayscale</string>
</array>
<array>
- <string>blend</string>
- <real>0.0</real>
- <real>0.0</real>
- </array>
- <array>
<string>screen</string>
<string>line</string>
- <real>5.0</real>
+ <real>0.015</real>
<real>90.0</real>
</array>
</array>
diff --git a/indra/integration_tests/llimage_libtest/video.xml b/indra/integration_tests/llimage_libtest/filters/video.xml
index 8b10687ef5..8b10687ef5 100755
--- a/indra/integration_tests/llimage_libtest/video.xml
+++ b/indra/integration_tests/llimage_libtest/filters/video.xml
diff --git a/indra/llimage/llimagefilter.cpp b/indra/llimage/llimagefilter.cpp
index c02679e04f..4c6dd2faee 100755
--- a/indra/llimage/llimagefilter.cpp
+++ b/indra/llimage/llimagefilter.cpp
@@ -1,6 +1,6 @@
/**
* @file llimagefilter.cpp
- * @brief Simple Image Filtering.
+ * @brief Simple Image Filtering. See https://wiki.lindenlab.com/wiki/SL_Viewer_Image_Filters for complete documentation.
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -75,42 +75,12 @@ LLImageFilter::~LLImageFilter()
/*
*TODO
- * Test blend modes
+ * Rename stencil to mask
+ * Test blend modes and name them correctly
+ * Suppress old "blend", "fade" and "lines" stencil definition. Change all xml accordingly.
* Improve perf: use LUT for alpha blending in uniform case
* Improve perf: make sure filter is not called more than necessary in viewer (seems to be called 3 times per change)
- * Make filter definition resolution independent (do not use pixel size anywhere)
* Add gradient coloring as a filter
-
- params:
- * vignette : center_x, center_y, width, feather
- * scan lines : wavelength, angle
- * uniform
- * gradient : start_x, start_y, end_x, end_y
-
- * Document all the admissible names in the wiki
-
- " Apply the filter <name> to the input images using the optional <param> value. Admissible names:\n"
- " - 'grayscale' converts to grayscale (no param).\n"
- " - 'sepia' converts to sepia (no param).\n"
- " - 'saturate' changes color saturation according to <param>: < 1.0 will desaturate, > 1.0 will saturate.\n"
- " - 'rotate' rotates the color hue according to <param> (in degree, positive value only).\n"
-
- " - 'gamma' applies a gamma curve <param> to all channels: > 1.0 will darken, < 1.0 will lighten.\n"
- " - 'colorize' applies a colored tint <param1, param2, param3> to the image.\n"
- " - 'contrast' modifies the contrast according to <param> : > 1.0 will enhance the contrast, <1.0 will flatten it.\n"
- " - 'brighten' adds <param> light to the image (<param> between 0 and 255).\n"
- " - 'darken' substracts <param> light to the image (<param> between 0 and 255).\n"
- " - 'linearize' optimizes the contrast using the brightness histogram. <param> is the fraction (between 0.0 and 1.0) of the discarded head and tail of the histogram.\n"
- " - 'posterize' redistributes the colors between <param> classes per channel (<param> between 2 and 255).\n"
-
- " - 'screen' applies a screening filter to the red channel and output to black and white. This filter assumes that the input image has been converted to grayscale or that the red channel is somewhat meaningful. It takes 3 parameters: a mode, a wave length and an angle. Modes are:\n"
- " - '2Dsine' applies a bidirectional (x,y) sine screen. <angle> has no influence on that mode.\n"
- " - 'line' applies a linear sine screen. <angle> is the line generator angle with the horizontal.\n"
- " <wave_length> is size between 2 peaks of the sine function in normalized image coordinates."
-
- " Apply a circular central vignette <name> to the filter using the optional <feather> and <min> values. Admissible names:\n"
- " - 'blend' : the filter is applied with full intensity in the center and blends with the image to the periphery.\n"
- " - 'fade' : the filter is applied with full intensity in the center and fades to black to the periphery.\n"
*/
//============================================================================
@@ -133,25 +103,6 @@ void LLImageFilter::executeFilter(LLPointer<LLImageRaw> raw_image)
//}
//std::cout << std::endl;
- // Execute the filter described on this line
- /*
- <array>
- <string>stencil</string>
- <string>shape</string> uniform / gradient / vignette / scanlines
- <string>blend_mode</string> blend /add /dodge / fade
- <real>min</real> -1.0 to 1.0 (mandatory though ignored for uniform shape)
- <real>max</real> -1.0 to 1.0 (value for uniform)
- <real>param1</real>
- <real>param2</real>
- <real>param3</real>
- <real>param4</real>
- </array>
- params:
- * vignette : center_x, center_y, width, feather : positions between in float (0.0 is center, 1.0 is top), width in float in same unit, feather is a float
- * scan lines : wavelength, angle : wavelength in float assuming (height/2 = 1), angle float in degree
- * uniform : all parameters ignored
- * gradient : start_x, start_y, end_x, end_y : position in float (0.0 is center, 1.0 is top)
- */
if (filter_name == "stencil")
{
// Get the shape of the stencil, that is how the procedural alpha is computed geometrically
@@ -279,7 +230,7 @@ void LLImageFilter::executeFilter(LLPointer<LLImageRaw> raw_image)
{
mode = SCREEN_MODE_LINE;
}
- filterScreen(mode,(S32)(mFilterData[i][2].asReal()),(F32)(mFilterData[i][3].asReal()));
+ filterScreen(mode,(F32)(mFilterData[i][2].asReal()),(F32)(mFilterData[i][3].asReal()));
}
else if (filter_name == "blur")
{
@@ -445,7 +396,7 @@ void LLImageFilter::convolve(const LLMatrix3 &kernel, bool normalize, bool abs_v
// All other lines
for (S32 j = 1; j < (height-1); j++)
{
- // We need to buffer 2 lines. We flip north and current to avoid moving too much memory around
+ // We need to buffer 2 lines. We flip north and east-west (current) to avoid moving too much memory around
if (j % 2)
{
memcpy( &odd_buffer[0], dst_data, buffer_size ); /* Flawfinder: ignore */
@@ -460,6 +411,7 @@ void LLImageFilter::convolve(const LLMatrix3 &kernel, bool normalize, bool abs_v
}
// First pixel : set to 0
blendStencil(getStencilAlpha(0,j), dst_data, 0, 0, 0);
+ dst_data += components;
// Set pointers to kernel
U8* NW = north_data;
U8* N = NW+components;
@@ -470,7 +422,6 @@ void LLImageFilter::convolve(const LLMatrix3 &kernel, bool normalize, bool abs_v
U8* SW = south_data;
U8* S = SW+components;
U8* SE = S+components;
- dst_data += components;
// All other pixels
for (S32 i = 1; i < (width-1); i++)
{
@@ -528,7 +479,7 @@ void LLImageFilter::convolve(const LLMatrix3 &kernel, bool normalize, bool abs_v
}
}
-void LLImageFilter::filterScreen(EScreenMode mode, const S32 wave_length, const F32 angle)
+void LLImageFilter::filterScreen(EScreenMode mode, const F32 wave_length, const F32 angle)
{
const S32 components = mImage->getComponents();
llassert( components >= 1 && components <= 4 );
@@ -536,6 +487,7 @@ void LLImageFilter::filterScreen(EScreenMode mode, const S32 wave_length, const
S32 width = mImage->getWidth();
S32 height = mImage->getHeight();
+ F32 wave_length_pixels = wave_length * (F32)(height) / 2.0;
F32 sin = sinf(angle*DEG_TO_RAD);
F32 cos = cosf(angle*DEG_TO_RAD);
@@ -550,11 +502,11 @@ void LLImageFilter::filterScreen(EScreenMode mode, const S32 wave_length, const
switch (mode)
{
case SCREEN_MODE_2DSINE:
- value = (sinf(2*F_PI*i/wave_length)*sinf(2*F_PI*j/wave_length)+1.0)*255.0/2.0;
+ value = (sinf(2*F_PI*i/wave_length_pixels)*sinf(2*F_PI*j/wave_length_pixels)+1.0)*255.0/2.0;
break;
case SCREEN_MODE_LINE:
d = sin*i - cos*j;
- value = (sinf(2*F_PI*d/wave_length)+1.0)*255.0/2.0;
+ value = (sinf(2*F_PI*d/wave_length_pixels)+1.0)*255.0/2.0;
break;
}
U8 dst_value = (dst_data[VRED] >= (U8)(value) ? 255 : 0);
diff --git a/indra/llimage/llimagefilter.h b/indra/llimage/llimagefilter.h
index 3e3be3d88b..e392d3215e 100755
--- a/indra/llimage/llimagefilter.h
+++ b/indra/llimage/llimagefilter.h
@@ -1,6 +1,6 @@
/**
* @file llimagefilter.h
- * @brief Simple Image Filtering.
+ * @brief Simple Image Filtering. See https://wiki.lindenlab.com/wiki/SL_Viewer_Image_Filters for complete documentation.
*
* $LicenseInfo:firstyear=2000&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -89,7 +89,7 @@ private:
// Filter Primitives
void colorTransform(const LLMatrix3 &transform);
void colorCorrect(const U8* lut_red, const U8* lut_green, const U8* lut_blue);
- void filterScreen(EScreenMode mode, const S32 wave_length, const F32 angle);
+ void filterScreen(EScreenMode mode, const F32 wave_length, const F32 angle);
void blendStencil(F32 alpha, U8* pixel, U8 red, U8 green, U8 blue);
void convolve(const LLMatrix3 &kernel, bool normalize, bool abs_value);