Ocean
Loading...
Searching...
No Matches
Ocean::Test::TestCV::TestFrameBlender Class Reference

This class implements a test for the frame blender class. More...

#include <TestFrameBlender.h>

Static Public Member Functions

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.
 

Static Protected Member Functions

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.
 

Detailed Description

This class implements a test for the frame blender class.

Member Function Documentation

◆ test()

static bool Ocean::Test::TestCV::TestFrameBlender::test ( const double  testDuration,
Worker worker 
)
static

Tests the frame blender functions.

Parameters
testDurationTest duration in seconds, with range (0, infinity)
workerThe 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
testDurationTest duration in seconds, with range (0, infinity)
workerThe worker object to distribute the computation
Returns
True, if this test succeeded
Template Parameters
tTransparentIs0xFFTrue, 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
testDurationTest duration in seconds, with range (0, infinity)
workerThe worker object to distribute the computation
Returns
True, if this test succeeded
Template Parameters
tTransparentIs0xFFTrue, 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
testDurationTest duration in seconds, with range (0, infinity)
workerThe 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
sourcePixelFormatSource pixel format
targetPixelFormatTarget pixel format
widthThe width of the test frame in pixel
heightThe height of the test frame in pixel
testDurationTest duration in seconds, with range (0, infinity)
workerThe worker object to distribute the computation
Returns
True, if this test succeeded
Template Parameters
tTransparentIs0xFFTrue, 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
testDurationTest duration in seconds, with range (0, infinity)
workerThe worker object to distribute the computation
Returns
True, if this test succeeded
Template Parameters
tTransparentIs0xFFTrue, 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
testDurationTest duration in seconds, with range (0, infinity)
workerThe worker object to distribute the computation
Returns
True, if this test succeeded
Template Parameters
tTransparentIs0xFFTrue, 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
testDurationTest duration in seconds, with range (0, infinity)
workerThe worker object to distribute the computation
Returns
True, if this test succeeded
Template Parameters
tTransparentIs0xFFTrue, 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
sourcePixelFormatSource pixel format
targetPixelFormatTarget pixel format
targetWidthWidth of the target test frame in pixel
targetHeightHeight of the target test frame in pixel
testDurationTest duration in seconds, with range (0, infinity)
workerThe worker object to distribute the computation
Returns
True, if this test succeeded
Template Parameters
tTransparentIs0xFFTrue, 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
sourceWithAlphaThe source frame with alpha channel, must be valid
targetThe target frame, must be valid
blendResultThe blend result, must be valid
sourceLeftHorizontal start position inside the source frame, with range [0, sourceWithAlpha.width() - 1]
sourceTopVertical start position inside the source frame, with range [0, sourceWithAlpha.height() - 1]
targetLeftHorizontal start position inside the target frame, with range [0, target.width() - 1]
targetTopVertical start position inside the target frame, with range [0, target.height() - 1]
widthThe width of the blending sub-region in pixel, with range [1, min(sourceWithAlpha.width() - sourceLeft, target.width() - targetLeft)]
heightThe height of the blending sub-region in pixel, with range [1, min(sourceWithAlpha.height() - sourceTop, target.height() - targetTop)]
Returns
True, if succeeded
Template Parameters
tTransparentIs0xFFTrue, 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: