19 #include "../context.h"
20 #include "../bitmap/converter.h"
21 #include "../bitmap/bitmap_access.h"
22 #include "../bitmap/mask_bitmap_access.h"
23 #include "../exception.h"
31 in_t in(input, startx, starty);
32 out_t
out(output, startx, starty);
39 input(nullptr), output(nullptr)
64 "Input and output bitmap must be of the same size.");
100 const int LOOK_AROUND_INTERVAL = 123456;
103 start += LOOK_AROUND_INTERVAL;
111 #define CALL_CONVERT_AND_RETURN(IN_T, OUT_T) \
112 convertBlock < IN_T, OUT_T >(*input, *output, outX, outY, nPix); return;
215 "Input and output bitmap must be of the same size.");
A very basic class for any image.
Context & getContext() const
virtual const PixelFormat getPixelFormat() const =0
Pixel format of the bitmap.
const ImageResolution getSize() const
Returns the bitmap resolution within ImageResolution object.
virtual const pixbyte * getData(int x, int y) const =0
Returns a pointer to given pixel.
virtual const msize getMemorySize() const =0
Bitmap size in bytes.
static ThreadIndex validThreadCount(int number)
Valid thread count from a given integer value.
TaskDeviceRequirement
Specifies which device (CPU and/or GPU) is used to run the task.
@ CPU_ONLY
this task does not use GPU
void unlock(AbstractBitmap *bitmap)
Drops a lock to the bitmap.
float performTask(AbstractTask &task, const PoolIndex pool=DEFAULT_POOL)
Performs a given task.
bool isManagingThread() const
virtual const int getHeight() const =0
Height of the texture in pixels.
virtual const int getWidth() const =0
Width of the texture in pixels.
Internal low-level GPU control API.
Exception thrown when an implementation restriction is encountered.
A generic to access sub-byte mask bitmap data.
Quad float bitmap reader.
Quad float bitmap writer.
static void check(const bool condition, const std::string &message)
Single byte bitmap reader.
Single byte bitmap writer.
Single float bitmap reader.
Single float bitmap writer.
virtual ThreadIndex numThreads() const =0
ThreadIndex currentThread() const
virtual bool isTaskAborted() const =0
Returns true if the task is asked to stop from outside.
Triple byte bitmap reader.
Triple byte bitmap writer.
Triple float bitmap reader.
Triple float bitmap writer.
#define CALL_CONVERT_AND_RETURN(IN_T, OUT_T)
void convertBlock(AbstractBitmap &input, AbstractBitmap &output, int startx, int starty, msize nPix)
uint32_t msize
memory size
unsigned char ThreadIndex
number of threads / thread index
@ SingleByte
single channel of 8 bits per pixel (like grayscale), unsigned integer values
@ SingleFloat
single channel of 32 bits per pixel (like grayscale), single precision floating point values
@ QuaternaryMask
2 bits per pixel
@ QuadFloat
4 channels of 32 bits per pixel, single precision floating point values,
@ TripleFloat
3 channels of 32 bits per pixel, single precision floating point values
@ QuadByte
4 channels of 8 bits per pixel (like RGBA), unsigned integer values
@ TripleByte
3 channels of 8 bits per pixel (like RGB), unsigned integer values
@ BinaryMask
1 bit per pixel
@ HexMask
4 bits per pixel
jlong jstring jint jint jint jint w
jlong jint jint jint jint jint jint jint outx
jlong jint jint jint jint jint jint jint jint outy