#107 closed defect (fixed)
psImagePixelInterpolate prototype definition tweaks
| Reported by: | Owned by: | eugene | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | math | Version: | unspecified |
| Severity: | normal | Keywords: | PSLib |
| Cc: |
Description
I have a few small issues/questions/suggestions regarding the specification of
psImagePixelInterpolate.
- the input image should probably be qualified as const.
- should not the return type to psF64, given it is a valid operation for psF64
imagery and there is no real need for the reduction in precision here?
- I'd like to add a parameter for the value returned if x,y is not in the image
area. That is a great help for psImageRotate (ref: psImageRotate's 'exposed'
parameter).
- FYI: In implementing this beast, I made specific (inline) private functions
for every type/mode combination (to increase performance by avoiding nested
switch statement in loops, etc.). Not sure if you'd want them in the Doxygen
documentation or not. Their definition is currently as follows:
#define p_psImagePixelInterpolateFcns(TYPE) \
inline psF64 p_psImagePixelInterpolateFLAT_##TYPE( \
const psImage *input, \
float x, \
float y, \
psF64 unexposedValue \
); \
inline psF64 p_psImagePixelInterpolateBILINEAR_##TYPE( \
const psImage *input, \
float x, \
float y, \
psF64 unexposedValue \
);
The suggested new prototype for psImagePixelInterpolate is:
psF64 psImagePixelInterpolate(
const psImage *input,
float x,
float y,
psF64 unexposedValue,
psImageInterpolateMode mode
);
Change History (6)
comment:1 by , 22 years ago
comment:2 by , 22 years ago
| Status: | new → assigned |
|---|
your suggestions, etc, all sound fine to me. I'll update our docs.
comment:3 by , 22 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
adjusted in SDRS (not in v.05)
comment:4 by , 22 years ago
| Keywords: | VERIFIED added |
|---|
The prototype for psImagePixelInterpolate in the SDRS-06 is:
psC64 psImagePixelInterpolate (const psImage *input, float x, float y, psC64
unexposedValue, psImageInterpolateMode mode);
In order for the function to be able to handle complex images, it needs a psC64
unexposedValue and a psC64 return type. Note that this differs slightly from
the suggestion RdS made, and from the implementation in rel2.
comment:5 by , 22 years ago
| bug_group: | IPP-doc? → PSLib? |
|---|---|
| Component: | PSLib SDRS → math |
| Keywords: | VERIFIED removed |
| product: | IPP-doc → PSLib |
| Resolution: | fixed |
| Status: | closed → reopened |
Please assign things that deal with code variations from the SDRS to me in the
PSLib product.

Also, I need to define this operation for complex (which is required since
psImageRotate is defined for complex). Shall I just treat the real and
imaginary planes as two independent F32/F64 planes?
I'll assume this to be the preferred means to handle complex data for
interpolation unless you say otherwise.
-rdd