Expand description
Low-level FFI bindings to Netflix VMAF.
All functions that call into libvmaf are unsafe. Consider using a safe wrapper crate for application code.
Structs§
- Vmaf
Configuration - @struct VmafConfiguration
@brief Configuration needed to initialize a
VmafContext - Vmaf
Context - Vmaf
Feature Dictionary - Vmaf
Model - Vmaf
Model Collection - Vmaf
Model Collection Score - Vmaf
Model Collection Score__ bindgen_ ty_ 1 - Vmaf
Model Collection Score__ bindgen_ ty_ 1__ bindgen_ ty_ 1 - Vmaf
Model Collection Score__ bindgen_ ty_ 1__ bindgen_ ty_ 1__ bindgen_ ty_ 1 - Vmaf
Model Config - Vmaf
Picture - Vmaf
Picture Configuration - Picture Pool Configuration
- Vmaf
Picture Configuration__ bindgen_ ty_ 1 - VmafRef
Constants§
- VMAF_
API_ VERSION_ MAJOR - VMAF_
API_ VERSION_ MINOR - VMAF_
API_ VERSION_ PATCH - Vmaf
LogLevel_ VMAF_ LOG_ LEVEL_ DEBUG - Vmaf
LogLevel_ VMAF_ LOG_ LEVEL_ ERROR - Vmaf
LogLevel_ VMAF_ LOG_ LEVEL_ INFO - Vmaf
LogLevel_ VMAF_ LOG_ LEVEL_ NONE - Vmaf
LogLevel_ VMAF_ LOG_ LEVEL_ WARNING - Vmaf
Model Collection Score Type_ VMAF_ MODEL_ COLLECTION_ SCORE_ BOOTSTRAP - Vmaf
Model Collection Score Type_ VMAF_ MODEL_ COLLECTION_ SCORE_ UNKNOWN - Vmaf
Model Flags_ VMAF_ MODEL_ FLAGS_ DEFAULT - Vmaf
Model Flags_ VMAF_ MODEL_ FLAG_ DISABLE_ CLIP - Vmaf
Model Flags_ VMAF_ MODEL_ FLAG_ DISABLE_ TRANSFORM - Vmaf
Model Flags_ VMAF_ MODEL_ FLAG_ ENABLE_ TRANSFORM - Vmaf
Output Format_ VMAF_ OUTPUT_ FORMAT_ CSV - Vmaf
Output Format_ VMAF_ OUTPUT_ FORMAT_ JSON - Vmaf
Output Format_ VMAF_ OUTPUT_ FORMAT_ NONE - Vmaf
Output Format_ VMAF_ OUTPUT_ FORMAT_ SUB - Vmaf
Output Format_ VMAF_ OUTPUT_ FORMAT_ XML - Vmaf
Pixel Format_ VMAF_ PIX_ FMT_ UNKNOWN - Vmaf
Pixel Format_ VMAF_ PIX_ FMT_ YUV400P - Vmaf
Pixel Format_ VMAF_ PIX_ FMT_ YUV420P - Vmaf
Pixel Format_ VMAF_ PIX_ FMT_ YUV422P - Vmaf
Pixel Format_ VMAF_ PIX_ FMT_ YUV444P - Vmaf
Pooling Method_ VMAF_ POOL_ METHOD_ HARMONIC_ MEAN - Vmaf
Pooling Method_ VMAF_ POOL_ METHOD_ MAX - Vmaf
Pooling Method_ VMAF_ POOL_ METHOD_ MEAN - Vmaf
Pooling Method_ VMAF_ POOL_ METHOD_ MIN - Vmaf
Pooling Method_ VMAF_ POOL_ METHOD_ NB - Vmaf
Pooling Method_ VMAF_ POOL_ METHOD_ UNKNOWN
Functions§
- vmaf_
close ⚠ - Close a VMAF instance and free all associated memory.
- vmaf_
feature_ ⚠dictionary_ free - vmaf_
feature_ ⚠dictionary_ set - vmaf_
feature_ ⚠score_ at_ index - Fetch feature score at specific index.
- vmaf_
feature_ ⚠score_ pooled - Pooled feature score for a specific interval.
- vmaf_
fetch_ ⚠preallocated_ picture - Fetch a preallocated picture from the picture pool. The picture must be returned to the pool via vmaf_picture_unref() when done. Pictures automatically return to the pool when their reference count reaches zero.
- vmaf_
import_ ⚠feature_ score - Import an external feature score. Useful when pre-computed feature scores are available. Also useful in the case where there is no libvmaf feature extractor implementation for a required feature.
- vmaf_
init ⚠ - Allocate and open a VMAF instance.
- vmaf_
model_ ⚠collection_ destroy - vmaf_
model_ ⚠collection_ feature_ overload - vmaf_
model_ ⚠collection_ load - vmaf_
model_ ⚠collection_ load_ from_ path - vmaf_
model_ ⚠destroy - vmaf_
model_ ⚠feature_ overload - vmaf_
model_ ⚠load - vmaf_
model_ ⚠load_ from_ path - vmaf_
picture_ ⚠alloc - vmaf_
picture_ ⚠unref - vmaf_
preallocate_ ⚠pictures - Preallocate pictures for use with multi-threaded feature extraction. Pictures are allocated once and automatically returned to the pool when fully unref’d, avoiding repeated allocation/deallocation overhead.
- vmaf_
read_ ⚠pictures - Read a pair of pictures and queue them for eventual feature extraction.
This should be called after feature extractors are registered via
vmaf_use_features_from_model()and/orvmaf_use_feature().VmafContextwill take ownership of bothVmafPictures (refanddist) andvmaf_picture_unref(). - vmaf_
score_ ⚠at_ index - Predict VMAF score at specific index.
- vmaf_
score_ ⚠at_ index_ model_ collection - Predict VMAF score at specific index, using a model collection.
- vmaf_
score_ ⚠pooled - Pooled VMAF score for a specific interval.
- vmaf_
score_ ⚠pooled_ model_ collection - Pooled VMAF score for a specific interval, using a model collection.
- vmaf_
use_ ⚠feature - Register specific feature extractor.
Useful when a specific/additional feature is required, usually one which
is not already provided by a model via
vmaf_use_features_from_model(). This may be called multiple times.VmafContextwill take ownership of theVmafFeatureDictionary(opts_dict). Usevmaf_feature_dictionary_free()only in the case of failure. - vmaf_
use_ ⚠features_ from_ model - Register feature extractors required by a specific
VmafModel. This may be called multiple times using different models. In this case, the registered feature extractors will form a set, and any features required by multiple models will only be extracted once. - vmaf_
use_ ⚠features_ from_ model_ collection - Register feature extractors required by a specific
VmafModelCollectionLikevmaf_use_features_from_model(), this function may be called multiple times using different model collections. - vmaf_
version ⚠ - Get libvmaf version.
- vmaf_
write_ ⚠output - Write VMAF stats to an output file.