python_vali.SurfacePlane

class python_vali.SurfacePlane

Continious 2D chunk of memory stored in vRAM which represents single plane / channel of video frame. It supports DLPack specification.

__init__(*args, **kwargs)

Methods

__init__(*args, **kwargs)

Attributes

ElemSize

Get the size of each element in the surface plane in bytes.

GpuMem

Get the CUDA device pointer to the surface plane data.

Height

Get the height of the surface plane in pixels.

HostFrameSize

Get the amount of host memory needed to store this surface plane.

Pitch

Get the pitch (stride) of the surface plane in bytes.

Width

Get the width of the surface plane in pixels.

property ElemSize

Get the size of each element in the surface plane in bytes.

Returns:

Size of each element in bytes

Return type:

int

property GpuMem

Get the CUDA device pointer to the surface plane data.

Returns:

CUDA device pointer to the plane’s data

Return type:

int

property Height

Get the height of the surface plane in pixels.

Returns:

Height of the plane in pixels

Return type:

int

property HostFrameSize

Get the amount of host memory needed to store this surface plane.

This is the total size in bytes required to store the plane’s data in host memory, taking into account the pitch and height.

Returns:

Required host memory size in bytes

Return type:

int

property Pitch

Get the pitch (stride) of the surface plane in bytes.

The pitch represents the number of bytes between the start of consecutive rows in the surface plane. This may be larger than the width * element size due to memory alignment requirements.

Returns:

Pitch of the plane in bytes

Return type:

int

property Width

Get the width of the surface plane in pixels.

Returns:

Width of the plane in pixels

Return type:

int