PyNvCodec.PySurfaceRemaper

class PyNvCodec.PySurfaceRemaper
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: PyNvCodec._PyNvCodec.PySurfaceRemaper, x_map: numpy.ndarray[numpy.float32], y_map: numpy.ndarray[numpy.float32], format: PyNvCodec._PyNvCodec.PixelFormat, gpu_id: int) -> None

    Constructor method.

    param x_map:

    x axis map

    param y_map:

    y axis map

    param format:

    target Surface pixel format

    param gpu_id:

    what GPU to run resize on

  2. __init__(self: PyNvCodec._PyNvCodec.PySurfaceRemaper, x_map: numpy.ndarray[numpy.float32], y_map: numpy.ndarray[numpy.float32], format: PyNvCodec._PyNvCodec.PixelFormat, context: int, stream: int) -> None

    Constructor method.

    param x_map:

    x axis map

    param y_map:

    y axis map

    param format:

    target Surface pixel format

    param context:

    CUDA context to use for remap

    param stream:

    CUDA stream to use for remap

Methods

Execute(self, src)

Remap input Surface.

Format(self)

Get pixel format.

__init__(*args, **kwargs)

Overloaded function.

Execute(self: PyNvCodec._PyNvCodec.PySurfaceRemaper, src: VPF::Surface) VPF::Surface

Remap input Surface.

Parameters:

src – input Surface. Must be of same format class instance was created with.

Returns:

remapped Surface of dimensions equal to given to ctor

Return type:

PyNvCodec.Surface

Format(self: PyNvCodec._PyNvCodec.PySurfaceRemaper) PyNvCodec._PyNvCodec.PixelFormat

Get pixel format.