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 0B1654AE39 for ; Wed, 22 May 2024 00:01:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 303AF68D3B3; Wed, 22 May 2024 03:01:55 +0300 (EEST) Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D484468D097 for ; Wed, 22 May 2024 03:01:48 +0300 (EEST) Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-43f84f53f56so4033391cf.0 for ; Tue, 21 May 2024 17:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716336107; x=1716940907; 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=2hURu73pJZbwwL7OCj/xssciXvsXCtBn8rXAlQRn62Q=; b=leqlnPtsuey+oZwRhXWqbLPY/F7HjeaBHEJU2q/TM2h3CtioPThSrjVRHQhyrFv+8W pyyaIiAIa60Y7tOqDAoO9pgm3zQtjMP8U7SAIMEPA86NM8pXx1UKQBcHGp73PBFYsrVB hEHlTLEKqJ5Kf/4zyIW/O3jQj6/z+EhaTyFS+LrueWeCZ606z5tFxPABLogt6KHYdS3A GlansI0kH8qac8woVaOFZqJzR7IVHeKYID5yYLxtTXlxNYZPGk2RdZ4vmNxItB+e4ZGI 3Ge1UDcl9ABnz3eea3GaKpYv+D3O9VyHahZCnJvv3vtCdMHNIxvdne6xe5wJuMRWhDPO fL7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716336107; x=1716940907; 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=2hURu73pJZbwwL7OCj/xssciXvsXCtBn8rXAlQRn62Q=; b=IbmthEguOAgcLf3zpSBndD46BYQqMStpy9TpYH+/tVfcub24/IO4SKKLLCU0katIUm aCulcrg7IM3Y6sUvWZJNHti8miDsMCsiJE5p6uoTaac7EhCOaioiPKhn7YgasnRgqd4a /KgeToJ9hjkTDMESAzkjBz3OS1iSyG9DacWPhaEZPpW7TlaRvxcASLzK/+9MgPNZZHeC EnmkRKWLuogjUgtvqlMwC5AM603O9COGSIYBc7hVqRebo0TOJZl69K3wKH+eSh1XKwn/ dZYwbqZ1mD7dnkpTg+2Ovr8Ze+EgvzemdFPnFjpgf39DlTGQghQ1v9ZkgTMcnCCoYJ0M SzxA== X-Gm-Message-State: AOJu0YwXw3tlnsuc3YKQSD4e89WakMMle9PEI1ph+fk/GBf9HYS/W64V X7NIJTk7arSqXpo8heyug0K4KDCouaCnDJtNsfCyEVZ8t/l8wWhD+6/f16pC X-Google-Smtp-Source: AGHT+IH3YdENwW4VgEubSCZd82MDyvgQXC5rK0IDIbwAKEv76K6VCogWNJDwNRXiEgPclaNo7X3ePw== X-Received: by 2002:a05:622a:586:b0:43d:f0e4:65ef with SMTP id d75a77b69052e-43f9e09ebf8mr6936271cf.4.1716336107199; Tue, 21 May 2024 17:01:47 -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-43e0ec47bf0sm133729061cf.3.2024.05.21.17.01.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 17:01:46 -0700 (PDT) From: Stone Chen To: ffmpeg-devel@ffmpeg.org Date: Tue, 21 May 2024 20:00:34 -0400 Message-ID: <20240522000039.34913-4-chen.stonechen@gmail.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240522000039.34913-2-chen.stonechen@gmail.com> References: <20240522000039.34913-2-chen.stonechen@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v5 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: 50.3 vvc_sad_8x8_avx2: 0.3 vvc_sad_16x16_c: 250.3 vvc_sad_16x16_avx2: 10.3 vvc_sad_32x32_c: 1020.3 vvc_sad_32x32_avx2: 60.3 vvc_sad_64x64_c: 3850.3 vvc_sad_64x64_avx2: 220.3 vvc_sad_128x128_c: 14100.3 vvc_sad_128x128_avx2: 840.3 --- 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..f2d7a6d561 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, intptr_t dx, intptr_t 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".