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

Function scale_image

example_transcoding/utils.cpp:362–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360#endif
361
362static void scale_image(const imagef& src, imagef& dst, const vec4F& scale, const vec4F& shift)
363{
364 dst.resize(src);
365
366//#pragma omp parallel for
367 for (int y = 0; y < (int)dst.get_height(); y++)
368 {
369 for (uint32_t x = 0; x < dst.get_width(); x++)
370 {
371 const vec4F& p = src(x, y);
372
373 vec4F d;
374
375 for (uint32_t c = 0; c < 4; c++)
376 d[c] = scale[c] * p[c] + shift[c];
377
378 dst(x, y).set(d[0], d[1], d[2], d[3]);
379 }
380 }
381}
382
383static void add_weighted_image(const imagef& src1, const vec4F& alpha, const imagef& src2, const vec4F& beta, const vec4F& gamma, imagef& dst)
384{

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