Log in

View Full Version : filter workflow


lexor
4th March 2007, 16:27
Hi guys, I'm toying with an idea of implementing a denoise filter of my own, however having looked over a few examples I'm thinking there could be a huge inefficiency rising due to the way filters (I think) work.

Now the way I think they work is to reinitialize for every frame. My algorithm however has a very computationally expensive set up step. That set up step only depends on the frame size of the input video so it only has to be done once in the beginning of the processing and then results are applicable to all the frames that follow without change.

So before I start to code a rather difficult algorithm I'd like to see if it is viable to even try. Because if the filter is restarted for every frame, that first computational step will make performance unbearably slow. So am I correct in thinking that there is no way to make a pre-computation and store it for every subsequent frame within my filter.dll code?

Thanks for advice.

Guest
4th March 2007, 17:18
Your thinking is not correct. It's easy. Just do the setup in your filter's constructor. It will not be repeated on every frame.