5#include "testing/testing.h"
15static constexpr int SRC_X = 5123;
16static constexpr int SRC_Y = 4091;
29 for (
int i = 0; i < img->
x * img->
y; i++) {
39 for (
int i = 0; i < img->
x * img->
y; i++) {
41 pix[1] = (i * 3) & 0xFF;
42 pix[2] = (i + 12345) & 0xFF;
43 pix[3] = (i / 4) & 0xFF;
57 float4(
float(src->
x) / dst->
x,
float(src->
y) / dst->
y, 1.0f, 1.0f));
106 void (*func)(
ImBuf *&src,
int width,
int height))
134TEST(imbuf_scaling, scaling_perf_byte)
139TEST(imbuf_scaling, scaling_perf_float)
#define SCOPED_TIMER(name)
@ IMB_TRANSFORM_MODE_REGULAR
Do not crop or repeat.
void IMB_transform(const ImBuf *src, ImBuf *dst, eIMBTransformMode mode, eIMBInterpolationFilterMode filter, const float transform_matrix[4][4], const rctf *src_crop)
Transform source image buffer onto destination image buffer using a transform matrix.
bool IMB_scale(ImBuf *ibuf, unsigned int newx, unsigned int newy, IMBScaleFilter filter, bool threaded=true)
eIMBInterpolationFilterMode
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
struct ImBuf * IMB_allocImBuf(unsigned int, unsigned int, unsigned char, unsigned int)
void IMB_freeImBuf(ImBuf *)
MatT from_scale(const VecBase< typename MatT::base_type, ScaleDim > &scale)
T mod(const T &a, const T &b)
TEST(BLI_string_utils, BLI_uniquename_cb)
VecBase< float, 4 > float4
ImBufFloatBuffer float_buffer
ImBufByteBuffer byte_buffer