Bug 328426 - Layer below is seen.
Summary: Layer below is seen.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-04 16:37 UTC by Paul Geraskin
Modified: 2013-12-05 19:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Geraskin 2013-12-04 16:37:13 UTC
Hi guys.

Layer beloq is seen. 

Here is the screenshot:
http://i.imgur.com/nVVoGEZ.png

Here is the file:
https://dl.dropboxusercontent.com/u/26887202/Krita/small_pony.psd
Comment 1 Dmitry Kazakov 2013-12-05 06:13:17 UTC
Hi, Paul!

That's an amazing bug! Thanks you! :)

I guess it happens due to  some rounding issues in the optimized comosite op :)
Comment 2 Dmitry Kazakov 2013-12-05 06:18:41 UTC
Yep, the blocks are aligned to 8 pixels, which is the size of the single AVX chunk.
http://wstaw.org/m/2013/12/05/plasma-desktopWG2430.jpg

Well, I have a unittest for that bug, but I wanted to wait until Vc implements an optimized rounding tool. Seems like we'll need to do it ourselves.
Comment 3 Dmitry Kazakov 2013-12-05 19:04:13 UTC
Git commit e00457271183242460a0d69faff84920fb645cfb by Dmitry Kazakov.
Committed on 05/12/2013 at 19:03.
Pushed by dkazakov into branch 'master'.

Fixed the rounding bug in Optimized Composite Ops

The vector and single-pixel versions of the op must generate absolutely
the same pixel values and with absolutely the same rounding rules.

This patch implements not-the-best way of rounding, because Vc doesn't
support single instruction round-and-convert-to-int opcodes (which are
present in the Intel architecture). Ideally, we should implement
Vc::iRount() method to do this.

Right now, using a separate-opcode rounding makes CompositeOver about
5-10% slower.

TODO: Implement Vc::iRound()

M  +1    -1    libs/pigment/compositeops/KoOptimizedCompositeOpAlphaDarken32.h
M  +1    -1    libs/pigment/compositeops/KoOptimizedCompositeOpOver32.h
M  +12   -5    libs/pigment/compositeops/KoStreamedMath.h

http://commits.kde.org/calligra/e00457271183242460a0d69faff84920fb645cfb
Comment 4 Dmitry Kazakov 2013-12-05 19:57:31 UTC
Git commit b77e25c1fde2523188fbe296bde7a4d4475e96fe by Dmitry Kazakov.
Committed on 05/12/2013 at 19:03.
Pushed by dkazakov into branch 'calligra/2.8'.

Fixed the rounding bug in Optimized Composite Ops

The vector and single-pixel versions of the op must generate absolutely
the same pixel values and with absolutely the same rounding rules.

This patch implements not-the-best way of rounding, because Vc doesn't
support single instruction round-and-convert-to-int opcodes (which are
present in the Intel architecture). Ideally, we should implement
Vc::iRount() method to do this.

Right now, using a separate-opcode rounding makes CompositeOver about
5-10% slower.

TODO: Implement Vc::iRound()

M  +1    -1    libs/pigment/compositeops/KoOptimizedCompositeOpAlphaDarken32.h
M  +1    -1    libs/pigment/compositeops/KoOptimizedCompositeOpOver32.h
M  +12   -5    libs/pigment/compositeops/KoStreamedMath.h

http://commits.kde.org/calligra/b77e25c1fde2523188fbe296bde7a4d4475e96fe