Remove temp tile.
This commit is contained in:
parent
9a9db2d4fd
commit
edb9ef7dd8
4
TODO.md
4
TODO.md
|
@ -10,10 +10,10 @@
|
||||||
|
|
||||||
# Cache
|
# Cache
|
||||||
[-] Rotate per channel -> no gain
|
[-] Rotate per channel -> no gain
|
||||||
[ ] Load pixels in uint64-t
|
[ ] Load pixels in 64-bit variable
|
||||||
[X] Cut image in tiles
|
[X] Cut image in tiles
|
||||||
[ ] Overlap?
|
[ ] Overlap?
|
||||||
[X] Rotate in one temp tile then copy/move it
|
[-] Rotate in one temp tile then copy/move it
|
||||||
[-] Align memory -> no gain
|
[-] Align memory -> no gain
|
||||||
|
|
||||||
# Quality
|
# Quality
|
||||||
|
|
|
@ -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_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);
|
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;
|
unsigned int const quantize = 8;
|
||||||
int const& src_qwidth = src.width * quantize;
|
int const& src_qwidth = src.width * quantize;
|
||||||
int const& src_qheight = src.height * 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)
|
for (unsigned int x = 0; x < rotated->nb_col_tile; ++x)
|
||||||
{
|
{
|
||||||
unsigned int const rot_tile_index = y * 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;
|
unsigned int rot_index = 0;
|
||||||
|
|
||||||
for (unsigned int j = 0; j < H; ++j)
|
for (unsigned int j = 0; j < H; ++j)
|
||||||
|
@ -822,9 +820,6 @@ rotate(TiledImage<W, H> const& src, double angle)
|
||||||
rot_index += 3;
|
rot_index += 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(rotated->tiles[rot_tile_index], tile, W * H * 3);
|
|
||||||
memset(tile, 0, W * H * 3);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue