After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759339 - processor: Setting a non-zero level to do mipmapped processing leads to invalid output
processor: Setting a non-zero level to do mipmapped processing leads to inval...
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: core
git master
Other All
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2015-12-11 10:02 UTC by Debarshi Ray
Modified: 2017-02-28 15:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case - try it with a 10240x10240 PNG (3.12 KB, text/plain)
2015-12-11 10:03 UTC, Debarshi Ray
  Details
processor: Fix rendering at non-zero levels (3.65 KB, patch)
2015-12-11 10:09 UTC, Debarshi Ray
none Details | Review

Description Debarshi Ray 2015-12-11 10:02:02 UTC
Try the attached test case with 10240x10240 PNG.

The problem is that while gegl_node_blit expects to be passed a scaled ROI, GeglProcessor doesn't scale its rectangle according to the level before blitting.
Comment 1 Debarshi Ray 2015-12-11 10:03:22 UTC
Created attachment 317192 [details]
Test case - try it with a 10240x10240 PNG
Comment 2 Debarshi Ray 2015-12-11 10:09:43 UTC
Created attachment 317193 [details] [review]
processor: Fix rendering at non-zero levels

This probably incomplete because I don't whether GeglOperationContext, gegl_buffer_set, etc. expect a scaled rectangle or unscaled, but it works with the attached test case.
Comment 3 Øyvind Kolås (pippin) 2016-02-12 10:11:40 UTC
The affine-with-negative composition test in GEGL produces a different output with this patch applied.
Comment 4 Øyvind Kolås (pippin) 2016-02-12 10:23:01 UTC
More composition ops failing:

checkerboard, noise-cell, noise-simplex, reflect, reflect2 and rotate, 

It seems like quite a few of them get a border of 100% transparency - losing their content.
Comment 5 Øyvind Kolås (pippin) 2017-02-27 22:29:03 UTC
The trouble came from how the scaling of the rectangle was done, what other
parts of GEGL do is >> level, doing that here as well removed the problems raised in comments 3 and 4.

commit 339d07c75a134cb7772959d2d541acfe229f5cac
Author: Øyvind Kolås <pippin@gimp.org>
Date:   Mon Feb 27 23:25:13 2017 +0100

    processor: make using non-zero levels for processing work
    
    gegl_node_blit expects to be passed a scaled ROI, GeglProcessor didn't use to
    scale its rectangle according to the level before blitting. Based on an
    initial patch by Debarshi Ray
Comment 6 Debarshi Ray 2017-02-28 15:06:06 UTC
Nice! Thanks.