Re: Selective Gaussian -> Early test app posted
- From: "Mattias Andersson" <mattias@xxxxxxxxxxxxx>
- Date: Thu, 14 Jul 2005 02:36:08 +0200
Eric Grange wrote:
> to attachments.
>
> Includes ability to generate a test noise bitmap, load a test JPG/BMP
> bitmap, perform noise reduction with a reference algorithm and an
> experimental one and then construct a bitmaps with the per-pixel delta
> between the two.
Okay, looks like a good start.
> Notes:
> - parameters are currently hardcoded
I hope this will change. ;)
> - if you don't have an AMD CPU, it will crash until you deactivate the
> hardcoded call to 3DNow optimized version (sorry)
That's not a problem here.
> - gives some rough timing and deviation figures (metrics to be
> refined)
Okay, I think it would be a good idea to store this in some report (together
with the input parameters used, and the size of the image).
> - includes source for a 128 bit version, though the Graphics128 unit
> isn't included (if enough participants are willing to go the 128 bit
> way, I'll probably included, for now this is for eyes only).
I'm willing to participate if the target bitmap format is 32 bit. I think if
we want to have 128 bit bitmaps as a target, then we should consider this a
separate sub-challenge.
A small sidenote: we are planning to add support for 128 bit bitmaps to the
Graphics32 library (as well as other bitmap formats). It is not unlikely
that this will be added when version 2.0 is announced. However, before that,
version 1.8 must be released -- which includes a lot of new features too.
> Purpose isn't as much to benchmark things yet, but rather to get
> started on specifics and requirements such as:
> - should the function operate on bitmaps or on rasters/scanlines?
I was going to say that I would favour an approach where a custom graphics
library (e.g. Graphics32) could be used. However, thinking about it, I see
how it might be difficult to support this option in a generic benchmark
application (unless we allow various function signatures).
If you have a routine that operates on scanlines, then you can easily make
this routine work in Graphics32 too, by simply using a wrapper routine. In
that regard I think scanlines is a good option. Of course, this means I
would have to rewrite my current routines that rely heavily on GR32 -- so in
that regard it's not a good option. ;)
> - should it operate on 32 bits and produce 32 bits, or on 128 and
> produce 128? (ie. work well on 16bits TIFF and not lose precision
> for subsequent sharpening/constrast/whatever PP)
I think we will get more participants if we choose the first alternative.
However, I would rather see two sub-challenges.
> - should the matrix/kernel be passed to the function (and thus assumed
> arbitrary) or should the function compute its own?
Well, the problem with an arbitrary kernel, is that it imposes a constraint
on the kind of optimizations you can perform. Since the gaussian kernel is
separable, you can take advantage of this fact in order to speed up the
implementation. If we assume an arbitrary kernel, then we can no longer
assume that it is still separable.
I think I would rather have the routine manage the kernel all by itself. The
parameters should IMO be restricted to the radius and the threshold value --
since these are the only parameters adjustable by the user in softwares such
as GIMP and Photoshop, and since it would be really difficult to design a
proper benchmark program with even more parameters.
> - is the current reference implementation numerically correct?
Well, as I pointed out in one of my previous posts -- the gaussian has
infinite extent. Hence, if you wanted 100% accuracy, then you should sum up
each pixel in the entire bitmap for each pixel coordinate. However, at a
certain radius the contribution of a pixel value becomes insignificant and
in this case you can safely assume the weight is zero without any impact on
the final result. I don't know what threshold value is used in GIMP, but it
might be worth taking a closer look at this.
> Also should the function support tiling/banding?
>
> This somewhat affects the bitmap vs scanlines and 32 vs 128 bits
> issues, as scanlines provide implicit support for banding, banding
> allows to process only part of the image at a time, and that
> considerably lessens the memory usage issues of 128 bits... (no need
> to have the whole bitmap converted to 128 bits anymore).
> 128 bits makes SSE usage straightforward, 32bits makes SSE2 compulsory
> (but is it an issue? are there many CPUs out there that support SSE
> and do not support neither 3DNow nor SSE2? Are they worth cattering
> to?).
I guess in order to see the advantage of this, we need rather large bitmaps?
Is it possible to determine an ideal size of each tile depending on the
amount of L1 and L2 cache? If we do support banding, does anything else in
the specification have to change (assuming we work with scanlines)?
Mattias
.
- Follow-Ups:
- Re: Selective Gaussian -> Early test app posted
- From: Lord Crc
- Re: Selective Gaussian -> Early test app posted
- From: Eric Grange
- Re: Selective Gaussian -> Early test app posted
- References:
- Selective Gaussian -> Early test app posted
- From: Eric Grange
- Selective Gaussian -> Early test app posted
- Prev by Date: Re: FastMM 4.13 Exceptions
- Next by Date: Re: FastMM 4.13 Exceptions
- Previous by thread: Re: Selective Gaussian -> Early test app posted
- Next by thread: Re: Selective Gaussian -> Early test app posted
- Index(es):
Relevant Pages
|