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 3B0BF49533 for ; Tue, 14 May 2024 20:41:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B580768D74F; Tue, 14 May 2024 23:41:43 +0300 (EEST) Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BBC1468D730 for ; Tue, 14 May 2024 23:41:36 +0300 (EEST) Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-43e1581e81cso18431491cf.3 for ; Tue, 14 May 2024 13:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715719295; x=1716324095; 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=XBW7L6tgc/okwVInn2iB8tl/p12g57MH3rZvL3yN4hI=; b=BqOJjzDG77CkxXaAvu2OO3Gfuqmon9bYnGafYv2suX8ZmRS3i3BMmyUqof7dxSu5Br e+0G7C+NeGCipM2gpPTXkHJ18/WG7Ff55MJ9Fr+oqXrsVm9715RkqV3fRe1f8dgkCrhT /ZqFMPyplkHVM4NA+WApRJNrqSbAIql4127m4yKdo/MBDYDFXjyNW+KZ1LeeyFzAIzhm y+wm9elsNQhtJOEMdxEu06huhrzMdTm9Bje3tWYdCxUNZeOz//8HqIxaDMWBZiHFuHKn y9funRIdDkyjuEels6wk2IZKQRXnEYaDp5pCTk1HeHAnIVfmfU3IsKBUcfC/qu8xzqae QFqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715719295; x=1716324095; 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=XBW7L6tgc/okwVInn2iB8tl/p12g57MH3rZvL3yN4hI=; b=WlfAUF9ShmX8b2QLG1zAC8pl5HHLp6iw8XgIOUC5t4/D2n/Ko5VISWgB7a5GCE3R2/ PlA7g4rEVzZIt2wtEW2zwz/MRRN+7VKXKu2baqVKx60KKnck0Ov0+Aq3zGyz9+qjsHlN b3I3TaLs/ctmPO71Tc96Suo1ugx2GjMB020OW1ICBYeajcjBVrbucAUxeopN+PE6XgW0 wzYJbn6X/KR76h6+rZjVOjDfgSzvYTXLOvqtUyPxu/8UFoC9cONaFl7VXQqu5B8qNOEB heaJoOusd/DAinmMlatlxyJAsgyPHygWmlO2mKmisfzyM1uFZV/AwsNN/LR32B95/CJa hBjg== X-Gm-Message-State: AOJu0YzTdt4r0agnzolnypG7CmlKLzspjzaa5B4yOwMXC3E4VkOQGLX9 6JZPgc9BLQBDAk9b/ZNogplBsg7Ohpbbc1da75x4bu2AwpzNZ5GrFxBGLXdA X-Google-Smtp-Source: AGHT+IGsMV4u+0PIh/+KhcP4Z1ZpdDioRzC7/5ZlBbqCGzMJv0C+3iY0ktip4fz6/PBx1ykq6QeCDA== X-Received: by 2002:a05:622a:178a:b0:43a:f80f:425b with SMTP id d75a77b69052e-43dfdabacb2mr143129391cf.10.1715719295352; Tue, 14 May 2024 13:41: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-43df77e0c77sm70868931cf.96.2024.05.14.13.41.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 13:41:35 -0700 (PDT) From: Stone Chen To: ffmpeg-devel@ffmpeg.org Date: Tue, 14 May 2024 16:40:11 -0400 Message-ID: <20240514204019.11022-4-chen.stonechen@gmail.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240514204019.11022-2-chen.stonechen@gmail.com> References: <20240514204019.11022-2-chen.stonechen@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 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: 63.0 vvc_sad_8x8_avx2: 3.0 vvc_sad_16x16_c: 263.0 vvc_sad_16x16_avx2: 23.0 vvc_sad_32x32_c: 1003.0 vvc_sad_32x32_avx2: 83.0 vvc_sad_64x64_c: 3923.0 vvc_sad_64x64_avx2: 373.0 vvc_sad_128x128_c: 17533.0 vvc_sad_128x128_avx2: 1683.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".