tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

vmaf.h (1631B)


      1 /*
      2 * Copyright (c) 2019, Alliance for Open Media. All rights reserved.
      3 *
      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.
     10 */
     11 
     12 #ifndef AOM_AOM_DSP_VMAF_H_
     13 #define AOM_AOM_DSP_VMAF_H_
     14 
     15 #include <libvmaf/libvmaf.h>
     16 #include <stdbool.h>
     17 
     18 #include "aom_scale/yv12config.h"
     19 
     20 void aom_init_vmaf_context(VmafContext **vmaf_context, VmafModel *vmaf_model,
     21                           bool cal_vmaf_neg);
     22 void aom_close_vmaf_context(VmafContext *vmaf_context);
     23 
     24 void aom_init_vmaf_model(VmafModel **vmaf_model, const char *model_path);
     25 void aom_close_vmaf_model(VmafModel *vmaf_model);
     26 
     27 void aom_calc_vmaf(VmafModel *vmaf_model, const YV12_BUFFER_CONFIG *source,
     28                   const YV12_BUFFER_CONFIG *distorted, int bit_depth,
     29                   bool cal_vmaf_neg, double *vmaf);
     30 
     31 void aom_read_vmaf_image(VmafContext *vmaf_context,
     32                         const YV12_BUFFER_CONFIG *source,
     33                         const YV12_BUFFER_CONFIG *distorted, int bit_depth,
     34                         int frame_index);
     35 
     36 double aom_calc_vmaf_at_index(VmafContext *vmaf_context, VmafModel *vmaf_model,
     37                              int frame_index);
     38 
     39 void aom_flush_vmaf_context(VmafContext *vmaf_context);
     40 
     41 #endif  // AOM_AOM_DSP_VMAF_H_