From a8bf8487ebdfbc29b851905ddaba095dff74a104 Mon Sep 17 00:00:00 2001 From: Holy Wu Date: Wed, 19 Dec 2018 11:26:14 +0800 Subject: [PATCH] Change default pool to 1 --- README.md | 2 +- VMAF/VMAF.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a7311b6..b9ccb18 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The folder `model` must be located in the same folder as `VMAF.dll`. Usage ===== - vmaf.VMAF(clip reference, clip distorted[, int model=0, string log_path="", int log_fmt=0, bint psnr=False, bint ssim=False, bint ms_ssim=False, int pool=0, bint ci=False]) + vmaf.VMAF(clip reference, clip distorted[, int model=0, string log_path="", int log_fmt=0, bint psnr=False, bint ssim=False, bint ms_ssim=False, int pool=1, bint ci=False]) * reference, distorted: Clips to calculate VMAF score. Only YUV420P8, YUV422P8, YUV444P8, YUV420P10, YUV422P10, and YUV444P10 are supported. diff --git a/VMAF/VMAF.cpp b/VMAF/VMAF.cpp index 642c3d6..87b7d4a 100644 --- a/VMAF/VMAF.cpp +++ b/VMAF/VMAF.cpp @@ -190,7 +190,9 @@ static void VS_CC vmafCreate(const VSMap *in, VSMap *out, void *userData, VSCore d->ms_ssim = !!vsapi->propGetInt(in, "ms_ssim", 0, &err); - const int pool = int64ToIntS(vsapi->propGetInt(in, "pool", 0, &err)); + int pool = int64ToIntS(vsapi->propGetInt(in, "pool", 0, &err)); + if (err) + pool = 1; d->ci = !!vsapi->propGetInt(in, "ci", 0, &err);