libvmaf
Loading...
Searching...
No Matches
libvmaf_cuda.h File Reference
#include "libvmaf/libvmaf.h"
Include dependency graph for libvmaf_cuda.h:

Go to the source code of this file.

Data Structures

struct  VmafCudaConfiguration
struct  VmafCudaPictureConfiguration

Typedefs

typedef struct VmafCudaState VmafCudaState

Enumerations

enum  VmafCudaPicturePreallocationMethod { VMAF_CUDA_PICTURE_PREALLOCATION_METHOD_NONE = 0 , VMAF_CUDA_PICTURE_PREALLOCATION_METHOD_DEVICE , VMAF_CUDA_PICTURE_PREALLOCATION_METHOD_HOST , VMAF_CUDA_PICTURE_PREALLOCATION_METHOD_HOST_PINNED }

Functions

int vmaf_cuda_state_init (VmafCudaState **cu_state, VmafCudaConfiguration cfg)
int vmaf_cuda_import_state (VmafContext *vmaf, VmafCudaState *cu_state)
int vmaf_cuda_preallocate_pictures (VmafContext *vmaf, VmafCudaPictureConfiguration cfg)
int vmaf_cuda_fetch_preallocated_picture (VmafContext *vmaf, VmafPicture *pic)

Typedef Documentation

◆ VmafCudaState

typedef struct VmafCudaState VmafCudaState

Copyright 2016-2023 Netflix, Inc.

Licensed under the BSD+Patent License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://opensource.org/licenses/BSDplusPatent

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Enumeration Type Documentation

◆ VmafCudaPicturePreallocationMethod

Enumerator
VMAF_CUDA_PICTURE_PREALLOCATION_METHOD_NONE 
VMAF_CUDA_PICTURE_PREALLOCATION_METHOD_DEVICE 
VMAF_CUDA_PICTURE_PREALLOCATION_METHOD_HOST 
VMAF_CUDA_PICTURE_PREALLOCATION_METHOD_HOST_PINNED 

Function Documentation

◆ vmaf_cuda_fetch_preallocated_picture()

int vmaf_cuda_fetch_preallocated_picture ( VmafContext * vmaf,
VmafPicture * pic )

Fetch a preallocated VmafPicture for use during CUDA feature extraction. pictures are allocated during vmaf_cuda_preallocate_pictures and data buffers are set according to cfg.pic_prealloc_method.

Parameters
vmafVMAF context allocated with vmaf_init() and initialized with vmaf_cuda_preallocate_pictures().
picPreallocated picture.
Returns
0 on success, or < 0 (a negative errno code) on error.

◆ vmaf_cuda_import_state()

int vmaf_cuda_import_state ( VmafContext * vmaf,
VmafCudaState * cu_state )

Import VmafCudaState for use during CUDA feature extraction.

Parameters
vmafVMAF context allocated with vmaf_init().
cu_stateCUDA state allocated with vmaf_cuda_state_init().
Returns
0 on success, or < 0 (a negative errno code) on error.

◆ vmaf_cuda_preallocate_pictures()

int vmaf_cuda_preallocate_pictures ( VmafContext * vmaf,
VmafCudaPictureConfiguration cfg )

Config and preallocate VmafPictures for use during CUDA feature extraction. The preallocated VmafPicture data buffers are set according to cfg.pic_prealloc_method.

Parameters
vmafVMAF context allocated with vmaf_init().
cfgVmafPicture parameter configuration.
Returns
0 on success, or < 0 (a negative errno code) on error.

◆ vmaf_cuda_state_init()

int vmaf_cuda_state_init ( VmafCudaState ** cu_state,
VmafCudaConfiguration cfg )

Initialize VmafCudaState. VmafCudaState can optionally be configured with VmafCudaConfiguration.

Parameters
cu_stateThe CUDA state to open.
cfgOptional configuration parameters.
Returns
0 on success, or < 0 (a negative errno code) on error.