From patchwork Wed Mar 30 20:31:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 35085 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c05:b0:7a:e998:b410 with SMTP id bw5csp1011090pzb; Wed, 30 Mar 2022 13:32:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVBWVZ8kZaHvuwTP//jpmoBT/WTnqLfkThV8KhRFgW4ZbNItNiRS2Rm3i2Dq+1PIZjmZrL X-Received: by 2002:a17:907:2d2a:b0:6df:c027:a3ac with SMTP id gs42-20020a1709072d2a00b006dfc027a3acmr1458944ejc.179.1648672363883; Wed, 30 Mar 2022 13:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648672363; cv=none; d=google.com; s=arc-20160816; b=LbwvvMnhT+qjukKztj1ahvm+YFSYb/lBu2z9OUPIyAZdEuTJiY6OMGuS3QTWzqb9QK TOQbwdg3chWiVKHZ+KO0kd9dmx6qC51Cl0WTbneYZzwu8L3d9AXxoqt1CMNhj3KmEKxV ZdhFL5Pj8HYiyW6PF3bOCmOoFlqNVCJiaePC6mkW9DEwp0fyoh83/vWSwp57niE9Ujc/ wpLUyHbw8gtm0SXR64qijyOTZ+bkywHyWMC1ZVjDLKh4AhnfTGxiOVUoE6PO9KPNbl8q vCWe0bTx1ww7suJSY79W2jpq3CikIG+Ji5Jm6lSX06LVmVKqDvDHaTidF//zL8BcPtIV IAAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=3AcGt/MhcllpFtkDJApxa4mO3JFPl1AQg0ZGqeEai2U=; b=S7jwheUO9PKfqV13e87GnLlP6LI5CO+75E0iBiqGam2hwcrvSMMnX4pFK3IWt9M3yE 9HQGjW1daHthjXihuQyd8EtIhyqa32bHzBqhL7YHk1E8pPIDl9+7dqcaTdNxwEJDqrx6 iBhrHNYk61w3k3U4HOs4fVp53vUnLlb4Ukz6cDs6JLOs4mq2nlSGAPhn1XqG7WHBqUIY eFetdodyyCTRnJexJr1MYiIwCYS7SYZueSjOq1507xgyk3sj2kHMNw+Xtm2qgcRGXLLc 9wXKntTWCafSs4NisPOHPfFcULWdBkaezlk5CDP18aCA+xFx88bzeNih6O7GE0V3VKQ0 CoZw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id bp16-20020a170907919000b006df76385bc3si17851244ejb.99.2022.03.30.13.32.22; Wed, 30 Mar 2022 13:32:43 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0D0A968B240; Wed, 30 Mar 2022 23:32:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 03B4968B18C for ; Wed, 30 Mar 2022 23:32:11 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 8BF45E67D7; Wed, 30 Mar 2022 22:32:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T5f5CnfqpoHH; Wed, 30 Mar 2022 22:32:11 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 8BC26E67A2; Wed, 30 Mar 2022 22:32:10 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Wed, 30 Mar 2022 22:31:58 +0200 Message-Id: <20220330203205.25937-1-cus@passwd.hu> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/8] fate/filter-refcmp-*: make refcmp_metadata fail on empty input X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Marton Balint Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: DbLOHjbSPGQ0 On empty input the awk script was always successful which caused the filter-refcmp tests to always succeed. Also fix the command lines for refcmp_metadata compare function because it needs auto conversion filters, and update reference of test filter-refcmp-psnr-rgb because it was missed in a7fc78c1a638a32c3695c06f727774c740d675c2 but was never noticed due to the original issue... Signed-off-by: Marton Balint --- tests/fate-run.sh | 2 +- tests/ref/fate/filter-refcmp-psnr-rgb | 80 +++++++++++++-------------- tests/refcmp-metadata.awk | 3 + 3 files changed, 44 insertions(+), 41 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index fbfc0a925d..5e8d607d88 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -377,7 +377,7 @@ refcmp_metadata(){ refcmp=$1 pixfmt=$2 fuzz=${3:-0.001} - ffmpeg $FLAGS $ENC_OPTS \ + ffmpeg -auto_conversion_filters $FLAGS $ENC_OPTS \ -lavfi "testsrc2=size=300x200:rate=1:duration=5,format=${pixfmt},split[ref][tmp];[tmp]avgblur=4[enc];[enc][ref]${refcmp},metadata=print:file=-" \ -f null /dev/null | awk -v ref=${ref} -v fuzz=${fuzz} -f ${base}/refcmp-metadata.awk - } diff --git a/tests/ref/fate/filter-refcmp-psnr-rgb b/tests/ref/fate/filter-refcmp-psnr-rgb index f06db575ac..20abd3dc5a 100644 --- a/tests/ref/fate/filter-refcmp-psnr-rgb +++ b/tests/ref/fate/filter-refcmp-psnr-rgb @@ -1,45 +1,45 @@ frame:0 pts:0 pts_time:0 -lavfi.psnr.mse.r=1381.80 -lavfi.psnr.psnr.r=16.73 -lavfi.psnr.mse.g=896.00 -lavfi.psnr.psnr.g=18.61 -lavfi.psnr.mse.b=277.38 -lavfi.psnr.psnr.b=23.70 -lavfi.psnr.mse_avg=851.73 -lavfi.psnr.psnr_avg=18.83 +lavfi.psnr.mse.r=1367.642090 +lavfi.psnr.psnr.r=16.771078 +lavfi.psnr.mse.g=885.804382 +lavfi.psnr.psnr.g=18.657425 +lavfi.psnr.mse.b=274.825073 +lavfi.psnr.psnr.b=23.740240 +lavfi.psnr.mse_avg=842.757202 +lavfi.psnr.psnr_avg=18.873779 frame:1 pts:1 pts_time:1 -lavfi.psnr.mse.r=1380.37 -lavfi.psnr.psnr.r=16.73 -lavfi.psnr.mse.g=975.91 -lavfi.psnr.psnr.g=18.24 -lavfi.psnr.mse.b=435.72 -lavfi.psnr.psnr.b=21.74 -lavfi.psnr.mse_avg=930.67 -lavfi.psnr.psnr_avg=18.44 +lavfi.psnr.mse.r=1356.681152 +lavfi.psnr.psnr.r=16.806026 +lavfi.psnr.mse.g=958.161560 +lavfi.psnr.psnr.g=18.316416 +lavfi.psnr.mse.b=428.238312 +lavfi.psnr.psnr.b=21.813948 +lavfi.psnr.mse_avg=914.360352 +lavfi.psnr.psnr_avg=18.519630 frame:2 pts:2 pts_time:2 -lavfi.psnr.mse.r=1403.20 -lavfi.psnr.psnr.r=16.66 -lavfi.psnr.mse.g=954.05 -lavfi.psnr.psnr.g=18.34 -lavfi.psnr.mse.b=494.22 -lavfi.psnr.psnr.b=21.19 -lavfi.psnr.mse_avg=950.49 -lavfi.psnr.psnr_avg=18.35 +lavfi.psnr.mse.r=1387.254883 +lavfi.psnr.psnr.r=16.709242 +lavfi.psnr.mse.g=939.230957 +lavfi.psnr.psnr.g=18.403080 +lavfi.psnr.mse.b=493.913757 +lavfi.psnr.psnr.b=21.194292 +lavfi.psnr.mse_avg=940.133179 +lavfi.psnr.psnr_avg=18.398911 frame:3 pts:3 pts_time:3 -lavfi.psnr.mse.r=1452.80 -lavfi.psnr.psnr.r=16.51 -lavfi.psnr.mse.g=1001.02 -lavfi.psnr.psnr.g=18.13 -lavfi.psnr.mse.b=557.39 -lavfi.psnr.psnr.b=20.67 -lavfi.psnr.mse_avg=1003.74 -lavfi.psnr.psnr_avg=18.11 +lavfi.psnr.mse.r=1433.291260 +lavfi.psnr.psnr.r=16.567459 +lavfi.psnr.mse.g=990.005859 +lavfi.psnr.psnr.g=18.174425 +lavfi.psnr.mse.b=550.512329 +lavfi.psnr.psnr.b=20.723133 +lavfi.psnr.mse_avg=991.269836 +lavfi.psnr.psnr_avg=18.168884 frame:4 pts:4 pts_time:4 -lavfi.psnr.mse.r=1401.25 -lavfi.psnr.psnr.r=16.67 -lavfi.psnr.mse.g=1009.80 -lavfi.psnr.psnr.g=18.09 -lavfi.psnr.mse.b=602.42 -lavfi.psnr.psnr.b=20.33 -lavfi.psnr.mse_avg=1004.49 -lavfi.psnr.psnr_avg=18.11 +lavfi.psnr.mse.r=1385.949341 +lavfi.psnr.psnr.r=16.713329 +lavfi.psnr.mse.g=997.065796 +lavfi.psnr.psnr.g=18.143566 +lavfi.psnr.mse.b=601.962952 +lavfi.psnr.psnr.b=20.335106 +lavfi.psnr.mse_avg=994.992676 +lavfi.psnr.psnr_avg=18.152605 diff --git a/tests/refcmp-metadata.awk b/tests/refcmp-metadata.awk index fa21aad0e0..e7ed5ae809 100644 --- a/tests/refcmp-metadata.awk +++ b/tests/refcmp-metadata.awk @@ -50,12 +50,15 @@ BEGIN { } END { + result = result && (NR != 0); if (result) { for (i = 1; i <= ref_nr; i++) print ref_lines[i]; } else { for (i = 1; i <= NR; i++) print cmp_lines[i]; + if (NR == 0) + print "[refcmp] no input"; if (NR != ref_nr) print "[refcmp] lines: " NR " != " ref_nr > "/dev/stderr"; if (delta_max >= fuzz)