From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id B51AB4CC82 for <ffmpegdev@gitmailbox.com>; Thu, 12 Jun 2025 20:14:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 13D3F68C285; Thu, 12 Jun 2025 23:14:07 +0300 (EEST) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 1F1D76882FD for <ffmpeg-devel@ffmpeg.org>; Thu, 12 Jun 2025 23:14:00 +0300 (EEST) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-551efd86048so1277309e87.3 for <ffmpeg-devel@ffmpeg.org>; Thu, 12 Jun 2025 13:14:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1749759239; x=1750364039; darn=ffmpeg.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=oRR8pMbD7FQUS5GrY/duxAFVX8CkEV5Y840B78i7BQs=; b=b6DE9Vq0bhnbYV9vWOWlZxGztBObsd/jZOoGdcEUwkuAJ2i7rJDbDgCgbxctkhAauD N+My5T+fsQeD2f1i+7Rs5FvdHhQgDGJfeGbQmxlWWfK/AvKaqagfgzh2V4S+eEjUSDLL U+tSgUOISRu3UzF5nNwVSforEOP/fmN0yfyTLaZ5r24Lqcq+yg98T6CcwFEN0hspmeFb pnmfV8DuBh1OcoMUBGfs0M277RJaUNo1g2jC2f3dPdQwZURkVDbICyyzm7UAk7+nrbF4 F/zR8JVGKh55aDg5knFrR4FVC5Uq1NTROF/IPBM1OvJGrE7JQBVzyzTPJ9aJflA5kN29 4G3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749759239; x=1750364039; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oRR8pMbD7FQUS5GrY/duxAFVX8CkEV5Y840B78i7BQs=; b=RFq8dHxBIy+CtRO5R6jIKN+yWCjnsEq2H38XR2exc5ZizP5cDI4mVrlEo2vo4TSgbF uTcsp0cxpxuogP+ZT8BVSfd/N4XheqCwUDuS3nlYHzj/98HNmWbeOtoAUD45yXFuW5lq yyv3kWSTsCTtWaTh//FIfx0KDCEZ+n9xBFDEjUlxDry7bDZzM8hvEfVFUy+ACtesI/m7 RVoRuhTLu0dUnYIbEK2ghvA0tW+Fj92HF1umJJIy6BkBYf8axZRVwTJraESMlXWma6C5 Sf8l3CKVRLKKb2R4doxrIFIkWZUx3Y2yiS96vQtRLss8AkvnFnfUivFFTtcNnebvdmoD uHqg== X-Gm-Message-State: AOJu0YxUtROQtaE/8oUKkRGSeRsqq97QLSTsWaYZRI5C9hiLeweJJ/bi e0ofRdfxu9Q2JI3nLQ6PBKwOjHhAvomlFRAA3bmZ8Cft9qo6TvOXz3bn8pjDFoEo9dtnhucBcEt 5E6HZ1g== X-Gm-Gg: ASbGncsIiAWeYc7kj0CwF4v57QFKD2H5FSWUea6/XTzaUb9jhW/k2X9xgR72IT8GIPd R5Tqa3hi2HyZ+5jmPqcN4uBHS+NzzNQhChHWeVDHB3Xe+p1Fi8kYkOaaZVH7sce7g9WiFo7wrCp znnyo/u4OzX7B/qi3rCAafiqQFaD3kHeFD/IKlSlCdhvAuGpsWFeCzJPvp+XCdaNU6SsiWp/1tW YiT2qMhSU05hnTLp9v8HjuspJbMeeFSLPdvlzw/jeDyC6/gBeY4w24yDjFdj4s3kPitXdTqmAxS os8KR4B7UTe7dK/tXByWdAsavj1I723yfYVBuXn255XMWl8KciXEAJOUPnk4TkKHO1RTN2R9x6l x3/KQhHy8zeI+yGLE69RjlNBjiiEwNv3Ty/WT680ExP6z8d2hzLsyhBL7kJelqUlUk3li X-Google-Smtp-Source: AGHT+IF4wlfH9r7FIrnI42LzZ2HN3Brd8bPgsLJCDoENuhSecfxnDRNI88im3rT8Bz5XJk9bnj6Dqw== X-Received: by 2002:a05:6512:108d:b0:553:3770:c91d with SMTP id 2adb3069b0e04-553af92c114mr120794e87.4.1749759238989; Thu, 12 Jun 2025 13:13:58 -0700 (PDT) Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553ac1aad08sm209962e87.124.2025.06.12.13.13.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jun 2025 13:13:58 -0700 (PDT) Date: Thu, 12 Jun 2025 23:13:53 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= <martin@martin.st> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> In-Reply-To: <20250612172500.2475075-1-tmatth@videolan.org> Message-ID: <cb82d063-5082-79f-7e16-a382ddca03@martin.st> References: <20250612172500.2475075-1-tmatth@videolan.org> MIME-Version: 1.0 Subject: Re: [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 <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Tristan Matthews <tmatth@videolan.org> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/cb82d063-5082-79f-7e16-a382ddca03@martin.st/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> On Thu, 12 Jun 2025, Tristan Matthews wrote: > --- > 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(); If possible, use the checkasm_check_*() helpers for validation for new code; this gives you printout of the differing values if you run "checkasm -v" and more. In this case, I think checkasm_check(int16_t, dst0, 16*sizeof(int16_t), dst1, 16*sizeof(int16_t), 16, 16, "dst") would be suitable one. // Martin _______________________________________________ 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".