From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id B240E4E9DF for ; Thu, 12 Jun 2025 17:25:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 238A868C109; Thu, 12 Jun 2025 20:25:26 +0300 (EEST) Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 8534F680267 for ; Thu, 12 Jun 2025 20:25:24 +0300 (EEST) Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-7d2107eb668so189360985a.1 for ; Thu, 12 Jun 2025 10:25:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749749123; x=1750353923; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=80mQ/75LiJooQ9Epej8njrupVmaLwhH5icIUY0OM2BM=; b=taPXfeUJREyHWtXfK3nVLWtAhuvkmB5f3yVNj6AKfTh4tyuQx34OfgKo69Flu4r4IF ocBVUgbq5MDCK7ibFgNINi2rnfxv+eqwS/cBahuiO2ksl2RGPfrc6f6sG64FPNbZLs8x wya7vsnjjXwd1VKDB2gTAz8Qd0qREKNWPkCfGWY5Wt21ekrmdIuj/oM5RrgyVv9QeeYn Ls/9rtBIith9MbsrBAl8mnGF/DH9gmTtcUA2yIhzUgsT9C0shzhagsXzeBk2ZKJg9AO1 vfcp+198XUDX/Lp+zFez3ksUgI7X8PL2yEaw/4D0S0fbjFPv0JwbxGb96nLt2uatKCOV AxKw== X-Gm-Message-State: AOJu0YzxE4AmqUW2VQi38HvFcsnb/iBamIna47qnqsRRqfx0JlG4tcL2 Wq8r9MKbXly5l7smy8Z/gtm7eQ+hKcQBgy5UFjcJbq3FnPsBxDOEQd6C7NnXCg== X-Gm-Gg: ASbGncs/TRj7veY8pqmsMwMloxwzbMb/lYN6HoYrI9byuuNiWvw4+O9/cLHMRzXkYvp Yc7QspPNxhAosNdGeToENej1GMtR1FpJ0XQUnJTFja7whgwxnJXcgtPwV4tOKljdS7kx1w+T6Tb WIlKx1JXSUy01MvfzOqDYR+e6KmaL2jvTzAoF0AQJoywkxfj998+BNUCyfZndgOB500zM2/Jhki 5nMGky2JN8LDgHkjc5zr2HAYMo3/+PCDNC1wNLxcAeCDMT6DrPmRKw3Mr+OjUCGa85fwSxmvbig Hq3aJwfDBhrhJNc9X5MVzDn/jEvooYWaAoJBubVFncUrgNgcBqjLPgURRw== X-Google-Smtp-Source: AGHT+IGg5ts/VsjtigCDg67K5OfWtU7O5gC3Ojv4prV3KL1KUePMBNd/E2fKK+xqPhzx3xaqF6crqA== X-Received: by 2002:a05:620a:199b:b0:7c5:4c6d:7fa5 with SMTP id af79cd13be357-7d3bc4510e1mr24108685a.48.1749749122500; Thu, 12 Jun 2025 10:25:22 -0700 (PDT) Received: from bellini.. ([198.58.151.12]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7d3b8eac7d8sm62631785a.67.2025.06.12.10.25.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jun 2025 10:25:21 -0700 (PDT) From: Tristan Matthews To: ffmpeg-devel@ffmpeg.org Date: Thu, 12 Jun 2025 13:25:00 -0400 Message-ID: <20250612172500.2475075-1-tmatth@videolan.org> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] checkasm: h264dsp: test luma_dc_dequant 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: Tristan Matthews 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: --- tests/checkasm/h264dsp.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/tests/checkasm/h264dsp.c b/tests/checkasm/h264dsp.c index d1228ed985..5fba31cf69 100644 --- a/tests/checkasm/h264dsp.c +++ b/tests/checkasm/h264dsp.c @@ -22,6 +22,7 @@ #include "checkasm.h" #include "libavcodec/h264dsp.h" #include "libavcodec/h264data.h" +#include "libavcodec/h264idct.h" #include "libavcodec/h264_parse.h" #include "libavutil/common.h" #include "libavutil/intreadwrite.h" @@ -324,6 +325,41 @@ static void check_idct_multiple(void) } } +static void check_idct_dequant(void) +{ + static const int depths[5] = { 8, 9, 10, 12, 14 }; + LOCAL_ALIGNED_16(int16_t, src, [16]); + LOCAL_ALIGNED_16(int16_t, dst0, [16 * 16]); + LOCAL_ALIGNED_16(int16_t, dst1, [16 * 16]); + H264DSPContext h; + int bit_depth, i, qmul; + declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_SSE2, void, int16_t *output, int16_t *input, int qmul); + + for (int j = 0; j < 16; j++) + src[j] = (rnd() % 512) - 256; + + qmul = rnd() % 4096; + + memset(dst0, 0, 16 * 16 * sizeof(dst0[0])); + memset(dst1, 0, 16 * 16 * sizeof(dst1[0])); + + for (i = 0; i < FF_ARRAY_ELEMS(depths); i++) { + bit_depth = depths[i]; + ff_h264dsp_init(&h, bit_depth, 1); + + if (check_func(h.h264_luma_dc_dequant_idct, "h264_luma_dc_dequant_idct_%d", bit_depth)) { + + call_ref(dst0, src, qmul); + call_new(dst1, src, qmul); + + if (memcmp(dst0, dst1, 16 * 16 * sizeof(*dst0))) + fail(); + + bench_new(dst1, src, qmul); + } + } +} + static void check_loop_filter(void) { @@ -453,6 +489,7 @@ void checkasm_check_h264dsp(void) { check_idct(); check_idct_multiple(); + check_idct_dequant(); report("idct"); check_loop_filter(); -- 2.48.1 _______________________________________________ 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".