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 7465148982 for ; Fri, 22 Dec 2023 01:16:03 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F2C9268D146; Fri, 22 Dec 2023 03:16:00 +0200 (EET) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 719EA68CB17 for ; Fri, 22 Dec 2023 03:15:54 +0200 (EET) Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-5c21e185df5so1072381a12.1 for ; Thu, 21 Dec 2023 17:15:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703207752; x=1703812552; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=yDqZJvrczLHAowfEuEmYDdc41d6Cc+AJwGp4kpqdFDk=; b=ARU4DgWFGpYvsnJwUzeP0b9M01RPQZxGEY3b1fufJhcb7IleaGymPenAAxEDItKIIe eGtJPb5pJY/SyQwuBC8ZSfCa3ibSvCODPyIYTypw4m/YY0YY/exHAx/CG7j2+0EJytq8 ORFfYt/3buIZSDrjLlxXCzwB1HSm5xtgkbkrDM6k3xH+s90VTLBWqP2pfEo/yWxfihCP dlGbdOnUEHTulsX3oJvJwzSEpcLv/xaq+bSR48d6H+BSlpBqcNpghd6IFZ0TH3tDoG18 0twhdSTMq+VTqOCYZPFHaFjaj28Sb1rrff5CYh3nAI3fxg9224lHewcbkpNfg6LK6/lJ NTBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703207752; x=1703812552; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yDqZJvrczLHAowfEuEmYDdc41d6Cc+AJwGp4kpqdFDk=; b=VMgym53bpeaiCg72+hAeUHSxFxmIF7vDudFJiR0xEavTgoKjqjnTM6znBPAqK2XQ4S eGZgQvmk3P97ktC9MxMPm56q5y63EFp3eiuS+sx5b+i0OSDr/iGdE9K5w8o7z3S07/sM 5i4UOgBsTZ4op5AcNuuw+VFVWX9T9/3y0nwNUDTUvjA9CKE9DThHQUYBhYEttnjnX3nL doRPrFQudWcJ6VRg6hlkRcYPHKP7D26wyD7vNNw4UTwLSxlPwyFuiunwJwm3eH8Rc2Z8 hl5xYHHHpl4zmerPizi4atCQgBDztBttfHqebugKNZg8wzisSGgH8nA0JcGFRjTkdg9K jzCQ== X-Gm-Message-State: AOJu0YwHeIkPiTbniMMqCWy4xKjG3mpnBc/VpuKUNxYeQN03rRMrur8Y CuxMZgXwc66beqlJcQW/16DZjV/o8Gc= X-Google-Smtp-Source: AGHT+IHALGfAtj/6p7aFp94h/jVxTwULFahRh5x8TWUcu2h7upXQ3GS8t7nFkZ7Xuq69UTA72U2lNA== X-Received: by 2002:a17:903:98b:b0:1d3:ff24:b3bf with SMTP id mb11-20020a170903098b00b001d3ff24b3bfmr775288plb.8.1703207751497; Thu, 21 Dec 2023 17:15:51 -0800 (PST) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id 5-20020a170902c24500b001d078e31cd1sm2236866plg.259.2023.12.21.17.15.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 17:15:50 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 21 Dec 2023 22:15:48 -0300 Message-ID: <20231222011549.16057-1-jamrial@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] checkasm/takdsp: add decorrelate_sf test 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-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: Signed-off-by: James Almer --- tests/checkasm/takdsp.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/tests/checkasm/takdsp.c b/tests/checkasm/takdsp.c index 495b7242c5..8df93cfd52 100644 --- a/tests/checkasm/takdsp.c +++ b/tests/checkasm/takdsp.c @@ -24,6 +24,7 @@ #include "libavutil/mem_internal.h" #include "libavcodec/takdsp.h" +#include "libavcodec/mathops.h" #include "checkasm.h" @@ -33,8 +34,9 @@ buf[i] = rnd(); \ } while (0) -static void test_decorrelate_ls(TAKDSPContext *s) { #define BUF_SIZE 1024 + +static void test_decorrelate_ls(TAKDSPContext *s) { declare_func(void, int32_t *, int32_t *, int); if (check_func(s->decorrelate_ls, "decorrelate_ls")) { @@ -60,7 +62,6 @@ static void test_decorrelate_ls(TAKDSPContext *s) { } static void test_decorrelate_sr(TAKDSPContext *s) { -#define BUF_SIZE 1024 declare_func(void, int32_t *, int32_t *, int); if (check_func(s->decorrelate_sr, "decorrelate_sr")) { @@ -86,7 +87,6 @@ static void test_decorrelate_sr(TAKDSPContext *s) { } static void test_decorrelate_sm(TAKDSPContext *s) { -#define BUF_SIZE 1024 declare_func(void, int32_t *, int32_t *, int); if (check_func(s->decorrelate_sm, "decorrelate_sm")) { @@ -113,6 +113,35 @@ static void test_decorrelate_sm(TAKDSPContext *s) { report("decorrelate_sm"); } +static void test_decorrelate_sf(TAKDSPContext *s) { + declare_func(void, int32_t *, int32_t *, int, int, int); + + if (check_func(s->decorrelate_sf, "decorrelate_sf")) { + LOCAL_ALIGNED_32(int32_t, p1, [BUF_SIZE]); + LOCAL_ALIGNED_32(int32_t, p1_2, [BUF_SIZE]); + LOCAL_ALIGNED_32(int32_t, p2, [BUF_SIZE]); + LOCAL_ALIGNED_32(int32_t, p2_2, [BUF_SIZE]); + int dshift, dfactor; + + randomize(p1, BUF_SIZE); + memcpy(p1, p1_2, BUF_SIZE); + randomize(p2, BUF_SIZE); + memcpy(p2_2, p2, BUF_SIZE); + dshift = (rnd() & 0xF) + 1; + dfactor = sign_extend(rnd(), 10); + call_ref(p1, p2, BUF_SIZE, dshift, dfactor); + call_new(p1_2, p2_2, BUF_SIZE, dshift, dfactor); + + if (memcmp(p2, p2_2, BUF_SIZE) != 0){ + fail(); + } + + bench_new(p1, p2, BUF_SIZE, dshift, dfactor); + } + + report("decorrelate_sf"); +} + void checkasm_check_takdsp(void) { TAKDSPContext s = { 0 }; @@ -121,4 +150,5 @@ void checkasm_check_takdsp(void) test_decorrelate_ls(&s); test_decorrelate_sr(&s); test_decorrelate_sm(&s); + test_decorrelate_sf(&s); } -- 2.43.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".