Dali 3D User Interface Engine
Functions
anonymous_namespace{utc-Dali-ImageOperations.cpp} Namespace Reference

Functions

uint32_t RandomInRange (uint32_t max)
 Generate a random integer between zero and the parameter passed in. More...
 
uint32_t RandomComponent8 ()
 Random number representable in an 8 bit color component. More...
 
uint32_t RandomComponent5 ()
 Random number representable in a 5 bit color component. More...
 
uint32_t RandomComponent6 ()
 Random number representable in a 6 bit color component. More...
 
uint32_t PixelRGBA8888 (uint32_t r, uint32_t g, uint32_t b, uint32_t a)
 RGBA8888 Pixels from separate color components. More...
 
uint16_t PixelRGB565 (uint32_t r, uint32_t g, uint32_t b)
 RGB565 Pixels from color components in the low bits of passed-in words. More...
 
uint32_t RandomPixelRGBA8888 ()
 RGBA8888 Pixels with random color components. More...
 
uint32_t HashPixels (const uint32_t *const pixels, unsigned int numPixels)
 Return a hash over a set of pixels. More...
 
void SetupScanlineForHalvingTestsRGBA8888 (size_t scanlineLength, Dali::Vector< uint32_t > &scanline, Dali::Vector< uint32_t > &reference)
 Build some dummy scanlines to exercise scanline averaging code on. More...
 
void SetupScanlineForHalvingTestsRGB565 (size_t scanlineLength, Dali::Vector< uint16_t > &scanline, Dali::Vector< uint16_t > &reference)
 Build some dummy scanlines to exercise scanline averaging code on. More...
 
void SetupScanlineForHalvingTests2Bytes (size_t scanlineLength, Dali::Vector< uint8_t > &scanline, Dali::Vector< uint8_t > &reference)
 Build some dummy scanlines to exercise scanline averaging code on. More...
 
void SetupScanlineForHalvingTests1Byte (size_t scanlineLength, Dali::Vector< uint8_t > &scanline, Dali::Vector< uint8_t > &reference)
 Build some dummy 1 byte per pixel scanlines to exercise scanline averaging code on. More...
 
void SetupScanlinesRGBA8888 (size_t scanlineLength, Dali::Vector< uint32_t > &scanline1, Dali::Vector< uint32_t > &scanline2, Dali::Vector< uint32_t > &reference, Dali::Vector< uint32_t > &output)
 Build some dummy scanlines to exercise vertical averaging code on. More...
 
void MatchScanlinesRGBA8888 (Dali::Vector< uint32_t > &reference, Dali::Vector< uint32_t > &output, size_t &numMatches, const char *const location)
 Compares a scanline of interest to a reference, testing each pixel is the same. More...
 
void MakeSingleColorImageRGBA8888 (unsigned int width, unsigned int height, uint32_t *inputImage)
 
void MakeGuardedOutputImageRGBA8888 (unsigned int desiredWidth, unsigned int desiredHeight, uint32_t *&outputBuffer, uint32_t *&outputImage)
 Allocate an image buffer with protected pages to top and tail it and SEGV if an operation strays into them. More...
 
uint32_t * AllocateReadOnlyPagesRGBA (unsigned int numPixels)
 Allocate a buffer of pages that are read-only, that is big enough for the number of pixels passed-in. More...
 
void FreeReadOnlyPagesRGBA (uint32_t *pages, unsigned int numPixels)
 Free a buffer of pages that are read-only. More...
 
Dali::IntrusivePtr
< Dali::RefCountedVector
< uint32_t > > 
MakeCheckerboardImageRGBA8888 (unsigned int width, unsigned int height, unsigned int checkerSize)
 

Function Documentation

uint32_t* anonymous_namespace{utc-Dali-ImageOperations.cpp}::AllocateReadOnlyPagesRGBA ( unsigned int  numPixels)

Allocate a buffer of pages that are read-only, that is big enough for the number of pixels passed-in.

Definition at line 1121 of file utc-Dali-ImageOperations.cpp.

Referenced by UtcDaliImageOperationsPointSampleRGBA888ScaleToZeroDims().

Here is the caller graph for this function:

void anonymous_namespace{utc-Dali-ImageOperations.cpp}::FreeReadOnlyPagesRGBA ( uint32_t *  pages,
unsigned int  numPixels 
)
uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::HashPixels ( const uint32_t *const  pixels,
unsigned int  numPixels 
)
inline

Return a hash over a set of pixels.

Used to check a buffer of pixels is unmodified by an operation given inputs that should mean that it is not changed.

Definition at line 94 of file utc-Dali-ImageOperations.cpp.

