74 lines
3.8 KiB
Diff
74 lines
3.8 KiB
Diff
diff -Naurp a/configure b/configure
|
|
--- a/configure 2018-07-18 13:51:59.000000000 +0000
|
|
+++ b/configure 2018-08-10 21:09:52.000000000 +0000
|
|
@@ -6043,7 +6043,7 @@ enabled libtwolame && require lib
|
|
die "ERROR: libtwolame must be installed and version must be >= 0.3.10"; }
|
|
enabled libv4l2 && require_pkg_config libv4l2 libv4l2 libv4l2.h v4l2_ioctl
|
|
enabled libvidstab && require_pkg_config libvidstab "vidstab >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit
|
|
-enabled libvmaf && require_pkg_config libvmaf "libvmaf >= 0.6.2" libvmaf.h compute_vmaf
|
|
+enabled libvmaf && require_pkg_config libvmaf "libvmaf >= 1.3.9" libvmaf.h compute_vmaf
|
|
enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc
|
|
enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h vorbis_info_init &&
|
|
require_pkg_config libvorbisenc vorbisenc vorbis/vorbisenc.h vorbis_encode_init
|
|
diff -Naurp a/doc/filters.texi b/doc/filters.texi
|
|
--- a/doc/filters.texi 2018-07-18 13:51:59.000000000 +0000
|
|
+++ b/doc/filters.texi 2018-08-10 21:09:52.000000000 +0000
|
|
@@ -10425,7 +10425,7 @@ The obtained VMAF score is printed throu
|
|
|
|
It requires Netflix's vmaf library (libvmaf) as a pre-requisite.
|
|
After installing the library it can be enabled using:
|
|
-@code{./configure --enable-libvmaf}.
|
|
+@code{./configure --enable-libvmaf --enable-version3}.
|
|
If no model path is specified it uses the default model: @code{vmaf_v0.6.1.pkl}.
|
|
|
|
The filter has following options:
|
|
@@ -10459,6 +10459,15 @@ Enables computing ms_ssim along with vma
|
|
|
|
@item pool
|
|
Set the pool method (mean, min or harmonic mean) to be used for computing vmaf.
|
|
+
|
|
+@item n_threads
|
|
+Set number of threads to be used when computing vmaf.
|
|
+
|
|
+@item n_subsample
|
|
+Set interval for frame subsampling used when computing vmaf.
|
|
+
|
|
+@item enable_conf_interval
|
|
+Enables confidence interval.
|
|
@end table
|
|
|
|
This filter also supports the @ref{framesync} options.
|
|
diff -Naurp a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c
|
|
--- a/libavfilter/vf_libvmaf.c 2018-07-18 13:52:01.000000000 +0000
|
|
+++ b/libavfilter/vf_libvmaf.c 2018-08-10 21:09:52.000000000 +0000
|
|
@@ -61,6 +61,9 @@ typedef struct LIBVMAFContext {
|
|
int ssim;
|
|
int ms_ssim;
|
|
char *pool;
|
|
+ int n_threads;
|
|
+ int n_subsample;
|
|
+ int enable_conf_interval;
|
|
int error;
|
|
} LIBVMAFContext;
|
|
|
|
@@ -77,6 +80,9 @@ static const AVOption libvmaf_options[]
|
|
{"ssim", "Enables computing ssim along with vmaf.", OFFSET(ssim), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
|
|
{"ms_ssim", "Enables computing ms-ssim along with vmaf.", OFFSET(ms_ssim), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
|
|
{"pool", "Set the pool method to be used for computing vmaf.", OFFSET(pool), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS},
|
|
+ {"n_threads", "Set number of threads to be used when computing vmaf.", OFFSET(n_threads), AV_OPT_TYPE_INT, {.i64=0}, 0, UINT_MAX, FLAGS},
|
|
+ {"n_subsample", "Set interval for frame subsampling used when computing vmaf.", OFFSET(n_subsample), AV_OPT_TYPE_INT, {.i64=1}, 1, UINT_MAX, FLAGS},
|
|
+ {"enable_conf_interval", "Enables confidence interval.", OFFSET(enable_conf_interval), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
|
|
{ NULL }
|
|
};
|
|
|
|
@@ -165,7 +171,8 @@ static void compute_vmaf_score(LIBVMAFCo
|
|
read_frame, s, s->model_path, s->log_path,
|
|
s->log_fmt, 0, 0, s->enable_transform,
|
|
s->phone_model, s->psnr, s->ssim,
|
|
- s->ms_ssim, s->pool);
|
|
+ s->ms_ssim, s->pool,
|
|
+ s->n_threads, s->n_subsample, s->enable_conf_interval);
|
|
}
|
|
|
|
static void *call_vmaf(void *ctx)
|