/external/skia/src/gpu/effects/ |
GrRectBlurEffect.h | 23 float sigma) { 24 unsigned int profileSize = SkScalarCeilToInt(6 * sigma); 42 SkBlurMask::ComputeBlurProfile(bitmap.getAddr8(0, 0), profileSize, sigma); 64 float sigma() const { return fSigma; } function in class:GrRectBlurEffect 67 const SkRect& rect, float sigma) { 68 int doubleProfileSize = SkScalarCeilToInt(12 * sigma); 71 // if the blur sigma is too large so the gaussian overlaps the whole 76 sk_sp<GrTextureProxy> blurProfile(CreateBlurProfileTexture(proxyProvider, sigma)); 82 rect, sigma, std::move(blurProfile), 90 GrRectBlurEffect(SkRect rect, float sigma, sk_sp<GrTextureProxy> blurProfile [all...] |
/external/skqp/src/gpu/effects/ |
GrRectBlurEffect.h | 23 float sigma) { 24 unsigned int profileSize = SkScalarCeilToInt(6 * sigma); 41 std::unique_ptr<uint8_t[]> profile(SkBlurMask::ComputeBlurProfile(sigma)); 56 float sigma() const { return fSigma; } function in class:GrRectBlurEffect 59 const SkRect& rect, float sigma) { 60 int doubleProfileSize = SkScalarCeilToInt(12 * sigma); 63 // if the blur sigma is too large so the gaussian overlaps the whole 68 sk_sp<GrTextureProxy> blurProfile(CreateBlurProfileTexture(proxyProvider, sigma)); 74 rect, sigma, std::move(blurProfile), 82 GrRectBlurEffect(SkRect rect, float sigma, sk_sp<GrTextureProxy> blurProfile [all...] |
/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/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...] |
/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/iproute2/netem/ |
stats.c | 24 double mu=0.0, sigma=0.0, sumsquare=0.0, sum=0.0, top=0.0, rho=0.0; local 44 sigma = sqrt((sumsquare - (double)n*mu*mu)/(double)(n-1)); 54 printf("sigma = %12.6f\n", sigma); 57 /*printf("correlation rho = %10.6f\n", top/((double)(n-1)*sigma*sigma));*/
|
/external/skia/gm/ |
blurimagevmask.cpp | 31 for (auto sigma:sigmas) { 36 sprintf(out, "Sigma: %g", sigma); 42 SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma, 49 imageBlurPaint.setImageFilter(SkBlurImageFilter::Make(sigma, sigma, nullptr));
|
blurtextsmallradii.cpp | 17 for (auto sigma : sigmas) { 20 paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma));
|
/external/skqp/gm/ |
blurimagevmask.cpp | 31 for (auto sigma:sigmas) { 36 sprintf(out, "Sigma: %g", sigma); 42 SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma, 49 imageBlurPaint.setImageFilter(SkBlurImageFilter::Make(sigma, sigma, nullptr));
|
blurtextsmallradii.cpp | 17 for (auto sigma : sigmas) { 20 paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma));
|
/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));
|
/frameworks/rs/tests/java_api/ImageProcessing/src/com/android/rs/image/ |
threshold.rs | 39 // g(x) = ( 1 / sqrt( 2 * pi ) * sigma) * e ^ ( -x^2 / 2 * sigma^2 ) 41 // and sigma varies with radius. 42 // Based on some experimental radius values and sigma's 43 // we approximately fit sigma = f(radius) as 44 // sigma = radius * 0.4 + 0.6 46 // will resemble a box blur since with large sigma 48 float sigma = 0.4f * (float)radius + 0.6f; 54 float coeff1 = 1.0f / (sqrt( 2.0f * pi ) * sigma); 55 float coeff2 = - 1.0f / (2.0f * sigma * sigma) [all...] |
/frameworks/rs/tests/java_api/ImageProcessing2/src/com/android/rs/image/ |
threshold.rs | 39 // g(x) = ( 1 / sqrt( 2 * pi ) * sigma) * e ^ ( -x^2 / 2 * sigma^2 ) 41 // and sigma varies with radius. 42 // Based on some experimental radius values and sigma's 43 // we approximately fit sigma = f(radius) as 44 // sigma = radius * 0.4 + 0.6 46 // will resemble a box blur since with large sigma 48 float sigma = 0.4f * (float)radius + 0.6f; 54 float coeff1 = 1.0f / (sqrt( 2.0f * pi ) * sigma); 55 float coeff2 = - 1.0f / (2.0f * sigma * sigma) [all...] |
/frameworks/rs/tests/java_api/ImageProcessing_jb/src/com/android/rs/image/ |
threshold.rs | 39 // g(x) = ( 1 / sqrt( 2 * pi ) * sigma) * e ^ ( -x^2 / 2 * sigma^2 ) 41 // and sigma varies with radius. 42 // Based on some experimental radius values and sigma's 43 // we approximately fit sigma = f(radius) as 44 // sigma = radius * 0.4 + 0.6 46 // will resemble a box blur since with large sigma 48 float sigma = 0.4f * (float)radius + 0.6f; 54 float coeff1 = 1.0f / (sqrt( 2.0f * pi ) * sigma); 55 float coeff2 = - 1.0f / (2.0f * sigma * sigma) [all...] |
threshold_half.rs | 39 // g(x) = ( 1 / sqrt( 2 * pi ) * sigma) * e ^ ( -x^2 / 2 * sigma^2 ) 41 // and sigma varies with radius. 42 // Based on some experimental radius values and sigma's 43 // we approximately fit sigma = f(radius) as 44 // sigma = radius * 0.4 + 0.6 46 // will resemble a box blur since with large sigma 48 half sigma = 0.4f * (half)radius + 0.6f; 54 half coeff1 = 1.0f / (sqrt( 2.0f * pi ) * sigma); 55 half coeff2 = - 1.0f / (2.0f * sigma * sigma) [all...] |
/frameworks/base/libs/hwui/utils/ |
Blur.h | 28 // If radius > 0, return the corresponding sigma, else return 0 30 // If sigma > 0.5, return the corresponding radius, else return 0 31 ANDROID_API static float convertSigmaToRadius(float sigma); 32 // If the original radius was on an integer boundary then after the sigma to
|
Blur.cpp | 33 float Blur::convertSigmaToRadius(float sigma) { 34 return sigma > 0.5f ? (sigma - 0.5f) / BLUR_SIGMA_SCALE : 0.0f; 50 * for sigma and to preserve compatibility we have kept that logic. 52 * Based on some experimental radius and sigma values we approximate the 53 * equation sigma = f(radius) as sigma = radius * 0.3 + 0.6. The larger the 55 * large sigma the gaussian curve begins to lose its shape. 68 // g(x) = ( 1 / sqrt( 2 * pi ) * sigma) * e ^ ( -x^2 / 2 * sigma^2 71 float sigma = legacyConvertRadiusToSigma(radius); local [all...] |