From patchwork Fri Mar 24 00:25:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 40785 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:d046:b0:cd:afd7:272c with SMTP id hv6csp163408pzb; Thu, 23 Mar 2023 17:26:18 -0700 (PDT) X-Google-Smtp-Source: AK7set/td2/r2XsfExLxk5GabL20megTtOgZ9aVTnlLbaJgTV8ZzsxFg8WmZlDYRjWbpaJm51bm/ X-Received: by 2002:a17:906:445:b0:8af:3382:e578 with SMTP id e5-20020a170906044500b008af3382e578mr7932020eja.4.1679617577849; Thu, 23 Mar 2023 17:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679617577; cv=none; d=google.com; s=arc-20160816; b=LHWmLZTF+dZF3ADvdviU3SbWGMNEihvmfpTmQ0V3qLRYg8jph+yLHW0hTkkZEOV8OL OkuyhGFved0aKw3cN6FE2jEC7ruzX0WM4TOYhYv7Du5i7dhHBjgblscoy7tAxJkXyaSY PfICx+aiTMfzdJA5ID5S1mDpK52QdmbwDCggPJmjYAn/U8LnxKR1jCGoRa18LbXRrVki Jj2zgd2lwpRQBNQQq2ZvyRmgYtTpKaa2MBAujc9/15RehsU1nMu6qhmCzLD5UgWh0wBm Ijb2pRCsc59RH8VsWyvUPrj8IMdNRasxolBzd5T8Xb6Ls3L6TSXlHAfxCAX1Z4Bl6FRn fXJw== 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:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=ECA4bxQOAz9C/l+b117H7tMnx8/pk/+89SeML1H4Bzk=; b=rzllSAD5qYbqvx1WHlJWPvI5HkePkOHMZuHRwgJa6uq3aZn4COQwnPh6frGBWlhaXG NUzzvtubQLP4vq0QSvmsMHwQinYJhOHDSLGZCo5MWPLJ8YErO/QfAChomqum4wTeHYp1 wU3BtALoaveWFhLJpK8UACrUwt5aLnjRvwcH/6rOxpPoSp2T/Ac3FtwvKxEjw78e2ofN bfgKIA+MFrNyGo0D08N5PM+QZTMaPbMdG0Fr98quU7zpZFIsI9u7BNFbSETWHTsdfmin fwX0S9j8iGpAiA4Y00Faux7qwALo8aqStBwBF8y+3g2jvlSpKfPeK4UiW+Cpeu+sf+I+ CuHA== 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 23-20020a170906101700b00922d833a2dbsi4934780ejm.508.2023.03.23.17.26.17; Thu, 23 Mar 2023 17:26:17 -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 AA1BD68C357; Fri, 24 Mar 2023 02:25:52 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 56AA568C329 for ; Fri, 24 Mar 2023 02:25:45 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 8D041240003 for ; Fri, 24 Mar 2023 00:25:44 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 24 Mar 2023 01:25:38 +0100 Message-Id: <20230324002540.3227-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230324002540.3227-1-michael@niedermayer.cc> References: <20230324002540.3227-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 4/6] avcodec/tests/snowenc: return a failure if DWT/IDWT mismatches 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 2SjhP+zAlQkm Signed-off-by: Michael Niedermayer --- libavcodec/tests/snowenc.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libavcodec/tests/snowenc.c b/libavcodec/tests/snowenc.c index 8064309144..19635899d9 100644 --- a/libavcodec/tests/snowenc.c +++ b/libavcodec/tests/snowenc.c @@ -37,6 +37,7 @@ int main(void){ AVLFG prng; s.spatial_decomposition_count=6; s.spatial_decomposition_type=1; + int ret = 0; s.temp_dwt_buffer = av_calloc(width, sizeof(*s.temp_dwt_buffer)); s.temp_idwt_buffer = av_calloc(width, sizeof(*s.temp_idwt_buffer)); @@ -58,7 +59,10 @@ int main(void){ ff_spatial_idwt(obuffer, s.temp_idwt_buffer, width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count); for(i=0; i20) printf("fsck: %4dx%4d %12d %7d\n",i%width, i/width, buffer[1][i], obuffer[i]); + if(FFABS(buffer[1][i] - obuffer[i])>20) { + printf("fsck: %4dx%4d %12d %7d\n",i%width, i/width, buffer[1][i], obuffer[i]); + ret = 1; + } { int level, orientation, x, y; @@ -137,5 +144,5 @@ int main(void){ } } - return 0; + return ret; }