From edb9ef7dd8e4404cdbe394c275032bf4306b9202 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Tue, 8 Jul 2014 08:48:17 +0200 Subject: [PATCH] Remove temp tile. --- TODO.md | 4 ++-- rotation.cpp | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/TODO.md b/TODO.md index 307058e..c5e26ef 100644 --- a/TODO.md +++ b/TODO.md @@ -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 diff --git a/rotation.cpp b/rotation.cpp index b5e21d6..5ee6839 100644 --- a/rotation.cpp +++ b/rotation.cpp @@ -787,9 +787,6 @@ rotate(TiledImage 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 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 const& src, double angle) rot_index += 3; } } - - memcpy(rotated->tiles[rot_tile_index], tile, W * H * 3); - memset(tile, 0, W * H * 3); } }