• Debarshi Ray's avatar
    buffer: Fix handling of the bottom abyss edge for negative co-ordinates · 863272d8
    Debarshi Ray authored
    The bufy value is an offset relative to the beginning of the memory
    buffer. It indicates the number of rows that've already been written
    and the index of the next row. On the other hand, the abyss_y_total
    value is the absolute vertical co-ordinate that lies just beyond the
    bottom edge of the abyss. It's the sum of the top edge and height of
    the abyss. In short, they lie in two different co-ordinate spaces - one
    relative, the other absolute.
    
    Therefore, bufy can only be used with abyss_y_total if the vertical
    co-ordinate of the top edge is used to normalize the spaces.
    
    Consider writing to [(-160,-160) 640x640] that matches the extent and
    abyss of a GeglBuffer with 80x80 tiles. When bufy equals 480 at the
    beginning of the 480th row in the buffer, the target absolute
    co-ordinate in the buffer would be (0, 320) at the top left corner of
    the seventh row of tiles. The abyss_y_total of this buffer is also 480.
    Here, the existing calculation breaks down and the writes get
    truncated.
    
    Fallout from 52e28c10
    
    !15
    863272d8
Name
Last commit
Last update
..
buffer Loading commit data...
graph Loading commit data...
module Loading commit data...
opencl Loading commit data...
operation Loading commit data...
process Loading commit data...
property-types Loading commit data...
.gitignore Loading commit data...
Gegl.metadata.in Loading commit data...
Makefile.am Loading commit data...
gegl-apply.c Loading commit data...
gegl-apply.h Loading commit data...
gegl-config.c Loading commit data...
gegl-config.h Loading commit data...
gegl-cpuaccel-private.h Loading commit data...
gegl-cpuaccel.c Loading commit data...
gegl-cpuaccel.h Loading commit data...
gegl-debug.h Loading commit data...
gegl-dot-visitor.c Loading commit data...
gegl-dot-visitor.h Loading commit data...
gegl-dot.c Loading commit data...
gegl-dot.h Loading commit data...
gegl-enums.c Loading commit data...
gegl-enums.h Loading commit data...
gegl-gio-private.h Loading commit data...
gegl-gio.c Loading commit data...
gegl-init-private.h Loading commit data...
gegl-init.c Loading commit data...
gegl-init.h Loading commit data...
gegl-instrument.c Loading commit data...
gegl-instrument.h Loading commit data...
gegl-introspection-support.c Loading commit data...
gegl-introspection-support.h Loading commit data...
gegl-lookup.c Loading commit data...
gegl-lookup.h Loading commit data...
gegl-matrix.c Loading commit data...
gegl-matrix.h Loading commit data...
gegl-module.h Loading commit data...
gegl-op.h Loading commit data...
gegl-operations-util.h Loading commit data...
gegl-parallel-private.h Loading commit data...
gegl-parallel.c Loading commit data...
gegl-parallel.h Loading commit data...
gegl-plugin.h Loading commit data...
gegl-random-private.h Loading commit data...
gegl-random.c Loading commit data...
gegl-random.h Loading commit data...
gegl-serialize.c Loading commit data...
gegl-stats.c Loading commit data...
gegl-stats.h Loading commit data...
gegl-types-internal.h Loading commit data...
gegl-types.h Loading commit data...
gegl-utils.c Loading commit data...
gegl-utils.h Loading commit data...
gegl-version.h.in Loading commit data...
gegl-xml.c Loading commit data...
gegl-xml.h Loading commit data...
gegl.deps.in Loading commit data...
gegl.h Loading commit data...