From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 9F99046ADE for ; Sun, 2 Jul 2023 21:14:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B6E8F68C4DC; Mon, 3 Jul 2023 00:14:23 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7374A68C489 for ; Mon, 3 Jul 2023 00:14:17 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 362LEGkq014556-362LEGkr014556; Mon, 3 Jul 2023 00:14:16 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id C6924A146B; Mon, 3 Jul 2023 00:14:16 +0300 (EEST) Date: Mon, 3 Jul 2023 00:14:16 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: John Cox In-Reply-To: <20230702123242.232484-6-jc@kynesim.co.uk> Message-ID: <399356a6-c093-bc20-b427-5a1b4a381e4f@martin.st> References: <20230702123242.232484-1-jc@kynesim.co.uk> <20230702123242.232484-6-jc@kynesim.co.uk> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [PATCH v2 05/15] tests/checkasm: Add test for vf_bwdif filter_intra 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: thomas.mundt@hr.de, ffmpeg-devel@ffmpeg.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Sun, 2 Jul 2023, John Cox wrote: > Signed-off-by: John Cox > --- > tests/checkasm/vf_bwdif.c | 37 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 37 insertions(+) > > diff --git a/tests/checkasm/vf_bwdif.c b/tests/checkasm/vf_bwdif.c > index 46224bb575..034bbabb4c 100644 > --- a/tests/checkasm/vf_bwdif.c > +++ b/tests/checkasm/vf_bwdif.c > @@ -20,6 +20,7 @@ > #include "checkasm.h" > #include "libavcodec/internal.h" > #include "libavfilter/bwdif.h" > +#include "libavutil/mem_internal.h" > > #define WIDTH 256 > > @@ -81,4 +82,40 @@ void checkasm_check_vf_bwdif(void) > BODY(uint16_t, 10); > report("bwdif10"); > } > + > + if (check_func(ctx_8.filter_intra, "bwdif8.intra")) { > + LOCAL_ALIGNED_16(uint8_t, cur0, [11*WIDTH]); > + LOCAL_ALIGNED_16(uint8_t, cur1, [11*WIDTH]); > + LOCAL_ALIGNED_16(uint8_t, dst0, [WIDTH*3]); > + LOCAL_ALIGNED_16(uint8_t, dst1, [WIDTH*3]); > + const int stride = WIDTH; > + const int mask = (1<<8)-1; > + > + declare_func(void, void *dst1, void *cur1, int w, int prefs, int mrefs, > + int prefs3, int mrefs3, int parity, int clip_max); > + > + randomize_buffers( cur0, cur1, mask, 11*WIDTH); > + memset(dst0, 0xba, WIDTH * 3); > + memset(dst1, 0xba, WIDTH * 3); > + > + call_ref(dst0 + stride, > + cur0 + stride * 4, WIDTH, > + stride, -stride, stride * 3, -stride * 3, > + 0, mask); > + call_new(dst1 + stride, > + cur0 + stride * 4, WIDTH, > + stride, -stride, stride * 3, -stride * 3, > + 0, mask); > + > + if (memcmp(dst0, dst1, WIDTH*3) > + || memcmp( cur0, cur1, WIDTH*11)) > + fail(); > + > + bench_new(dst1 + stride, > + cur0 + stride * 4, WIDTH, > + stride, -stride, stride * 3, -stride * 3, > + 0, mask); > + > + report("bwdif8.intra"); > + } It's a bit of a shame that this only tests things for 8 bit, not 10, but I guess that's better than nothing. The way the current code is set up to template both variants of the tests isn't very neat either... // Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".