mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Add small cache before convolution for seq access
This commit is contained in:
parent
ae968142ee
commit
3810f642d3
@ -459,6 +459,15 @@ class ResizeWorker : public NanAsyncWorker {
|
|||||||
return Error();
|
return Error();
|
||||||
}
|
}
|
||||||
vips_object_local(hook, gaussian);
|
vips_object_local(hook, gaussian);
|
||||||
|
// Sequential input requires a small linecache before use of convolution
|
||||||
|
if (baton->accessMethod == VIPS_ACCESS_SEQUENTIAL) {
|
||||||
|
VipsImage *lineCached;
|
||||||
|
if (vips_linecache(image, &lineCached, "access", VIPS_ACCESS_SEQUENTIAL, "tile_height", 1, "threaded", TRUE, NULL)) {
|
||||||
|
return Error();
|
||||||
|
}
|
||||||
|
vips_object_local(hook, lineCached);
|
||||||
|
image = lineCached;
|
||||||
|
}
|
||||||
// Apply Gaussian function
|
// Apply Gaussian function
|
||||||
VipsImage *blurred;
|
VipsImage *blurred;
|
||||||
if (vips_convsep(image, &blurred, gaussian, "precision", VIPS_PRECISION_INTEGER, NULL)) {
|
if (vips_convsep(image, &blurred, gaussian, "precision", VIPS_PRECISION_INTEGER, NULL)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user