| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
#pragma once |
| 16 |
#include "basisu_enc.h" |
| 17 |
|
| 18 |
namespace basisu |
| 19 |
{ |
| 20 |
float gauss(int x, int y, float sigma_sqr); |
| 21 |
|
| 22 |
enum |
| 23 |
{ |
| 24 |
cComputeGaussianFlagNormalize = 1, |
| 25 |
cComputeGaussianFlagPrint = 2, |
| 26 |
cComputeGaussianFlagNormalizeCenterToOne = 4 |
| 27 |
}; |
| 28 |
|
| 29 |
void compute_gaussian_kernel(float *pDst, int size_x, int size_y, float sigma_sqr, uint32_t flags = 0); |
| 30 |
|
| 31 |
void scale_image(const imagef &src, imagef &dst, const vec4F &scale, const vec4F &shift); |
| 32 |
void add_weighted_image(const imagef &src1, const vec4F &alpha, const imagef &src2, const vec4F &beta, const vec4F &gamma, imagef &dst); |
| 33 |
void add_image(const imagef &src1, const imagef &src2, imagef &dst); |
| 34 |
void adds_image(const imagef &src, const vec4F &value, imagef &dst); |
| 35 |
void mul_image(const imagef &src1, const imagef &src2, imagef &dst, const vec4F &scale); |
| 36 |
void div_image(const imagef &src1, const imagef &src2, imagef &dst, const vec4F &scale); |
| 37 |
vec4F avg_image(const imagef &src); |
| 38 |
|
| 39 |
void gaussian_filter(imagef &dst, const imagef &orig_img, uint32_t odd_filter_width, float sigma_sqr, bool wrapping = false, uint32_t width_divisor = 1, uint32_t height_divisor = 1); |
| 40 |
|
| 41 |
vec4F compute_ssim(const imagef &a, const imagef &b); |
| 42 |
vec4F compute_ssim(const image &a, const image &b, bool luma, bool luma_601); |
| 43 |
|
| 44 |
} |