diff --git a/docs/2026.html b/docs/2026.html index 0c9649226e..56ac15b807 100644 --- a/docs/2026.html +++ b/docs/2026.html @@ -125,6 +125,19 @@
Renaming
Removing
+ +

Python wrapper

+
Removing
+ + +

Test framework

+
Removing
+

Documentation

diff --git a/py/SimdPy/Simd.py b/py/SimdPy/Simd.py index 283b81672a..b07123e438 100644 --- a/py/SimdPy/Simd.py +++ b/py/SimdPy/Simd.py @@ -761,9 +761,6 @@ def Init(dir = ""): Lib.__lib.SimdFillBgra.argtypes = [ ctypes.c_void_p, ctypes.c_size_t, ctypes.c_size_t, ctypes.c_size_t, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8 ] Lib.__lib.SimdFillBgra.restype = None - Lib.__lib.SimdFillFrame.argtypes = [ ctypes.c_void_p, ctypes.c_size_t, ctypes.c_size_t, ctypes.c_size_t, ctypes.c_size_t, ctypes.c_size_t, ctypes.c_size_t, ctypes.c_size_t, ctypes.c_size_t, ctypes.c_uint8 ] - Lib.__lib.SimdFillFrame.restype = None - ## Gets version of %Simd Library. # @return A string with version. @@ -1799,20 +1796,6 @@ def FillBgr(dst : ctypes.c_void_p, stride: int, width: int, height: int, blue: i def FillBgra(dst : ctypes.c_void_p, stride: int, width: int, height: int, blue: int, green: int, red: int, alpha: int) : Lib.__lib.SimdFillBgra(dst, stride, width, height, blue, green, red, alpha) - ## Fills pixels outside given rectangle (frame) by given value. - # @param dst - a pointer to pixels data of output image. - # @param stride - a row size of output image in bytes. - # @param width - a width of output image. - # @param height - a height of output image. - # @param pixelSize - a size of the image pixel in bytes. - # @param frameLeft - a left side of a frame. - # @param frameTop - a top side of a frame. - # @param frameRight - a right side of a frame. - # @param frameBottom - a bottom side of a frame. - # @param value - a value to fill image outside of the frame. - def FillFrame(dst : ctypes.c_void_p, stride: int, width: int, height: int, pixelSize: int, frameLeft: int, frameTop: int, frameRight: int, frameBottom: int, value: int) : - Lib.__lib.SimdFillFrame(dst, stride, width, height, pixelSize, frameLeft, frameTop, frameRight, frameBottom, value) - ################################################################################################### diff --git a/py/SimdPy/Test.py b/py/SimdPy/Test.py index 90fbe94ac4..4d43ebd85c 100644 --- a/py/SimdPy/Test.py +++ b/py/SimdPy/Test.py @@ -273,7 +273,6 @@ def ImageReduceTest(args) : def ImageFillTest(args) : image = Simd.Image(Simd.PixelFormat.Bgr24, 400, 300) Simd.Lib.FillBgr(image.Data(), image.Stride(), image.Width(), image.Height(), 0, 128, 255) - Simd.Lib.FillFrame(image.Data(), image.Stride(), image.Width(), image.Height(), image.Format().PixelSize(), 50, 50, 350, 250, 64) image.Save("Fill.jpg") bgra = Simd.Image(Simd.PixelFormat.Bgra32, 400, 300) Simd.Lib.FillBgra(bgra.Data(), bgra.Stride(), bgra.Width(), bgra.Height(), 10, 20, 30, 255) diff --git a/src/Simd/SimdBase.h b/src/Simd/SimdBase.h index 79008656f3..de54e6a112 100644 --- a/src/Simd/SimdBase.h +++ b/src/Simd/SimdBase.h @@ -245,9 +245,6 @@ namespace Simd void Fill(uint8_t * dst, size_t stride, size_t width, size_t height, size_t pixelSize, uint8_t value); - void FillFrame(uint8_t * dst, size_t stride, size_t width, size_t height, size_t pixelSize, - size_t frameLeft, size_t frameTop, size_t frameRight, size_t frameBottom, uint8_t value); - void FillBgr(uint8_t * dst, size_t stride, size_t width, size_t height, uint8_t blue, uint8_t green, uint8_t red); void FillBgra(uint8_t * dst, size_t stride, size_t width, size_t height, uint8_t blue, uint8_t green, uint8_t red, uint8_t alpha); diff --git a/src/Simd/SimdBaseFill.cpp b/src/Simd/SimdBaseFill.cpp index 4fb15d863c..28713b22ca 100644 --- a/src/Simd/SimdBaseFill.cpp +++ b/src/Simd/SimdBaseFill.cpp @@ -38,51 +38,6 @@ namespace Simd } } - void FillFrame(uint8_t * dst, size_t stride, size_t width, size_t height, size_t pixelSize, - size_t frameLeft, size_t frameTop, size_t frameRight, size_t frameBottom, uint8_t value) - { - if (frameTop) - { - size_t offset = 0; - size_t size = width*pixelSize; - for (size_t row = 0; row < frameTop; ++row) - { - memset(dst + offset, value, size); - offset += stride; - } - } - if (height - frameBottom) - { - size_t offset = frameBottom*stride; - size_t size = width*pixelSize; - for (size_t row = frameBottom; row < height; ++row) - { - memset(dst + offset, value, size); - offset += stride; - } - } - if (frameLeft) - { - size_t offset = frameTop*stride; - size_t size = frameLeft*pixelSize; - for (size_t row = frameTop; row < frameBottom; ++row) - { - memset(dst + offset, value, size); - offset += stride; - } - } - if (width - frameRight) - { - size_t offset = frameTop*stride + frameRight*pixelSize; - size_t size = (width - frameRight)*pixelSize; - for (size_t row = frameTop; row < frameBottom; ++row) - { - memset(dst + offset, value, size); - offset += stride; - } - } - } - SIMD_INLINE uint64_t Fill64(uint8_t a, uint8_t b, uint8_t c) { #ifdef SIMD_BIG_ENDIAN diff --git a/src/Simd/SimdLib.cpp b/src/Simd/SimdLib.cpp index 122da67a0d..37734b9adc 100644 --- a/src/Simd/SimdLib.cpp +++ b/src/Simd/SimdLib.cpp @@ -2530,13 +2530,6 @@ SIMD_API void SimdFill(uint8_t * dst, size_t stride, size_t width, size_t height Base::Fill(dst, stride, width, height, pixelSize, value); } -SIMD_API void SimdFillFrame(uint8_t * dst, size_t stride, size_t width, size_t height, size_t pixelSize, - size_t frameLeft, size_t frameTop, size_t frameRight, size_t frameBottom, uint8_t value) -{ - SIMD_EMPTY(); - Base::FillFrame(dst, stride, width, height, pixelSize, frameLeft, frameTop, frameRight, frameBottom, value); -} - SIMD_API void SimdFillBgr(uint8_t * dst, size_t stride, size_t width, size_t height, uint8_t blue, uint8_t green, uint8_t red) { SIMD_EMPTY(); diff --git a/src/Simd/SimdLib.h b/src/Simd/SimdLib.h index d2e949df8d..5a2fcfcac0 100644 --- a/src/Simd/SimdLib.h +++ b/src/Simd/SimdLib.h @@ -3631,33 +3631,6 @@ extern "C" */ SIMD_API void SimdFill(uint8_t * dst, size_t stride, size_t width, size_t height, size_t pixelSize, uint8_t value); - /*! @ingroup filling - - \fn void SimdFillFrame(uint8_t * dst, size_t stride, size_t width, size_t height, size_t pixelSize, size_t frameLeft, size_t frameTop, size_t frameRight, size_t frameBottom, uint8_t value); - - \short Fills image pixel data outside of the given inner frame with the given 8-bit value. - - The function fills four areas: rows above frameTop, rows below frameBottom, columns before - frameLeft inside frame vertical range, and columns after frameRight inside frame vertical range. - The rectangle [frameLeft, frameRight) x [frameTop, frameBottom) is left unchanged. - Frame coordinates must satisfy frameLeft <= frameRight <= width and frameTop <= frameBottom <= height. - - \note This function has a C++ wrapper Simd::FillFrame(View& dst, const Rectangle & frame, uint8_t value). - - \param [out] dst - a pointer to pixels data of destination image. - \param [in] stride - a row size of the dst image (in bytes). - \param [in] width - an image width (in pixels). - \param [in] height - an image height (in pixels). - \param [in] pixelSize - a size of one image pixel (in bytes). - \param [in] frameLeft - a left side of the inner frame. - \param [in] frameTop - a top side of the inner frame. - \param [in] frameRight - a right side of the inner frame. - \param [in] frameBottom - a bottom side of the inner frame. - \param [in] value - a byte value to fill image pixel data outside of the frame. - */ - SIMD_API void SimdFillFrame(uint8_t * dst, size_t stride, size_t width, size_t height, size_t pixelSize, - size_t frameLeft, size_t frameTop, size_t frameRight, size_t frameBottom, uint8_t value); - /*! @ingroup filling \fn void SimdFillBgr(uint8_t * dst, size_t stride, size_t width, size_t height, uint8_t blue, uint8_t green, uint8_t red); diff --git a/src/Test/Test.cpp b/src/Test/Test.cpp index 6744703bad..b61927858d 100644 --- a/src/Test/Test.cpp +++ b/src/Test/Test.cpp @@ -197,7 +197,6 @@ namespace Test TEST_ADD_GROUP_0S(FontDraw); TEST_ADD_GROUP_A0(Fill); - TEST_ADD_GROUP_A0(FillFrame); TEST_ADD_GROUP_A0(FillBgra); TEST_ADD_GROUP_A0(FillBgr); TEST_ADD_GROUP_A0(FillPixel); diff --git a/src/Test/TestFill.cpp b/src/Test/TestFill.cpp index 92c7181c2f..c947edf9db 100644 --- a/src/Test/TestFill.cpp +++ b/src/Test/TestFill.cpp @@ -103,89 +103,6 @@ namespace Test //--------------------------------------------------------------------------------------------- - namespace - { - struct FuncF - { - typedef void(*FuncPtr)(uint8_t * dst, size_t stride, size_t width, size_t height, size_t pixelSize, - size_t frameLeft, size_t frameTop, size_t frameRight, size_t frameBottom, uint8_t value); - - FuncPtr func; - String description; - - FuncF(const FuncPtr & f, const String & d) : func(f), description(d) {} - - void Call(View & dst, const Rect & frame, uint8_t value) const - { - TEST_PERFORMANCE_TEST(description); - func(dst.data, dst.stride, dst.width, dst.height, dst.PixelSize(), - frame.left, frame.top, frame.right, frame.bottom, value); - } - }; - } - -#define FUNC_F(function) \ - FuncF(function, std::string(#function)) - - bool FillFrameAutoTest(View::Format format, int width, int height, const FuncF & f1, const FuncF & f2) - { - bool result = true; - - TEST_LOG_SS(Info, "Test " << f1.description << " & " << f2.description << " [" << width << ", " << height << "]."); - - uint8_t value = Random(256); - Rect frame(width * 1 / 15, height * 2 / 15, width * 11 / 15, height * 12 / 15); - - View d1(width, height, format, NULL, TEST_ALIGN(width)); - View d2(width, height, format, NULL, TEST_ALIGN(width)); - Simd::Fill(d1, 0); - Simd::Fill(d2, 0); - - TEST_EXECUTE_AT_LEAST_MIN_TIME(f1.Call(d1, frame, value)); - - TEST_EXECUTE_AT_LEAST_MIN_TIME(f2.Call(d2, frame, value)); - - result = result && Compare(d1, d2, 0, true, 32); - - View d3(width, height, format, NULL, TEST_ALIGN(width)); - Simd::Fill(d3, 0); - Simd::FillFrame(d3, frame, value); - result = result && Compare(d1, d3, 0, true, 32); - - return result; - } - - bool FillFrameAutoTest(const FuncF & f1, const FuncF & f2) - { - bool result = true; - - for (View::Format format = View::Gray8; format <= View::BayerBggr; format = View::Format(format + 1)) - { - if (format == View::Float || format == View::Double) - continue; - - FuncF f1c = FuncF(f1.func, f1.description + ColorDescription(format)); - FuncF f2c = FuncF(f2.func, f2.description + ColorDescription(format)); - - result = result && FillFrameAutoTest(format, W, H, f1c, f2c); - result = result && FillFrameAutoTest(format, W + O, H - O, f1c, f2c); - } - - return result; - } - - bool FillFrameAutoTest(const Options & options) - { - bool result = true; - - if (TestBase(options)) - result = result && FillFrameAutoTest(FUNC_F(Simd::Base::FillFrame), FUNC_F(SimdFillFrame)); - - return result; - } - - //--------------------------------------------------------------------------------------------- - namespace { struct FuncBgra