Unpredictable output of filter function on XScale platform

Unpredictable output of filter function on XScale platform

I'm getting some strange and unpredictable output from the IPP Filter function on the XScale-platform (I'm using the BenQ P50).

For my Master's thesis, I need to create edge images. The IPP functions seem to be a lot faster than what I could do myself. Unfortunately, the mobile platform seems to be limited to do filtering with 8u pictures and there's no extra Sobel-function. That means that I have to do the filtering using custom filters four times to get all the required information - positive and negative edges in x/y-direction.

Most of the time this works fine. However, sometimes the output of one or both of the negative sobel filters is just not correct. I attached an image to show you the effect, the negative y-edges picture is wrong. Quite often when that happens I just switch from doing a debug build to a release build (or the other way round) and everything works fine again. Without any changes in code. In fact, I don't change anything in this piece code and sometimes it can work fine for several days (at least with one build configuration), then, suddenly, it doesn't.

Calling "clean" or "rebuild all" doesn't change anything. I tried changing the order of declaring the images, the order of the calls to the filter function, anything I could think of... But there doesn't seem to be any way how I can influence the rather unpredictable output of the filter function.

Do you have any suggestions? I have no idea what I could do in this case...

Here's the code I use to create the edge images:

const Ipp32s filterSobelXPos[3][3] = {{1,0,-1},{2,0,-2},{1,0,-1}};
const Ipp32s filterSobelYPos[3][3] = {{1,2,1},{0,0,0},{-1,-2,-1}};
const Ipp32s filterSobelXNeg[3][3] = {{-1,0,1},{-2,0,2},{-1,0,1}};
const Ipp32s filterSobelYNeg[3][3] = {{-1,-2,-1},{0,0,0},{1,2,1}};
const IppiSize sobelSize = {3, 3};
const IppiPoint kernelAnchor = {1, 1};

IppStatus status;

status = ippiFilter_8u_C1R(imgY->imageData, iImgYWidthStep, edgeXPos->imageData, iEdgeWidthStep, edgeXPos->size, *filterSobelXPos, sobelSize, kernelAnchor, 1);
status = ippiFilter_8u_C1R(imgY->imageData, iImgYWidthStep, edgeYPos->imageData, iEdgeWidthStep, edgeYPos->size, *filterSobelYPos, sobelSize, kernelAnchor, 1);
status = ippiFilter_8u_C1R(imgY->imageData, iImgYWidthStep, edgeXNeg->imageData, iEdgeWidthStep, edgeXNeg->size, *filterSobelXNeg, sobelSize, kernelAnchor, 1);
status = ippiFilter_8u_C1R(imgY->imageData, iImgYWidthStep, edgeYNeg->imageData, iEdgeWidthStep, edgeYNeg->size, *filterSobelYNeg, sobelSize, kernelAnchor, 1);

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Could you also specify for version of IPP do you use and for wich processor family (IXP or PCA)?


The BenQ P50 is running the Intel PXA 272, I'm developing using eVC 4. I'm using the latest IPP-versionavailable for this platform(w_ipp_pca_wmmx_p_5.0.2.001.exe).In the last few days the situation always stayed the same, resulting in the demonstration image I attached to the previous post no matter which build configuration.My current workaround is to substract the resulting strange edge image from the original image, which gives me the correct edges. However, the "repaired" edge image does look a bit different to the others and it's an additional performance penalty.Do you have any ideas about what could go wrong here?Thanks a lot,Andreas

I recommend you to submit your bug report to Technical Support. You also can consider opportunity to move your code to IPP for IXP, which also will run on your processor. Note, IPP for IXP does not provide WMMX optimization.


Leave a Comment

Please sign in to add a comment. Not a member? Join today