From patchwork Sun Dec 18 18:48:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Burt P X-Patchwork-Id: 1858 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp812028vsa; Sun, 18 Dec 2016 10:54:46 -0800 (PST) X-Received: by 10.194.248.233 with SMTP id yp9mr10576217wjc.228.1482087286116; Sun, 18 Dec 2016 10:54:46 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l6si15670801wje.169.2016.12.18.10.54.45; Sun, 18 Dec 2016 10:54:46 -0800 (PST) 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; 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 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 34761689E9D; Sun, 18 Dec 2016 20:54:36 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it0-f43.google.com (mail-it0-f43.google.com [209.85.214.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 74013689E80 for ; Sun, 18 Dec 2016 20:54:29 +0200 (EET) Received: by mail-it0-f43.google.com with SMTP id b132so35005585iti.1 for ; Sun, 18 Dec 2016 10:54:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=DaZ9SvBgG3IN31vSrP7a2Bjr0wJb8qUKDpyF8injzMc=; b=dZn7sIhsdOLYYP6EWP+ZqyYKNRoTesaoW7JkAOIf0Zz2xsZ4v4ruZLuk/I5fFeXrUz 1aEi6wWDV3sZx5oE0+XLOJRZuvMBuE5wK+DTERLAD9BPLeq1J8t1IUUFsI6gTjFmNLO4 FDEEs3kLHM6fz2IB4EAHpRm7fRj7eh3KwC2joShhBbKweb8jTTSThJ2MJA77yIqc3gUw f7hkhQLqoeF8gwbiRQdgPfx58En46mKWTGWpzkbiR+Kb+kbOWokVGthEIrowG1KPc8WN RpLD8RRWQZvfHvqFCr1LmMQUCe0eES/7wptyT+QjoPgWDeRTuV4A9lkVvxB4lxqlESLC Ca3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=DaZ9SvBgG3IN31vSrP7a2Bjr0wJb8qUKDpyF8injzMc=; b=TRVMRx1JcoTxGd+rLQ/WMi/bey5ToB6gOqzeIMvMCKPGgvuFvvsNJFVZmYJjcv4JmT yTV0+vPZEfmnjM9O5rcBSb8ilTM7Yq1Qmz7aR7DVuOMVFE2va16cFUBGhNfqO/qB49yF TnYeiP9aTsEqo6A81vkZ28uAvQyYgSeep21SPbRffxAxr3lQf6LBjlcbZegMssUGx07W V9XUu5KbmML+qx4aM+t64eVm8tKrf8SXEZNCOWoXlLdU9pMWxnZx2K682DQGqiXmCvYd zGVtXHDn8z4BluyxU/SlN8Wksc3+qUPxcPWyTFJvWfkYG/55JhFcwNePoU10PhrUAEJm H4RA== X-Gm-Message-State: AKaTC01ZMzPeobz2MkdynRlZDRjKoAhlBqnMGeM/SpkCNwooDth9K02N46jX9jW4EEIpFA== X-Received: by 10.36.87.203 with SMTP id u194mr13054650ita.100.1482086928348; Sun, 18 Dec 2016 10:48:48 -0800 (PST) Received: from localhost.localdomain ([216.16.66.181]) by smtp.gmail.com with ESMTPSA id e143sm5513184itc.9.2016.12.18.10.48.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Dec 2016 10:48:47 -0800 (PST) From: Burt P To: ffmpeg-devel@ffmpeg.org Date: Sun, 18 Dec 2016 12:48:45 -0600 Message-Id: <20161218184845.26928-1-pburt0@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161218074226.22778-1-pburt0@gmail.com> References: <20161218074226.22778-1-pburt0@gmail.com> Subject: [FFmpeg-devel] [PATCHv3] af_hdcd: more FATE tests 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Additional/Modified FATE tests improve code coverage from 63.7% to 98.1%. Changed fate-suite sample files: * filter/hdcd-encoding-errors.flac (1.3M) replaced by a smaller version (140K). It can be replaced because the test only looks for a non-zero number of errors, so the existing test will still pass. * filter/hdcd-mix.flac (958K) added. It is a much better test than filter/hdcd.flac (910K), which is now unused, but can't be removed. * filter/hdcd-fake20bit.flac (168K) added. It is the first second of filter/hdcd.flac, with the 16-bit LSB copied into bit 20 of a 24-bit stream. There isn't an actual non-16-bit HDCD sample available to test. Net change -34K. Would be -944K if hdcd.flac could be removed. Signed-off-by: Burt P --- tests/fate/filter-audio.mak | 86 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 74 insertions(+), 12 deletions(-) diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 9c6f7cd..b356bcc 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -255,17 +255,55 @@ fate-filter-volume: CMD = md5 -i $(SRC) -af aperms=random,volume=precision=fixed fate-filter-volume: CMP = oneline fate-filter-volume: REF = 4d6ba75ef3e32d305d066b9bc771d6f4 -FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd -fate-filter-hdcd: SRC = $(TARGET_SAMPLES)/filter/hdcd.flac -fate-filter-hdcd: CMD = md5 -i $(SRC) -af hdcd -f s24le -fate-filter-hdcd: CMP = oneline -fate-filter-hdcd: REF = 5db465a58d2fd0d06ca944b883b33476 - -FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-analyze -fate-filter-hdcd-analyze: SRC = $(TARGET_SAMPLES)/filter/hdcd.flac -fate-filter-hdcd-analyze: CMD = md5 -i $(SRC) -af hdcd=analyze_mode=pe -f s24le -fate-filter-hdcd-analyze: CMP = oneline -fate-filter-hdcd-analyze: REF = 6e39dc4629c1e84321c0d8bc069b42f6 +# hdcd-mix.flac is a mix of three different sources which are interesting for various reasons: +# first 5 seconds uses packet format A and max LLE of -7.0db +# second 5 seconds uses packet format B and has a gain mismatch between channels +# last 10 seconds is not HDCD but has a coincidental HDCD packet, it needs to be 10 seconds because it also tests the cdt expiration +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-mix +fate-filter-hdcd-mix: SRC = $(TARGET_SAMPLES)/filter/hdcd-mix.flac +fate-filter-hdcd-mix: CMD = md5 -i $(SRC) -af hdcd -f s24le +fate-filter-hdcd-mix: CMP = oneline +fate-filter-hdcd-mix: REF = e7079913e90c124460cdbc712df5b84c + +# output will be different because of the gain mismatch in the second and third parts +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-mix-psoff +fate-filter-hdcd-mix-psoff: SRC = $(TARGET_SAMPLES)/filter/hdcd-mix.flac +fate-filter-hdcd-mix-psoff: CMD = md5 -i $(SRC) -af hdcd=process_stereo=false -f s24le +fate-filter-hdcd-mix-psoff: CMP = oneline +fate-filter-hdcd-mix-psoff: REF = bd0e81fe17696b825ee3515ab928e6bb + +# test the different analyze modes +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-analyze-pe +fate-filter-hdcd-analyze-pe: SRC = $(TARGET_SAMPLES)/filter/hdcd-mix.flac +fate-filter-hdcd-analyze-pe: CMD = md5 -i $(SRC) -af hdcd=analyze_mode=pe -f s24le +fate-filter-hdcd-analyze-pe: CMP = oneline +fate-filter-hdcd-analyze-pe: REF = bb83e97bbd0064b9b1c0ef2f2c8f0c77 +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-analyze-lle +fate-filter-hdcd-analyze-lle: SRC = $(TARGET_SAMPLES)/filter/hdcd-mix.flac +fate-filter-hdcd-analyze-lle: CMD = md5 -i $(SRC) -af hdcd=analyze_mode=lle -f s24le +fate-filter-hdcd-analyze-lle: CMP = oneline +fate-filter-hdcd-analyze-lle: REF = 121cc4a681aa0caef5c664fece7a3ddc +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-analyze-cdt +fate-filter-hdcd-analyze-cdt: SRC = $(TARGET_SAMPLES)/filter/hdcd-mix.flac +fate-filter-hdcd-analyze-cdt: CMD = md5 -i $(SRC) -af hdcd=analyze_mode=cdt -f s24le +fate-filter-hdcd-analyze-cdt: CMP = oneline +fate-filter-hdcd-analyze-cdt: REF = 12136e6a00dd532994f6edcc347af1d4 +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-analyze-tgm +fate-filter-hdcd-analyze-tgm: SRC = $(TARGET_SAMPLES)/filter/hdcd-mix.flac +fate-filter-hdcd-analyze-tgm: CMD = md5 -i $(SRC) -af hdcd=analyze_mode=tgm -f s24le +fate-filter-hdcd-analyze-tgm: CMP = oneline +fate-filter-hdcd-analyze-tgm: REF = a3c39f62e9b9b42c9c440d0045d5fb2f +# the two additional analyze modes from libhdcd +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-analyze-ltgm +fate-filter-hdcd-analyze-ltgm: SRC = $(TARGET_SAMPLES)/filter/hdcd-mix.flac +fate-filter-hdcd-analyze-ltgm: CMD = md5 -i $(SRC) -af hdcd=analyze_mode=lle:process_stereo=false -f s24le +fate-filter-hdcd-analyze-ltgm: CMP = oneline +fate-filter-hdcd-analyze-ltgm: REF = 76ffd86b762b5a93332039f27e4c0c0e +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-analyze-pel +fate-filter-hdcd-analyze-pel: SRC = $(TARGET_SAMPLES)/filter/hdcd-mix.flac +fate-filter-hdcd-analyze-pel: CMD = md5 -i $(SRC) -af hdcd=analyze_mode=pe:force_pe=true -f s24le +fate-filter-hdcd-analyze-pel: CMP = oneline +fate-filter-hdcd-analyze-pel: REF = 8156c5a3658d789ab46447d62151f5e9 FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-false-positive fate-filter-hdcd-false-positive: SRC = $(TARGET_SAMPLES)/filter/hdcd-false-positive.flac @@ -274,11 +312,35 @@ fate-filter-hdcd-false-positive: CMP = grep fate-filter-hdcd-false-positive: REF = HDCD detected: no FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-detect-errors -fate-filter-hdcd-detect-errors: SRC = $(TARGET_SAMPLES)/filter/hdcd-encoding-errors.flac +fate-filter-hdcd-detect-errors: SRC = $(TARGET_SAMPLES)/filter/hdcd-encoding-errors2.flac fate-filter-hdcd-detect-errors: CMD = md5 -i $(SRC) -af hdcd -f s24le fate-filter-hdcd-detect-errors: CMP = grep fate-filter-hdcd-detect-errors: REF = detectable errors: [1-9] +# 20bit HDCD +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S32LE, PCM_S32LE) += fate-filter-hdcd-20bit +fate-filter-hdcd-20bit: SRC = $(TARGET_SAMPLES)/filter/hdcd-fake20bit.flac +fate-filter-hdcd-20bit: CMD = md5 -i $(SRC) -af hdcd=bits_per_sample=20 -f s32le +fate-filter-hdcd-20bit: CMP = oneline +fate-filter-hdcd-20bit: REF = 365ded883a4a92483b15b69babc81390 + +# non-hdcd tests of different input formats for code coverage +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, WAV, PCM_S16LE, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-mono +fate-filter-hdcd-mono: SRC = $(TARGET_SAMPLES)/audiomatch/tones_44100_mono.wav +fate-filter-hdcd-mono: CMD = md5 -i $(SRC) -af hdcd -f s24le +fate-filter-hdcd-mono: CMP = oneline +fate-filter-hdcd-mono: REF = f51b114b20728e6a463a9491c643d166 +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, WV, WAVPACK, PCM_S32LE, PCM_S32LE) += fate-filter-hdcd-s16p +fate-filter-hdcd-s16p: SRC = $(TARGET_SAMPLES)/wavpack/lossless/16bit-partial.wv +fate-filter-hdcd-s16p: CMD = md5 -i $(SRC) -af hdcd -f s32le +fate-filter-hdcd-s16p: CMP = oneline +fate-filter-hdcd-s16p: REF = 4e767f436b891ac59810a8b2b1d7e96b +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, WV, WAVPACK, PCM_S32LE, PCM_S32LE) += fate-filter-hdcd-s32p +fate-filter-hdcd-s32p: SRC = $(TARGET_SAMPLES)/wavpack/lossless/24bit-partial.wv +fate-filter-hdcd-s32p: CMD = md5 -i $(SRC) -af hdcd -f s32le +fate-filter-hdcd-s32p: CMP = oneline +fate-filter-hdcd-s32p: REF = 0c5513e83eedaa10ab6fac9ddc173cf5 + FATE_AFILTER-yes += fate-filter-formats fate-filter-formats: libavfilter/tests/formats$(EXESUF) fate-filter-formats: CMD = run libavfilter/tests/formats