Referenced by UtcDaliImageOperationsDownscaleInPlacePow2RGBA8888Nops().

Here is the caller graph for this function:

Dali::IntrusivePtr<Dali::RefCountedVector<uint32_t> > anonymous_namespace{utc-Dali-ImageOperations.cpp}::MakeCheckerboardImageRGBA8888 ( unsigned int  width,
unsigned int  height,
unsigned int  checkerSize 
)

Definition at line 1146 of file utc-Dali-ImageOperations.cpp.

References height, and width.

Referenced by UtcDaliImageOperationsPointSampleCheckerboardRGBA888().

Here is the caller graph for this function:

void anonymous_namespace{utc-Dali-ImageOperations.cpp}::MakeGuardedOutputImageRGBA8888 ( unsigned int  desiredWidth,
unsigned int  desiredHeight,
uint32_t *&  outputBuffer,
uint32_t *&  outputImage 
)

Allocate an image buffer with protected pages to top and tail it and SEGV if an operation strays into them.

Definition at line 1109 of file utc-Dali-ImageOperations.cpp.

Referenced by UtcDaliImageOperationsPointSampleRGB88InBounds(), UtcDaliImageOperationsPointSampleRGBA888InBounds(), and UtcDaliImageOperationsPointSampleRGBA888PixelsCorrectColor().

Here is the caller graph for this function:

void anonymous_namespace{utc-Dali-ImageOperations.cpp}::MakeSingleColorImageRGBA8888 ( unsigned int  width,
unsigned int  height,
uint32_t *  inputImage 
)

Definition at line 1096 of file utc-Dali-ImageOperations.cpp.

References height, and PixelRGBA8888().

Referenced by UtcDaliImageOperationsPointSampleRGBA888PixelsCorrectColor(), UtcDaliImageOperationsPointSampleRGBA888ScaleToSinglePixel(), and UtcDaliImageOperationsPointSampleRGBA888ScaleToZeroDims().

Here is the call graph for this function:

Here is the caller graph for this function:

void anonymous_namespace{utc-Dali-ImageOperations.cpp}::MatchScanlinesRGBA8888 ( Dali::Vector< uint32_t > &  reference,
Dali::Vector< uint32_t > &  output,
size_t &  numMatches,
const char *const  location 
)

Compares a scanline of interest to a reference, testing each pixel is the same.

Definition at line 286 of file utc-Dali-ImageOperations.cpp.

References Dali::VectorBase::Capacity(), and DALI_TEST_EQUALS().

Referenced by UtcDaliImageOperationsAverageScanlines1(), UtcDaliImageOperationsAverageScanlines2(), UtcDaliImageOperationsAverageScanlines3(), and UtcDaliImageOperationsAverageScanlinesRGBA8888().

Here is the call graph for this function:

Here is the caller graph for this function:

uint16_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::PixelRGB565 ( uint32_t  r,
uint32_t  g,
uint32_t  b 
)
inline

RGB565 Pixels from color components in the low bits of passed-in words.

Definition at line 74 of file utc-Dali-ImageOperations.cpp.

uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::PixelRGBA8888 ( uint32_t  r,
uint32_t  g,
uint32_t  b,
uint32_t  a 
)
inline

RGBA8888 Pixels from separate color components.

Definition at line 66 of file utc-Dali-ImageOperations.cpp.

References a.

Referenced by MakeSingleColorImageRGBA8888(), RandomPixelRGBA8888(), SetupScanlineForHalvingTestsRGBA8888(), and SetupScanlinesRGBA8888().

Here is the caller graph for this function:

uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::RandomComponent5 ( )
inline

Random number representable in a 5 bit color component.

Definition at line 50 of file utc-Dali-ImageOperations.cpp.

References RandomInRange().

Referenced by SetupScanlineForHalvingTestsRGB565().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::RandomComponent6 ( )
inline

Random number representable in a 6 bit color component.

Definition at line 58 of file utc-Dali-ImageOperations.cpp.

References RandomInRange().

Referenced by SetupScanlineForHalvingTestsRGB565().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::RandomComponent8 ( )
inline

Random number representable in an 8 bit color component.

Definition at line 42 of file utc-Dali-ImageOperations.cpp.

References RandomInRange().

Referenced by RandomPixelRGBA8888(), SetupScanlineForHalvingTests1Byte(), SetupScanlineForHalvingTests2Bytes(), SetupScanlineForHalvingTestsRGBA8888(), and SetupScanlinesRGBA8888().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::RandomInRange ( uint32_t  max)

Generate a random integer between zero and the parameter passed in.

Definition at line 33 of file utc-Dali-ImageOperations.cpp.

