Simd Library Documentation.

Home | Release Notes | Download | Documentation | Issues | GitHub
C Types

Types of Simd Library C API. More...

Enumerations

enum  SimdBayerLayoutType {
  SimdBayerLayoutGrbg ,
  SimdBayerLayoutGbrg ,
  SimdBayerLayoutRggb ,
  SimdBayerLayoutBggr
}
 
enum  SimdBool {
  SimdFalse = 0 ,
  SimdTrue = 1
}
 
enum  SimdCompareType {
  SimdCompareEqual ,
  SimdCompareNotEqual ,
  SimdCompareGreater ,
  SimdCompareGreaterOrEqual ,
  SimdCompareLesser ,
  SimdCompareLesserOrEqual
}
 
enum  SimdCpuDescType { SimdCpuDescModel }
 
enum  SimdCpuInfoType {
  SimdCpuInfoSockets ,
  SimdCpuInfoCores ,
  SimdCpuInfoThreads ,
  SimdCpuInfoCacheL1 ,
  SimdCpuInfoCacheL2 ,
  SimdCpuInfoCacheL3 ,
  SimdCpuInfoRam ,
  SimdCpuInfoSse41 ,
  SimdCpuInfoAvx2 ,
  SimdCpuInfoAvx512bw ,
  SimdCpuInfoAvx512vnni ,
  SimdCpuInfoAmxBf16 ,
  SimdCpuInfoNeon ,
  SimdCpuInfoSve ,
  SimdCpuInfoSveSize ,
  SimdCpuInfoSve2 ,
  SimdCpuInfoHvx ,
  SimdCpuInfoCurrentFrequency
}
 
enum  SimdDetectionInfoFlags {
  SimdDetectionInfoFeatureHaar = 0 ,
  SimdDetectionInfoFeatureLbp ,
  SimdDetectionInfoFeatureMask = 3 ,
  SimdDetectionInfoHasTilted = 4 ,
  SimdDetectionInfoCanInt16 = 8
}
 
enum  SimdImageFileType {
  SimdImageFileUndefined = 0 ,
  SimdImageFilePgmTxt ,
  SimdImageFilePgmBin ,
  SimdImageFilePpmTxt ,
  SimdImageFilePpmBin ,
  SimdImageFilePng ,
  SimdImageFileJpeg ,
  SimdImageFileBmp
}
 
enum  SimdOperationBinary8uType {
  SimdOperationBinary8uAverage ,
  SimdOperationBinary8uAnd ,
  SimdOperationBinary8uOr ,
  SimdOperationBinary8uMaximum ,
  SimdOperationBinary8uMinimum ,
  SimdOperationBinary8uSaturatedSubtraction ,
  SimdOperationBinary8uSaturatedAddition
}
 
enum  SimdOperationBinary16iType {
  SimdOperationBinary16iAddition ,
  SimdOperationBinary16iSubtraction
}
 
enum  SimdPixelFormatType {
  SimdPixelFormatNone = 0 ,
  SimdPixelFormatGray8 ,
  SimdPixelFormatUv16 ,
  SimdPixelFormatBgr24 ,
  SimdPixelFormatBgra32 ,
  SimdPixelFormatInt16 ,
  SimdPixelFormatInt32 ,
  SimdPixelFormatInt64 ,
  SimdPixelFormatFloat ,
  SimdPixelFormatDouble ,
  SimdPixelFormatBayerGrbg ,
  SimdPixelFormatBayerGbrg ,
  SimdPixelFormatBayerRggb ,
  SimdPixelFormatBayerBggr ,
  SimdPixelFormatHsv24 ,
  SimdPixelFormatHsl24 ,
  SimdPixelFormatRgb24 ,
  SimdPixelFormatRgba32 ,
  SimdPixelFormatUyvy16 ,
  SimdPixelFormatArgb32 ,
  SimdPixelFormatLab24
}
 
enum  SimdReduceType {
  SimdReduce2x2 ,
  SimdReduce3x3 ,
  SimdReduce4x4 ,
  SimdReduce5x5
}
 

Detailed Description

Types of Simd Library C API.

Enumeration Type Documentation

◆ SimdBayerLayoutType

Describes the order of color samples in a repeating 2x2 Bayer cell.

The letters in each name are listed in raster order: top-left, top-right, bottom-left, bottom-right. These layouts correspond to the Bayer pixel formats used by SimdBayerToBgr, SimdBayerToBgra, SimdBgraToBayer and SimdBgrToBayer.

Enumerator
SimdBayerLayoutGrbg 

A Bayer layout with the first row G R and the second row B G.

SimdBayerLayoutGbrg 

A Bayer layout with the first row G B and the second row R G.

SimdBayerLayoutRggb 

A Bayer layout with the first row R G and the second row G B.

SimdBayerLayoutBggr 

A Bayer layout with the first row B G and the second row G R.

◆ SimdBool

