TcrSdk-Windows V1.0
Public Member Functions | List of all members
I420Buffer Class Reference

The I420Buffer class represents a buffer in I420 format. More...

#include <video_frame_observer.h>

Public Member Functions

 I420Buffer (const uint8_t *data_y, const uint8_t *data_u, const uint8_t *data_v, int32_t stride_y, int32_t stride_u, int32_t stride_v, int32_t width, int32_t height)
 Constructs an I420Buffer object with the specified parameters.
 
 ~I420Buffer ()
 Destructs the I420Buffer object.
 
const uint8_t * DataY ()
 Returns a pointer to the Y plane data.
 
const uint8_t * DataU ()
 Returns a pointer to the U plane data.
 
const uint8_t * DataV ()
 Returns a pointer to the V plane data.
 
int32_t StrideY ()
 Returns the stride (number of bytes between consecutive rows) of the Y plane.
 
int32_t StrideU ()
 Returns the stride (number of bytes between consecutive rows) of the U plane.
 
int32_t StrideV ()
 Returns the stride (number of bytes between consecutive rows) of the V plane.
 
int32_t width ()
 Returns the width of the buffer in pixels.
 
int32_t height ()
 Returns the height of the buffer in pixels.
 

Detailed Description

The I420Buffer class represents a buffer in I420 format.

I420 is a planar YUV format with 8 bits per component. The Y plane is first, followed by the U and V planes. The U and V planes are subsampled by a factor of 2 in both dimensions.

Constructor & Destructor Documentation

◆ I420Buffer()

I420Buffer ( const uint8_t *  data_y,
const uint8_t *  data_u,
const uint8_t *  data_v,
int32_t  stride_y,
int32_t  stride_u,
int32_t  stride_v,
int32_t  width,
int32_t  height 
)

Constructs an I420Buffer object with the specified parameters.

Parameters
data_yA pointer to the Y plane data.
data_uA pointer to the U plane data.
data_vA pointer to the V plane data.
stride_yThe stride (number of bytes between consecutive rows) of the Y plane.
stride_uThe stride (number of bytes between consecutive rows) of the U plane.
stride_vThe stride (number of bytes between consecutive rows) of the V plane.
widthThe width of the buffer in pixels.
heightThe height of the buffer in pixels.

◆ ~I420Buffer()

~I420Buffer ( )

Destructs the I420Buffer object.

Member Function Documentation

◆ DataU()

const uint8_t * DataU ( )

Returns a pointer to the U plane data.

Returns
A pointer to the U plane data.

◆ DataV()

const uint8_t * DataV ( )

Returns a pointer to the V plane data.

Returns
A pointer to the V plane data.

◆ DataY()

const uint8_t * DataY ( )

Returns a pointer to the Y plane data.

Returns
A pointer to the Y plane data.

◆ height()

int32_t height ( )

Returns the height of the buffer in pixels.

Returns
The height of the buffer.

◆ StrideU()

int32_t StrideU ( )

Returns the stride (number of bytes between consecutive rows) of the U plane.

Returns
The stride of the U plane.

◆ StrideV()

int32_t StrideV ( )

Returns the stride (number of bytes between consecutive rows) of the V plane.

Returns
The stride of the V plane.

◆ StrideY()

int32_t StrideY ( )

Returns the stride (number of bytes between consecutive rows) of the Y plane.

Returns
The stride of the Y plane.

◆ width()

int32_t width ( )

Returns the width of the buffer in pixels.

Returns
The width of the buffer.

The documentation for this class was generated from the following file: