PyNvCodec.PySurfaceResizer

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

Overloaded function.

  1. __init__(self: PyNvCodec._PyNvCodec.PySurfaceResizer, width: int, height: int, format: PyNvCodec._PyNvCodec.PixelFormat, gpu_id: int) -> None

    Constructor method.

    param width:

    target Surface width

    param height:

    target Surface height

    param format:

    target Surface pixel format

    param gpu_id:

    what GPU to run resize on

  2. __init__(self: PyNvCodec._PyNvCodec.PySurfaceResizer, width: int, height: int, format: PyNvCodec._PyNvCodec.PixelFormat, context: int, stream: int) -> None

    Constructor method.

    param width:

    target Surface width

    param height:

    target Surface height

    param format:

    target Surface pixel format

    param context:

    CUDA context to use for resize

    param stream:

    CUDA stream to use for resize

Methods

Execute(self, src)

Resize input Surface.

Format(self)

Get pixel format.

__init__(*args, **kwargs)

Overloaded function.

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

Resize input Surface.

Parameters:

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

Returns:

Surface of dimensions equal to given to ctor

Return type:

PyNvCodec.Surface

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

Get pixel format.