python_vali.PySurfaceConverter

class python_vali.PySurfaceConverter

CUDA-accelerated converter between different pixel formats.

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: python_vali._python_vali.PySurfaceConverter, src_format: python_vali._python_vali.PixelFormat, dst_format: python_vali._python_vali.PixelFormat, gpu_id: int) -> None

    Constructor method.

    param src_format:

    input Surface pixel format

    param dst_format:

    output Surface pixel format

    param gpu_id:

    what GPU to run conversion on

  2. __init__(self: python_vali._python_vali.PySurfaceConverter, src_format: python_vali._python_vali.PixelFormat, dst_format: python_vali._python_vali.PixelFormat, stream: int) -> None

    Constructor method.

    param src_format:

    input Surface pixel format

    param dst_format:

    output Surface pixel format

    param stream:

    CUDA stream to use for conversion

Methods

Run(self, src, dst, cc_ctx)

Perform pixel format conversion.

__init__(*args, **kwargs)

Overloaded function.

Run(self: python_vali._python_vali.PySurfaceConverter, src: VPF::Surface, dst: VPF::Surface, cc_ctx: Optional[python_vali._python_vali.ColorspaceConversionContext] = None) Tuple[bool, python_vali._python_vali.TaskExecInfo]

Perform pixel format conversion.

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

  • dst – output Surface. Must be of suitable format.

  • cc_ctx – colorspace conversion context. Describes color space and color range used for conversion. Optional parameter. If not given, VALI will automatically pick supported color conversion parameters.

Returns:

tuple containing: success (Bool) True in case of success, False otherwise. info (TaskExecInfo) task execution information.

Return type:

tuple