/* * Copyright (c) 2019, Alliance for Open Media. All rights reserved. * * This source code is subject to the terms of the BSD 2 Clause License and * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License * was not distributed with this source code in the LICENSE file, you can * obtain it at www.aomedia.org/license/software. If the Alliance for Open * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
if (vmaf_init(vmaf_context, cfg)) {
vmaf_fatal_error("Failed to init VMAF context.");
}
if (cal_vmaf_neg) {
VmafFeatureDictionary *vif_feature = NULL; if (vmaf_feature_dictionary_set(&vif_feature, "vif_enhn_gain_limit", "1.0")) {
vmaf_fatal_error("Failed to set vif_enhn_gain_limit.");
} if (vmaf_model_feature_overload(vmaf_model, "float_vif", vif_feature)) {
vmaf_fatal_error("Failed to use feature float_vif.");
}
VmafFeatureDictionary *adm_feature = NULL; if (vmaf_feature_dictionary_set(&adm_feature, "adm_enhn_gain_limit", "1.0")) {
vmaf_fatal_error("Failed to set adm_enhn_gain_limit.");
} if (vmaf_model_feature_overload(vmaf_model, "adm", adm_feature)) {
vmaf_fatal_error("Failed to use feature float_adm.");
}
}
VmafFeatureDictionary *motion_force_zero = NULL; if (vmaf_feature_dictionary_set(&motion_force_zero, "motion_force_zero", "1")) {
vmaf_fatal_error("Failed to set motion_force_zero.");
} if (vmaf_model_feature_overload(vmaf_model, "float_motion",
motion_force_zero)) {
vmaf_fatal_error("Failed to use feature float_motion.");
}
if (vmaf_use_features_from_model(*vmaf_context, vmaf_model)) {
vmaf_fatal_error("Failed to load feature extractors from VMAF model.");
}
}
void aom_close_vmaf_context(VmafContext *vmaf_context) { if (vmaf_close(vmaf_context)) {
vmaf_fatal_error("Failed to close VMAF context.");
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.