diff --git a/README.md b/README.md index fbde6cc..4fadefe 100644 --- a/README.md +++ b/README.md @@ -196,22 +196,24 @@ VERSION: 1.7.0 COMMANDS: - blockmozaic - boxblur - brightness - clone - contrast - edge - emboss - gamma - gaussianblur - gradient - grayscale - highpass - invert - laplacian - rotate - sobel + blockmozaic + boxblur + brightness + clone + contrast + dilation + edge + emboss + erosion + gamma + gaussianblur + gradient + grayscale + highpass + invert + laplacian + rotate + sobel help, h Shows a list of commands or help for one command GLOBAL OPTIONS: @@ -231,22 +233,25 @@ darwin/amd64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz ``` benchmark... src 320x240 -BenchmarkJIT/cloneimg : 0.01770ms -BenchmarkJIT/rotate : 0.02045ms -BenchmarkJIT/grayscale : 0.11156ms -BenchmarkJIT/invert : 0.06351ms -BenchmarkJIT/brightness : 0.06539ms -BenchmarkJIT/gammacorrection : 0.13358ms -BenchmarkJIT/contrast : 0.08683ms -BenchmarkJIT/boxblur : 0.32303ms -BenchmarkJIT/gaussianblur : 0.31415ms -BenchmarkJIT/edge : 0.10656ms -BenchmarkJIT/sobel : 0.12836ms -BenchmarkJIT/emboss : 0.15628ms -BenchmarkJIT/laplacian : 0.16627ms -BenchmarkJIT/highpass : 0.17836ms -BenchmarkJIT/gradient : 0.15612ms -BenchmarkJIT/blockmozaic : 0.34116ms +BenchmarkJIT/cloneimg : 0.01805ms +BenchmarkJIT/rotate : 0.02173ms +BenchmarkJIT/erosion : 0.06836ms +BenchmarkJIT/dilation : 0.06849ms +BenchmarkJIT/grayscale : 0.11893ms +BenchmarkJIT/invert : 0.06620ms +BenchmarkJIT/brightness : 0.08915ms +BenchmarkJIT/gammacorrection : 0.10024ms +BenchmarkJIT/contrast : 0.09237ms +BenchmarkJIT/boxblur : 0.33524ms +BenchmarkJIT/gaussianblur : 0.31813ms +BenchmarkJIT/edge : 0.10531ms +BenchmarkJIT/sobel : 0.12117ms +BenchmarkJIT/canny : 0.34783ms +BenchmarkJIT/emboss : 0.15647ms +BenchmarkJIT/laplacian : 0.16669ms +BenchmarkJIT/highpass : 0.18053ms +BenchmarkJIT/gradient : 0.17972ms +BenchmarkJIT/blockmozaic : 0.34307ms ``` ## AOT benchmarks diff --git a/blurry.cpp b/blurry.cpp index 9d9964a..6ea76d3 100644 --- a/blurry.cpp +++ b/blurry.cpp @@ -637,7 +637,7 @@ Func canny_fn(Func input, Param width, Param height) { Expr sigma = 5.0f; RDom gauss_rd = RDom(-2, 5, "gaussian_rdom"); - Func gauss = gaussian(in, sigma, gauss_rd, "gaussian5x5"); + Func gauss = gaussian(in, sigma, gauss_rd, "canny"); Func ks_x = Func("kernel_sobel_x"); ks_x(x, y) = 0; diff --git a/libblockmozaic_linux.a b/libblockmozaic_linux.a index 889501f..183a5f8 100644 Binary files a/libblockmozaic_linux.a and b/libblockmozaic_linux.a differ diff --git a/libblockmozaic_osx.a b/libblockmozaic_osx.a index 4420305..9e16724 100644 Binary files a/libblockmozaic_osx.a and b/libblockmozaic_osx.a differ diff --git a/libsobel3x3_linux.a b/libcanny_linux.a similarity index 58% rename from libsobel3x3_linux.a rename to libcanny_linux.a index 5fe1d45..317263f 100644 Binary files a/libsobel3x3_linux.a and b/libcanny_linux.a differ diff --git a/libsobel3x3_osx.h b/libcanny_linux.h similarity index 79% rename from libsobel3x3_osx.h rename to libcanny_linux.h index 8051b61..66aa532 100644 --- a/libsobel3x3_osx.h +++ b/libcanny_linux.h @@ -1,5 +1,5 @@ -#ifndef HALIDE__libsobel3x3_osx_h -#define HALIDE__libsobel3x3_osx_h +#ifndef HALIDE__libcanny_linux_h +#define HALIDE__libcanny_linux_h #include // Forward declarations of the types used in the interface @@ -41,13 +41,13 @@ extern "C" { #endif HALIDE_FUNCTION_ATTRS -int sobel3x3(struct halide_buffer_t *_p13_buffer, int32_t _width, int32_t _height, struct halide_buffer_t *_sobel3x3_buffer); +int canny(struct halide_buffer_t *_p13_buffer, int32_t _width, int32_t _height, struct halide_buffer_t *_canny_buffer); HALIDE_FUNCTION_ATTRS -int sobel3x3_argv(void **args); +int canny_argv(void **args); HALIDE_FUNCTION_ATTRS -const struct halide_filter_metadata_t *sobel3x3_metadata(); +const struct halide_filter_metadata_t *canny_metadata(); #ifdef __cplusplus } // extern "C" diff --git a/libcanny_osx.a b/libcanny_osx.a new file mode 100644 index 0000000..624089a Binary files /dev/null and b/libcanny_osx.a differ diff --git a/libsobel3x3_linux.h b/libcanny_osx.h similarity index 79% rename from libsobel3x3_linux.h rename to libcanny_osx.h index 933bdfb..ec496e4 100644 --- a/libsobel3x3_linux.h +++ b/libcanny_osx.h @@ -1,5 +1,5 @@ -#ifndef HALIDE__libsobel3x3_linux_h -#define HALIDE__libsobel3x3_linux_h +#ifndef HALIDE__libcanny_osx_h +#define HALIDE__libcanny_osx_h #include // Forward declarations of the types used in the interface @@ -41,13 +41,13 @@ extern "C" { #endif HALIDE_FUNCTION_ATTRS -int sobel3x3(struct halide_buffer_t *_p13_buffer, int32_t _width, int32_t _height, struct halide_buffer_t *_sobel3x3_buffer); +int canny(struct halide_buffer_t *_p13_buffer, int32_t _width, int32_t _height, struct halide_buffer_t *_canny_buffer); HALIDE_FUNCTION_ATTRS -int sobel3x3_argv(void **args); +int canny_argv(void **args); HALIDE_FUNCTION_ATTRS -const struct halide_filter_metadata_t *sobel3x3_metadata(); +const struct halide_filter_metadata_t *canny_metadata(); #ifdef __cplusplus } // extern "C" diff --git a/libedge_linux.a b/libedge_linux.a index bbcd20e..09260df 100644 Binary files a/libedge_linux.a and b/libedge_linux.a differ diff --git a/libedge_osx.a b/libedge_osx.a index 78e0f22..3e4ef68 100644 Binary files a/libedge_osx.a and b/libedge_osx.a differ diff --git a/libemboss_linux.a b/libemboss_linux.a index 85eee4d..2e47ba0 100644 Binary files a/libemboss_linux.a and b/libemboss_linux.a differ diff --git a/libemboss_osx.a b/libemboss_osx.a index 37f1e73..d12dc51 100644 Binary files a/libemboss_osx.a and b/libemboss_osx.a differ diff --git a/libgaussianblur_linux.a b/libgaussianblur_linux.a index 99365f2..a7fa5fe 100644 Binary files a/libgaussianblur_linux.a and b/libgaussianblur_linux.a differ diff --git a/libgaussianblur_osx.a b/libgaussianblur_osx.a index 9c33c37..234322c 100644 Binary files a/libgaussianblur_osx.a and b/libgaussianblur_osx.a differ diff --git a/libgradient_linux.a b/libgradient_linux.a index f181a98..36a5fb1 100644 Binary files a/libgradient_linux.a and b/libgradient_linux.a differ diff --git a/libgradient_osx.a b/libgradient_osx.a index ee4a6c5..525eea9 100644 Binary files a/libgradient_osx.a and b/libgradient_osx.a differ diff --git a/libhighpass_linux.a b/libhighpass_linux.a index 947df2e..77d18bd 100644 Binary files a/libhighpass_linux.a and b/libhighpass_linux.a differ diff --git a/libhighpass_osx.a b/libhighpass_osx.a index c39d669..16805bb 100644 Binary files a/libhighpass_osx.a and b/libhighpass_osx.a differ diff --git a/liblaplacian_linux.a b/liblaplacian_linux.a index ef770e0..7db25e5 100644 Binary files a/liblaplacian_linux.a and b/liblaplacian_linux.a differ diff --git a/liblaplacian_osx.a b/liblaplacian_osx.a index 389f7f3..349c0da 100644 Binary files a/liblaplacian_osx.a and b/liblaplacian_osx.a differ diff --git a/libsobel3x3_osx.a b/libsobel3x3_osx.a deleted file mode 100644 index b480298..0000000 Binary files a/libsobel3x3_osx.a and /dev/null differ diff --git a/libsobel_linux.a b/libsobel_linux.a index f5b7f0c..47ff5a3 100644 Binary files a/libsobel_linux.a and b/libsobel_linux.a differ diff --git a/libsobel_osx.a b/libsobel_osx.a index 5c93be9..ad07e09 100644 Binary files a/libsobel_osx.a and b/libsobel_osx.a differ