MCPcopy Create free account
hub / github.com/BinomialLLC/basis_universal / pow_image

Function pow_image

example_transcoding/utils.cpp:326–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326static void pow_image(const imagef& src, imagef& dst, const vec4F& power)
327{
328 dst.resize(src);
329
330//#pragma omp parallel for
331 for (int y = 0; y < (int)dst.get_height(); y++)
332 {
333 for (uint32_t x = 0; x < dst.get_width(); x++)
334 {
335 const vec4F& p = src(x, y);
336
337 if ((power[0] == 2.0f) && (power[1] == 2.0f) && (power[2] == 2.0f) && (power[3] == 2.0f))
338 dst(x, y).set(p[0] * p[0], p[1] * p[1], p[2] * p[2], p[3] * p[3]);
339 else
340 dst(x, y).set(powf(p[0], power[0]), powf(p[1], power[1]), powf(p[2], power[2]), powf(p[3], power[3]));
341 }
342 }
343}
344
345#if 0
346static void mul_image(const imagef& src, imagef& dst, const vec4F& mul)

Callers 1

compute_ssimFunction · 0.70

Calls 4

resizeMethod · 0.45
get_heightMethod · 0.45
get_widthMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected