Home
last modified time | relevance | path

Searched refs:sigma (Results 1 – 25 of 144) sorted by relevance

123456

/external/skia/tests/
DBlurTest.cpp106 SkScalar sigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)); in DEF_TEST() local
112 paint.setMaskFilter(SkBlurMaskFilter::Make(blurStyle, sigma, flags)); in DEF_TEST()
156 SkScalar sigma, in ground_truth_2d() argument
167 if (!SkBlurMask::BlurGroundTruth(sigma, &dst, src, kNormal_SkBlurStyle)) { in ground_truth_2d()
197 static float gaussian(int x, SkScalar sigma) { in gaussian() argument
198 float k = SK_Scalar1/(sigma * sqrtf(2.0f*SK_ScalarPI)); in gaussian()
199 float exponent = -(x * x) / (2 * sigma * sigma); in gaussian()
334 SkScalar sigma = 10.0f; in DEF_TEST() local
336 for (int i = 0; i < 4; ++i, sigma /= 10) { in DEF_TEST()
338 cpu_blur_path(rectPath, sigma, rectSpecialCaseResult, kSize); in DEF_TEST()
[all …]
DMaskCacheTest.cpp34 SkScalar sigma = 0.8f; in DEF_TEST() local
42 SkCachedData* data = SkMaskCache::FindAndRef(sigma, style, quality, rrect, &mask, &cache); in DEF_TEST()
51 SkMaskCache::Add(sigma, style, quality, rrect, mask, data, &cache); in DEF_TEST()
58 data = SkMaskCache::FindAndRef(sigma, style, quality, rrect, &mask, &cache); in DEF_TEST()
73 SkScalar sigma = 0.8f; in DEF_TEST() local
80 SkCachedData* data = SkMaskCache::FindAndRef(sigma, style, quality, rects, 1, &mask, &cache); in DEF_TEST()
89 SkMaskCache::Add(sigma, style, quality, rects, 1, mask, data, &cache); in DEF_TEST()
96 data = SkMaskCache::FindAndRef(sigma, style, quality, rects, 1, &mask, &cache); in DEF_TEST()
/external/skia/src/effects/
DGrCircleBlurFragmentProcessor.cpp16 static float make_unnormalized_half_kernel(float* halfKernel, int halfKernelSize, float sigma) { in make_unnormalized_half_kernel() argument
17 const float invSigma = 1.f / sigma; in make_unnormalized_half_kernel()
32 int halfKernelSize, float sigma) { in make_half_kernel_and_summed_table() argument
33 const float tot = 2.f * make_unnormalized_half_kernel(halfKernel, halfKernelSize, sigma); in make_half_kernel_and_summed_table()
90 static uint8_t* create_circle_profile(float sigma, float circleR, int profileTextureWidth) { in create_circle_profile() argument
94 int halfKernelSize = SkScalarCeilToInt(6.0f * sigma); in create_circle_profile()
104 make_half_kernel_and_summed_table(halfKernel, summedKernel, halfKernelSize, sigma); in create_circle_profile()
121 float sigma = profileWidth / 6.f; in create_half_plane_profile() local
127 const float tot = 2.f * make_unnormalized_half_kernel(halfKernel.get(), halfKernelSize, sigma); in create_half_plane_profile()
146 const SkRect& circle, float sigma, in create_profile_texture() argument
[all …]
DSkBlurMask.h18 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,
34 SkScalar sigma, SkBlurStyle style, SkBlurQuality,
40 static bool SK_WARN_UNUSED_RESULT BlurGroundTruth(SkScalar sigma, SkMask* dst,
47 static SkScalar ConvertSigmaToRadius(SkScalar sigma);
66 static uint8_t* ComputeBlurProfile(SkScalar sigma);
78 unsigned int width, SkScalar sigma);
DSkDropShadowImageFilter.cpp89 SkVector sigma = SkVector::Make(fSigmaX, fSigmaY); in onFilterImage() local
90 ctx.ctm().mapVectors(&sigma, 1); in onFilterImage()
91 sigma.fX = SkMaxScalar(0, sigma.fX); in onFilterImage()
92 sigma.fY = SkMaxScalar(0, sigma.fY); in onFilterImage()
96 paint.setImageFilter(SkBlurImageFilter::Make(sigma.fX, sigma.fY, nullptr)); in onFilterImage()
148 SkVector sigma = SkVector::Make(fSigmaX, fSigmaY); in onFilterNodeBounds() local
149 ctm.mapVectors(&sigma, 1); in onFilterNodeBounds()
151 SkScalarCeilToInt(SkScalarAbs(sigma.x() * 3)), in onFilterNodeBounds()
152 SkScalarCeilToInt(SkScalarAbs(sigma.y() * 3))); in onFilterNodeBounds()
DGrCircleBlurFragmentProcessor.fp22 const SkRect& circle, float sigma);
35 static float make_unnormalized_half_kernel(float* halfKernel, int halfKernelSize, float sigma) {
36 const float invSigma = 1.f / sigma;
50 // Create a Gaussian half-kernel (right side) and a summed area table given a sigma and number
53 int halfKernelSize, float sigma) {
55 const float tot = 2.f * make_unnormalized_half_kernel(halfKernel, halfKernelSize, sigma);
127 static uint8_t* create_circle_profile(float sigma, float circleR, int profileTextureWidth) {
132 int halfKernelSize = SkScalarCeilToInt(6.0f*sigma);
143 make_half_kernel_and_summed_table(halfKernel, summedKernel, halfKernelSize, sigma);
160 float sigma = profileWidth / 6.f;
[all …]
DSkBlurMaskFilter.cpp43 SkBlurMaskFilterImpl(SkScalar sigma, SkBlurStyle, const SkRect& occluder, uint32_t flags);
131 sk_sp<SkMaskFilter> SkBlurMaskFilter::Make(SkBlurStyle style, SkScalar sigma, in Make() argument
136 if (!SkScalarIsFinite(sigma) || sigma <= 0) { in Make()
140 return sk_sp<SkMaskFilter>(new SkBlurMaskFilterImpl(sigma, style, occluder, flags)); in Make()
196 SkScalar sigma, SkScalar xformedSigma, in ComputeBlurredRRectParams() argument
205 SkScalar srcBlurRadius = 3.0f * sigma; in ComputeBlurredRRectParams()
288 SkBlurMaskFilterImpl::SkBlurMaskFilterImpl(SkScalar sigma, SkBlurStyle style, in SkBlurMaskFilterImpl() argument
290 : fSigma(sigma) in SkBlurMaskFilterImpl()
319 SkScalar sigma = this->computeXformedSigma(matrix); in filterMask() local
320 return SkBlurMask::BoxBlur(dst, src, sigma, fBlurStyle, this->getQuality(), margin); in filterMask()
[all …]
DSkBlurMask.cpp29 SkScalar SkBlurMask::ConvertSigmaToRadius(SkScalar sigma) { in ConvertSigmaToRadius() argument
30 return sigma > 0.5f ? (sigma - 0.5f) / kBLUR_SIGMA_SCALE : 0.0f; in ConvertSigmaToRadius()
478 SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, in BoxBlur() argument
497 if (!force_quality && sigma <= SkIntToScalar(2)) { in BoxBlur()
505 passRadius = sigma - (1 / 6.0f); in BoxBlur()
510 passRadius = 1.5f * sigma - 0.5f; in BoxBlur()
592 SkMaskBlurFilter blurFilter{sigma, sigma}; in BoxBlur()
701 uint8_t* SkBlurMask::ComputeBlurProfile(SkScalar sigma) { in ComputeBlurProfile() argument
702 int size = SkScalarCeilToInt(6*sigma); in ComputeBlurProfile()
707 float invr = 1.f/(2*sigma); in ComputeBlurProfile()
[all …]
DSkEmbossMaskFilter.cpp62 SkScalar sigma = matrix.mapRadius(fBlurSigma); in filterMask() local
64 if (!SkBlurMask::BoxBlur(dst, src, sigma, kInner_SkBlurStyle, kLow_SkBlurQuality)) { in filterMask()
70 margin->set(SkScalarCeilToInt(3*sigma), SkScalarCeilToInt(3*sigma)); in filterMask()
114 const SkScalar sigma = buffer.readScalar(); in CreateProc() local
115 return Make(sigma, light); in CreateProc()
/external/skia/src/core/
DSkMaskCache.cpp23 RRectBlurKey(SkScalar sigma, const SkRRect& rrect, SkBlurStyle style, SkBlurQuality quality) in RRectBlurKey()
24 : fSigma(sigma) in RRectBlurKey()
77 SkCachedData* SkMaskCache::FindAndRef(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, in FindAndRef() argument
80 RRectBlurKey key(sigma, rrect, style, quality); in FindAndRef()
90 void SkMaskCache::Add(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, in Add() argument
93 RRectBlurKey key(sigma, rrect, style, quality); in Add()
104 RectsBlurKey(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, in RectsBlurKey()
106 : fSigma(sigma) in RectsBlurKey()
171 SkCachedData* SkMaskCache::FindAndRef(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, in FindAndRef() argument
175 RectsBlurKey key(sigma, style, quality, rects, count); in FindAndRef()
[all …]
DSkBlurImageFilter.cpp78 SkVector sigma = SkVector::Make(localSigma.width(), localSigma.height()); in map_sigma() local
79 ctm.mapVectors(&sigma, 1); in map_sigma()
80 sigma.fX = SkMinScalar(SkScalarAbs(sigma.fX), MAX_SIGMA); in map_sigma()
81 sigma.fY = SkMinScalar(SkScalarAbs(sigma.fY), MAX_SIGMA); in map_sigma()
82 return sigma; in map_sigma()
166 const SkVector sigma = map_sigma(fSigma, ctx.ctm()); in onFilterImage() local
181 if (0 == sigma.x() && 0 == sigma.y()) { in onFilterImage()
202 sigma.x(), in onFilterImage()
203 sigma.y(), in onFilterImage()
222 get_box3_params(sigma.x(), &kernelSizeX, &kernelSizeX3, &lowOffsetX, &highOffsetX); in onFilterImage()
[all …]
DSkMaskCache.h26 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,
DSkGpuBlurUtils.cpp54 static float adjust_sigma(float sigma, int maxTextureSize, int *scaleFactor, int *radius) { in adjust_sigma() argument
56 while (sigma > MAX_BLUR_SIGMA) { in adjust_sigma()
58 sigma *= 0.5f; in adjust_sigma()
61 sigma = MAX_BLUR_SIGMA; in adjust_sigma()
64 *radius = static_cast<int>(ceilf(sigma * 3.0f)); in adjust_sigma()
66 return sigma; in adjust_sigma()
76 float sigma, in convolve_gaussian_1d() argument
83 std::move(proxy), direction, radius, sigma, mode, bounds)); in convolve_gaussian_1d()
125 float sigma, in convolve_gaussian() argument
133 std::move(proxy), direction, radius, sigma, in convolve_gaussian()
[all …]
/external/libvpx/libvpx/vpx_dsp/
Dadd_noise.c40 static double gaussian(double sigma, double mu, double x) { in gaussian() argument
41 return 1 / (sigma * sqrt(2.0 * 3.14159265)) * in gaussian()
42 (exp(-(x - mu) * (x - mu) / (2 * sigma * sigma))); in gaussian()
45 int vpx_setup_noise(double sigma, int8_t *noise, int size) { in vpx_setup_noise() argument
51 const int a_i = (int)(0.5 + 256 * gaussian(sigma, 0, i)); in vpx_setup_noise()
/external/skia/gm/
Dblurimagevmask.cpp31 for (auto sigma:sigmas) { variable
36 sprintf(out, "Sigma: %g", sigma);
42 SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma,
49 imageBlurPaint.setImageFilter(SkBlurImageFilter::Make(sigma, sigma, nullptr));
Dimageblurclampmode.cpp76 for (auto sigma: { 0.6f, 3.0f, 8.0f, 20.0f }) { in onDraw()
79 SkBlurImageFilter::Make(sigma, 0.0f, nullptr, nullptr, in onDraw()
84 filter = SkBlurImageFilter::Make(0.0f, sigma, nullptr, nullptr, in onDraw()
89 filter = SkBlurImageFilter::Make(sigma, sigma, nullptr, nullptr, in onDraw()
Dimageblurrepeatmode.cpp95 for (auto sigma: { 0.6f, 3.0f, 8.0f, 20.0f }) { in onDraw()
98 SkBlurImageFilter::Make(sigma, 0.0f, nullptr, nullptr, in onDraw()
103 filter = SkBlurImageFilter::Make(0.0f, sigma, nullptr, nullptr, in onDraw()
108 filter = SkBlurImageFilter::Make(sigma, sigma, nullptr, nullptr, in onDraw()
/external/apache-commons-math/src/main/java/org/apache/commons/math/random/
DValueServer.java79 private double sigma = 0.0; field in ValueServer
196 sigma = empiricalDistribution.getSampleStats().getStandardDeviation(); in computeDistribution()
292 return sigma; in getSigma()
298 public void setSigma(double sigma) { in setSigma() argument
299 this.sigma = sigma; in setSigma()
382 return randomData.nextGaussian(mu, sigma); in getNextGaussian()
/external/ImageMagick/MagickCore/
Dmorphology.c272 args.rho = args.sigma; /* then width = height */ in ParseKernelArray()
275 if ( args.sigma < 1.0 ) /* if height too small */ in ParseKernelArray()
276 args.sigma = args.rho; /* then height = width */ in ParseKernelArray()
278 kernel->height = (size_t)args.sigma; in ParseKernelArray()
418 flags, args.rho, args.sigma, args.xi, args.psi ); in ParseKernelName()
435 args.sigma = 1.0; /* Default scale = 1.0, zero is valid */ in ParseKernelName()
443 args.rho = args.sigma; /* then width = height */ in ParseKernelName()
446 if ( args.sigma < 1.0 ) /* if height too small */ in ParseKernelName()
447 args.sigma = args.rho; /* then height = width */ in ParseKernelName()
451 args.psi = (double)(((ssize_t)args.sigma-1)/2); in ParseKernelName()
[all …]
/external/iproute2/netem/
Dmaketable.c51 arraystats(double *x, int limit, double *mu, double *sigma, double *rho) in arraystats() argument
63 *sigma = sqrt((sumsquare - (double)n*(*mu)*(*mu))/(double)(n-1)); in arraystats()
93 makedist(double *x, int limit, double mu, double sigma) in makedist() argument
107 input = (x[i]-mu)/sigma; in makedist()
200 double mu, sigma, rho; in main() local
219 arraystats(x, limit, &mu, &sigma, &rho); in main()
222 limit, mu, sigma, rho); in main()
225 table = makedist(x, limit, mu, sigma); in main()
/external/apache-commons-math/src/main/java/org/apache/commons/math/optimization/direct/
DNelderMead.java45 private final double sigma; field in NelderMead
55 this.sigma = 0.5; in NelderMead()
65 final double gamma, final double sigma) { in NelderMead() argument
69 this.sigma = sigma; in NelderMead()
171 x[j] = xSmallest[j] + sigma * (x[j] - xSmallest[j]); in iterateSimplex()
/external/skia/include/effects/
DSkBlurMaskFilter.h43 static sk_sp<SkMaskFilter> Make(SkBlurStyle style, SkScalar sigma,
46 static sk_sp<SkMaskFilter> Make(SkBlurStyle style, SkScalar sigma,
48 return Make(style, sigma, SkRect::MakeEmpty(), flags);
77 SkScalar sigma, SkScalar xformedSigma,
/external/eigen/Eigen/src/Cholesky/
DLLT_LAPACKE.h72 … rankUpdate(MatrixType& mat, const VectorType& vec, const typename MatrixType::RealScalar& sigma) \
73 { return Eigen::internal::llt_rank_update_lower(mat, vec, sigma); } \
83 … rankUpdate(MatrixType& mat, const VectorType& vec, const typename MatrixType::RealScalar& sigma) \
86 return llt_inplace<EIGTYPE, Lower>::rankUpdate(matt, vec.conjugate(), sigma); \
DLLT.h199 LLT rankUpdate(const VectorType& vec, const RealScalar& sigma = 1);
229 …_update_lower(MatrixType& mat, const VectorType& vec, const typename MatrixType::RealScalar& sigma) in llt_rank_update_lower() argument
245 if(sigma>0) in llt_rank_update_lower()
250 temp = sqrt(sigma) * vec; in llt_rank_update_lower()
275 RealScalar swj2 = sigma*numext::abs2(wj); in llt_rank_update_lower()
291 …mat.col(j).tail(rs) = (nLjj/Ljj) * mat.col(j).tail(rs) + (nLjj * sigma*numext::conj(wj)/gamma)*tem… in llt_rank_update_lower()
360 static Index rankUpdate(MatrixType& mat, const VectorType& vec, const RealScalar& sigma)
362 return Eigen::internal::llt_rank_update_lower(mat, vec, sigma);
383 static Index rankUpdate(MatrixType& mat, const VectorType& vec, const RealScalar& sigma)
386 return llt_inplace<Scalar, Lower>::rankUpdate(matt, vec.conjugate(), sigma);
[all …]
/external/boringssl/src/crypto/chacha/
Dchacha.c73 static const uint8_t sigma[16] = { 'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', variable
128 input[0] = U8TO32_LITTLE(sigma + 0); in CRYPTO_chacha_20()
129 input[1] = U8TO32_LITTLE(sigma + 4); in CRYPTO_chacha_20()
130 input[2] = U8TO32_LITTLE(sigma + 8); in CRYPTO_chacha_20()
131 input[3] = U8TO32_LITTLE(sigma + 12); in CRYPTO_chacha_20()

123456