From patchwork Thu Aug 3 05:34:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashish Singh X-Patchwork-Id: 4610 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.46.211 with SMTP id u202csp438516vsu; Wed, 2 Aug 2017 22:34:24 -0700 (PDT) X-Received: by 10.28.8.144 with SMTP id 138mr286313wmi.8.1501738464293; Wed, 02 Aug 2017 22:34:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501738464; cv=none; d=google.com; s=arc-20160816; b=R+c5I8aKyLB732eT6GIEqBRGgGtETNXI8TJikAacx/iaQKfdg2OjeB+iPThGQneTJP eTGXHK4ZqqEYpwSqaNRMW6YV5tZ4WEJu6Q+NAmM/npUo4HkLKa8FvEz3xK6fOAGCiu2X WmWsyjJnPQmhv179JLmwCd1PFjqMP/X9s5QhIb/yMnI99CeG9LsMC4GoKTBv1TeL077w ObH/+3I61c+qthcgPUYsKZEOy+mfPfGbIm9Gr6rdjuuMHjSqA18mamwgR60EtdcouSx3 42eNS0hnS7IrgT8b56kBjd/vUQcAQAiwGBWTrOom0YIdPiRO4jibmsixGhuyLKXcDRgX XbyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=I6QTDqAM90bRXnY40Bpo6+WKxRCXZHCbDpW/HCPTgRg=; b=KTl302+eaAZO8kQ5uX4rwY2XoR8rLbJiTz70AIeKsT3bq0bnYqVQPK/EsbRoEGoSoT ShinVbYpPE7OhwUqtN1rkyP2amxB5smjBlIcQQIDJaiWczvB7QZIb6Ypw5WcTrojKw/M fSZT9JyikZhl9KH2O4+GG/+5XRM+QI5gfcW1zKQVcX13vjDEVGHp3m7kOcQa4qCjA/cn e1kpP8Ffqnx1YbeMIZF7Hpr1NfRDWmwk9adomwnpOY0Ddp6o+S7IU/AyRNHWAtxnprWx qzoXyoslLyxNYqrQvbbdBRMzw6LtTsjzgtnUV+zqeog4mkavv381LzpAGPuKCs2Uu/Ux Lynw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=DlLm2VGR; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id r76si678819wmb.234.2017.08.02.22.34.23; Wed, 02 Aug 2017 22:34:24 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=DlLm2VGR; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8E67A68055B; Thu, 3 Aug 2017 08:34:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BFF7A68043F for ; Thu, 3 Aug 2017 08:34:10 +0300 (EEST) Received: by mail-pg0-f67.google.com with SMTP id y129so531891pgy.3 for ; Wed, 02 Aug 2017 22:34:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=VFMAW8HNiW+gAJd2lQtCM5njl3c1/RZtCB/AbPQgu2U=; b=DlLm2VGRcfUl8FgTtaYyAPOPVAx6oi6HsEtBljHniLRWXOmJ4ZeFXq22llXVw2xjFX jJbJ5w8IwY8DpNCNFu53sABZp6J70GUP+J96LIRL8TEy12JPXb1LATW4mhLddPrsDTlc eIATsX9IYIEOVKj+pQWkR2/joYYW+ejN685z5Oc1EWjYQEvRdOTkPVD6ng+v/m2eyg7U ZH3tSdTdhiMmhELhLH0r/fUZIV9Je9fPaZOLBjoCP4dvxk0HCzYNJC0v/LcnAlF++fLr QZHA711FZyBg4uM6Xl3WHmYygeKew/hf4fAg6aGjljAcliFtNFqWJjmD0DO0bhop4j6w rixg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VFMAW8HNiW+gAJd2lQtCM5njl3c1/RZtCB/AbPQgu2U=; b=a1zUvHQmwnBqVGkNRwmeSC9yYhtt+4gKe8oJiVV/n0pGU7BkyurHCjKnqVEDXvkAsp +GD5TsWS/GGnS8ems74aXZ0iteTO57R28DuJUrtvPRvIRzAxHTfABX1tIo5jKR9bgaoQ PFNM3YGbsCM1cDIQ0+4OvDA+F2DgiUUse6gRZMcz/0qOreYZLZBxKh7/Rg6aU9QQ5R5a KxYHzBlPm8A9HHlNb7g7tIyE0wCpLUQJAe+xNeWgmjVkaDAcgACmn+ZxR5B311q6rtag tveFOs8qFkxqHS1hghNsukmVcSwicZksrOXaSyVDgcER67c/0kUpilOOLuYuUVBVEagq 788A== X-Gm-Message-State: AIVw11288CDpqg1c7YlZJ5ROVY73G8Z3cO4sM4vkLES8SoHj+EgVSYqc ssuliJNavTuhAavh X-Received: by 10.84.131.15 with SMTP id 15mr617901pld.156.1501738452132; Wed, 02 Aug 2017 22:34:12 -0700 (PDT) Received: from localhost.localdomain ([117.244.33.94]) by smtp.gmail.com with ESMTPSA id o14sm64509913pfi.158.2017.08.02.22.34.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Aug 2017 22:34:11 -0700 (PDT) From: Ashish Pratap Singh To: ffmpeg-devel@ffmpeg.org Date: Thu, 3 Aug 2017 11:04:01 +0530 Message-Id: <1501738441-23838-1-git-send-email-ashk43712@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [FFmpeg-devel] [PATCH] avfilter/vf_libvmaf: fix pre convert to framesync2 bugs X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Ashish Singh MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Ashish Singh Hi, it fixes the errors while converting to framesync2. libvmaf was changed recently, double *score variable is removed in the new version since it's not used anywhere. This patch fixes all the warnings and segmentation faults. Signed-off-by: Ashish Singh --- libavfilter/vf_libvmaf.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c index 3345cad..f2a8c9a 100644 --- a/libavfilter/vf_libvmaf.c +++ b/libavfilter/vf_libvmaf.c @@ -24,7 +24,6 @@ * Calculate the VMAF between two input videos. */ -#include #include #include #include "libavutil/avstring.h" @@ -84,11 +83,10 @@ static const AVOption libvmaf_options[] = { AVFILTER_DEFINE_CLASS(libvmaf); #define read_frame_fn(type, bits) \ - static int read_frame_##bits##bit(float *ref_data, float *main_data, \ - float *temp_data, int stride, \ - double *score, void *ctx) \ + static int read_frame_##bits##bit(float *ref_data, float *main_data, \ + float *temp_data, int stride, void *ctx) \ { \ - LIBVMAFContext *s = (LIBVMAFContext *) ctx; \ + LIBVMAFContext *s = (LIBVMAFContext *) ctx; \ int ret; \ \ pthread_mutex_lock(&s->lock); \ @@ -150,7 +148,7 @@ read_frame_fn(uint16_t, 10); static void compute_vmaf_score(LIBVMAFContext *s) { int (*read_frame)(float *ref_data, float *main_data, float *temp_data, - int stride, double *score, void *ctx); + int stride, void *ctx); if (s->desc->comp[0].depth <= 8) { read_frame = read_frame_8bit;