﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
754	psImageSmooth algorithm	David.Robbins@…	Paul Price	"It appears as though the current implementation of psImageSmooth was a recent
addition to replace slower, existing code.  It appears however, that this
function is not working for a couple of reasons.  First, when given a square
matrix (ie, numCols=numRows) the function produces incorrect answers.  Secondly,
and more disastrous, when the matrix is not square the function can result in an
abort call.  
ie, for test case #2 in tst_psImageSmooth (numCols=1, numRows=20) the following
output results:

...
classdhcp178.mhpcc.hawaii.edu|E|checkMemBlock (psMemory.c:180)
    Memory block 26 is corrupted; buffer overflow detected.
classdhcp178.mhpcc.hawaii.edu|A|memProblemCallbackDefault
    Detected a problem in the memory system at psVector.c:59
Return value mismatch: expected 1, got -6
---> TESTPOINT FAILED (psImage{psImageSmooth} | tst_psImageSmooth.c)


I've done some further investigating and determined that this problem is being
cause by an attempt to store values outside the allocated psVector range. 
Here's what's happening in this case:    (...in psImageConvolve.c:)
617:  temp = psVectorAlloc(1, PS_TYPE_##TYPE); \
621:  ps##TYPE *vo = temp->data.TYPE; \
624:  for (int i=0; i < 5; i++, vi++, vo++) { \
632:  *vo = s / g; \

I'm not exactly sure how to fix this other than looking up the algorithm on the
internet and re-implementing the function myself.  Please let me know how to
proceed here."	defect	closed	high		PSLib SDRS	unspecified	normal	fixed		
