[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Re: Yet another bug. This time filters vs selections
From: Dmitry Kazakov <dimula73 () gmail ! com>
Date: 2009-09-10 16:55:46
Message-ID: ae32c1ef0909100955x5d791a3br9117196d2111d04f () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Thu, Sep 10, 2009 at 12:18 PM, Cyrille Berger <cberger@cberger.net>wrote:
> On Wednesday 09 September 2009, Dmitry Kazakov wrote:
> > > to use such a solution for Shiva based filters, since OpenShiva doesn't
> > > know anything about masks and selections.
> >
> > I don't know how to make a benchmark of that, i guess, it would be
> > interesting to look at. We could test for the cold-cache problem at
> least.
> > (We could assume that big holes in a selection are quite rare and not
> very
> > important).
> To benchmark that, since currently it doesn't work, it's quiet easy to test
> the speed of method 2.
>
>
> You just have to make something like:
>
>
> * KisPaintDevice tmp;
> * filter->process(KisProcessInfo(src, src.origin() ), KisProcessInfo(tmp,
> QPoint(0,0), selection()), size);
> * then apply the mask on dst
>
>
> And see the overhead of applying the mask. It's still worth to pass the
> selection, so that we don't compute pixel value when the pixel is
> unselected.
>
Yes, it's not so good to filter unneeded areas, but iterating pixel by pixel
can create even bigger overhead due to cache footprint
I'll try to make some tests now.
> Thinking about that, the highest cost will be the creation of tiles for the
> tmp KisPaintDevice
>
It can be smoothed a bit by a new tile3 engine with it's pooler and COW.
> and the need to iterate twice.
>
That is worse. But i'll take a try.
--
Dmitry Kazakov
[Attachment #5 (text/html)]
<br><br><div class="gmail_quote">On Thu, Sep 10, 2009 at 12:18 PM, Cyrille Berger \
<span dir="ltr"><<a \
href="mailto:cberger@cberger.net">cberger@cberger.net</a>></span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div style="font-family: \
'DejaVu Sans'; font-size: 9pt; font-weight: 400; font-style: normal;"><div \
class="im">On Wednesday 09 September 2009, Dmitry Kazakov wrote:<br> > > to use \
such a solution for Shiva based filters, since OpenShiva doesn't<br> > > \
know anything about masks and selections.<br> ><br>
> I don't know how to make a benchmark of that, i guess, it would be<br>
> interesting to look at. We could test for the cold-cache problem at least.<br>
> (We could assume that big holes in a selection are quite rare and not very<br>
> important).<br></div>
To benchmark that, since currently it doesn't work, it's quiet easy to test \
the speed of method 2.<br> <p style="margin: 0px; text-indent: 0px;"><br></p>You just \
have to make something like:<br> <p style="margin: 0px; text-indent: 0px;"><br></p>* \
KisPaintDevice tmp;<br>
* filter->process(KisProcessInfo(src, src.origin() ), KisProcessInfo(tmp, \
QPoint(0,0), selection()), size);<br>
* then apply the mask on dst<br>
<p style="margin: 0px; text-indent: 0px;"><br></p>And see the overhead of applying \
the mask. It's still worth to pass the selection, so that we don't compute \
pixel value when the pixel is unselected.<br></div></blockquote> <div><br>Yes, \
it's not so good to filter unneeded areas, but iterating pixel by pixel can \
create even bigger overhead due to cache footprint<br> I'll try to make some \
tests now. <br></div><div><br> </div><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;"> <div style="font-family: 'DejaVu Sans'; font-size: 9pt; \
font-weight: 400; font-style: normal;">Thinking about that, the highest cost will be \
the creation of tiles for the tmp KisPaintDevice</div></blockquote><div> <br>It can \
be smoothed a bit by a new tile3 engine with it's pooler and COW.<br> \
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="font-family: \
'DejaVu Sans'; font-size: 9pt; font-weight: 400; font-style: normal;"> and \
the need to iterate twice.<br clear="all"></div></blockquote></div><br>That is worse. \
But i'll take a try.<br><br><br><br><br>-- <br>Dmitry Kazakov<br>
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic