Simd Library Documentation.

Home | Release Notes | Download | Documentation | Issues | GitHub
Related Functions

Related functions for Simd::Frame structure. More...

Functions

template<template< class > class A, template< class > class B>
bool EqualSize (const Frame< A > &a, const Frame< B > &b)
 
template<template< class > class A, template< class > class B>
bool Compatible (const Frame< A > &a, const Frame< B > &b)
 
template<template< class > class A, template< class > class B>
void Copy (const Frame< A > &src, Frame< B > &dst)
 Copies one frame to another frame. More...
 
template<template< class > class A>
void Convert (const Frame< A > &src, Frame< A > &dst)
 Converts one frame to another frame. More...
 
template<template< class > class A>
SIMD_INLINE void Resize (const Frame< A > &src, Frame< A > &dst, ::SimdResizeMethodType method=::SimdResizeMethodBilinear)
 Performs resizing of frame. More...
 
template<template< class > class A>
SIMD_INLINE void Resize (const Frame< A > &src, Frame< A > &dst, const Point< ptrdiff_t > &size, ::SimdResizeMethodType method=::SimdResizeMethodBilinear)
 Performs resizing of frame. More...
 

Detailed Description

Related functions for Simd::Frame structure.

Function Documentation

◆ EqualSize()

template< template< class > class A, template< class > class B > bool EqualSize ( const Frame< A > &  a,
const Frame< B > &  b 
)

Checks two frames on the same size.

The frames must have the same width and height. Format, flipped and yuvType may differ. Convert() requires EqualSize.

Parameters
[in]a- a first frame.
[in]b- a second frame.
Returns
- a result of checking.

◆ Compatible()

template< template< class > class A, template< class > class B > bool Compatible ( const Frame< A > &  a,
const Frame< B > &  b 
)

Checks two frames on compatibility.

The frames must have the same width, height, pixel format, flipped flag and yuvType. Copy() requires Compatible.

Parameters
[in]a- a first frame.
[in]b- a second frame.
Returns
- a result of checking.

◆ Copy()

template< template< class > class A, template< class > class B > void Copy ( const Frame< A > &  src,
Frame< B > &  dst 
)

Copies one frame to another frame.

The frames must be Compatible (the same width, height, format, flipped and yuvType). Pixel data of all used planes are copied. Timestamp of dst is not changed.

Parameters
[in]src- an input frame.
[out]dst- an output frame.

◆ Convert()

template< template< class > class A > void Convert ( const Frame< A > &  src,
Frame< A > &  dst 
)

Converts one frame to another frame.

The frames must have the same width, height and flipped flag. Both formats must be defined (not None). The same format does Copy. YUV-to-YUV conversion requires the same yuvType. Typical usage converts packed Bgr24 to Yuv420p and back.

Timestamp of dst is not changed.

Parameters
[in]src- an input frame.
[out]dst- an output frame.

◆ Resize() [1/2]

void Resize ( const Frame< A > &  src,
Frame< A > &  dst,
::SimdResizeMethodType  method = ::SimdResizeMethodBilinear 
)

Performs resizing of frame.

The frames must have the same format (not None). Equal size does Copy. Nv12 and Yuv420p resize chroma planes at half resolution. Yuv444p resizes all three planes with the same resizer. Timestamp of dst is not changed.

Parameters
[in]src- an original input frame.
[out]dst- a resized output frame.
[in]method- a resizing method. By default it is equal to SimdResizeMethodBilinear.

◆ Resize() [2/2]

void Resize ( const Frame< A > &  src,
Frame< A > &  dst,
const Point< ptrdiff_t > &  size,
::SimdResizeMethodType  method = ::SimdResizeMethodBilinear 
)

Performs resizing of frame.

Recreates dst when its size differs from size (format is taken from src). The input frame can be the output (in-place resize uses a temporary Frame).

Parameters
[in]src- an original input frame.
[out]dst- a resized output frame. The input frame can be the output.
[in]size- a size of output frame.
[in]method- a resizing method. By default it is equal to SimdResizeMethodBilinear.