Referenced by RandomComponent5(), RandomComponent6(), and RandomComponent8().

Here is the caller graph for this function:

uint32_t anonymous_namespace{utc-Dali-ImageOperations.cpp}::RandomPixelRGBA8888 ( )
inline

RGBA8888 Pixels with random color components.

Definition at line 82 of file utc-Dali-ImageOperations.cpp.

References PixelRGBA8888(), and RandomComponent8().

Referenced by UtcDaliImageOperationsDownscaleInPlacePow2RGBA8888Nops().

Here is the call graph for this function:

Here is the caller graph for this function:

void anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlineForHalvingTests1Byte ( size_t  scanlineLength,
Dali::Vector< uint8_t > &  scanline,
Dali::Vector< uint8_t > &  reference 
)

Build some dummy 1 byte per pixel scanlines to exercise scanline averaging code on.

Definition at line 214 of file utc-Dali-ImageOperations.cpp.

References Dali::VectorBase::Capacity(), Dali::Vector< T, IsTrivialType >::PushBack(), RandomComponent8(), Dali::Vector< T, IsTrivialType >::Reserve(), and Dali::Vector< T, IsTrivialType >::Resize().

Referenced by UtcDaliImageOperationsHalveScanlineInPlace1Byte().

Here is the call graph for this function:

Here is the caller graph for this function:

void anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlineForHalvingTests2Bytes ( size_t  scanlineLength,
Dali::Vector< uint8_t > &  scanline,
Dali::Vector< uint8_t > &  reference 
)

Build some dummy scanlines to exercise scanline averaging code on.

Definition at line 179 of file utc-Dali-ImageOperations.cpp.

References Dali::VectorBase::Capacity(), Dali::Vector< T, IsTrivialType >::PushBack(), RandomComponent8(), Dali::Vector< T, IsTrivialType >::Reserve(), and Dali::Vector< T, IsTrivialType >::Resize().

Referenced by UtcDaliImageOperationsHalveScanlineInPlace2Bytes().

Here is the call graph for this function:

Here is the caller graph for this function:

void anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlineForHalvingTestsRGB565 ( size_t  scanlineLength,
Dali::Vector< uint16_t > &  scanline,
Dali::Vector< uint16_t > &  reference 
)

Build some dummy scanlines to exercise scanline averaging code on.

Definition at line 145 of file utc-Dali-ImageOperations.cpp.

References Dali::VectorBase::Capacity(), Dali::Vector< T, IsTrivialType >::PushBack(), RandomComponent5(), RandomComponent6(), Dali::Vector< T, IsTrivialType >::Reserve(), and Dali::Vector< T, IsTrivialType >::Resize().

Referenced by UtcDaliImageOperationsHalveScanlineInPlaceRGB565().

Here is the call graph for this function:

Here is the caller graph for this function:

void anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlineForHalvingTestsRGBA8888 ( size_t  scanlineLength,
Dali::Vector< uint32_t > &  scanline,
Dali::Vector< uint32_t > &  reference 
)

Build some dummy scanlines to exercise scanline averaging code on.

Definition at line 109 of file utc-Dali-ImageOperations.cpp.

References Dali::VectorBase::Capacity(), PixelRGBA8888(), Dali::Vector< T, IsTrivialType >::PushBack(), RandomComponent8(), Dali::Vector< T, IsTrivialType >::Reserve(), and Dali::Vector< T, IsTrivialType >::Resize().

Referenced by UtcDaliImageOperationsHalveScanlineInPlaceRGBA8888().

Here is the call graph for this function:

Here is the caller graph for this function:

void anonymous_namespace{utc-Dali-ImageOperations.cpp}::SetupScanlinesRGBA8888 ( size_t  scanlineLength,
Dali::Vector< uint32_t > &  scanline1,
Dali::Vector< uint32_t > &  scanline2,
Dali::Vector< uint32_t > &  reference,
Dali::Vector< uint32_t > &  output 
)

Build some dummy scanlines to exercise vertical averaging code on.

All tested formats bar RGB565 can share this setup.

Definition at line 247 of file utc-Dali-ImageOperations.cpp.

References Dali::VectorBase::Capacity(), PixelRGBA8888(), Dali::Vector< T, IsTrivialType >::PushBack(), RandomComponent8(), and Dali::Vector< T, IsTrivialType >::Reserve().

Referenced by UtcDaliImageOperationsAverageScanlines1(), UtcDaliImageOperationsAverageScanlines2(), UtcDaliImageOperationsAverageScanlines3(), and UtcDaliImageOperationsAverageScanlinesRGBA8888().

Here is the call graph for this function:

Here is the caller graph for this function:

Dali Docs Home
Read more about Dali