[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-GIFT] patch-fu
From: |
David Squire |
Subject: |
Re: [help-GIFT] patch-fu |
Date: |
Thu, 17 Aug 2006 10:13:31 +0100 |
User-agent: |
Thunderbird 1.5.0.5 (Macintosh/20060719) |
Jonas Lindqvist wrote:
Hi!
I feel an urge to ask some questions... (Perhaps silly, but anyway...
I know I could probably find the answers by digging in the code a bit
deeper, but I admit I'm lazy...)
* The function gabor_filter, in gabor.c, now uses a fixed array of
65536 doubles, instead of callocing the size indicated by the width
and height that are passed as parameters to gabor_filter(...). Very
well...
Are the width and height always 256, or can they be 128*512 or 2*32768
or whatever?
That is not a change I would approve. The width and height are presently
always 256x256, but this was always intended to be a temporary measure.
Code that does not need this assumption should not make it. The code
should be kept as open for extension and generalization as possible.
* I guess that most modern CPUs have some kind of SSE2-ish features
that gcc could use, but what would the effect of the patch be for an
architecture that lacks it? (Something seriously old, pre MMX, or
something else that perhaps one would not use for this application
anyway...)
* Wouldn't memset be faster than looping and setting to zero?:
for (i = 0; i < width*height; i++)
{
conv[i]= 0; /* needs to be zeroed */
}
calloc should handle this.
and isn't width*height always 65536?
See my comment above.
I've just got back from a few weeks away from the internet. Much
catching up to do...
Regards,
David
--
Dr David McG. Squire, Senior Lecturer, on sabbatical in 2006
Caulfield School of Information Technology, Monash University, Australia
CRICOS Provider No. 00008C http://www.csse.monash.edu.au/~davids/
- [help-GIFT] patch-fu, risc, 2006/08/16
- Re: [help-GIFT] patch-fu, Jonas Lindqvist, 2006/08/17
- Re: [help-GIFT] patch-fu,
David Squire <=
- Re: [help-GIFT] patch-fu, Jonas Lindqvist, 2006/08/17
- Re: [help-GIFT] patch-fu, David Squire, 2006/08/17
- Re: [help-GIFT] patch-fu, risc, 2006/08/17
- Re: [help-GIFT] patch-fu, David Squire, 2006/08/17
- Re: [help-GIFT] patch-fu, risc, 2006/08/17
- Re: [help-GIFT] patch-fu, David Squire, 2006/08/17
- Re: [help-GIFT] patch-fu, risc, 2006/08/17
- Re: [help-GIFT] patch-fu, David Squire, 2006/08/17
- Re: [help-GIFT] hard-coding MAX_WIDTH and MAX_HEIGHT (was: patch-fu), David Squire, 2006/08/17
Re: [help-GIFT] patch-fu, risc, 2006/08/17