Noisy touchscreen values, especially on the horizontal axis, have been a problem on GPH devices since it was first introduced on the GP2X F200, the Wiz's predecessor.
There is a touchscreen library,
tslib, that supports most touchscreen device drivers under linux. It has modules that can be inserted to filter and smooth out touchscreens. I did not find them to be particularly helpful for curing the amount of noise in the GP2X F200 touchscreen, however.
I ultimately pulled a lot of code out of tslib and inserted it directly into the hardware-accelerated SDL for the GP2X F200. I heavily optimized it and also created a filter of my own that I found to be very successful in smoothing out the noise. You can find that code here:
http://open2x.svn.sourceforge.net/viewvc/open2x/trunk/libs-new/sdl/sdl/SDL-1.2.11/src/video/gp2x/gp2x_tslib.c?revision=375&view=markup
There is a header file it includes in that same folder. It is quite well-commented so you should be able to work things out for yourself. I can give you a brief description here, though. I hope I am remembering it correctly. It has a 15-sample buffer. When it reads a new value, it performs a weighted average of the new sample combined with all the old samples. The weights are as follows: 1-2-3-4-5-6-7-8-7-6-5-4-3-2-1 (15 samples) going from oldest to most recent, and the current sample having a relatively low weight of one. Then, it divides by the total of the weights very quickly by bit-shifting to the right 6 places (same as dividing by 64). I intentionally made the weights add up to 64, a power of 2, so the final division would be fast. Notice also in the code that it performs the multiplications required for the weighted averagings by using nothing but left-shifts and additions. It performs this for both the x and y-axis readings, and adds the averaged sample to its history and the oldest one is discarded. This averaged sample is what is reported to SDL's higher layers.
For most small movements (navigating a GUI, drawing on the screen) it is fantastic. It is very laggy for fast movements, however. Because of this, it is constantly comparing the new sample to the most recent sample. If the difference between the two is over a certain threshold, it determines that fast movement has occured and instead of performing the weighted average it instead flushes the entire history and begins it anew, reporting the sample as an unfiltered value.
The touchscreen device driver only updates its reported values at a rate of 100hz, and I actually determined that reading from it at a rate of ~50hz is more than adequate, saving CPU cycles.
I don't have enough time right now to add this to SDL for the Wiz but you could quickly adapt this to your own program and read the touchscreen device directly instead of going through SDL. I might add this to SDL later in the coming months.