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

Function scale_image

encoder/basisu_ssim.cpp:174–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172 }
173
174 void scale_image(const imagef &src, imagef &dst, const vec4F &scale, const vec4F &shift)
175 {
176 dst.resize(src);
177
178//#pragma omp parallel for
179 for (int y = 0; y < (int)dst.get_height(); y++)
180 {
181 for (uint32_t x = 0; x < dst.get_width(); x++)
182 {
183 const vec4F &p = src(x, y);
184
185 vec4F d;
186
187 for (uint32_t c = 0; c < 4; c++)
188 d[c] = scale[c] * p[c] + shift[c];
189
190 dst(x, y).set(d[0], d[1], d[2], d[3]);
191 }
192 }
193 }
194
195 void add_weighted_image(const imagef &src1, const vec4F &alpha, const imagef &src2, const vec4F &beta, const vec4F &gamma, imagef &dst)
196 {

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