Remove temp tile.

master
Fabien Freling 2014-07-08 08:48:17 +02:00
parent 9a9db2d4fd
commit edb9ef7dd8
2 changed files with 3 additions and 8 deletions

View File

@ -10,10 +10,10 @@
# Cache
[-] Rotate per channel -> no gain
[ ] Load pixels in uint64-t
[ ] Load pixels in 64-bit variable
[X] Cut image in tiles
[ ] Overlap?
[X] Rotate in one temp tile then copy/move it
[-] Rotate in one temp tile then copy/move it
[-] Align memory -> no gain
# Quality

View File

@ -787,9 +787,6 @@ rotate(TiledImage<W, H> const& src, double angle)
DPoint const rot_origin_in_src_grid = get_mapped_point(*rotated, Point(0, 0), -rotation);
DPoint const rot_origin_in_src = convert_img_coord_precision(src, rot_origin_in_src_grid);
uint8_t tile[W * H * 3];
memset(tile, 0, W * H * 3);
unsigned int const quantize = 8;
int const& src_qwidth = src.width * quantize;
int const& src_qheight = src.height * quantize;
@ -799,6 +796,7 @@ rotate(TiledImage<W, H> const& src, double angle)
for (unsigned int x = 0; x < rotated->nb_col_tile; ++x)
{
unsigned int const rot_tile_index = y * rotated->nb_col_tile + x;
uint8_t* tile = rotated->tiles[rot_tile_index];
unsigned int rot_index = 0;
for (unsigned int j = 0; j < H; ++j)
@ -822,9 +820,6 @@ rotate(TiledImage<W, H> const& src, double angle)
rot_index += 3;
}
}
memcpy(rotated->tiles[rot_tile_index], tile, W * H * 3);
memset(tile, 0, W * H * 3);
}
}