/external/libvpx/libvpx/vpx_dsp/ |
postproc.h | 18 // Fills a noise buffer with gaussian noise strength determined by sigma. 19 int vpx_setup_noise(double sigma, int8_t *noise, int size);
|
add_noise.c | 41 static double gaussian(double sigma, double mu, double x) { 42 return 1 / (sigma * sqrt(2.0 * 3.14159265)) * 43 (exp(-(x - mu) * (x - mu) / (2 * sigma * sigma))); 46 int vpx_setup_noise(double sigma, int8_t *noise, int size) { 52 const int a_i = (int)(0.5 + 256 * gaussian(sigma, 0, i));
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/layout/ |
normal_distribution.h | 26 // Normal distribution N(u, sigma^2). 29 NormalDistribution(const float u, const float sigma) 32 * GeometryUtils::SQUARE_FLOAT(sigma))), 33 mPreComputedExponentPart(-1.0f / (2.0f * GeometryUtils::SQUARE_FLOAT(sigma))) {} 45 const float mPreComputedNonExpPart; // = 1 / sqrt(2 * PI * sigma^2) 46 const float mPreComputedExponentPart; // = -1 / (2 * sigma^2)
|
/external/skia/src/core/ |
SkGaussFilter.cpp | 45 static int calculate_bessel_factors(double sigma, double *gauss) { 46 auto var = sigma * sigma; 51 // BesselI_0 for 0 <= sigma < 2. 58 // Use a variable number of loops. When sigma is small, this only requires 3-4 loops, but 59 // when sigma is near 2, it could require 10 loops. The same holds for BesselI_1. 67 // BesselI_1 for 0 <= sigma < 2. 90 // The maximum spread for sigma == 2 is guass[4], but in order to know to stop guass[5] 107 static int calculate_gauss_factors(double sigma, double* gauss) { 108 SkASSERT(0 <= sigma && sigma < 2) [all...] |
SkMaskCache.h | 26 static SkCachedData* FindAndRef(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, 29 static SkCachedData* FindAndRef(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, 36 static void Add(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, 39 static void Add(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality,
|
/external/skqp/src/core/ |
SkGaussFilter.cpp | 45 static int calculate_bessel_factors(double sigma, double *gauss) { 46 auto var = sigma * sigma; 51 // BesselI_0 for 0 <= sigma < 2. 58 // Use a variable number of loops. When sigma is small, this only requires 3-4 loops, but 59 // when sigma is near 2, it could require 10 loops. The same holds for BesselI_1. 67 // BesselI_1 for 0 <= sigma < 2. 90 // The maximum spread for sigma == 2 is guass[4], but in order to know to stop guass[5] 107 static int calculate_gauss_factors(double sigma, double* gauss) { 108 SkASSERT(0 <= sigma && sigma < 2) [all...] |
SkMaskCache.h | 26 static SkCachedData* FindAndRef(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, 29 static SkCachedData* FindAndRef(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, 36 static void Add(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, 39 static void Add(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality,
|
/external/skia/tests/ |
SkGaussFilterTest.cpp | 32 double sigma; SkGaussFilter::Type type; std::vector<double> golden; 33 std::tie(sigma, type, golden) = test; 34 SkGaussFilter filter{sigma, type}; 51 // 0.788675 - most common mask sigma. 58 // 1.07735 - second most common mask sigma. 74 auto check = [&](double sigma, SkGaussFilter::Type type) { 75 SkGaussFilter filter{sigma, type}; 88 for (double sigma = 0.0; sigma < 2.0; sigma += 0.1) [all...] |
/external/skqp/tests/ |
SkGaussFilterTest.cpp | 32 double sigma; SkGaussFilter::Type type; std::vector<double> golden; 33 std::tie(sigma, type, golden) = test; 34 SkGaussFilter filter{sigma, type}; 51 // 0.788675 - most common mask sigma. 58 // 1.07735 - second most common mask sigma. 74 auto check = [&](double sigma, SkGaussFilter::Type type) { 75 SkGaussFilter filter{sigma, type}; 88 for (double sigma = 0.0; sigma < 2.0; sigma += 0.1) [all...] |
/external/skia/src/effects/ |
SkBlurMask.h | 18 static bool SK_WARN_UNUSED_RESULT BlurRect(SkScalar sigma, SkMask *dst, const SkRect &src, 22 static bool SK_WARN_UNUSED_RESULT BlurRRect(SkScalar sigma, SkMask *dst, const SkRRect &src, 27 // forceQuality will prevent BoxBlur from falling back to the low quality approach when sigma 39 SkScalar sigma, SkBlurStyle style, SkBlurQuality, 45 static bool SK_WARN_UNUSED_RESULT BlurGroundTruth(SkScalar sigma, SkMask* dst, 49 // If radius > 0, return the corresponding sigma, else return 0 51 // If sigma > 0.5, return the corresponding radius, else return 0 52 static SkScalar SK_API ConvertSigmaToRadius(SkScalar sigma); 67 @param size Should be 6*sigma bytes 68 @param sigma The standard deviation of the gaussian blur kerne [all...] |
GrCircleBlurFragmentProcessor.fp | 25 const SkRect& circle, float sigma); 38 static float make_unnormalized_half_kernel(float* halfKernel, int halfKernelSize, float sigma) { 39 const float invSigma = 1.f / sigma; 53 // Create a Gaussian half-kernel (right side) and a summed area table given a sigma and number 56 int halfKernelSize, float sigma) { 58 const float tot = 2.f * make_unnormalized_half_kernel(halfKernel, halfKernelSize, sigma); 130 static uint8_t* create_circle_profile(float sigma, float circleR, int profileTextureWidth) { 135 int halfKernelSize = SkScalarCeilToInt(6.0f*sigma); 146 make_half_kernel_and_summed_table(halfKernel, summedKernel, halfKernelSize, sigma); 163 float sigma = profileWidth / 6.f [all...] |
/external/skqp/src/effects/ |
SkBlurMask.h | 18 static bool SK_WARN_UNUSED_RESULT BlurRect(SkScalar sigma, SkMask *dst, const SkRect &src, 22 static bool SK_WARN_UNUSED_RESULT BlurRRect(SkScalar sigma, SkMask *dst, const SkRRect &src, 27 // forceQuality will prevent BoxBlur from falling back to the low quality approach when sigma 39 SkScalar sigma, SkBlurStyle style, SkBlurQuality, 45 static bool SK_WARN_UNUSED_RESULT BlurGroundTruth(SkScalar sigma, SkMask* dst, 49 // If radius > 0, return the corresponding sigma, else return 0 51 // If sigma > 0.5, return the corresponding radius, else return 0 52 static SkScalar SK_API ConvertSigmaToRadius(SkScalar sigma); 67 must free the memory. The amount of memory allocated will be exactly 6*sigma bytes. 68 @param sigma The standard deviation of the gaussian blur kerne [all...] |
GrCircleBlurFragmentProcessor.fp | 25 const SkRect& circle, float sigma); 38 static float make_unnormalized_half_kernel(float* halfKernel, int halfKernelSize, float sigma) { 39 const float invSigma = 1.f / sigma; 53 // Create a Gaussian half-kernel (right side) and a summed area table given a sigma and number 56 int halfKernelSize, float sigma) { 58 const float tot = 2.f * make_unnormalized_half_kernel(halfKernel, halfKernelSize, sigma); 130 static uint8_t* create_circle_profile(float sigma, float circleR, int profileTextureWidth) { 135 int halfKernelSize = SkScalarCeilToInt(6.0f*sigma); 146 make_half_kernel_and_summed_table(halfKernel, summedKernel, halfKernelSize, sigma); 163 float sigma = profileWidth / 6.f [all...] |
/external/libxcam/modules/ocl/ |
cl_gauss_handler.h | 39 const SmartPtr<CLContext> &context, uint32_t radius, float sigma); 41 bool set_gaussian(uint32_t radius, float sigma); 62 bool set_gaussian_table(int size, float sigma); 72 float sigma = XCAM_GAUSS_DEFAULT_SIGMA);
|