enum SimdBool

Describes a boolean value used by the C API.

Function parameters of this type enable or disable an option, and functions returning this type report success/failure or another binary state.

Enumerator
SimdFalse 

False, disabled or failed state.

SimdTrue 

True, enabled or successful state.

◆ SimdCompareType

Describes comparison predicates used by binarization and conditional operations.

In expressions such as Compare(a, b, compareType), a is typically a source, mask or image value, and b is the threshold or reference value passed to the function.

Enumerator
SimdCompareEqual 

The predicate is true when a == b.

SimdCompareNotEqual 

The predicate is true when a != b.

SimdCompareGreater 

The predicate is true when a > b.

SimdCompareGreaterOrEqual 

The predicate is true when a >= b.

SimdCompareLesser 

The predicate is true when a < b.

SimdCompareLesserOrEqual 

The predicate is true when a <= b.

◆ SimdCpuDescType

Describes string descriptions available from SimdCpuDesc.

Unknown values passed to SimdCpuDesc return NULL. Returned strings are owned by the library and remain valid until the process exits.

Enumerator
SimdCpuDescModel 

CPU brand/model name string. It can be empty when the platform does not expose it.

◆ SimdCpuInfoType

Describes CPU information queries supported by SimdCpuInfo.

Topology and memory queries return counts or byte sizes. SIMD extension queries return 1 only when the extension is both supported by the current CPU and enabled in this build of the library; otherwise they return 0. Unsupported query values also return 0.

Enumerator
SimdCpuInfoSockets 

Number of CPU sockets.

SimdCpuInfoCores 

Number of physical CPU cores.

SimdCpuInfoThreads 

Number of logical CPU threads.

SimdCpuInfoCacheL1 

Size in bytes of the level 1 data cache.

SimdCpuInfoCacheL2 

Size in bytes of the level 2 cache.

SimdCpuInfoCacheL3 

Size in bytes of the level 3 cache.

SimdCpuInfoRam 

Size in bytes of physical RAM.

SimdCpuInfoSse41 

Availability of x86 SSE4.1 code path and required lower SSE levels.

SimdCpuInfoAvx2 

Availability of x86 AVX2 code path with AVX and FMA support.

SimdCpuInfoAvx512bw 

Availability of x86 AVX-512BW code path with AVX-512F support.

SimdCpuInfoAvx512vnni 

Availability of x86 AVX-512VNNI code path.

SimdCpuInfoAmxBf16 

Availability of x86 AMX-BF16 code path with AMX-INT8, AVX-512VBMI and AVX-512FP16 support.

SimdCpuInfoNeon 

Availability of ARM NEON code path.

SimdCpuInfoSve 

Availability of ARM SVE code path.

SimdCpuInfoSveSize 

Size in bytes of the ARM SVE/SVE2 vector register; 0 if SVE is unavailable.

SimdCpuInfoSve2 

Availability of ARM SVE2 code path.

SimdCpuInfoHvx 

Availability of Hexagon HVX code path.

SimdCpuInfoCurrentFrequency 

Current frequency in Hz of the CPU core executing the query; 0 if unavailable.

◆ SimdDetectionInfoFlags

Describes classifier cascade type and capability flags returned by SimdDetectionInfo.

The low bits selected by SimdDetectionInfoFeatureMask encode the cascade feature type. Other bits describe optional cascade properties. Test flags with bit operations, for example: (flags & SimdDetectionInfoFeatureMask) and (flags & SimdDetectionInfoHasTilted).

Note
This type is used for implementation of Simd::Detection.
Enumerator
SimdDetectionInfoFeatureHaar 

HAAR cascade classifier type, stored in the feature-type bits.

SimdDetectionInfoFeatureLbp 

LBP cascade classifier type, stored in the feature-type bits.

SimdDetectionInfoFeatureMask 

Mask used to extract the feature type from a SimdDetectionInfoFlags value.

SimdDetectionInfoHasTilted 

Flag set when a HAAR cascade contains tilted features and requires a tilted integral image.

SimdDetectionInfoCanInt16 

Flag set when an LBP cascade can use the 16-bit integer detection path.

◆ SimdImageFileType

Describes image file formats supported by image I/O functions.

The type is passed to SimdImageSaveToMemory and SimdImageSaveToFile to select an encoder. Loaders detect the same formats from file content. When SimdImageFileUndefined is used for saving to a file, the encoder is chosen from the output path extension. When it is used for saving to memory, Gray8 input is saved as binary PGM and other supported formats as binary PPM.

Enumerator
SimdImageFileUndefined 

Undefined file format; use automatic format choice where the saving function supports it.

SimdImageFilePgmTxt 

PGM (Portable Graymap) text file format with P2 header.

SimdImageFilePgmBin 

PGM (Portable Graymap) binary file format with P5 header.

SimdImageFilePpmTxt 

PPM (Portable Pixmap) text file format with P3 header.

