Commit graph

96 commits

Author SHA1 Message Date
Fabien Freling
f618b3fed1 Extract one 64-bit value for SSE.
Instead of extracting 4 16-bit value, we directly extract a 64-bit
value.
2014-09-08 22:53:54 +02:00
Fabien Freling
d28caec8cc Implement SIMD in two passes.
In a first pass, we put the pixels values and the coefficients
in two separate buffers.

In a second pass, we computer the interpolation.
2014-09-08 22:32:35 +02:00
Fabien Freling
2491796107 Remove pixel_size in rotate_pixel().
It is now specialized for PGM format.
2014-08-11 07:51:17 +02:00
Fabien Freling
ea7855b9dd Remove dead code. 2014-08-08 23:08:48 +02:00
Fabien Freling
b4032a3eee Do one memset for left and right padding. 2014-08-08 19:29:46 +02:00
Fabien Freling
fdbe6efc35 Remove obsolete TODO comments. 2014-08-07 20:10:18 +02:00
Fabien Freling
fd36a3bea6 Merge left and right padding into one table. 2014-08-07 20:05:01 +02:00
Fabien Freling
242813ed41 Update padding and deactivate borders.
Borders are merged with padding for now.
2014-08-07 19:50:13 +02:00
Fabien Freling
4f46d32b9e Add borders. 2014-08-07 01:24:29 +02:00
Fabien Freling
bd84e85c1e Activate right padding. 2014-08-07 00:31:03 +02:00
Fabien Freling
723cd88d56 Do a memset for padding. 2014-08-06 23:22:29 +02:00
Fabien Freling
237ed00689 Add right padding as mirror of left padding. 2014-08-06 23:22:02 +02:00
Fabien Freling
eb710efc68 Deactivate last line / column.
This causes the check_00() and check_90() to fail.
2014-08-06 23:12:44 +02:00
Fabien Freling
817b1a779b Rotate to 360. 2014-08-06 23:12:08 +02:00
Fabien Freling
a419225ea3 Add logging lines. 2014-08-06 23:11:56 +02:00
Fabien Freling
7ac7522908 Add check when building padding table. 2014-08-06 23:11:42 +02:00
Fabien Freling
f2234dea1f Deactivate right padding. 2014-08-06 23:01:50 +02:00
Fabien Freling
b015d91331 Round small deltas to 0.
Otherwise it triggers a small change.
2014-08-06 23:01:29 +02:00
Fabien Freling
e2a17282aa Remove boundary check in rotate_pixel().
This check makes the last line invalid.
2014-08-06 22:33:41 +02:00
Fabien Freling
210dff5c62 Remove tiled image rotation. 2014-08-06 22:26:24 +02:00
Fabien Freling
8adf17510f Fix qdx and qdy computation.
Off-by-1 error.
2014-08-06 22:24:20 +02:00
Fabien Freling
199ab32254 Add check_00(). 2014-08-06 22:23:40 +02:00
Fabien Freling
e88962753c Add logging macro. 2014-08-06 22:23:15 +02:00
Fabien Freling
593352bc45 Use qdx to infer padding.
The border is unused for now.

I set padding to a specific color.
2014-08-06 21:49:40 +02:00
Fabien Freling
43208cea90 Update TODO. 2014-08-06 21:44:00 +02:00
Fabien Freling
5403a2deeb Clean images before doing a run. 2014-08-06 21:43:27 +02:00
Fabien Freling
df00295cd1 Patch border to have at least one pixel.
We check that we have a border of at least 1 pixel in 8-neighborhood.
2014-08-05 23:47:39 +02:00
Fabien Freling
7f1bd27ac0 Add borders in padding printing. 2014-08-05 22:45:43 +02:00
Fabien Freling
57c5052908 Add border pixels.
A border pixels is a pixel missing a neighbor.
2014-08-05 22:36:48 +02:00
Fabien Freling
085dc2861c Set padding pixels to black. 2014-08-05 22:30:37 +02:00
Fabien Freling
b008cccb95 Add print_padding_table(). 2014-08-05 22:25:06 +02:00
Fabien Freling
8febb99bf9 Use src_rotated_origin to create src_rotated_point. 2014-08-05 22:19:07 +02:00
Fabien Freling
9dbaafece1 Add padding table.
We don't set the memory to 0 anymore, we'll use padding.
We can see artifacts in the background for now.
2014-08-05 22:16:10 +02:00
Fabien Freling
4cec5287d7 Hardcode buffer step.
It will free one register.
2014-08-05 08:48:52 +02:00
Fabien Freling
784fc07a15 Set integer point type to int32_t. 2014-08-05 08:47:52 +02:00
Fabien Freling
bcc195c775 Update build for Linux.
Add flags for SSE instructions.
2014-07-28 19:47:51 +02:00
Fabien Freling
da4bdf7702 Decompose complex lines.
Create a bunch of const variables to better profile.
2014-07-27 22:41:09 +02:00
Fabien Freling
4dba86c9f0 Add configure script.
- Deactivate LTO.
- Deactivate SIMD.
2014-07-27 18:01:41 +02:00
Fabien Freling
f8178fae98 Add 'callgrind' target.
- Reactivate SIMD.
2014-07-24 22:40:02 +02:00
Fabien Freling
c704c14526 Add 'runall' target.
The ‘runall’ target runs the rotation on different sizes:
- 512x512
- 1024x1024
- 3000x3000
2014-07-24 22:17:55 +02:00
Fabien Freling
760d6244d0 Have different quantifications.
I now have a precise quantification for point position and a more
approximate one for pixel interpolation.
2014-07-24 22:13:47 +02:00
Fabien Freling
80b004a418 Change Point type to int64_t. 2014-07-24 22:11:31 +02:00
Fabien Freling
e804d9b5ca Add TPoint operators +=, -=, *=, /= 2014-07-24 00:40:27 +02:00
Fabien Freling
e7802e30fd Compute src position in quantified coordinates.
Instead of relying on floating values for the position in the
source image, we quantify all positions with a power of 2.

We lose some precision and the delta step is less accurate, leading in
some offset at the end.

For now the rotation is not correct.
2014-07-23 23:44:14 +02:00
Fabien Freling
9cdea5bcc3 Add lena_64.pgm (useful for debugging). 2014-07-23 23:40:29 +02:00
Fabien Freling
7e152c29fc Add support for PGM format.
The code has been split into different source files.

This breaks for now rotation for tiled images and PPM format. The focus
is now on the PGM format.
2014-07-21 06:57:08 +02:00
Fabien Freling
53974a4116 Add PGM images of Lena of various sizes. 2014-07-20 13:14:51 +02:00
Fabien Freling
20055e22c5 Clean Makefile indentation. 2014-07-16 22:07:30 +02:00
Fabien Freling
c918ca5504 Remove out-of-bounds check for tiled images.
Since tiles have an overlap, if the absolute point is inside the source
image, we can interpolate.
2014-07-16 21:50:25 +02:00
Fabien Freling
5f78958584 Use PIXEL_SIZE to move to next pixel in I/O. 2014-07-16 20:52:52 +02:00