Charlie Vieth
acea8646b2
Fix error in YCC PixOffset and SubImage.
10 years ago
jst
ccddecd1bf
Merge branch 'charlievieth-master'
10 years ago
Charlie Vieth
a5a6a66088
Merge branch 'refactor'
10 years ago
Charlie Vieth
eefd4737aa
Optimize YCbCr image resize
10 years ago
Charlie Vieth
ee540982e0
Merge branch 'refactor'
10 years ago
Charlie Vieth
427b8d133e
Optimized Nearest-Neighbor function - 2x faster
10 years ago
Charlie Vieth
80b3fc2b3f
Pre-calculate start offset, optimize bound check
Increased performance by 30% for RGBA and 45% for Gray images, minor
performance increase for 16-bit images.
The start offset calculated by createWeights are stored in a slice and
passed to the resize functions to prevent duplication of effort.
10 years ago
jst
be07665345
Update README.md
10 years ago
jst
299762ed77
Add unit tests for converter.go
10 years ago
jst
016a61cd31
Optimize data-locality for a huge increase in processing speed.
This is a complete rewrite! The tight scaling loop needs data locality for optimal performance. The old version used lots of pointer redirections to access image data which was bad for data locality. By providing the complete loop for each image type, this problem is solved. Unfortunately this increases code duplication but the result should be worth it: I could measure a ~6x speed-up for certain test cases!
10 years ago
jst
bdfbbead13
Merge branch 'anisus-master'
10 years ago
Accipiter Nisus
f3cac2f865
Fix to resize correctly when source image.Bounds().Min is not (0,0)
10 years ago
jst
8aee0d995b
Update README.md to mention resize.Thumbnail.
11 years ago
jst
079ed2e48a
Merge branch 'master' of https://github.com/matrixik/resize into matrixik-master
11 years ago
jst
a83cb40860
Remove some redundancies.
11 years ago
jst
446eea2f7b
Remove LUT based filters.
Caching kernel weights makes using the LUT based approach obsolete. Now they seem to be even slower than their counterparts.
11 years ago
jst
9884534579
Cache kernel weights for each row.
For each row the convolution kernel is evaluated at fixed positions around "u". By calculating these values once for each row, a huge speedup is achieved.
11 years ago
jst
8f586c4f06
Add benchmarks to compare execution times.
Run "go test -bench LargeJpegThumb" to benchmark all functions at once.
11 years ago
jst
45368ad0cd
Multiply instead of dividing
11 years ago
jst
314cea6612
Avoid temporaries to save some cycles.
11 years ago
jst
7c5018c82b
Extract method "resizeSlice" to reduce duplicate code.
11 years ago
Dobrosław Żybort
b744503c5c
Add: thumbnail helper function
11 years ago
jst
f8ec710330
Fix wrong calculation of second adjust parameter.
11 years ago
jst
d9287fbcb6
Use x,y as coordinates of the origin image.
11 years ago
jst
d1bef9bdb6
Refactoring
11 years ago
jst
494d8de4e5
Speedup calculation by exploiting the separability of the resizing filter.
Should be ~5x faster! More optimization will follow.
before:
> go test -bench .
PASS
Benchmark_BigResizeLanczos3-4 1 2438137093 ns/op
Benchmark_BigResizeLanczos3Lut-4 1 1157612362 ns/op
Benchmark_Reduction-4 2 743950618 ns/op
after:
> go test -bench .
PASS
Benchmark_BigResizeLanczos3-4 5 403685685 ns/op
Benchmark_BigResizeLanczos3Lut-4 10 225539497 ns/op
Benchmark_Reduction-4 10 207004759 ns/op
11 years ago
jst
4d25061069
Fixed yet another typo.
11 years ago
jst
252ccc84a2
Add benchmarks for Lanczos3Lut to compare it with Lanczos3 performance.
11 years ago
jst
098f882331
Fix a typo.
11 years ago
jst
b272d51eaa
Update README.md
11 years ago
jst
a85ea9eaa8
Rename Lanczos functions using look-up tables to Lanczos2Lut, Lanczos3Lut and restore Lanczos2, Lanczos3 to give users the choice between higher speed or higher accuracy.
11 years ago
jst
9e5ed35b85
Move splineKernel function nearer to Lanczos definitions.
11 years ago
Geoff Adams
c1b8c4986e
Use a lookup table to speed up the Lanczos kernel
Profiling the resize operation using Lanczos kernels showed that most of
the time was spent in the Sin function, which is called twice per
evaluation of the Lanczos kernel. Generating a lookup table and doing a
linear interpolation between table entries speeds up the resize by a
factor of 4.
11 years ago
jst
33204d8746
Update README.md
11 years ago
jst
c37f8f8470
gofmt
11 years ago
jst
62777ac833
Precalculate bicubic factors, save some cycles.
11 years ago
jst
6448fff2ee
Generalize spline based filters
This also fixes a quality issue with Mitchell-Netravali: A factor was
missing in the calculation.
11 years ago
jst
5290c4773b
Add Travis build status in README
11 years ago
jst
09f4012229
Add Travis integration
11 years ago
jst
da95f74904
go fmt
11 years ago
jst
852f4a47e7
Merge branch 'no-image-shift' of http://github.com/jsummers/nfnt.resize
11 years ago
jst
84039c403b
Test for correct canvas size.
11 years ago
jst
b6fef854bc
Merge branch 'improve-canvas-size' of http://github.com/jsummers/nfnt.resize into fix-canvas-size-issue
11 years ago
jst
82ab8b977c
Make kernel the only dependency of convolution1d
12 years ago
jst
e512502b3c
Use range for more idiomatic Go
12 years ago
jst
bf09bbe0a3
boolToUint: true -> 1
12 years ago
jst
a32116ce4a
Add documentation
12 years ago
jst
0c69e0e0b7
Change order of fields in filterModel
12 years ago
jst
bf006ca38d
Description added
Describe filterModel interface,
Extract bool-to-int method
12 years ago
jst
2d6edc049a
Change ordering
12 years ago