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 025574888F for ; Mon, 20 May 2024 00:46:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0365268D084; Mon, 20 May 2024 03:46:43 +0300 (EEST) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9E90368B4F8 for ; Mon, 20 May 2024 03:46:36 +0300 (EEST) Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-43dff9da88fso16153471cf.2 for ; Sun, 19 May 2024 17:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716165995; x=1716770795; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aGvTMhGOaxrf04bYXpxOloXE02vhH6EyRHW93MX9OVc=; b=L9PSN/sW7v1etvvigN6FfnLq6Rwmz0HHzuCOGz5tJxmuRmQbTDS5kNECCmBB8x7aSy gKlbLw+rf64AMbuWYDCVI69Hz11FdMa+MPMIpJdFqjS5iqrcERlIWFFL9PO7+xFcnFGm oqfi3gWz/oWJWSKUcMV12PhwgGrjaGOs7/zyQsgPfEItjiKCy36ty9wMpi9z1n3amBvA g2cUqhYs0Y2x/p2PMHMft5cNUPPTNiw8bf58i94alDlX56ZtLsnkS86If8L7uzoaqPq7 wfEw4H9X+sPQFbde+wNaTcZQYdzJrN4XpSJA0D2fFQcjVpKK6GPveCXureQDcs91VyiL qzDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716165995; x=1716770795; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aGvTMhGOaxrf04bYXpxOloXE02vhH6EyRHW93MX9OVc=; b=dV/EwjDsy50E+gg2v+cJ6aNUMu2srqXI65Nr/o+du4TaJWojhAsh5sFxASh6DiyfNR 1t3sG9RH1iYeK2Y7Knbm2gFrv0o7lPz4546BLjUiImU2Kf2HkMCiNGXR4zicCS7i17VW ZuRtmnWUdb65aDf8gx1I/DwuER/ZrDEN2HoiTf6gOElNKcqv9+HefKEIOKd+tLCtVTI0 6iv8hnJSwv54o0DoXMDn34affQb1AWRh3I7gwLMyFL+0MmUM87F7xM01j51z8LiNRFBn s+NUgIUMq4mCPrLnHWe8e2h7NvGNyyx5/6xQpv9SqwQY9jInBeF7W1TA8kbJ8AdNYj/B 2xrg== X-Gm-Message-State: AOJu0YwcXgjYMnLjWtZvfoNWLudfA4A3hp4toxtPHARNM288iLaT4wac 9wiEyFBx0qgmYnlpdzl9uhD2NDg/P9C29zI/MERQgXyKZ4wTg+C+NAYQ4SUK X-Google-Smtp-Source: AGHT+IEnMOChqg0gJXu4EtTbBQeL5SIxV9Im7zHYs7YJFj2AaQUPauS00zikqn3OxAPbqr+raZvk4Q== X-Received: by 2002:ac8:7d82:0:b0:43a:cbd5:7599 with SMTP id d75a77b69052e-43dfdb290ccmr325439591cf.21.1716165995077; Sun, 19 May 2024 17:46:35 -0700 (PDT) Received: from fedora.tailc94c2.ts.net (209-6-133-125.s1659.c3-0.bkl-cbr1.sbo-bkl.ma.cable.rcncustomer.com. [209.6.133.125]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-43df8308580sm138383581cf.66.2024.05.19.17.46.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 17:46:34 -0700 (PDT) From: Stone Chen To: ffmpeg-devel@ffmpeg.org Date: Sun, 19 May 2024 20:42:03 -0400 Message-ID: <20240520004210.11489-4-chen.stonechen@gmail.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240520004210.11489-2-chen.stonechen@gmail.com> References: <20240520004210.11489-2-chen.stonechen@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 2/2][GSoC 2024] tests/checkasm: Add check_vvc_sad to vvc_mc.c 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: Stone Chen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Adds checkasm for DMVR SAD AVX2 implementation. Benchmarks ( AMD 7940HS ) vvc_sad_8x8_c: 70.0 vvc_sad_8x8_avx2: 10.0 vvc_sad_16x16_c: 280.0 vvc_sad_16x16_avx2: 20.0 vvc_sad_32x32_c: 1020.0 vvc_sad_32x32_avx2: 70.0 vvc_sad_64x64_c: 3560.0 vvc_sad_64x64_avx2: 270.0 vvc_sad_128x128_c: 13760.0 vvc_sad_128x128_avx2: 1070.0 --- tests/checkasm/vvc_mc.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/checkasm/vvc_mc.c b/tests/checkasm/vvc_mc.c index 97f57cb401..e251400bfc 100644 --- a/tests/checkasm/vvc_mc.c +++ b/tests/checkasm/vvc_mc.c @@ -322,8 +322,46 @@ static void check_avg(void) report("avg"); } +static void check_vvc_sad(void) +{ + const int bit_depth = 10; + VVCDSPContext c; + LOCAL_ALIGNED_32(uint16_t, src0, [MAX_CTU_SIZE * MAX_CTU_SIZE * 4]); + LOCAL_ALIGNED_32(uint16_t, src1, [MAX_CTU_SIZE * MAX_CTU_SIZE * 4]); + declare_func(int, const int16_t *src0, const int16_t *src1, int dx, int dy, int block_w, int block_h); + + ff_vvc_dsp_init(&c, bit_depth); + memset(src0, 0, MAX_CTU_SIZE * MAX_CTU_SIZE * 4); + memset(src1, 0, MAX_CTU_SIZE * MAX_CTU_SIZE * 4); + + randomize_pixels(src0, src1, MAX_CTU_SIZE * MAX_CTU_SIZE * 2); + for (int h = 8; h <= MAX_CTU_SIZE; h *= 2) { + for (int w = 8; w <= MAX_CTU_SIZE; w *= 2) { + for(int offy = 0; offy <= 4; offy++) { + for(int offx = 0; offx <= 4; offx++) { + if(check_func(c.inter.sad, "vvc_sad_%dx%d", w, h)) { + int result0; + int result1; + + result0 = call_ref(src0 + PIXEL_STRIDE * 2 + 2, src1 + PIXEL_STRIDE * 2 + 2, offx, offy, w, h); + result1 = call_new(src0 + PIXEL_STRIDE * 2 + 2, src1 + PIXEL_STRIDE * 2 + 2, offx, offy, w, h); + + if (result1 != result0) + fail(); + if(w == h && offx == 0 && offy == 0) + bench_new(src0 + PIXEL_STRIDE * 2 + 2, src1 + PIXEL_STRIDE * 2 + 2, offx, offy, w, h); + } + } + } + } + } + + report("check_vvc_sad"); +} + void checkasm_check_vvc_mc(void) { + check_vvc_sad(); check_put_vvc_luma(); check_put_vvc_luma_uni(); check_put_vvc_chroma(); -- 2.45.0 _______________________________________________ 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".