diff --git a/docs/2026.html b/docs/2026.html index 9c88f424aa..9635f3f248 100644 --- a/docs/2026.html +++ b/docs/2026.html @@ -103,6 +103,33 @@
Improving
  • Description of function SimdAlphaFilling.
  • Description of function SimdAlphaPremultiply.
  • Description of function SimdAlphaUnpremultiply.
  • +
  • Description of function SimdBackgroundGrowRangeSlow.
  • +
  • Description of function SimdBackgroundGrowRangeFast.
  • +
  • Description of function SimdBackgroundIncrementCount.
  • +
  • Description of function SimdBackgroundAdjustRange.
  • +
  • Description of function SimdBackgroundAdjustRangeMasked.
  • +
  • Description of function SimdBackgroundShiftRange.
  • +
  • Description of function SimdBackgroundShiftRangeMasked.
  • +
  • Description of function SimdBackgroundInitMask.
  • +
  • Description of function SimdBase64Decode.
  • +
  • Description of function SimdBase64Encode.
  • +
  • Description of function SimdBayerToBgr.
  • +
  • Description of function SimdBayerToBgra.
  • +
  • Description of function SimdBgraToBayer.
  • +
  • Description of function SimdBgraToBgr.
  • +
  • Description of function SimdBgraToGray.
  • +
  • Description of function SimdBgraToRgb.
  • +
  • Description of function SimdBgraToRgba.
  • +
  • Description of function SimdBgraToYuv420pV2.
  • +
  • Description of function SimdBgraToYuv422pV2.
  • +
  • Description of function SimdBgraToYuv444pV2.
  • +
  • Description of function SimdBgraToYuva420pV2.
  • +
  • Description of function SimdBgrToBayer.
  • +
  • Description of function SimdBgrToBgra.
  • +
  • Description of function SimdBgr48pToBgra32.
  • +
  • Description of function SimdBgrToGray.
  • +
  • Description of function SimdBgrToHsl.
  • +
  • Description of function SimdBgrToHsv.
  • Home diff --git a/docs/help/group__background.html b/docs/help/group__background.html index 09e6149c22..887b5e3e58 100644 --- a/docs/help/group__background.html +++ b/docs/help/group__background.html @@ -51,28 +51,28 @@

    Simd Library Documentation.

    Functions

    SIMD_API void SimdBackgroundGrowRangeSlow (const uint8_t *value, size_t valueStride, size_t width, size_t height, uint8_t *lo, size_t loStride, uint8_t *hi, size_t hiStride) - Performs background update (initial grow, slow mode). More...
    + Performs slow expansion of background range. More...
      SIMD_API void SimdBackgroundGrowRangeFast (const uint8_t *value, size_t valueStride, size_t width, size_t height, uint8_t *lo, size_t loStride, uint8_t *hi, size_t hiStride) - Performs background update (initial grow, fast mode). More...
    + Performs fast expansion of background range. More...
      SIMD_API void SimdBackgroundIncrementCount (const uint8_t *value, size_t valueStride, size_t width, size_t height, const uint8_t *loValue, size_t loValueStride, const uint8_t *hiValue, size_t hiValueStride, uint8_t *loCount, size_t loCountStride, uint8_t *hiCount, size_t hiCountStride) - Performs collection of background statistic. More...
    + Collects background out-of-range statistics. More...
      SIMD_API void SimdBackgroundAdjustRange (uint8_t *loCount, size_t loCountStride, size_t width, size_t height, uint8_t *loValue, size_t loValueStride, uint8_t *hiCount, size_t hiCountStride, uint8_t *hiValue, size_t hiValueStride, uint8_t threshold) - Performs adjustment of background range. More...
    + Adjusts background range using collected counters. More...
      SIMD_API void SimdBackgroundAdjustRangeMasked (uint8_t *loCount, size_t loCountStride, size_t width, size_t height, uint8_t *loValue, size_t loValueStride, uint8_t *hiCount, size_t hiCountStride, uint8_t *hiValue, size_t hiValueStride, uint8_t threshold, const uint8_t *mask, size_t maskStride) - Performs adjustment of background range with using adjust range mask. More...
    + Adjusts background range using collected counters and a mask. More...
      SIMD_API void SimdBackgroundShiftRange (const uint8_t *value, size_t valueStride, size_t width, size_t height, uint8_t *lo, size_t loStride, uint8_t *hi, size_t hiStride) - Shifts background range. More...
    + Shifts background range to include current value. More...
      SIMD_API void SimdBackgroundShiftRangeMasked (const uint8_t *value, size_t valueStride, size_t width, size_t height, uint8_t *lo, size_t loStride, uint8_t *hi, size_t hiStride, const uint8_t *mask, size_t maskStride) - Shifts background range with using shift range mask. More...
    + Shifts background range to include current value using a mask. More...
      SIMD_API void SimdBackgroundInitMask (const uint8_t *src, size_t srcStride, size_t width, size_t height, uint8_t index, uint8_t value, uint8_t *dst, size_t dstStride) - Creates background update mask. More...
    + Initializes background update mask by selected source index. More...
      template<template< class > class A> SIMD_INLINE void BackgroundGrowRangeSlow (const View< A > &value, View< A > &lo, View< A > &hi) @@ -172,9 +172,9 @@

    -

    Performs background update (initial grow, slow mode).

    +

    Performs slow expansion of background range.

    All images must have the same width, height and format (8-bit gray).

    -

    For every point:

    lo[i] -= value[i] < lo[i] ? 1 : 0;
    +

    For every point, range bounds are moved by one step toward current value:

    lo[i] -= value[i] < lo[i] ? 1 : 0;
     hi[i] += value[i] > hi[i] ? 1 : 0;
     

    This function is used for background updating in motion detection algorithm.

    Note
    This function has a C++ wrapper Simd::BackgroundGrowRangeSlow(const View<A>& value, View<A>& lo, View<A>& hi).
    @@ -256,9 +256,9 @@

    -

    Performs background update (initial grow, fast mode).

    +

    Performs fast expansion of background range.

    All images must have the same width, height and format (8-bit gray).

    -

    For every point:

    lo[i] = value[i] < lo[i] ? value[i] : lo[i];
    +

    For every point, range bounds are expanded to include current value:

    lo[i] = value[i] < lo[i] ? value[i] : lo[i];
     hi[i] = value[i] > hi[i] ? value[i] : hi[i];
     

    This function is used for background updating in motion detection algorithm.

    Note
    This function has a C++ wrapper Simd::BackgroundGrowRangeFast(const View<A>& value, View<A>& lo, View<A>& hi).
    @@ -364,9 +364,9 @@

    -

    Performs collection of background statistic.

    +

    Collects background out-of-range statistics.

    All images must have the same width, height and format (8-bit gray).

    -

    Updates background statistic counters for every point:

    loCount[i] += (value[i] < loValue[i] && loCount[i] < 255) ? 1 : 0;
    +

    For every point, counters are incremented with saturation to 255:

    loCount[i] += (value[i] < loValue[i] && loCount[i] < 255) ? 1 : 0;
     hiCount[i] += (value[i] > hiValue[i] && hiCount[i] < 255) ? 1 : 0;
     

    This function is used for background updating in motion detection algorithm.

    Note
    This function has a C++ wrapper Simd::BackgroundIncrementCount(const View<A>& value, const View<A>& loValue, const View<A>& hiValue, View<A>& loCount, View<A>& hiCount).
    @@ -470,9 +470,9 @@

    -

    Performs adjustment of background range.

    +

    Adjusts background range using collected counters.

    All images must have the same width, height and format (8-bit gray).

    -

    Adjusts background range for every point:

    loValue[i] -= (loCount[i] > threshold && loValue[i] > 0) ? 1 : 0;
    +

    For every point:

    loValue[i] -= (loCount[i] > threshold && loValue[i] > 0) ? 1 : 0;
     loValue[i] += (loCount[i] < threshold && loValue[i] < 255) ? 1 : 0;
     loCount[i] = 0;
     hiValue[i] += (hiCount[i] > threshold && hiValue[i] < 255) ? 1 : 0;
    @@ -591,9 +591,9 @@ 

    -

    Performs adjustment of background range with using adjust range mask.

    +

    Adjusts background range using collected counters and a mask.

    All images must have the same width, height and format (8-bit gray).

    -

    Adjusts background range for every point:

    if(mask[i])
    +

    For every point:

    if(mask[i])
     {
         loValue[i] -= (loCount[i] > threshold && loValue[i] > 0) ? 1 : 0;
         loValue[i] += (loCount[i] < threshold && loValue[i] < 255) ? 1 : 0;
    @@ -687,17 +687,19 @@ 

    -

    Shifts background range.

    +

    Shifts background range to include current value.

    All images must have the same width, height and format (8-bit gray).

    -

    For every point:

    if (value[i] > hi[i])
    +

    For every point:

    add = value[i] - hi[i];
    +sub = lo[i] - value[i];
    +if(add > 0)
     {
    -    lo[i] = min(lo[i] + value[i] - hi[i], 255);
    -    hi[i] = value[i];
    +    lo[i] = min(lo[i] + add, 255);
    +    hi[i] = min(hi[i] + add, 255);
     }
    -if (lo[i] > value[i])
    +if(sub > 0)
     {
    -    lo[i] = value[i];
    -    hi[i] = max(hi[i] - lo[i] + value[i], 0);
    +    lo[i] = max(lo[i] - sub, 0);
    +    hi[i] = max(hi[i] - sub, 0);
     }
     

    This function is used for fast background updating in motion detection algorithm.

    Note
    This function has a C++ wrapper Simd::BackgroundShiftRange(const View<A>& value, View<A>& lo, View<A>& hi).
    @@ -791,19 +793,21 @@

    -

    Shifts background range with using shift range mask.

    +

    Shifts background range to include current value using a mask.

    All images must have the same width, height and format (8-bit gray).

    For every point:

    if(mask[i])
     {
    -    if (value[i] > hi[i])
    +    add = value[i] - hi[i];
    +    sub = lo[i] - value[i];
    +    if(add > 0)
         {
    -        lo[i] = min(lo[i] + value[i] - hi[i], 255);
    -        hi[i] = value[i];
    +        lo[i] = min(lo[i] + add, 255);
    +        hi[i] = min(hi[i] + add, 255);
         }
    -    if (lo[i] > value[i])
    +    if(sub > 0)
         {
    -        lo[i] = value[i];
    -        hi[i] = max(hi[i] - lo[i] + value[i], 0);
    +        lo[i] = max(lo[i] - sub, 0);
    +        hi[i] = max(hi[i] - sub, 0);
         }
     }
     

    This function is used for fast background updating in motion detection algorithm.

    @@ -888,9 +892,9 @@

    -

    Creates background update mask.

    +

    Initializes background update mask by selected source index.

    All images must have the same width, height and format (8-bit gray).

    -

    For every point:

    if(mask[i] == index)
    +

    For every point:

    if(src[i] == index)
         dst[i] = value;
     

    This function is used for background updating in motion detection algorithm.

    Note
    This function has a C++ wrapper Simd::BackgroundInitMask(const View<A>& src, uint8_t index, uint8_t value, View<A>& dst).
    @@ -947,7 +951,7 @@

    lo[i] -= value[i] < lo[i] ? 1 : 0; hi[i] += value[i] > hi[i] ? 1 : 0;

    This function is used for background updating in motion detection algorithm.

    -
    Note
    This function is a C++ wrapper for function SimdBackgroundGrowRangeSlow.
    +
    Note
    This function is a C++ wrapper for function SimdBackgroundGrowRangeSlow.
    Parameters
    @@ -996,7 +1000,7 @@

    lo[i] = value[i] < lo[i] ? value[i] : lo[i]; hi[i] = value[i] > hi[i] ? value[i] : hi[i];

    This function is used for background updating in motion detection algorithm.

    -
    Note
    This function is a C++ wrapper for function SimdBackgroundGrowRangeFast.
    +
    Note
    This function is a C++ wrapper for function SimdBackgroundGrowRangeFast.
    Parameters

    [in]value- a current feature value.
    @@ -1057,7 +1061,7 @@

    loCount[i] += (value[i] < loValue[i] && loCount[i] < 255) ? 1 : 0; hiCount[i] += (value[i] > hiValue[i] && hiCount[i] < 255) ? 1 : 0;

    This function is used for background updating in motion detection algorithm.

    -
    Note
    This function is a C++ wrapper for function SimdBackgroundIncrementCount.
    +
    Note
    This function is a C++ wrapper for function SimdBackgroundIncrementCount.
    Parameters

    [in]value- a current feature value.
    @@ -1124,7 +1128,7 @@

    Note
    This function is a C++ wrapper for function SimdBackgroundAdjustRange.
    +
    Note
    This function is a C++ wrapper for function SimdBackgroundAdjustRange.
    Parameters

    [in]value- a current feature value.
    @@ -1200,7 +1204,7 @@

    Note
    This function is a C++ wrapper for function SimdBackgroundAdjustRangeMasked.
    +
    Note
    This function is a C++ wrapper for function SimdBackgroundAdjustRangeMasked.
    Parameters

    [in,out]loCount- a count of feature lower bound of dynamic background.
    @@ -1260,7 +1264,7 @@

    Note
    This function is a C++ wrapper for function SimdBackgroundShiftRange.
    +
    Note
    This function is a C++ wrapper for function SimdBackgroundShiftRange.
    Parameters

    [in,out]loCount- a count of feature lower bound of dynamic background.
    @@ -1326,7 +1330,7 @@

    Note
    This function is a C++ wrapper for function SimdBackgroundShiftRangeMasked.
    +
    Note
    This function is a C++ wrapper for function SimdBackgroundShiftRangeMasked.
    Parameters

    [in]value- a current feature value.
    @@ -1382,7 +1386,7 @@

    if(mask[i] == index) dst[i] = value;

    This function is used for background updating in motion detection algorithm.

    -
    Note
    This function is a C++ wrapper for function SimdBackgroundInitMask.
    +
    Note
    This function is a C++ wrapper for function SimdBackgroundInitMask.
    Parameters

    [in]value- a current feature value.
    diff --git a/docs/help/group__base64.html b/docs/help/group__base64.html index def3ed0b9a..9a4587d963 100644 --- a/docs/help/group__base64.html +++ b/docs/help/group__base64.html @@ -51,10 +51,10 @@

    Simd Library Documentation.

    - + - + @@ -104,14 +104,15 @@

    -

    Decode string from Base64.

    +

    Decodes a Base64-encoded byte sequence into its original binary data.

    +

    The function decodes a Base64-encoded input (as defined by RFC 4648) into the original binary data. The input length must be a multiple of 4 and at least 4 bytes. Padding characters ('=') at the end of the input are handled automatically, so the actual decoded length may be 1 or 2 bytes less than srcSize / 4 * 3.

    Note
    This function has a C++ wrapper std::string Simd::Base64Decode(const std::string & src).
    Parameters

    [in]src- an input mask image.

    Functions

    SIMD_API void SimdBase64Decode (const uint8_t *src, size_t srcSize, uint8_t *dst, size_t *dstSize)
     Decode string from Base64. More...
     Decodes a Base64-encoded byte sequence into its original binary data. More...
     
    SIMD_API void SimdBase64Encode (const uint8_t *src, size_t size, uint8_t *dst)
     Encode string to Base64. More...
     Encodes binary data into a Base64 string. More...
     
    SIMD_INLINE std::string Base64Decode (const std::string &src)
     Decode string to Base64. More...
    - - - - + + + +
    [in]src- a pointer to Base64 encoded input string.
    [in]srcSize- a length of input string.
    [out]dst- a pointer to the output buffer with decoded string. The size of the buffer is must be at least srcSize / 4 * 3.
    [out]dstSize- a pointer to the value with length of decoded string.
    [in]src- a pointer to the Base64-encoded input data. Its length must be a multiple of 4 and at least 4.
    [in]srcSize- a size (in bytes) of the Base64-encoded input. Must be a non-zero multiple of 4.
    [out]dst- a pointer to the output buffer for the decoded binary data. The buffer size must be at least srcSize / 4 * 3 bytes.
    [out]dstSize- a pointer to a variable that receives the number of bytes written to the output buffer.
    @@ -150,13 +151,14 @@

    -

    Encode string to Base64.

    +

    Encodes binary data into a Base64 string.

    +

    The function encodes arbitrary binary data into its Base64 representation (as defined by RFC 4648). Every 3 input bytes are encoded as 4 Base64 characters. If the input length is not a multiple of 3, the output is padded with '=' characters to the next multiple of 4. The output is NOT null-terminated; its length is exactly (size + 2) / 3 * 4 bytes.

    Note
    This function has a C++ wrapper std::string Simd::Base64Encode(const std::string & src).
    Parameters
    - - - + + +
    [in]src- a pointer to original string.
    [in]size- a length of input string.
    [out]dst- a pointer to the output buffer with Base64 encoded string. The size of the buffer is must be at least (size + 2) / 3 * 4.
    [in]src- a pointer to the input binary data to be encoded.
    [in]size- a size (in bytes) of the input data.
    [out]dst- a pointer to the output buffer for the Base64-encoded string. The buffer size must be at least (size + 2) / 3 * 4 bytes.
    @@ -180,7 +182,7 @@

    Decode string to Base64.

    -
    Note
    This function is a C++ wrapper for function SimdBase64Decode.
    +
    Note
    This function is a C++ wrapper for function SimdBase64Decode.
    Parameters
    @@ -208,7 +210,7 @@

    Encode string to Base64.

    -
    Note
    This function is a C++ wrapper for function SimdBase64Encode.
    +
    Note
    This function is a C++ wrapper for function SimdBase64Encode.
    Parameters

    [in]src- an input Base64 encoded string.
    diff --git a/docs/help/group__bayer__conversion.html b/docs/help/group__bayer__conversion.html index 1acc669ea5..71708586c1 100644 --- a/docs/help/group__bayer__conversion.html +++ b/docs/help/group__bayer__conversion.html @@ -51,10 +51,10 @@

    Simd Library Documentation.

    - + - + @@ -124,18 +124,18 @@

    -

    Converts 8-bit Bayer image to 24-bit BGR.

    -

    All images must have the same width and height. The width and the height must be even.

    +

    Converts an 8-bit Bayer image to a 24-bit BGR image using edge-directed demosaicing.

    +

    The function performs demosaicing of a raw Bayer-patterned image into a full-color 24-bit BGR image. Missing color samples at each pixel are reconstructed using a gradient-based interpolation that selects between vertical and horizontal neighbors according to local edge strength, producing sharper results along edges than simple bilinear interpolation. Both images must have the same width and height, and both dimensions must be even.

    Note
    This function has a C++ wrapper Simd::BayerToBgr(const View<A>& bayer, View<A>& bgr).
    Parameters

    [in]src- an input original string.

    Functions

    SIMD_API void SimdBayerToBgr (const uint8_t *bayer, size_t width, size_t height, size_t bayerStride, SimdPixelFormatType bayerFormat, uint8_t *bgr, size_t bgrStride)
     Converts 8-bit Bayer image to 24-bit BGR. More...
     Converts an 8-bit Bayer image to a 24-bit BGR image using edge-directed demosaicing. More...
     
    SIMD_API void SimdBayerToBgra (const uint8_t *bayer, size_t width, size_t height, size_t bayerStride, SimdPixelFormatType bayerFormat, uint8_t *bgra, size_t bgraStride, uint8_t alpha)
     Converts 8-bit Bayer image to 32-bit BGRA. More...
     Converts an 8-bit Bayer image to a 32-bit BGRA image using edge-directed demosaicing. More...
     
    template<template< class > class A>
    SIMD_INLINE void BayerToBgr (const View< A > &bayer, View< A > &bgr)
    - - - + + + - +
    [in]bayer- a pointer to pixels data of input 8-bit Bayer image.
    [in]width- an image width.
    [in]height- an image height.
    [in]bayerStride- a row size of the bayer image.
    [in]width- an image width. Must be even and at least 4.
    [in]height- an image height. Must be even and at least 4.
    [in]bayerStride- a row size (in bytes) of the bayer image.
    [in]bayerFormat- a format of the input bayer image. It can be SimdPixelFormatBayerGrbg, SimdPixelFormatBayerGbrg, SimdPixelFormatBayerRggb or SimdPixelFormatBayerBggr.
    [out]bgr- a pointer to pixels data of output 24-bit BGR image.
    [in]bgrStride- a row size of the bgr image.
    [in]bgrStride- a row size (in bytes) of the bgr image.
    @@ -204,19 +204,19 @@

    -

    Converts 8-bit Bayer image to 32-bit BGRA.

    -

    All images must have the same width and height. The width and the height must be even.

    +

    Converts an 8-bit Bayer image to a 32-bit BGRA image using edge-directed demosaicing.

    +

    The function performs demosaicing of a raw Bayer-patterned image into a full-color 32-bit BGRA image. Missing color samples at each pixel are reconstructed using a gradient-based interpolation that selects between vertical and horizontal neighbors according to local edge strength. The alpha channel of every output pixel is set to the constant value specified by the alpha parameter. Both images must have the same width and height, and both dimensions must be even.

    Note
    This function has a C++ wrapper Simd::BayerToBgra(const View<A>& bayer, View<A>& bgra, uint8_t alpha).
    Parameters
    - - - + + + - - + +
    [in]bayer- a pointer to pixels data of input 8-bit Bayer image.
    [in]width- an image width.
    [in]height- an image height.
    [in]bayerStride- a row size of the bayer image.
    [in]width- an image width. Must be even and at least 4.
    [in]height- an image height. Must be even and at least 4.
    [in]bayerStride- a row size (in bytes) of the bayer image.
    [in]bayerFormat- a format of the input bayer image. It can be SimdPixelFormatBayerGrbg, SimdPixelFormatBayerGbrg, SimdPixelFormatBayerRggb or SimdPixelFormatBayerBggr.
    [out]bgra- a pointer to pixels data of output 32-bit BGRA image.
    [in]bgraStride- a row size of the bgra image.
    [in]alpha- a value of alpha channel.
    [in]bgraStride- a row size (in bytes) of the bgra image.
    [in]alpha- a constant value to fill the alpha channel of every output pixel.
    @@ -251,7 +251,7 @@

    Note
    This function is a C++ wrapper for function SimdBayerToBgr.
    +
    Note
    This function is a C++ wrapper for function SimdBayerToBgr.
    Parameters
    @@ -296,7 +296,7 @@

    Note
    This function is a C++ wrapper for function SimdBayerToBgra.
    +
    Note
    This function is a C++ wrapper for function SimdBayerToBgra.
    Parameters

    [in]bayer- an input 8-bit Bayer image.
    diff --git a/docs/help/group__bgr__conversion.html b/docs/help/group__bgr__conversion.html index 1341d6b54e..8eb4596eea 100644 --- a/docs/help/group__bgr__conversion.html +++ b/docs/help/group__bgr__conversion.html @@ -51,19 +51,19 @@

    Simd Library Documentation.

    - + - + - + - + - + @@ -184,8 +184,8 @@

    -

    Converts 24-bit BGR image to 8-bit Bayer image.

    -

    All images must have the same width and height. The width and the height must be even.

    +

    Converts a 24-bit BGR image to a single-channel 8-bit Bayer mosaic image.

    +

    For each output pixel only one source color component (B, G or R) is selected according to bayerFormat and its position inside a 2x2 Bayer pattern tile. Input and output images must have the same width and height. The width and the height must be even.

    Note
    This function has a C++ wrapper Simd::BgrToBayer(const View<A>& bgr, View<A>& bayer).
    Parameters

    [in]bayer- an input 8-bit Bayer image.

    Functions

    SIMD_API void SimdBgrToBayer (const uint8_t *bgr, size_t width, size_t height, size_t bgrStride, uint8_t *bayer, size_t bayerStride, SimdPixelFormatType bayerFormat)
     Converts 24-bit BGR image to 8-bit Bayer image. More...
     Converts a 24-bit BGR image to a single-channel 8-bit Bayer mosaic image. More...
     
    SIMD_API void SimdBgrToBgra (const uint8_t *bgr, size_t width, size_t height, size_t bgrStride, uint8_t *bgra, size_t bgraStride, uint8_t alpha)
     Converts 24-bit BGR image to 32-bit BGRA image. More...
     Converts a 24-bit BGR image to a 32-bit BGRA image with constant alpha. More...
     
    SIMD_API void SimdBgrToGray (const uint8_t *bgr, size_t width, size_t height, size_t bgrStride, uint8_t *gray, size_t grayStride)
     Converts 24-bit BGR image to 8-bit gray image. More...
     Converts a 24-bit BGR image to an 8-bit gray image. More...
     
    SIMD_API void SimdBgrToHsl (const uint8_t *bgr, size_t width, size_t height, size_t bgrStride, uint8_t *hsl, size_t hslStride)
     Converts 24-bit BGR image to 24-bit HSL(Hue, Saturation, Lightness) image. More...
     Converts a 24-bit BGR image to a 24-bit HSL (Hue, Saturation, Lightness) image. More...
     
    SIMD_API void SimdBgrToHsv (const uint8_t *bgr, size_t width, size_t height, size_t bgrStride, uint8_t *hsv, size_t hsvStride)
     Converts 24-bit BGR image to 24-bit HSV(Hue, Saturation, Value) image. More...
     Converts a 24-bit BGR image to a 24-bit HSV (Hue, Saturation, Value) image. More...
     
    SIMD_API void SimdBgrToLab (const uint8_t *bgr, size_t bgrStride, size_t width, size_t height, uint8_t *lab, size_t labStride)
     Converts 24-bit BGR image to 24-bit LAB(CIELAB) image. More...
    @@ -258,8 +258,8 @@

    -

    Converts 24-bit BGR image to 32-bit BGRA image.

    -

    All images must have the same width and height.

    +

    Converts a 24-bit BGR image to a 32-bit BGRA image with constant alpha.

    +

    For each pixel, B, G and R are copied unchanged and A is set to the alpha parameter. Input and output images must have the same width and height.

    Note
    This function has a C++ wrapper Simd::BgrToBgra(const View<A>& bgr, View<A>& bgra, uint8_t alpha).
    Parameters

    @@ -326,8 +326,9 @@

    -

    Converts 24-bit BGR image to 8-bit gray image.

    -

    All images must have the same width and height.

    +

    Converts a 24-bit BGR image to an 8-bit gray image.

    +

    For every pixel:

    gray = round(0.114*blue + 0.587*green + 0.299*red).
    +

    Input and output images must have the same width and height.

    Note
    This function has a C++ wrapper Simd::BgrToGray(const View<A>& bgr, View<A>& gray).
    Parameters

    @@ -393,8 +394,8 @@

    -

    Converts 24-bit BGR image to 24-bit HSL(Hue, Saturation, Lightness) image.

    -

    All images must have the same width and height.

    +

    Converts a 24-bit BGR image to a 24-bit HSL (Hue, Saturation, Lightness) image.

    +

    For each output pixel: hsl[0] = hue, hsl[1] = saturation, hsl[2] = lightness. All HSL components are stored as 8-bit values in range [0, 255]. Input and output images must have the same width and height.

    Note
    This function has a C++ wrapper Simd::BgrToHsl(const View<A>& bgr, View<A>& hsl).
    Parameters

    @@ -460,8 +461,8 @@

    -

    Converts 24-bit BGR image to 24-bit HSV(Hue, Saturation, Value) image.

    -

    All images must have the same width and height.

    +

    Converts a 24-bit BGR image to a 24-bit HSV (Hue, Saturation, Value) image.

    +

    For each output pixel: hsv[0] = hue, hsv[1] = saturation, hsv[2] = value. All HSV components are stored as 8-bit values in range [0, 255]. Input and output images must have the same width and height.

    Note
    This function has a C++ wrapper Simd::BgrToHsv(const View<A>& bgr, View<A>& hsv).
    Parameters

    @@ -945,7 +946,7 @@

    Note
    This function is a C++ wrapper for function SimdBgrToBayer.
    +
    Note
    This function is a C++ wrapper for function SimdBgrToBayer.
    Parameters

    @@ -990,7 +991,7 @@

    Note
    This function is a C++ wrapper for function SimdBgrToBgra.
    +
    Note
    This function is a C++ wrapper for function SimdBgrToBgra.
    Parameters

    [in]bgr- an input 24-bit BGR image.
    @@ -1030,7 +1031,7 @@

    Note
    This function is a C++ wrapper for function SimdBgrToGray.
    +
    Note
    This function is a C++ wrapper for function SimdBgrToGray.
    Parameters

    [in]bgr- an input 24-bit BGR image.
    @@ -1069,7 +1070,7 @@

    Note
    This function is a C++ wrapper for function SimdBgrToHsl.
    +
    Note
    This function is a C++ wrapper for function SimdBgrToHsl.
    Parameters

    [in]bgr- an input 24-bit BGR image.
    @@ -1108,7 +1109,7 @@

    Note
    This function is a C++ wrapper for function SimdBgrToHsv.
    +
    Note
    This function is a C++ wrapper for function SimdBgrToHsv.
    Parameters

    [in]bgr- an input 24-bit BGR image.
    diff --git a/docs/help/group__bgra__conversion.html b/docs/help/group__bgra__conversion.html index 668b3430b3..900a265eaf 100644 --- a/docs/help/group__bgra__conversion.html +++ b/docs/help/group__bgra__conversion.html @@ -51,31 +51,31 @@

    Simd Library Documentation.

    - + - + - + - + - + - + - + - + - + @@ -173,17 +173,17 @@

    -

    Converts 32-bit BGRA image to 8-bit Bayer image.

    -

    All images must have the same width and height. The width and the height must be even.

    +

    Converts a 32-bit BGRA image to an 8-bit Bayer image by sub-sampling color channels.

    +

    The function down-samples a full-color 32-bit BGRA image to an 8-bit Bayer-patterned image. For each 2x2 block of BGRA pixels, exactly one color channel value (Blue, Green, or Red) is selected per output pixel according to the specified Bayer pattern. The alpha channel of the input image is ignored. Both images must have the same width and height, and both dimensions must be even.

    Note
    This function has a C++ wrapper Simd::BgraToBayer(const View<A>& bgra, View<A>& bayer).
    Parameters

    [in]bgr- an input 24-bit BGR image.

    Functions

    SIMD_API void SimdBgraToBayer (const uint8_t *bgra, size_t width, size_t height, size_t bgraStride, uint8_t *bayer, size_t bayerStride, SimdPixelFormatType bayerFormat)
     Converts 32-bit BGRA image to 8-bit Bayer image. More...
     Converts a 32-bit BGRA image to an 8-bit Bayer image by sub-sampling color channels. More...
     
    SIMD_API void SimdBgraToBgr (const uint8_t *bgra, size_t width, size_t height, size_t bgraStride, uint8_t *bgr, size_t bgrStride)
     Converts 32-bit BGRA image to 24-bit BGR image. Also it can be used for 32-bit RGBA to 24-bit RGB conversion. More...
     Converts a 32-bit BGRA image to a 24-bit BGR image by dropping the alpha channel. More...
     
    SIMD_API void SimdBgraToGray (const uint8_t *bgra, size_t width, size_t height, size_t bgraStride, uint8_t *gray, size_t grayStride)
     Converts 32-bit BGRA image to 8-bit gray image. More...
     Converts a 32-bit BGRA image to an 8-bit grayscale image. More...
     
    SIMD_API void SimdBgraToRgb (const uint8_t *bgra, size_t width, size_t height, size_t bgraStride, uint8_t *rgb, size_t rgbStride)
     Converts 32-bit BGRA image to 24-bit RGB image. Also it can be used for 32-bit RGBA to 24-bit BGR conversion. More...
     Converts a 32-bit BGRA image to a 24-bit RGB image by swapping the Red and Blue channels and dropping the alpha channel. More...
     
    SIMD_API void SimdBgraToRgba (const uint8_t *bgra, size_t width, size_t height, size_t bgraStride, uint8_t *rgba, size_t rgbaStride)
     Converts 32-bit BGRA image to 32-bit RGBA image. Also it can be used for 32-bit RGBA to 32-bit BGRA conversion. More...
     Converts a 32-bit BGRA image to a 32-bit RGBA image by swapping the Red and Blue channels while preserving the alpha channel. More...
     
    SIMD_API void SimdBgraToYuv420pV2 (const uint8_t *bgra, size_t bgraStride, size_t width, size_t height, uint8_t *y, size_t yStride, uint8_t *u, size_t uStride, uint8_t *v, size_t vStride, SimdYuvType yuvType)
     Converts 32-bit BGRA image to YUV420P. More...
     Converts a 32-bit BGRA image to planar YUV420P (4:2:0) and ignores input alpha. More...
     
    SIMD_API void SimdBgraToYuv422pV2 (const uint8_t *bgra, size_t bgraStride, size_t width, size_t height, uint8_t *y, size_t yStride, uint8_t *u, size_t uStride, uint8_t *v, size_t vStride, SimdYuvType yuvType)
     Converts 32-bit BGRA image to YUV422P. More...
     Converts a 32-bit BGRA image to planar YUV422P (4:2:2) and ignores input alpha. More...
     
    SIMD_API void SimdBgraToYuv444pV2 (const uint8_t *bgra, size_t bgraStride, size_t width, size_t height, uint8_t *y, size_t yStride, uint8_t *u, size_t uStride, uint8_t *v, size_t vStride, SimdYuvType yuvType)
     Converts 32-bit BGRA image to YUV444P. More...
     Converts a 32-bit BGRA image to planar YUV444P (4:4:4) and ignores input alpha. More...
     
    SIMD_API void SimdBgraToYuva420pV2 (const uint8_t *bgra, size_t bgraStride, size_t width, size_t height, uint8_t *y, size_t yStride, uint8_t *u, size_t uStride, uint8_t *v, size_t vStride, uint8_t *a, size_t aStride, SimdYuvType yuvType)
     Converts 32-bit BGRA image to YUVA420P. More...
     Converts a 32-bit BGRA image to planar YUVA420P (YUV 4:2:0 plus full-size alpha plane). More...
     
    template<template< class > class A>
    SIMD_INLINE void BgraToBayer (const View< A > &bgra, View< A > &bayer)
    - - - + + + - +
    [in]bgra- a pointer to pixels data of input 32-bit BGRA image.
    [in]width- an image width.
    [in]height- an image height.
    [in]bgraStride- a row size of the bgra image.
    [in]width- an image width. Must be even.
    [in]height- an image height. Must be even.
    [in]bgraStride- a row size (in bytes) of the bgra image.
    [out]bayer- a pointer to pixels data of output 8-bit Bayer image.
    [in]bayerStride- a row size of the bayer image.
    [in]bayerStride- a row size (in bytes) of the bayer image.
    [in]bayerFormat- a format of the output bayer image. It can be SimdPixelFormatBayerGrbg, SimdPixelFormatBayerGbrg, SimdPixelFormatBayerRggb or SimdPixelFormatBayerBggr.
    @@ -241,17 +241,17 @@

    -

    Converts 32-bit BGRA image to 24-bit BGR image. Also it can be used for 32-bit RGBA to 24-bit RGB conversion.

    -

    All images must have the same width and height.

    +

    Converts a 32-bit BGRA image to a 24-bit BGR image by dropping the alpha channel.

    +

    The function converts a 32-bit BGRA (Blue, Green, Red, Alpha) image to a 24-bit BGR (Blue, Green, Red) image. The Blue, Green, and Red channels are copied unchanged for each pixel; the alpha channel is discarded. This function can also be used for 32-bit RGBA to 24-bit RGB conversion, since the channel layout operation (dropping the 4th channel) is identical. Both images must have the same width and height.

    Note
    This function has C++ wrappers: Simd::BgraToBgr(const View<A>& bgra, View<A>& bgr) and Simd::RgbaToRgb(const View<A>& rgba, View<A>& rgb).
    Parameters
    - + - +
    [in]bgra- a pointer to pixels data of input 32-bit BGRA (or 32-bit RGBA) image.
    [in]width- an image width.
    [in]height- an image height.
    [in]bgraStride- a row size of the bgra image.
    [in]bgraStride- a row size (in bytes) of the bgra image.
    [out]bgr- a pointer to pixels data of output 24-bit BGR (or 24-bit RGB) image.
    [in]bgrStride- a row size of the bgr image.
    [in]bgrStride- a row size (in bytes) of the bgr image.
    @@ -308,17 +308,18 @@

    -

    Converts 32-bit BGRA image to 8-bit gray image.

    -

    All images must have the same width and height.

    +

    Converts a 32-bit BGRA image to an 8-bit grayscale image.

    +

    The function converts a 32-bit BGRA (Blue, Green, Red, Alpha) image to an 8-bit grayscale image. The alpha channel is ignored. The luminance value of each pixel is calculated from the Blue, Green, and Red channels using the ITU-R BT.601 standard weighted sum:

    gray = (0.114 * blue + 0.587 * green + 0.299 * red)
    +

    Both images must have the same width and height.

    Note
    This function has a C++ wrapper Simd::BgraToGray(const View<A>& bgra, View<A>& gray).
    Parameters
    - + - +
    [in]bgra- a pointer to pixels data of input 32-bit BGRA image.
    [in]width- an image width.
    [in]height- an image height.
    [in]bgraStride- a row size of the bgra image.
    [in]bgraStride- a row size (in bytes) of the bgra image.
    [out]gray- a pointer to pixels data of output 8-bit gray image.
    [in]grayStride- a row size of the gray image.
    [in]grayStride- a row size (in bytes) of the gray image.
    @@ -375,17 +376,17 @@

    -

    Converts 32-bit BGRA image to 24-bit RGB image. Also it can be used for 32-bit RGBA to 24-bit BGR conversion.

    -

    All images must have the same width and height.

    +

    Converts a 32-bit BGRA image to a 24-bit RGB image by swapping the Red and Blue channels and dropping the alpha channel.

    +

    The function converts a 32-bit BGRA (Blue, Green, Red, Alpha) image to a 24-bit RGB (Red, Green, Blue) image. The Blue and Red channels are swapped, the Green channel is copied unchanged, and the alpha channel is discarded. This function can also be used for 32-bit RGBA to 24-bit BGR conversion, since the channel reordering operation is identical. Both images must have the same width and height.

    Note
    This function has C++ wrappers: Simd::BgraToRgb(const View<A>& bgra, View<A>& rgb) and Simd::RgbaToBgr(const View<A>& rgba, View<A>& bgr).
    Parameters
    - + - +
    [in]bgra- a pointer to pixels data of input 32-bit BGRA (or 32-bit RGBA) image.
    [in]width- an image width.
    [in]height- an image height.
    [in]bgraStride- a row size of the bgra image.
    [in]bgraStride- a row size (in bytes) of the bgra image.
    [out]rgb- a pointer to pixels data of output 24-bit RGB (or 24-bit BGR) image.
    [in]rgbStride- a row size of the rgb image.
    [in]rgbStride- a row size (in bytes) of the rgb image.
    @@ -442,17 +443,17 @@

    -

    Converts 32-bit BGRA image to 32-bit RGBA image. Also it can be used for 32-bit RGBA to 32-bit BGRA conversion.

    -

    All images must have the same width and height.

    +

    Converts a 32-bit BGRA image to a 32-bit RGBA image by swapping the Red and Blue channels while preserving the alpha channel.

    +

    The function converts a 32-bit BGRA (Blue, Green, Red, Alpha) image to a 32-bit RGBA (Red, Green, Blue, Alpha) image. The Blue and Red channels are swapped, while the Green and Alpha channels are copied unchanged for each pixel. This function can also be used for 32-bit RGBA to 32-bit BGRA conversion, since the transformation is its own inverse. Both images must have the same width and height.

    Note
    This function has C++ wrappers: Simd::BgraToRgba(const View<A>& bgra, View<A>& rgba) and Simd::RgbaToBgra(const View<A>& rgba, View<A>& bgra).
    Parameters
    - + - +
    [in]bgra- a pointer to pixels data of input 32-bit BGRA (or 32-bit RGBA) image.
    [in]width- an image width.
    [in]height- an image height.
    [in]bgraStride- a row size of the bgra image.
    [in]bgraStride- a row size (in bytes) of the bgra image.
    [out]rgba- a pointer to pixels data of output 32-bit RGBA (or 32-bit BGRA) image.
    [in]rgbaStride- a row size of the rgb image.
    [in]rgbaStride- a row size (in bytes) of the rgba image.
    @@ -539,8 +540,8 @@

    -

    Converts 32-bit BGRA image to YUV420P.

    -

    The input BGRA and output Y images must have the same width and height. The output U and V images must have the same width and height (half size relative to Y component).

    +

    Converts a 32-bit BGRA image to planar YUV420P (4:2:0) and ignores input alpha.

    +

    Y is computed for every source pixel from its B, G, R values. U and V are computed for every 2x2 block from averaged B, G, R values of this block. The input BGRA and output Y images must have the same width and height. The output U and V images must have half width and half height relative to Y. The width and the height must be even.

    Note
    This function has a C++ wrapper Simd::BgraToYuv420p(const View& bgra, View& y, View& u, View& v, SimdYuvType yuvType = SimdYuvBt601).
    Parameters
    @@ -641,8 +642,8 @@

    -

    Converts 32-bit BGRA image to YUV422P.

    -

    The input BGRA and output Y images must have the same width and height. The input U and V images must have the same width and height (their width is equal to half width of Y component).

    +

    Converts a 32-bit BGRA image to planar YUV422P (4:2:2) and ignores input alpha.

    +

    Y is computed for every source pixel from its B, G, R values. U and V are computed for each horizontal pair of pixels from averaged B, G, R values of this pair. The input BGRA and output Y images must have the same width and height. The output U and V images must have half width and the same height relative to Y. The width must be even.

    Note
    This function has a C++ wrapper Simd::BgraToYuv422p(const View& bgra, View& y, View& u, View& v, SimdYuvType yuvType = SimdYuvBt601).
    Parameters

    @@ -743,8 +744,8 @@

    -

    Converts 32-bit BGRA image to YUV444P.

    -

    The input BGRA and output Y, U and V images must have the same width and height.

    +

    Converts a 32-bit BGRA image to planar YUV444P (4:4:4) and ignores input alpha.

    +

    Y, U and V are computed for every source pixel from its B, G, R values. The input BGRA and output Y, U and V images must have the same width and height.

    Note
    This function has a C++ wrapper Simd::BgraToYuv444p(const View& bgra, View& y, View& u, View& v, SimdYuvType yuvType = SimdYuvBt601).
    Parameters

    @@ -857,8 +858,8 @@

    -

    Converts 32-bit BGRA image to YUVA420P.

    -

    The input BGRA and output Y and A images must have the same width and height. The input U and V images must have the same width and height (half size relative to Y component).

    +

    Converts a 32-bit BGRA image to planar YUVA420P (YUV 4:2:0 plus full-size alpha plane).

    +

    Y is computed for every source pixel from its B, G, R values. U and V are computed for every 2x2 block from averaged B, G, R values of this block. A is copied from the source alpha channel for every pixel without changes. The input BGRA and output Y and A images must have the same width and height. The output U and V images must have half width and half height relative to Y. The width and the height must be even.

    Note
    This function has a C++ wrapper Simd::BgraToYuva420p(const View & bgra, View & y, View & u, View & v, View & a, SimdYuvType yuvType = SimdYuvBt601).
    Parameters

    @@ -909,7 +910,7 @@

    Note
    This function is a C++ wrapper for function SimdBgraToBayer.
    +
    Note
    This function is a C++ wrapper for function SimdBgraToBayer.
    Parameters

    @@ -948,7 +949,7 @@

    Note
    This function is a C++ wrapper for function SimdBgraToBgr.
    +
    Note
    This function is a C++ wrapper for function SimdBgraToBgr.
    Parameters

    [in]bgra- an input 32-bit BGRA image.
    @@ -987,7 +988,7 @@

    Note
    This function is a C++ wrapper for function SimdBgraToGray.
    +
    Note
    This function is a C++ wrapper for function SimdBgraToGray.
    Parameters

    [in]bgra- an input 32-bit BGRA image.
    @@ -1026,7 +1027,7 @@

    Note
    This function is a C++ wrapper for function SimdBgraToRgb.
    +
    Note
    This function is a C++ wrapper for function SimdBgraToRgb.
    Parameters

    [in]bgra- an input 32-bit BGRA image.
    @@ -1065,7 +1066,7 @@

    Note
    This function is a C++ wrapper for function SimdBgraToRgba.
    +
    Note
    This function is a C++ wrapper for function SimdBgraToRgba.
    Parameters

    [in]bgra- an input 32-bit BGRA image.
    @@ -1122,7 +1123,7 @@

    Note
    This function is a C++ wrapper for function SimdBgraToYuv420pV2.
    +
    Note
    This function is a C++ wrapper for function SimdBgraToYuv420pV2.
    Parameters

    [in]bgra- an input 32-bit BGRA image.
    @@ -1182,7 +1183,7 @@

    Note
    This function is a C++ wrapper for function SimdBgraToYuv422pV2.
    +
    Note
    This function is a C++ wrapper for function SimdBgraToYuv422pV2.
    Parameters

    [in]bgra- an input 32-bit BGRA image.
    @@ -1242,7 +1243,7 @@

    Note
    This function is a C++ wrapper for function SimdBgraToYuv444pV2.
    +
    Note
    This function is a C++ wrapper for function SimdBgraToYuv444pV2.
    Parameters

    [in]bgra- an input 32-bit BGRA image.
    @@ -1308,7 +1309,7 @@

    Note
    This function is a C++ wrapper for function SimdBgraToYuva420pV2.
    +
    Note
    This function is a C++ wrapper for function SimdBgraToYuva420pV2.
    Parameters

    [in]bgra- an input 32-bit BGRA image.
    diff --git a/docs/help/group__c__types.html b/docs/help/group__c__types.html index 036bf3d69d..60785142c8 100644 --- a/docs/help/group__c__types.html +++ b/docs/help/group__c__types.html @@ -510,7 +510,7 @@

    -

    Describes pixel format types of an image. In particular this type is used in functions SimdBayerToBgr, SimdBayerToBgra, SimdBgraToBayer and SimdBgrToBayer.

    Note
    This type is corresponds to C++ type Simd::View::Format.
    +

    Describes pixel format types of an image. In particular this type is used in functions SimdBayerToBgr, SimdBayerToBgra, SimdBgraToBayer and SimdBgrToBayer.

    Note
    This type is corresponds to C++ type Simd::View::Format.

    [in]bgra- an input 32-bit BGRA image.
    diff --git a/docs/help/group__other__conversion.html b/docs/help/group__other__conversion.html index 5cb0d8fbbf..4fa237e815 100644 --- a/docs/help/group__other__conversion.html +++ b/docs/help/group__other__conversion.html @@ -51,7 +51,7 @@

    Simd Library Documentation.

    - + @@ -154,8 +154,8 @@

    -

    Converts 48-bit planar BGR image to 32-bit BGRA image.

    -

    All images must have the same width and height.

    +

    Converts a planar 48-bit BGR image (three 16-bit planes) to 32-bit BGRA.

    +

    For each pixel, one 8-bit value is taken from every 16-bit source channel (low byte on little-endian systems, high byte on big-endian systems), and alpha is set to alpha. All input and output images must have the same width and height.

    Note
    This function has a C++ wrapper Simd::Bgr48pToBgra32(const View<A>& blue, const View<A>& green, const View<A>& red, View<A>& bgra, uint8_t alpha).
    Parameters

    Enumerator
    SimdPixelFormatNone 

    An undefined pixel format.

    Functions

    SIMD_API void SimdBgr48pToBgra32 (const uint8_t *blue, size_t blueStride, size_t width, size_t height, const uint8_t *green, size_t greenStride, const uint8_t *red, size_t redStride, uint8_t *bgra, size_t bgraStride, uint8_t alpha)
     Converts 48-bit planar BGR image to 32-bit BGRA image. More...
     Converts a planar 48-bit BGR image (three 16-bit planes) to 32-bit BGRA. More...
     
    SIMD_API void SimdFloat32ToUint8 (const float *src, size_t size, const float *lower, const float *upper, uint8_t *dst)
     Converts numbers in the array from 32-bit float to 8-bit unsigned integer format. More...
    @@ -408,7 +408,7 @@

    Note
    This function is a C++ wrapper for function SimdBgr48pToBgra32.
    +
    Note
    This function is a C++ wrapper for function SimdBgr48pToBgra32.
    Parameters

    diff --git a/docs/help/group__rgb__conversion.html b/docs/help/group__rgb__conversion.html index c23a924dd4..1bbe6fb093 100644 --- a/docs/help/group__rgb__conversion.html +++ b/docs/help/group__rgb__conversion.html @@ -375,7 +375,7 @@

    Note
    This function is a C++ wrapper for function SimdBgrToBgra.
    +
    Note
    This function is a C++ wrapper for function SimdBgrToBgra.
    Parameters

    [in]blue- an input 16-bit image with blue color plane.
    diff --git a/docs/help/group__rgba__conversion.html b/docs/help/group__rgba__conversion.html index 0999397368..0ee289f9b7 100644 --- a/docs/help/group__rgba__conversion.html +++ b/docs/help/group__rgba__conversion.html @@ -168,7 +168,7 @@

    Note
    This function is a C++ wrapper for function SimdBgraToRgb.
    +
    Note
    This function is a C++ wrapper for function SimdBgraToRgb.
    Parameters

    [in]rgb- an input 24-bit RGB image.
    @@ -207,7 +207,7 @@

    Note
    This function is a C++ wrapper for function SimdBgraToRgba.
    +
    Note
    This function is a C++ wrapper for function SimdBgraToRgba.
    Parameters

    [in]rgba- an input 32-bit RGBA image.
    @@ -285,7 +285,7 @@

    Note
    This function is a C++ wrapper for function SimdBgraToBgr.
    +
    Note
    This function is a C++ wrapper for function SimdBgraToBgr.
    Parameters

    [in]rgba- an input 32-bit RGBA image.
    diff --git a/src/Simd/SimdAmxBf16SynetMergedConvolution16bDepthwise3x3.cpp b/src/Simd/SimdAmxBf16SynetMergedConvolution16bDepthwise3x3.cpp index 6cd5a0e0be..8e70a3eff1 100644 --- a/src/Simd/SimdAmxBf16SynetMergedConvolution16bDepthwise3x3.cpp +++ b/src/Simd/SimdAmxBf16SynetMergedConvolution16bDepthwise3x3.cpp @@ -623,6 +623,7 @@ namespace Simd template static void DepthwiseConvolution_k3p1d1s1w8(const uint8_t* src8, const ConvParam& p, const AlgParam& a, size_t maC, size_t yBeg, size_t yEnd, const float* weight, const float* bias, const float* params, uint8_t* dst) { + //SIMD_PERF_FUNC(); assert(p.IsKernel(3) && p.IsPad(1) && p.IsStride(1) && p.IsDilation(1) && p.srcW >= 8); const T* src = (T*)src8; size_t srcH = p.srcH, srcW = p.srcW; diff --git a/src/Simd/SimdBaseSynetMergedConvolution16b.cpp b/src/Simd/SimdBaseSynetMergedConvolution16b.cpp index 0bee8b2e2b..1413f9316b 100644 --- a/src/Simd/SimdBaseSynetMergedConvolution16b.cpp +++ b/src/Simd/SimdBaseSynetMergedConvolution16b.cpp @@ -953,12 +953,14 @@ namespace Simd a.yStep[1] = a.yStep[2] * c0.strideY; a.yStart[1] = Simd::Min((a.yStart[2] - 1) * c0.strideY + c0.kernelY - c0.padY, c0.srcH); - _sizeB[2] = a.bufH[2] * p.conv[1].srcW * a.maC; - if (_sizeB[2] * 2 <= L2) + _sizeB[2] = a.bufH[2] * c1.srcW * a.maC; + size_t srcS = 0;// a.yStep[1] * c0.srcW* c0.srcC* a.elem[0]; + if (srcS + _sizeB[2] * 2 <= L2) break; if (!SetPartOf(c0.dstH, yStep)) yStep--; } + //std::cout << "a.yStep[2] " << a.yStep[2] << " a.miK " << a.miK << std::endl; a.bufH[0] = 0; a.bufH[1] = 0; _sizeB[0] = 0; diff --git a/src/Test/TestSynetConvolution16b.cpp b/src/Test/TestSynetConvolution16b.cpp index af58e54b30..50eced01a5 100644 --- a/src/Test/TestSynetConvolution16b.cpp +++ b/src/Test/TestSynetConvolution16b.cpp @@ -552,12 +552,19 @@ namespace Test result = result && SynetConvolution16bForwardAutoTest(eps, Param(1, 56, 96, 96, 56, _3, _1, _1, _1, _1, 1, aPr, tT, b16, b16), c, f1, f2); result = result && SynetConvolution16bForwardAutoTest(eps, Param(1, 56, 48, 48, 56, _3, _1, _1, _1, _1, 1, aPr, tT, b16, b16), c, f1, f2); #endif -#if 1 +#if 0 result = result && SynetConvolution16bForwardAutoTest(eps, Param(1, 112, 24, 24, 112, _3, _1, _1, _1, _1, 1, aPr, tT, b16, b16), c, f1, f2); result = result && SynetConvolution16bForwardAutoTest(eps, Param(1, 224, 12, 12, 224, _3, _1, _1, _1, _1, 1, aPr, tT, b16, b16), c, f1, f2); result = result && SynetConvolution16bForwardAutoTest(eps, Param(1, 224, 12, 12, 448, _3, _1, _1, _1, _1, 1, aPr, tT, b16, b16), c, f1, f2); result = result && SynetConvolution16bForwardAutoTest(eps, Param(1, 448, 6, 6, 448, _3, _1, _1, _1, _1, 1, aPr, tT, b16, b16), c, f1, f2); #endif +#if 1 + result = result && SynetConvolution16bForwardAutoTest(eps, Param(1, 3, 432, 240, 16, _3, _1, _2, _1, _1, 1, aRe, tT, f32, b16), c, f1, f2); + result = result && SynetConvolution16bForwardAutoTest(eps, Param(1, 16, 216, 120, 16, _1, _1, _1, _0, _0, 1, aRe, tT, b16, b16), c, f1, f2); + result = result && SynetConvolution16bForwardAutoTest(eps, Param(1, 16, 216, 120, 16, _3, _1, _1, _1, _1, 16, aRe, tT, b16, b16), c, f1, f2); + result = result && SynetConvolution16bForwardAutoTest(eps, Param(1, 16, 216, 120, 16, _3, _1, _1, _1, _1, 16, aRe, tT, f32, b16), c, f1, f2); + result = result && SynetConvolution16bForwardAutoTest(eps, Param(1, 24, 108, 60, 72, _1, _1, _1, _0, _0, 1, aRe, tT, b16, b16), c, f1, f2); +#endif #if 0 result = result && SynetConvolution16bForwardAutoTest(eps, Param(1, 64, 57, 57, 64, Size(1, 7), _1, _1, Size(0, 3), Size(0, 3), 1, aPr, tT, b16, b16), c, f1, f2); result = result && SynetConvolution16bForwardAutoTest(eps, Param(1, 64, 57, 57, 64, Size(7, 1), _1, _1, Size(3, 0), Size(3, 0), 1, aPr, tT, b16, b16), c, f1, f2); diff --git a/src/Test/TestSynetMergedConvolution16b.cpp b/src/Test/TestSynetMergedConvolution16b.cpp index 64578578d3..3531e46b2d 100644 --- a/src/Test/TestSynetMergedConvolution16b.cpp +++ b/src/Test/TestSynetMergedConvolution16b.cpp @@ -318,11 +318,9 @@ namespace Test result = result && SynetMergedConvolution16bForwardAutoTest(eps, Param(Shp(1, 128, 32, 32), Cnv(aPr, 1, 1, 128), Cnv(aPr, 3, 1), b16, b16), f1, f2); #endif #if 1 - //result = result && SynetMergedConvolution16bForwardAutoTest(eps, Param(Shp(1, 2048, 32, 32), Cnv(aPr, 3, 1), Cnv(aPr, 1, 1, 2048), b16, b16), f1, f2); - result = result && SynetMergedConvolution16bForwardAutoTest(eps, Param(Shp(1, 64, 33, 33), Cnv(aPr, 3, 1), Cnv(aPr, 1, 1, 63), b16, b16), f1, f2); - result = result && SynetMergedConvolution16bForwardAutoTest(eps, Param(Shp(1, 64, 33, 33), Cnv(aPr, 3, 1), Cnv(aPr, 1, 1, 47), b16, b16), f1, f2); - //result = result && SynetMergedConvolution16bForwardAutoTest(eps, Param(Shp(1, 64, 32, 32), Cnv(aPr, 1, 1, 64), Cnv(aPr, 3, 1), Cnv(aPr, 1, 1, 64), f, b16, b16), f1, f2); - //result = result && SynetMergedConvolution16bForwardAutoTest(eps, Param(Shp(1, 64, 32, 32), Cnv(aPr, 1, 1, 64), Cnv(aPr, 3, 1), Cnv(aPr, 1, 1, 64), t, b16, b16), f1, f2); + result = result && SynetMergedConvolution16bForwardAutoTest(eps, Param(Shp(1, 16, 216, 120), Cnv(aRe, 3, 1), Cnv(aRe, 1, 1, 16), b16, b16), f1, f2); + result = result && SynetMergedConvolution16bForwardAutoTest(eps, Param(Shp(1, 16, 216, 120), Cnv(aRe, 3, 1), Cnv(aRe, 1, 1, 16), f32, b16), f1, f2); + //result = result && SynetMergedConvolution16bForwardAutoTest(eps, Param(Shp(1, 24, 108, 60), Cnv(aRe, 1, 1, 72), Cnv(aRe, 5, 2), b16, b16), f1, f2); #endif #if 0 for (size_t i = 250; i < 260; i += 1)
    [in]rgba- an input 32-bit RGBA image.