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 F41B54AADA for ; Sun, 12 May 2024 20:36:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C00A468D6C9; Sun, 12 May 2024 23:36:37 +0300 (EEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F27FA68D319 for ; Sun, 12 May 2024 23:36:29 +0300 (EEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1ec4dc64c6cso25263915ad.0 for ; Sun, 12 May 2024 13:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715546188; x=1716150988; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=laJx40oybFRppPE4yBEpuD/YMY+I/UssA712dWltTXo=; b=lfS7fxzIVWOJaB4QtdFwOnmh2XWbUmHS/BwrFgNR4KW9vT7ZB+NCi5HH5l9Rqa5mx3 F+9poCJ16fYrnQqTrzCT/s5aLXq5rhzAD5dVfhfZ1XiV390+FUkZq0xBRYiP8jnpcBI/ b+QMfCDngJZ6zjZMQdaY6eFY45VUnJsr+opjkolUbb4wLigu2cbPfEjXnFkQBTaIDEyJ wSpxSI4WkEzGVV2eue83EGcyELgHF/8PGqUJDBWsVwUjIJfJkePuuWsTt8cLSbcoujd5 90x6aKgjEEdVaChWgUBk1SIUsUcUDzxGe6d44ocGhwJ002aANQfkJqabGPnWeNSL5yNl QwsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715546188; x=1716150988; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=laJx40oybFRppPE4yBEpuD/YMY+I/UssA712dWltTXo=; b=VIIYEYDNSi7rpgyyomvA4IRdIvYVBLrUkedCsmDqDVLAapR0wFj99UGWC/wdjge8SP SN2iare2DM9x3Tj73Q8LyAEO1tYDqcEFuoR2eNctKaA3vgaP5jeXWE45Q5cu811Dbbqx Tsd3toctitJzdKxDU5KitP8awLhaNwml8Gd6DfWhleUwhLFwTKqDMBRl51MpmbnRmGm+ IJjLOJ+X9E3tO9HUCkoVgoZJcEPM4d40BXQNW9o87eJkTWl+kbxcDbC6VlLQ3jtfU+12 VLtx44e0Jd8nr+DBcUADW2slpBt7p5ruBosii+I1Utp1BZUpnG0T7VNKLBbogKxErB5Y 8tlA== X-Gm-Message-State: AOJu0YyYPFfG+UL/6Pvb/gvfcpbu8FN2n1inXetqBiL5oJgDRiosxWyM KZF85WvSdihHh/ssuSxDKSUb0nPLIhT/L7x6jW6c2jvPJ2j7hpssAybIOA== X-Google-Smtp-Source: AGHT+IEoBrLIuEpsNgCyVSmaCIth+CXpt0qc+KsUcfjWiSjul7OAy4ZOa5hOvjYBX7/GHk1rjXpD1Q== X-Received: by 2002:a17:902:ab96:b0:1e3:999a:9726 with SMTP id d9443c01a7336-1ef43e254dbmr86084425ad.29.1715546187445; Sun, 12 May 2024 13:36:27 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0c136843sm65912175ad.235.2024.05.12.13.36.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 13:36:26 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 12 May 2024 17:36:11 -0300 Message-ID: <20240512203611.60371-2-jamrial@gmail.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240511194656.1576-1-jamrial@gmail.com> References: <20240511194656.1576-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 10/10] checkasm/flacdsp: add a test for lpc33 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/flacdsp.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/checkasm/flacdsp.c b/tests/checkasm/flacdsp.c index 96b7d05f7e..6f8e8817b5 100644 --- a/tests/checkasm/flacdsp.c +++ b/tests/checkasm/flacdsp.c @@ -83,6 +83,35 @@ static void check_lpc(int pred_order, int bps) bench_new(dst, coeffs, pred_order, qlevel, BUF_SIZE); } +static void check_lpc33(int pred_order) +{ + int qlevel = rnd() % 16; + int coeff_prec = (rnd() % 15) + 1; + LOCAL_ALIGNED_16(int64_t, dst, [BUF_SIZE]); + LOCAL_ALIGNED_16(int64_t, dst0, [BUF_SIZE]); + LOCAL_ALIGNED_16(int64_t, dst1, [BUF_SIZE]); + LOCAL_ALIGNED_16(int32_t, residuals, [BUF_SIZE]); + LOCAL_ALIGNED_16(int32_t, coeffs, [32]); + + declare_func(void, int64_t *, const int32_t *, const int[32], int, int, int); + + for (int i = 0; i < 32; i++) + coeffs[i] = sign_extend(rnd(), coeff_prec); + + for (int i = 0; i < BUF_SIZE; i++) { + residuals[i] = sign_extend(rnd(), pred_order); + dst[i] = sign_extend64(((int64_t)rnd() << 1) | (rnd() & 1), 33); + } + + memcpy(dst0, dst, BUF_SIZE * sizeof (int64_t)); + memcpy(dst1, dst, BUF_SIZE * sizeof (int64_t)); + call_ref(dst0, residuals, coeffs, pred_order, qlevel, BUF_SIZE); + call_new(dst1, residuals, coeffs, pred_order, qlevel, BUF_SIZE); + if (memcmp(dst0, dst1, BUF_SIZE * sizeof (int64_t)) != 0) + fail(); + bench_new(dst, residuals, coeffs, pred_order, qlevel, BUF_SIZE); +} + static void check_wasted32(void) { int wasted = rnd() % 32; @@ -165,6 +194,9 @@ void checkasm_check_flacdsp(void) for (i = 0; i < FF_ARRAY_ELEMS(pred_orders); i++) if (check_func(h.lpc32, "flac_lpc_32_%d", pred_orders[i])) check_lpc(pred_orders[i], 32); + for (i = 0; i < FF_ARRAY_ELEMS(pred_orders); i++) + if (check_func(h.lpc33, "flac_lpc_33_%d", pred_orders[i])) + check_lpc33(pred_orders[i]); report("lpc"); -- 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".