Skip to content

Commit

Permalink
meson: fix external builds with builtin models
Browse files Browse the repository at this point in the history
fixes #752

Signed-off-by: Christopher Degawa <[email protected]>
  • Loading branch information
1480c1 committed Dec 17, 2020
1 parent 23cc493 commit 410410a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 25 deletions.
6 changes: 5 additions & 1 deletion libvmaf/src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ if built_in_models_enabled
json_model_c_sources += custom_target(
model_file,
output : '@[email protected]',
input : model_dir + model_file,
input : configure_file(
input : model_dir + model_file,
output : model_file,
copy: true
),
command : [xxd, '--include', '@INPUT@', '@OUTPUT@'],
)
endforeach
Expand Down
48 changes: 24 additions & 24 deletions libvmaf/src/model.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,54 +20,54 @@ typedef struct VmafBuiltInModel {

#if VMAF_BUILT_IN_MODELS
#if VMAF_FLOAT_FEATURES
extern const char ___src_______model_vmaf_float_v0_6_1neg_json;
extern const int ___src_______model_vmaf_float_v0_6_1neg_json_len;
extern const char ___src_______model_vmaf_float_v0_6_1_json;
extern const int ___src_______model_vmaf_float_v0_6_1_json_len;
extern const char ___src_______model_vmaf_float_b_v0_6_3_json;
extern const int ___src_______model_vmaf_float_b_v0_6_3_json_len;
extern const char src_vmaf_float_v0_6_1neg_json;
extern const int src_vmaf_float_v0_6_1neg_json_len;
extern const char src_vmaf_float_v0_6_1_json;
extern const int src_vmaf_float_v0_6_1_json_len;
extern const char src_vmaf_float_b_v0_6_3_json;
extern const int src_vmaf_float_b_v0_6_3_json_len;
#endif
extern const char ___src_______model_vmaf_v0_6_1_json;
extern const int ___src_______model_vmaf_v0_6_1_json_len;
extern const char ___src_______model_vmaf_b_v0_6_3_json;
extern const int ___src_______model_vmaf_b_v0_6_3_json_len;
extern const char ___src_______model_vmaf_v0_6_1neg_json;
extern const int ___src_______model_vmaf_v0_6_1neg_json_len;
extern const char src_vmaf_v0_6_1_json;
extern const int src_vmaf_v0_6_1_json_len;
extern const char src_vmaf_b_v0_6_3_json;
extern const int src_vmaf_b_v0_6_3_json_len;
extern const char src_vmaf_v0_6_1neg_json;
extern const int src_vmaf_v0_6_1neg_json_len;
#endif

static const VmafBuiltInModel built_in_models[] = {
#if VMAF_BUILT_IN_MODELS
#if VMAF_FLOAT_FEATURES
{
.version = "vmaf_float_v0.6.1neg",
.data = &___src_______model_vmaf_float_v0_6_1neg_json,
.data_len = &___src_______model_vmaf_float_v0_6_1neg_json_len,
.data = &src_vmaf_float_v0_6_1neg_json,
.data_len = &src_vmaf_float_v0_6_1neg_json_len,
},
{
.version = "vmaf_float_v0.6.1",
.data = &___src_______model_vmaf_float_v0_6_1_json,
.data_len = &___src_______model_vmaf_float_v0_6_1_json_len,
.data = &src_vmaf_float_v0_6_1_json,
.data_len = &src_vmaf_float_v0_6_1_json_len,
},
{
.version = "vmaf_float_b_v0.6.3",
.data = &___src_______model_vmaf_float_b_v0_6_3_json,
.data_len = &___src_______model_vmaf_float_b_v0_6_3_json_len,
.data = &src_vmaf_float_b_v0_6_3_json,
.data_len = &src_vmaf_float_b_v0_6_3_json_len,
},
#endif
{
.version = "vmaf_v0.6.1",
.data = &___src_______model_vmaf_v0_6_1_json,
.data_len = &___src_______model_vmaf_v0_6_1_json_len,
.data = &src_vmaf_v0_6_1_json,
.data_len = &src_vmaf_v0_6_1_json_len,
},
{
.version = "vmaf_b_v0.6.3",
.data = &___src_______model_vmaf_b_v0_6_3_json,
.data_len = &___src_______model_vmaf_b_v0_6_3_json_len,
.data = &src_vmaf_b_v0_6_3_json,
.data_len = &src_vmaf_b_v0_6_3_json_len,
},
{
.version = "vmaf_v0.6.1neg",
.data = &___src_______model_vmaf_v0_6_1neg_json,
.data_len = &___src_______model_vmaf_v0_6_1neg_json_len,
.data = &src_vmaf_v0_6_1neg_json,
.data_len = &src_vmaf_v0_6_1neg_json_len,
},
#endif
{ 0 }
Expand Down

0 comments on commit 410410a

Please sign in to comment.