Gaussian Blur incorrect for small standard deviations

NEW
Unassigned

Status

()

12 years ago
5 years ago

People

(Reporter: malex, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4


To approximate a Gaussian Blur the SVG 1.1 spec recommends a box blur approximation for stdDeviations >= 2.  Currently, this approximation is used when stdDeviation is anything greater than about 0.27.  Below 0.27 the size of the box used in the box blur drops below 1 and no blurring occurs.  Instead, the input image is copied directly to the output (see bug #307622).  This may or may not be an acceptable behavior.

Note that any scaling performed via the transform attribute will cause stdDeviation to be scaled as well.  This means that objects with small stdDeviations will be filtered correctly when scaled up to larger proportions.  This restricts blurring errors to small blurs where they may not be noticeable.

Reproducible: Always
Robert, Tim, you guys are interested in filters, right? :-) Does one of you care to confirm this bug?
The code has

dX = (PRUint32) floor(aStdX * 3*sqrt(2*M_PI)/4 + 0.5);

And 0.27 * 3*sqrt(2*M_PI)/4 + 0.5 = 1.0075922256127776017391924701742 which is the threshold.

If dX (and dY) are zero nothing happens.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: general → nobody
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.