Simd Library Documentation.

Home | Release Notes | Download | Documentation | Forum | SourceForge | GitHub

Functions for BGRA-32 image conversions. More...

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...
 
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. 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...
 
SIMD_API void SimdBgraToYuv420p (const uint8_t *bgra, size_t width, size_t height, size_t bgraStride, uint8_t *y, size_t yStride, uint8_t *u, size_t uStride, uint8_t *v, size_t vStride)
 Converts 32-bit BGRA image to YUV420P. More...
 
SIMD_API void SimdBgraToYuv422p (const uint8_t *bgra, size_t width, size_t height, size_t bgraStride, uint8_t *y, size_t yStride, uint8_t *u, size_t uStride, uint8_t *v, size_t vStride)
 Converts 32-bit BGRA image to YUV422P. More...
 
SIMD_API void SimdBgraToYuv444p (const uint8_t *bgra, size_t width, size_t height, size_t bgraStride, uint8_t *y, size_t yStride, uint8_t *u, size_t uStride, uint8_t *v, size_t vStride)
 Converts 32-bit BGRA image to YUV444P. More...
 
template<template< class > class A>
SIMD_INLINE void BgraToBayer (const View< A > &bgra, View< A > &bayer)
 Converts 32-bit BGRA image to 8-bit Bayer image. More...
 
template<template< class > class A>
SIMD_INLINE void BgraToBgr (const View< A > &bgra, View< A > &bgr)
 Converts 32-bit BGRA image to 24-bit BGR image. More...
 
template<template< class > class A>
SIMD_INLINE void BgraToGray (const View< A > &bgra, View< A > &gray)
 Converts 32-bit BGRA image to 8-bit gray image. More...
 
template<template< class > class A>
SIMD_INLINE void BgraToYuv420p (const View< A > &bgra, View< A > &y, View< A > &u, View< A > &v)
 Converts 32-bit BGRA image to YUV420P. More...
 
template<template< class > class A>
SIMD_INLINE void BgraToYuv422p (const View< A > &bgra, View< A > &y, View< A > &u, View< A > &v)
 Converts 32-bit BGRA image to YUV422P. More...
 
template<template< class > class A>
SIMD_INLINE void BgraToYuv444p (const View< A > &bgra, View< A > &y, View< A > &u, View< A > &v)
 Converts 32-bit BGRA image to YUV444P. More...
 

Detailed Description

Functions for BGRA-32 image conversions.

Function Documentation

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.

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

Note
This function has a C++ wrapper Simd::BgraToBayer(const View<A>& bgra, View<A>& bayer).
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.
[out]bayer- a pointer to pixels data of output 8-bit Bayer image.
[in]bayerStride- a row size of the bayer image.
[in]bayerFormat- a format of the output bayer image. It can be SimdPixelFormatBayerGrbg, SimdPixelFormatBayerGbrg, SimdPixelFormatBayerRggb or SimdPixelFormatBayerBggr.
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.

All images must have the same width and height.

Note
This function has a C++ wrapper Simd::BgraToBgr(const View<A>& bgra, View<A>& bgr).
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.
[out]bgr- a pointer to pixels data of output 24-bit BGR image.
[in]bgrStride- a row size of the bgr image.
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.

All 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.
[out]gray- a pointer to pixels data of output 8-bit gray image.
[in]grayStride- a row size of the gray image.
void SimdBgraToYuv420p ( const uint8_t *  bgra,
size_t  width,
size_t  height,
size_t  bgraStride,
uint8_t *  y,
size_t  yStride,
uint8_t *  u,
size_t  uStride,
uint8_t *  v,
size_t  vStride 
)

Converts 32-bit BGRA image to YUV420P.

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 (half size relative to Y component).

Note
This function has a C++ wrapper Simd::BgraToYuv420p(const View<A>& bgra, View<A>& y, View<A>& u, View<A>& v).
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.
[out]y- a pointer to pixels data of output 8-bit image with Y color plane.
[in]yStride- a row size of the y image.
[out]u- a pointer to pixels data of output 8-bit image with U color plane.
[in]uStride- a row size of the u image.
[out]v- a pointer to pixels data of output 8-bit image with V color plane.
[in]vStride- a row size of the v image.
void SimdBgraToYuv422p ( const uint8_t *  bgra,
size_t  width,
size_t  height,
size_t  bgraStride,
uint8_t *  y,
size_t  yStride,
uint8_t *  u,
size_t  uStride,
uint8_t *  v,
size_t  vStride 
)

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).

Note
This function has a C++ wrapper Simd::BgraToYuv422p(const View<A>& bgra, View<A>& y, View<A>& u, View<A>& v).
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.
[out]y- a pointer to pixels data of output 8-bit image with Y color plane.
[in]yStride- a row size of the y image.
[out]u- a pointer to pixels data of output 8-bit image with U color plane.
[in]uStride- a row size of the u image.
[out]v- a pointer to pixels data of output 8-bit image with V color plane.
[in]vStride- a row size of the v image.
void SimdBgraToYuv444p ( const uint8_t *  bgra,
size_t  width,
size_t  height,
size_t  bgraStride,
uint8_t *  y,
size_t  yStride,
uint8_t *  u,
size_t  uStride,
uint8_t *  v,
size_t  vStride 
)

Converts 32-bit BGRA image to YUV444P.

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<A>& bgra, View<A>& y, View<A>& u, View<A>& v).
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.
[out]y- a pointer to pixels data of output 8-bit image with Y color plane.
[in]yStride- a row size of the y image.
[out]u- a pointer to pixels data of output 8-bit image with U color plane.
[in]uStride- a row size of the u image.
[out]v- a pointer to pixels data of output 8-bit image with V color plane.
[in]vStride- a row size of the v image.
void BgraToBayer ( const View< A > &  bgra,
View< A > &  bayer 
)

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.

Note
This function is a C++ wrapper for function SimdBgraToBayer.
Parameters
[in]bgra- an input 32-bit BGRA image.
[out]bayer- an output 8-bit Bayer image.
void BgraToBgr ( const View< A > &  bgra,
View< A > &  bgr 
)

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

All images must have the same width and height.

Note
This function is a C++ wrapper for function SimdBgraToBgr.
Parameters
[in]bgra- an input 32-bit BGRA image.
[out]bgr- an output 24-bit BGR image.
void BgraToGray ( const View< A > &  bgra,
View< A > &  gray 
)

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

All images must have the same width and height.

Note
This function is a C++ wrapper for function SimdBgraToGray.
Parameters
[in]bgra- an input 32-bit BGRA image.
[out]gray- an output 8-bit gray image.
void BgraToYuv420p ( const View< A > &  bgra,
View< A > &  y,
View< A > &  u,
View< A > &  v 
)

Converts 32-bit BGRA image to YUV420P.

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 (half size relative to Y component).

Note
This function is a C++ wrapper for function SimdBgraToYuv420p.
Parameters
[in]bgra- an input 32-bit BGRA image.
[out]y- an output 8-bit image with Y color plane.
[out]u- an output 8-bit image with U color plane.
[out]v- an output 8-bit image with V color plane.
void BgraToYuv422p ( const View< A > &  bgra,
View< A > &  y,
View< A > &  u,
View< A > &  v 
)

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).

Note
This function is a C++ wrapper for function SimdBgraToYuv422p.
Parameters
[in]bgra- an input 32-bit BGRA image.
[out]y- an output 8-bit image with Y color plane.
[out]u- an output 8-bit image with U color plane.
[out]v- an output 8-bit image with V color plane.
void BgraToYuv444p ( const View< A > &  bgra,
View< A > &  y,
View< A > &  u,
View< A > &  v 
)

Converts 32-bit BGRA image to YUV444P.

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

Note
This function is a C++ wrapper for function SimdBgraToYuv444p.
Parameters
[in]bgra- an input 32-bit BGRA image.
[out]y- an output 8-bit image with Y color plane.
[out]u- an output 8-bit image with U color plane.
[out]v- an output 8-bit image with V color plane.