cdef: Pad cdef_directions
[aom.git] / aom_dsp / vmaf.h
blob3ba8c8d5651b06a5c1aa8ae8ed1e54e72c140337
1 /*
2 * Copyright (c) 2019, Alliance for Open Media. All rights reserved
4 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
12 #ifndef AOM_AOM_DSP_VMAF_H_
13 #define AOM_AOM_DSP_VMAF_H_
15 #include <stdbool.h>
16 #include "aom_scale/yv12config.h"
18 typedef struct VmafContext VmafContext;
19 typedef struct VmafModel VmafModel;
21 void aom_init_vmaf_context(VmafContext **vmaf_context, VmafModel *vmaf_model,
22 bool cal_vmaf_neg);
23 void aom_close_vmaf_context(VmafContext *vmaf_context);
25 void aom_init_vmaf_model(VmafModel **vmaf_model, const char *model_path);
26 void aom_close_vmaf_model(VmafModel *vmaf_model);
28 void aom_calc_vmaf(VmafModel *vmaf_model, const YV12_BUFFER_CONFIG *source,
29 const YV12_BUFFER_CONFIG *distorted, int bit_depth,
30 bool cal_vmaf_neg, double *vmaf);
32 void aom_read_vmaf_image(VmafContext *vmaf_context,
33 const YV12_BUFFER_CONFIG *source,
34 const YV12_BUFFER_CONFIG *distorted, int bit_depth,
35 int frame_index);
37 double aom_calc_vmaf_at_index(VmafContext *vmaf_context, VmafModel *vmaf_model,
38 int frame_index);
40 void aom_flush_vmaf_context(VmafContext *vmaf_context);
42 #endif // AOM_AOM_DSP_VMAF_H_