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 12C154ADAC for ; Tue, 21 May 2024 10:16:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EA92668D2FB; Tue, 21 May 2024 13:15:58 +0300 (EEST) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E492A68D04F for ; Tue, 21 May 2024 13:15:52 +0300 (EEST) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-51f40b5e059so5188553e87.0 for ; Tue, 21 May 2024 03:15:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1716286552; x=1716891352; darn=ffmpeg.org; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=f2rWKuFX+5UjKCx7k10ciXmugUaGKFd/YKcYPuf3riY=; b=aofGA3df0t9XP3XLkx9B4oJYoXLqgmlAdc8I8yr9pAQULyHeY9oWTN0pVGY8SM8U+b XLa257mweIT1PDZdgCmipL3fHCDFJBmWtmoifXU7FZW2aZxp0vnhUtKxPbwB1eSK9iBg QZiIk4Pin3F4Kn3bB9hrmq/fkiAraYVA8T9ox1SMyam+7n9xv1AE5CjbLEHQrVAnw/QI AT+ANDMYMBkXkdqDm5iHr9JyrGyyU2LnehMrEkCykq5xRTfWJawNxAFjYwpnPtKLi0dp n/LWGXK/hFHlV1kcUgCCJcy4/2tCWNpjzn2wuPmUWfoQlQf2P9vde+CLRrNXnmEuQkXg kLqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716286552; x=1716891352; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f2rWKuFX+5UjKCx7k10ciXmugUaGKFd/YKcYPuf3riY=; b=WBPnWBRGQ/bB/VJpyLd8Cwl9O5QVnjIdwJM1fpJ7zVYpxX5rHk2sVV228shk9aDUOT NHxfApzm7Z6gL5R8lWdOtx1nic6HZ18p80GISSMnAVVHNlcQylFhOwTDlTmDRhxUsxMy qxeUTTg/JXshNl3c6cYXLeu2AENE19dUUT4KuJnzZhPvB6VXfwaj5jliUA2NgrEGAAbT 2eYxTGoGxgc/RgD/gBNTwbGG5z+OLwXOQkj8dxP3kyI0j9IJ4eUNR9f71Tmh9tdbEpqc mUKRcsWW9iho3VZrkO+jfVBVh17r9/LKr/FT82T3UYIpKw4RVoT4I46MJpZG7wEr5Y6Q yWYQ== X-Gm-Message-State: AOJu0YwYwqj4OycC6VPIYyLhLZt/YvEoymCleWZf2kuEBzHnDUbBhw+E VBNhqIO7de8awkRw5gEpP8PolrDdKwREIgwEaJ9V5voo2G3HJrYzPFFylhd1tMIPaDIvCTlhiQt Xkg== X-Google-Smtp-Source: AGHT+IG0Ddx0+N5geuTZkayJfyMvx+cW2G0S5rM7unInFiK9bSnPH815zk6xofRwHbCzd9fqJl1FqQ== X-Received: by 2002:a05:6512:a83:b0:51b:e0f0:e4f8 with SMTP id 2adb3069b0e04-5220fc72fbemr22601307e87.31.1716286551834; Tue, 21 May 2024 03:15:51 -0700 (PDT) Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52367f8556fsm2712502e87.234.2024.05.21.03.15.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 03:15:51 -0700 (PDT) Date: Tue, 21 May 2024 13:15:50 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: ffmpeg-devel@ffmpeg.org In-Reply-To: <20240521100429.87090-1-martin@martin.st> Message-ID: References: <20240521100429.87090-1-martin@martin.st> MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] checkasm: vvc_alf: Limit benchmarking to a reasonable subset of functions 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-15"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Tue, 21 May 2024, Martin Storsj=F6 wrote: > Don't benchmark every single combination of widths and heights; > only benchmark cases which are squares (like in vvc_mc.c). > > Contrary to vvc_mc, which increases sizes by doubling dimensions, > vvc_alf tests all sizes in increments of 4. Limit benchmarking to > the cases which are powers of two. > > This reduces the number of benchmarked cases from 3072 down to 18. > --- > tests/checkasm/vvc_alf.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/tests/checkasm/vvc_alf.c b/tests/checkasm/vvc_alf.c > index 9526260598..6dd89bfafc 100644 > --- a/tests/checkasm/vvc_alf.c > +++ b/tests/checkasm/vvc_alf.c > @@ -103,7 +103,9 @@ static void check_alf_filter(VVCDSPContext *c, const = int bit_depth) > if (memcmp(dst0 + i * dst_stride, dst1 + i * dst_stri= de, w * SIZEOF_PIXEL)) > fail(); > } > - bench_new(dst1, dst_stride, src1 + offset, src_stride, w= , h, filter, clip, vb_pos); > + // Bench only square sizes, and ones with dimensions bei= ng a power of two. > + if (w =3D=3D h && (w & (w - 1)) =3D=3D 0) > + bench_new(dst1, dst_stride, src1 + offset, src_strid= e, w, h, filter, clip, vb_pos); > } > if (check_func(c->alf.filter[CHROMA], "vvc_alf_filter_chroma_= %dx%d_%d", w, h, bit_depth)) { > const int vb_pos =3D ctu_size - ALF_VB_POS_ABOVE_CHROMA; > @@ -115,7 +117,8 @@ static void check_alf_filter(VVCDSPContext *c, const = int bit_depth) > if (memcmp(dst0 + i * dst_stride, dst1 + i * dst_stri= de, w * SIZEOF_PIXEL)) > fail(); > } > - bench_new(dst1, dst_stride, src1 + offset, src_stride, w= , h, filter, clip, vb_pos); > + if (w =3D=3D h && (w & (w - 1)) =3D=3D 0) > + bench_new(dst1, dst_stride, src1 + offset, src_strid= e, w, h, filter, clip, vb_pos); > } > } > } > @@ -156,7 +159,9 @@ static void check_alf_classify(VVCDSPContext *c, cons= t int bit_depth) > fail(); > if (memcmp(transpose_idx0, transpose_idx1, id_size)) > fail(); > - bench_new(class_idx1, transpose_idx1, src1 + offset, str= ide, w, h, vb_pos, alf_gradient_tmp); > + // Bench only square sizes, and ones with dimensions bei= ng a power of two. > + if (w =3D=3D h && (w & (w - 1)) =3D=3D 0) > + bench_new(class_idx1, transpose_idx1, src1 + offset,= stride, w, h, vb_pos, alf_gradient_tmp); Note, these tests (all vvc tests) use check_func("name...%dx%d", w, h) - = while it's common elsewhere to group them up into slightly bigger bundles, = e.g. only including the width in the function name, assuming that this is = the level of granularity of actual assembly implementations - e.g. I don't = think there would be a different codepath implemented for each block = height. And it's possible to convey more information about exactly what failed, = without needing to encode it into the function name - see the = checkasm_check functions/macro, and e.g. commit = 8ff4a4a4f4f73c5e276fa0cbe6cd5a148ebdd4ae. // 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".