Commit graph

62 commits

Author SHA1 Message Date
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 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 da4bdf7702 Decompose complex lines.
Create a bunch of const variables to better profile.
2014-07-27 22:41:09 +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 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 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 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
Fabien Freling afd89f5238 Remove PackedPixel.
The RGBX format takes more space but it is more efficient to handle.
2014-07-16 20:47:43 +02:00
Fabien Freling a992cba5ed Implement RGBX for tiled images.
Interpolation is now done with SIMD with -DSIMD for tiled images as
well.
2014-07-16 20:44:32 +02:00
Fabien Freling bcf16680ae Remove RGBX structure.
The pixels are still packed as RGBX in memory but
no structure is created, it’s just a contiguous buffer.

Interpolation is now done with SIMD on integer values.

- Add SIMD define.
2014-07-16 02:08:32 +02:00
Fabien Freling cce4d45ba6 Implement pixels as RGBX structure.
- Add ‘make debug’ target
- Add links in README
2014-07-12 22:42:48 +02:00
Fabien Freling 8175b8a06c Do not save output images. 2014-07-10 22:01:55 +02:00
Fabien Freling 7c6cfd9046 Create small overlap in tiles.
Tiles overlap on the bottom line and the right column.
Having an overlap allows us to get neighbor points for each point in a
tile, regardless of its position.
2014-07-10 22:01:55 +02:00
Fabien Freling fea3e90fba Remove unused code. 2014-07-09 08:19:09 +02:00
Fabien Freling 3ab9df90df Remove temp buffer for non-tiled image. 2014-07-09 08:00:58 +02:00
Fabien Freling eb5bae42c3 Allocate tiles as a unified buffer. 2014-07-09 07:50:09 +02:00
Fabien Freling edb9ef7dd8 Remove temp tile. 2014-07-08 08:48:17 +02:00
Fabien Freling 9a9db2d4fd Interpolate on quantized values for tiled images. 2014-07-08 08:04:43 +02:00
Fabien Freling 54e35ff8d0 Tweak stats display.
Add average metric.
2014-07-07 23:36:10 +02:00
Fabien Freling 68fb1b1951 Do interpolation on quantized values. 2014-07-07 23:19:57 +02:00
Fabien Freling 67b4bcc3d3 Minimize computation in rotate_pixel().
- Deactivate tests.
- Check if delta is on integer values.
2014-07-06 23:49:46 +02:00
Fabien Freling a6ef15ea62 Create PackedPixel structure. 2014-07-06 23:47:21 +02:00
Fabien Freling 049228b377 Fill a temp buffer for each line.
We don’t write into the memory right away, we first write to a temp
buffer that we blit into the rotated image.
2014-07-04 08:23:06 +02:00
Fabien Freling e3e0d3c20a Fix first rotated tile on each row.
The first tile on each row seemed to be missing values.
This was due to the ‘continue’ statement that would prevent
src_rotated_point to be incremented properly.
2014-07-04 00:34:06 +02:00
Fabien Freling 7f29bd192a Pass tile to rotate_pixel() instead of image. 2014-07-04 00:23:54 +02:00
Fabien Freling 8811d7023e Factorize rotated point computation 2014-07-03 23:56:10 +02:00
Fabien Freling a871d92723 Add image destructors. 2014-07-03 23:56:10 +02:00
Fabien Freling 9e8d79d384 Return image pointer for rotate(). 2014-07-03 23:56:10 +02:00
Fabien Freling 8d096ee2ce Add get_save_path(). 2014-07-03 23:49:10 +02:00
Fabien Freling 4f124a2896 Remove deprecated functions (draw). 2014-07-03 23:48:11 +02:00
Fabien Freling e86dbe0f36 Factorize the computation of the source point. 2014-07-02 22:38:57 +02:00
Fabien Freling 7e33e85909 Fix tiled rotation.
- Add TiledImage::access_pixel().
- Add TiledImage::print_tile().
- Compare implementations.
2014-07-02 21:54:52 +02:00
Fabien Freling 007ad2284e Add basic tiled image type. 2014-07-01 21:52:40 +02:00
Fabien Freling 3af56f6619 Interpolate using SSE instructions. 2014-06-29 17:17:19 +02:00