5#include "testing/testing.h"
15static constexpr int SRC_X = 5123;
16static constexpr int SRC_Y = 4091;
30 for (
size_t i = 0;
i < img_pixel_count;
i++) {
41 for (
size_t i = 0;
i < img_pixel_count;
i++) {
43 pix[1] = (
i * 3) & 0xFF;
44 pix[2] = (
i + 12345) & 0xFF;
45 pix[3] = (
i / 4) & 0xFF;
59 float3(
float(src->
x) / dst->
x,
float(src->
y) / dst->
y, 1.0f));
108 void (*func)(
ImBuf *&src,
int width,
int height))
136TEST(imbuf_scaling, scaling_perf_byte)
141TEST(imbuf_scaling, scaling_perf_float)
#define SCOPED_TIMER(name)
void IMB_transform(const ImBuf *src, ImBuf *dst, eIMBTransformMode mode, eIMBInterpolationFilterMode filter, const blender::float3x3 &transform_matrix, const rctf *src_crop)
Transform source image buffer onto destination image buffer using a transform matrix.
@ IMB_TRANSFORM_MODE_REGULAR
Do not crop or repeat.
void IMB_freeImBuf(ImBuf *ibuf)
size_t IMB_get_pixel_count(const ImBuf *ibuf)
Get the length of the data of the given image buffer in pixels.
ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
bool IMB_scale(ImBuf *ibuf, unsigned int newx, unsigned int newy, IMBScaleFilter filter, bool threaded=true)
eIMBInterpolationFilterMode
MatT from_scale(const VecBase< typename MatT::base_type, ScaleDim > &scale)
T mod(const T &a, const T &b)
TEST(BLI_string_utils, BLI_string_replace)
MatBase< float, 3, 3 > float3x3
VecBase< float, 3 > float3
static void imb_scale_box(ImBuf *ibuf, uint newx, uint newy, bool threaded)
ImBufFloatBuffer float_buffer
ImBufByteBuffer byte_buffer