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 2F10F4945C for ; Sat, 11 May 2024 14:35:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 07D5768D4B6; Sat, 11 May 2024 17:35:57 +0300 (EEST) Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 282EE68D3DD for ; Sat, 11 May 2024 17:35:50 +0300 (EEST) Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-792b8d989e8so215624285a.0 for ; Sat, 11 May 2024 07:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715438148; x=1716042948; 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=VJ3CL+/XFNLTSYyJ+75PGYmjh7aApI8XEUyEpk/KIyI=; b=ebCFp/7CDFtIEDxVaFx8t2ZrWlH3iKhBvota9eMpoV8KBeEbAeXnuAxlbXxW48bDJj sjUG8m+PXLtewnSIRyyvCK/PEMoiaMX276/c9IL21L3vGDL9K+Gpdzisn9VyGrCWniSf CL7DBnCjsXxcJrkL2gPtTZwjnzgH2jEX886DRQeChvjM03vUO0xPoFCMRV/VgePsQ3jW FLwKii5d9VEztopJsGWs+EXxYTc1CZvtASzYJNnflq2tInVXaCGkbmGcI/3kp+iZ39o7 Pnw9U+NQylwJeG+5FP6i4x4ibNKyTRmlzwcb/iYoEmJQYjO3D44uVBI0r0Ndd9oijhUl BqWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715438148; x=1716042948; 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=VJ3CL+/XFNLTSYyJ+75PGYmjh7aApI8XEUyEpk/KIyI=; b=REsoq2JJ/Rw/2dCs06GAmYNeUn8HJF++jQx1rBxgjZhBfGDr+BTSJxY2jQQAAP9vGm g3/2xMEGd2I/o7dDeo/EaO00K5bxOMctW3U50S/zi0a6PjXJZJwDCMvzsPbZ0aCFd5LA eh10eGc8jrv9Qgl5r+SV/akqh7cpPs+ZsifInDFmJXEfHQTw4Nsw4FW4m0LTogsM3sT5 4xgihtfjUDTye84gSba5Es/Y25KFMp7HnUqSwkXRjKOR3d/xO0FWSBYzvN4mFPgMP/7F Te1U+GUUD7xnJXuCeC6FngOlwSL9ishRT7J7kNkxRRwEDV2V+E0YgwKeB9cat2e8vKVG 4pnQ== X-Gm-Message-State: AOJu0YzXytgdh8lq4iWspP9vqa0tkgdHLOkEtCqpEq9v6/3BKAQyZsQn D4znqwN3Gl5aeCDR7DN4eBrhZ20+J/8rIeBRxBeM95gV+FXQkjgD+sAXTSfz X-Google-Smtp-Source: AGHT+IEuv9DLES1+NLekBJBE5ueOLDBaJZYu/ID9K/CFA3SlvHyyXgwJ8weqasXfB7ifoVstmJU/4w== X-Received: by 2002:a05:620a:40c5:b0:790:c677:5469 with SMTP id af79cd13be357-792bbe4f375mr1513567585a.29.1715438148547; Sat, 11 May 2024 07:35:48 -0700 (PDT) Received: from fedora.tailc94c2.ts.net ([96.67.5.125]) by smtp.gmail.com with ESMTPSA id af79cd13be357-792bf33b16dsm280394285a.127.2024.05.11.07.35.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 07:35:48 -0700 (PDT) From: Stone Chen To: ffmpeg-devel@ffmpeg.org Date: Sat, 11 May 2024 10:34:21 -0400 Message-ID: <20240511143445.18940-4-chen.stonechen@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240511143445.18940-2-chen.stonechen@gmail.com> References: <20240511143445.18940-2-chen.stonechen@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 2/2][GSoC 2024] Terminal 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.44.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".