66 std::optional<ColormanageProcessor> cm_processor =
94 cm_processor.value(), range.
size(), src, 4);
95 for (
const float4 &pixel : pixels) {
116 cm_processor.value(), range.
size(), src, 4);
117 for (
const float4 &pixel : pixels) {
130 for (
int i = 0; i < a.
size(); i++) {
131 res[i] = a[i] +
b[i];
void apply(float *buffer, int width, int height, int channels, bool predivide) const
static std::optional< ColormanageProcessor > display_processor_for_imbuf(const ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, ColorManagedDisplaySpace display_space=DISPLAY_SPACE_DRAW)
constexpr int64_t first() const
constexpr int64_t size() const
constexpr IndexRange()=default
static Array< float4 > pixels_to_scope_space(const ColormanageProcessor &processor, int64_t num, const float *src, int64_t stride)
T max(const T &a, const T &b)
Value parallel_reduce(IndexRange range, int64_t grain_size, const Value &identity, const Function &function, const Reduction &reduction)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
MINLINE void rgba_uchar_to_float(float r_col[4], const unsigned char col_ub[4])
size_t IMB_get_pixel_count(const ImBuf *ibuf)
Get the length of the data of the given image buffer in pixels.
VecBase< uint32_t, 3 > uint3
VecBase< float, 4 > float4
ATTR_WARN_UNUSED_RESULT const size_t num
MINLINE void premul_to_straight_v4_v4(float straight[4], const float premul[4])
const uint8_t * byte_data() const
const float * float_data() const
void calc_from_ibuf(const ImBuf *ibuf, const ColorManagedViewSettings &view_settings, const ColorManagedDisplaySettings &display_settings)
static constexpr int NUM_BINS
static int float_to_bin(float f)