use the coordinate parameters in tile_data_pointer() instead of adjusting

2007-12-18  Sven Neumann  <sven@gimp.org>

	* app/base/tile-pyramid.c: use the coordinate parameters in
	tile_data_pointer() instead of adjusting the pointer manually.

svn path=/trunk/; revision=24392
This commit is contained in:
Sven Neumann 2007-12-18 15:40:01 +00:00 committed by Sven Neumann
parent f63b11c3aa
commit 055086aef2
2 changed files with 11 additions and 10 deletions

View File

@ -1,3 +1,8 @@
2007-12-18 Sven Neumann <sven@gimp.org>
* app/base/tile-pyramid.c: use the coordinate parameters in
tile_data_pointer() instead of adjusting the pointer manually.
2007-12-18 Sven Neumann <sven@gimp.org>
* app/base/tile-pyramid.c

View File

@ -452,17 +452,15 @@ tile_pyramid_write_quarter (Tile *dest,
const gint j)
{
const guchar *src_data = tile_data_pointer (src, 0, 0);
guchar *dest_data = tile_data_pointer (dest, 0, 0);
guchar *dest_data = tile_data_pointer (dest,
i * TILE_WIDTH / 2,
j * TILE_WIDTH / 2);
const gint src_ewidth = tile_ewidth (src);
const gint src_eheight = tile_eheight (src);
const gint dest_ewidth = tile_ewidth (dest);
const gint bpp = tile_bpp (dest);
gint y;
/* Adjust dest pointer to the right quadrant. */
dest_data += i * bpp * (TILE_WIDTH / 2) +
j * bpp * dest_ewidth * (TILE_HEIGHT / 2);
for (y = 0; y < src_eheight / 2; y++)
{
const guchar *src0 = src_data;
@ -605,17 +603,15 @@ tile_pyramid_write_upper_quarter (Tile *dest,
const gint j)
{
const guchar *src_data = tile_data_pointer (src, 0, 0);
guchar *dest_data = tile_data_pointer (dest, 0, 0);
guchar *dest_data = tile_data_pointer (dest,
i * TILE_WIDTH / 2,
j * TILE_WIDTH / 2);
const gint src_ewidth = tile_ewidth (src);
const gint src_eheight = tile_eheight (src);
const gint dest_ewidth = tile_ewidth (dest);
const gint bpp = tile_bpp (dest);
gint y;
/* Adjust dest pointer to the right quadrant. */
dest_data += i * bpp * (TILE_WIDTH / 2) +
j * bpp * dest_ewidth * (TILE_HEIGHT / 2);
for (y = 0; y < src_eheight / 2; y++)
{
const guchar *src0 = src_data;