Yet another bug. This time filters vs selections

Dmitry Kazakov dimula73 at gmail.com
Mon Sep 14 12:06:17 CEST 2009


>
>
>> On Sunday 13 September 2009, Dmitry Kazakov wrote:
>>> > Btw, Blur filter doen NOT pay any attention to selections. And i do not
>>> > know the way how can it do that. =(
>>> it's probably just a matter to give the iterrators the selection object.
>>>
>>
>> It won't solve the problem of semi-selected pixels (pixels with
>> alpha~128). Such pixels should be filtered with cs->applyAlphaU8Mask()
>> separately. I think it'll be quite complex solution for blur filter.
>>
>>
>> Atm, i insist on using bitBlt after the filtering. This will make filter
>> creation much simplier, especially for filters that are quite complex
>> themselves (like convolution). My tests show the following overhead:
>>
>> when 28% of the canvas is deselected we get only 2% overhead
>> when 53% of the canvas is deselected we get only 13% overhead
>>
>
> when 73% of the canvas is deselected we get only 19% overhead
>

heh... with 95% of the canvas deselected  we get only 30% overhead. =)


It seems that 70% of the time is consumed by
KisBrightnessConstrastFilter::createTransformation(cs, config) method, not
by filtering itself. =)

I use filtering rect of size - 500x320px. If we assume, that
createTransformation() is constant time function, then enlarging filter rect
to 1+Mpx will degrade performance much.

I think the following approach can be used:

1) We drop selections from filters and use bitBlt instead
2) In the future, when new tile engine gets activated, we'll optimize filter
application. Filters will be applied tile-by-tile. This means that
rectangles with underlying tiles of selections are not present simply won't
be filtered.
3) Of course, for realization of 2) we have to drop all the constant-time
components from process function (like createTransformation()).


PS:
This approach can create some border-effect-problems, but i guess it has
already been solved in kis_dlg_adjustment_layer.cpp

-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20090914/baacad60/attachment.htm 


More information about the kimageshop mailing list