This class implements a test for the frame blender class.
More...
#include <TestFrameBlender.h>
|
static bool | test (const double testDuration, Worker &worker) |
| Tests the frame blender functions.
|
|
static bool | testConstantAlpha (const double testDuration, Worker &worker) |
| Tests the blending two images with constant alpha value.
|
|
template<bool tTransparentIs0xFF> |
static bool | testSeparateAlphaChannel (const double testDuration, Worker &worker) |
| Tests the blending two images with a separate alpha channel.
|
|
template<bool tTransparentIs0xFF> |
static bool | testBlend (const double testDuration, Worker &worker) |
| Tests the blend function with alpha channel at the front or at the back.
|
|
template<bool tTransparentIs0xFF> |
static bool | testBlendWithConstantValue (const double testDuration, Worker &worker) |
| Tests the blend function with constant value.
|
|
|
template<bool tTransparentIs0xFF> |
static bool | testSeparateAlphaChannelSubFrame (const double testDuration, Worker &worker) |
| Tests the blending two images with a separate alpha channel.
|
|
template<bool tTransparentIs0xFF> |
static bool | testSeparateAlphaChannelFullFrame (const double testDuration, Worker &worker) |
| Tests the blending two images with a separate alpha channel.
|
|
template<bool tTransparentIs0xFF> |
static bool | testSubFrame (const FrameType::PixelFormat sourcePixelFormat, const FrameType::PixelFormat targetPixelFormat, const unsigned int targetWidth, const unsigned int targetHeight, const double testDuration, Worker &worker) |
| Tests the sub-region transparent blend function.
|
|
template<bool tTransparentIs0xFF> |
static bool | testFullFrame (const FrameType::PixelFormat sourcePixelFormat, const FrameType::PixelFormat targetPixelFormat, const unsigned int width, const unsigned int height, const double testDuration, Worker &worker) |
| Tests the transparent blend function.
|
|
template<bool tTransparentIs0xFF> |
static bool | validateBlendResult (const Frame &sourceWithAlpha, const Frame &target, const Frame &blendResult, const unsigned int sourceLeft, const unsigned int sourceTop, const unsigned int targetLeft, const unsigned int targetTop, const unsigned int width, const unsigned int height) |
| Validates the blend function with alpha channel.
|
|
This class implements a test for the frame blender class.
◆ test()
static bool Ocean::Test::TestCV::TestFrameBlender::test |
( |
const double |
testDuration, |
|
|
Worker & |
worker |
|
) |
| |
|
static |
Tests the frame blender functions.
- Parameters
-
testDuration | Test duration in seconds, with range (0, infinity) |
worker | The worker object to distribute the computation |
- Returns
- True, if this test succeeded
◆ testBlend()
template<bool tTransparentIs0xFF>
static bool Ocean::Test::TestCV::TestFrameBlender::testBlend |
( |
const double |
testDuration, |
|
|
Worker & |
worker |
|
) |
| |
|
static |
Tests the blend function with alpha channel at the front or at the back.
- Parameters
-
testDuration | Test duration in seconds, with range (0, infinity) |
worker | The worker object to distribute the computation |
- Returns
- True, if this test succeeded
- Template Parameters
-
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent value; False, if 0x00 is interpreted as fully transparent |
◆ testBlendWithConstantValue()
template<bool tTransparentIs0xFF>
static bool Ocean::Test::TestCV::TestFrameBlender::testBlendWithConstantValue |
( |
const double |
testDuration, |
|
|
Worker & |
worker |
|
) |
| |
|
static |
Tests the blend function with constant value.
- Parameters
-
testDuration | Test duration in seconds, with range (0, infinity) |
worker | The worker object to distribute the computation |
- Returns
- True, if this test succeeded
- Template Parameters
-
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent value; False, if 0x00 is interpreted as fully transparent |
◆ testConstantAlpha()
static bool Ocean::Test::TestCV::TestFrameBlender::testConstantAlpha |
( |
const double |
testDuration, |
|
|
Worker & |
worker |
|
) |
| |
|
static |
Tests the blending two images with constant alpha value.
- Parameters
-
testDuration | Test duration in seconds, with range (0, infinity) |
worker | The worker object to distribute the computation |
- Returns
- True, if this test succeeded
◆ testFullFrame()
template<bool tTransparentIs0xFF>
static bool Ocean::Test::TestCV::TestFrameBlender::testFullFrame |
( |
const FrameType::PixelFormat |
sourcePixelFormat, |
|
|
const FrameType::PixelFormat |
targetPixelFormat, |
|
|
const unsigned int |
width, |
|
|
const unsigned int |
height, |
|
|
const double |
testDuration, |
|
|
Worker & |
worker |
|
) |
| |
|
staticprotected |
Tests the transparent blend function.
- Parameters
-
sourcePixelFormat | Source pixel format |
targetPixelFormat | Target pixel format |
width | The width of the test frame in pixel |
height | The height of the test frame in pixel |
testDuration | Test duration in seconds, with range (0, infinity) |
worker | The worker object to distribute the computation |
- Returns
- True, if this test succeeded
- Template Parameters
-
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent value; False, if 0x00 is interpreted as fully transparent |
◆ testSeparateAlphaChannel()
template<bool tTransparentIs0xFF>
static bool Ocean::Test::TestCV::TestFrameBlender::testSeparateAlphaChannel |
( |
const double |
testDuration, |
|
|
Worker & |
worker |
|
) |
| |
|
static |
Tests the blending two images with a separate alpha channel.
- Parameters
-
testDuration | Test duration in seconds, with range (0, infinity) |
worker | The worker object to distribute the computation |
- Returns
- True, if this test succeeded
- Template Parameters
-
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent value; False, if 0x00 is interpreted as fully transparent |
◆ testSeparateAlphaChannelFullFrame()
template<bool tTransparentIs0xFF>
static bool Ocean::Test::TestCV::TestFrameBlender::testSeparateAlphaChannelFullFrame |
( |
const double |
testDuration, |
|
|
Worker & |
worker |
|
) |
| |
|
staticprotected |
Tests the blending two images with a separate alpha channel.
- Parameters
-
testDuration | Test duration in seconds, with range (0, infinity) |
worker | The worker object to distribute the computation |
- Returns
- True, if this test succeeded
- Template Parameters
-
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent value; False, if 0x00 is interpreted as fully transparent |
◆ testSeparateAlphaChannelSubFrame()
template<bool tTransparentIs0xFF>
static bool Ocean::Test::TestCV::TestFrameBlender::testSeparateAlphaChannelSubFrame |
( |
const double |
testDuration, |
|
|
Worker & |
worker |
|
) |
| |
|
staticprotected |
Tests the blending two images with a separate alpha channel.
- Parameters
-
testDuration | Test duration in seconds, with range (0, infinity) |
worker | The worker object to distribute the computation |
- Returns
- True, if this test succeeded
- Template Parameters
-
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent value; False, if 0x00 is interpreted as fully transparent |
◆ testSubFrame()
template<bool tTransparentIs0xFF>
static bool Ocean::Test::TestCV::TestFrameBlender::testSubFrame |
( |
const FrameType::PixelFormat |
sourcePixelFormat, |
|
|
const FrameType::PixelFormat |
targetPixelFormat, |
|
|
const unsigned int |
targetWidth, |
|
|
const unsigned int |
targetHeight, |
|
|
const double |
testDuration, |
|
|
Worker & |
worker |
|
) |
| |
|
staticprotected |
Tests the sub-region transparent blend function.
- Parameters
-
sourcePixelFormat | Source pixel format |
targetPixelFormat | Target pixel format |
targetWidth | Width of the target test frame in pixel |
targetHeight | Height of the target test frame in pixel |
testDuration | Test duration in seconds, with range (0, infinity) |
worker | The worker object to distribute the computation |
- Returns
- True, if this test succeeded
- Template Parameters
-
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent value; False, if 0x00 is interpreted as fully transparent |
◆ validateBlendResult()
template<bool tTransparentIs0xFF>
static bool Ocean::Test::TestCV::TestFrameBlender::validateBlendResult |
( |
const Frame & |
sourceWithAlpha, |
|
|
const Frame & |
target, |
|
|
const Frame & |
blendResult, |
|
|
const unsigned int |
sourceLeft, |
|
|
const unsigned int |
sourceTop, |
|
|
const unsigned int |
targetLeft, |
|
|
const unsigned int |
targetTop, |
|
|
const unsigned int |
width, |
|
|
const unsigned int |
height |
|
) |
| |
|
staticprotected |
Validates the blend function with alpha channel.
- Parameters
-
sourceWithAlpha | The source frame with alpha channel, must be valid |
target | The target frame, must be valid |
blendResult | The blend result, must be valid |
sourceLeft | Horizontal start position inside the source frame, with range [0, sourceWithAlpha.width() - 1] |
sourceTop | Vertical start position inside the source frame, with range [0, sourceWithAlpha.height() - 1] |
targetLeft | Horizontal start position inside the target frame, with range [0, target.width() - 1] |
targetTop | Vertical start position inside the target frame, with range [0, target.height() - 1] |
width | The width of the blending sub-region in pixel, with range [1, min(sourceWithAlpha.width() - sourceLeft, target.width() - targetLeft)] |
height | The height of the blending sub-region in pixel, with range [1, min(sourceWithAlpha.height() - sourceTop, target.height() - targetTop)] |
- Returns
- True, if succeeded
- Template Parameters
-
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent value; False, if 0x00 is interpreted as fully transparent |
The documentation for this class was generated from the following file: