libvmaf

package
v0.0.0-...-487786b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version() string

Types

type ModelConfiguration

type ModelConfiguration struct {
	Name    string
	Version string
	Flags   ModelFlags
}

func NewModelDefault

func NewModelDefault() *ModelConfiguration

type ModelFlags

type ModelFlags uint64
const (
	ModelFlagsDefault         ModelFlags = C.VMAF_MODEL_FLAGS_DEFAULT
	ModelFlagDisableClip      ModelFlags = C.VMAF_MODEL_FLAG_DISABLE_CLIP
	ModelFlagEnableTransform  ModelFlags = C.VMAF_MODEL_FLAG_ENABLE_TRANSFORM
	ModelFlagDisableTransform ModelFlags = C.VMAF_MODEL_FLAG_DISABLE_TRANSFORM
)

type OutputFormat

type OutputFormat uint32
const (
	OutputFormatNone OutputFormat = C.VMAF_OUTPUT_FORMAT_NONE
	OutputFormatXml  OutputFormat = C.VMAF_OUTPUT_FORMAT_XML
	OutputFormatJson OutputFormat = C.VMAF_OUTPUT_FORMAT_JSON
	OutputFormatCsv  OutputFormat = C.VMAF_OUTPUT_FORMAT_CSV
	OutputFormatSub  OutputFormat = C.VMAF_OUTPUT_FORMAT_SUB
)

type PoolingMethod

type PoolingMethod uint32
const (
	PoolingMethodUnknown      PoolingMethod = C.VMAF_POOL_METHOD_UNKNOWN
	PoolingMethodMinimum      PoolingMethod = C.VMAF_POOL_METHOD_MIN
	PoolingMethodMaximum      PoolingMethod = C.VMAF_POOL_METHOD_MAX
	PoolingMethodMean         PoolingMethod = C.VMAF_POOL_METHOD_MEAN
	PoolingMethodHarmonicMean PoolingMethod = C.VMAF_POOL_METHOD_HARMONIC_MEAN
	PoolingMethodNB           PoolingMethod = C.VMAF_POOL_METHOD_NB
)

type VMAF

type VMAF struct {
	// contains filtered or unexported fields
}

func New

func New(subsample uint, model *ModelConfiguration) (*VMAF, error)

func (*VMAF) Close

func (v *VMAF) Close()

func (*VMAF) FeatureScoreAtIndex

func (v *VMAF) FeatureScoreAtIndex(featureName string, index uint) (float64, error)

func (*VMAF) Output

func (v *VMAF) Output(path string, format OutputFormat) error

func (*VMAF) ReadPictures

func (v *VMAF) ReadPictures(reference, distorted frame.Frame, index uint) error

ReadPictures Read a pair of frame.Frame and queue them for eventual feature extraction. When you're done reading pictures call this function again with both reference and distorted set to nil

func (*VMAF) ReadStreams

func (v *VMAF) ReadStreams(reference, distorted *frame.Stream) (uint, error)

ReadStreams Read a pair of frame.Stream and queues each frame.Frame via ReadPictures for eventual feature extraction, and flushes at the end. Returns the count of frame.Frame used (indexes will be up to count - 1).

func (*VMAF) ScoreAtIndex

func (v *VMAF) ScoreAtIndex(index uint) (float64, error)

func (*VMAF) ScorePooled

func (v *VMAF) ScorePooled(method PoolingMethod, indexLow, indexHigh uint) (float64, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL