[Mesa-dev] [PATCH 2/4] st/vdpau: use median filter for noise reduction

Christian König deathsimple at vodafone.de
Tue Feb 14 02:38:56 PST 2012


On 13.02.2012 15:57, Maarten Lankhorst wrote:
> Hey Christian,
>
> Op 13-02-12 13:09, Christian König schreef:
>> No, it's not really needed, but I had it this way in the first place 
>> and you need a lot of "if (something_is_not_null) cleanup(something)" 
>> in the destructor functions, and with this implementation we only 
>> need to test if it's allocated once, and that looked allot cleaner. 
> It will also allow you to do away with the error cleanup in 
> vl_median_filter_init,
> by just doing vl_median_filter_cleanup.
>
> Do you really need to re-create the entire filter though? Wouldn't 
> just uploading new quads be enough?
The strength of a median filter is defined by the window size, the 
larger the window is the more pixels you need to fetch, sort etc...
So when the strength changes you need to recreate your shaders, cause 
you need more temporaries / fetch instructions... but the rest of the 
state doesn't need to change, so a set window size function would look 
allot more simpler....

Yeah, that sounds like a good idea, but I'm going to push the fix for 
the memory leak first, and going to simplify that on the next time I'm 
touching it.

Christian.


More information about the mesa-dev mailing list