SimdImageFilePpmBin 

PPM (Portable Pixmap) binary file format with P6 header.

SimdImageFilePng 

PNG (Portable Network Graphics) image file format.

SimdImageFileJpeg 

JPEG (Joint Photographic Experts Group) image file format.

SimdImageFileBmp 

BMP (BitMap Picture) image file format.

◆ SimdOperationBinary8uType

Describes element-wise binary operations performed by SimdOperationBinary8u.

The function treats every row as width*channelCount unsigned 8-bit values. Source and destination images must have the same width, height and number of channels; every channel is processed independently.

Enumerator
SimdOperationBinary8uAverage 

Rounded average of two unsigned values: dst = (a + b + 1)/2.

SimdOperationBinary8uAnd 

Bitwise AND: dst = a & b.

SimdOperationBinary8uOr 

Bitwise OR: dst = a | b.

SimdOperationBinary8uMaximum 

Maximum of two unsigned values: dst = Max(a, b).

SimdOperationBinary8uMinimum 

Minimum of two unsigned values: dst = Min(a, b).

SimdOperationBinary8uSaturatedSubtraction 

Saturated subtraction: dst = Max(a - b, 0).

SimdOperationBinary8uSaturatedAddition 

Saturated addition: dst = Min(a + b, 255).

◆ SimdOperationBinary16iType

Describes element-wise binary operations performed by SimdOperationBinary16i.

The function treats every row as width signed 16-bit values. Source and destination images must have the same width, height and SimdPixelFormatInt16 format. Operations are not saturated.

Enumerator
SimdOperationBinary16iAddition 

Signed 16-bit addition: dst = a + b.

SimdOperationBinary16iSubtraction 

Signed 16-bit subtraction: dst = a - b.

◆ SimdPixelFormatType

Describes in-memory pixel formats of images.

This type selects channel order, channel count and element size in image conversion, image I/O, integral and arithmetic functions. In particular it is used by SimdBayerToBgr, SimdBayerToBgra, SimdBgraToBayer and SimdBgrToBayer.

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

Undefined or not initialized pixel format.

SimdPixelFormatGray8 

Single-channel 8-bit gray image.

SimdPixelFormatUv16 

Two 8-bit channels stored as interleaved UV pairs; used for NV12/NV21 chroma planes.

SimdPixelFormatBgr24 

Three 8-bit channels in BGR order: blue, green, red.

SimdPixelFormatBgra32 

Four 8-bit channels in BGRA order: blue, green, red, alpha.

SimdPixelFormatInt16 

Single-channel signed 16-bit integer image.

SimdPixelFormatInt32 

Single-channel signed 32-bit integer image.

SimdPixelFormatInt64 

Single-channel signed 64-bit integer image.

SimdPixelFormatFloat 

Single-channel 32-bit floating point image.

SimdPixelFormatDouble 

Single-channel 64-bit floating point image.

SimdPixelFormatBayerGrbg 

Single-channel 8-bit Bayer mosaic with 2x2 tile: G R / B G.

SimdPixelFormatBayerGbrg 

Single-channel 8-bit Bayer mosaic with 2x2 tile: G B / R G.

SimdPixelFormatBayerRggb 

Single-channel 8-bit Bayer mosaic with 2x2 tile: R G / G B.

SimdPixelFormatBayerBggr 

Single-channel 8-bit Bayer mosaic with 2x2 tile: B G / G R.

SimdPixelFormatHsv24 

Three 8-bit channels in HSV order: hue, saturation, value.

SimdPixelFormatHsl24 

Three 8-bit channels in HSL order: hue, saturation, lightness.

SimdPixelFormatRgb24 

Three 8-bit channels in RGB order: red, green, blue.

SimdPixelFormatRgba32 

Four 8-bit channels in RGBA order: red, green, blue, alpha.

SimdPixelFormatUyvy16 

Packed UYVY422 format; every four bytes store two pixels as U0, Y0, V0, Y1.

SimdPixelFormatArgb32 

Four 8-bit channels in ARGB order: alpha, red, green, blue.

SimdPixelFormatLab24 

Three 8-bit channels in CIELAB order: L, a, b.

◆ SimdReduceType

Describes algorithms used by C++ wrapper Simd::ReduceGray to downscale an 8-bit gray image by two.

All variants produce output size (srcWidth + 1)/2 by (srcHeight + 1)/2. Border pixels are replicated when source coordinates fall outside the image.

Enumerator
SimdReduce2x2 

Uses SimdReduceGray2x2: average over a 2x2 source block.

SimdReduce3x3 

Uses SimdReduceGray3x3: separable Gaussian kernel [1 2 1].

SimdReduce4x4 

Uses SimdReduceGray4x4: separable kernel [1 3 3 1].

SimdReduce5x5 

Uses SimdReduceGray5x5: separable Gaussian kernel [1 4 6 4 1].