- Dali::Internal::Platform::PointSample4BPP( (const unsigned char *) inputImage, 0, 0, (unsigned char*) outputImage, 200, 99 );
-
- FreeReadOnlyPagesRGBA( outputImage, getpagesize() / 4 );
-
- //! The only real test is whether the above code SEGVs, but do a fake test so we pass if that hasn't happened:
- DALI_TEST_EQUALS( true, true, TEST_LOCATION );
-
- END_TEST;
-}
-
-/**
- * @brief Test that a scaling doesn't stray outside the bounds of the destination image.
- *
- * The test allocates a destination buffer that is an exact multiple of the page size
- * with guard pages at either end.
- */
-int UtcDaliImageOperationsPointSampleRGB88InBounds(void)
-{
- const unsigned int inputWidth = 163;
- const unsigned int inputHeight = 691;
- const unsigned int desiredWidth = 32;
- const unsigned int desiredHeight = 128;
- const unsigned int outputBuffersizeInWords = desiredWidth * (desiredHeight / 4) * 3;
-
- uint8_t inputImage[ inputWidth * inputHeight ][3];
-
- // Allocate an output image buffer with read-only guard pages at either end:
- // The test will segfault if it strays into the guard pages.
- uint32_t *outputBuffer, *outputImage;
-
- MakeGuardedOutputImageRGBA8888( desiredWidth * (desiredHeight / 4), 3, outputBuffer, outputImage );
-
- Dali::Internal::Platform::PointSample3BPP( &inputImage[0][0], inputWidth, inputHeight, (uint8_t*) outputImage, desiredWidth, desiredHeight );
-
- FreeReadOnlyPagesRGBA( outputBuffer, outputBuffersizeInWords );
-
- //! The only real test is whether the above code SEGVs, but do a fake test so we pass if that hasn't happened:
- DALI_TEST_EQUALS( true, true, TEST_LOCATION );
+ Dali::Internal::Platform::PointSample4BPP( (const unsigned char *) inputImage, 0, 0, (unsigned char*) outputImage, 200, 99 );
+ DALI_TEST_EQUALS( 0xaaaaaaaa, outputImage[0], TEST_LOCATION );