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 48B134EA45 for ; Fri, 13 Jun 2025 04:13:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 88A2568C480; Fri, 13 Jun 2025 07:12:58 +0300 (EEST) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 7ED72688002 for ; Fri, 13 Jun 2025 07:12:52 +0300 (EEST) Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-7d09f11657cso168688685a.0 for ; Thu, 12 Jun 2025 21:12:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749787971; x=1750392771; 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=gM98fCdSdyMd0cp/u8H1xFv9P2GJbqKgrZ6nmNX8mCs=; b=N2E5z5+me+RourUT9S52iqnm6yzTbuzOmGIRuS0wRyohs3mQGWER+eVOQjSmeau40R YfjPh2aO5ZUc8kLXeeXFhkgEtR53HAzsZh1h88SsMrvp269frF8WMcqtIrxDKnSk4F// s7vQIbbbRjcQ/Ntdrt2jcats3aPF6Nr3QG8x/OObUl66NnH+RByXLB71vvJ5KwKHb8CT UrhZmGtwD1C5tEV8XfbOVh6TUyeyAN8ARCk//by36OQqElp66cpTyh4EEVMyXNg8/vwJ QMBNf5xo2AvvjWrJOgZ00riacorKg41avfBoESXqo6/envAzWWksgTpPJGYqBWjeVY2v 0eYA== X-Gm-Message-State: AOJu0Yzfjapx72PzB51lntcfIfWTNYdICHWyP8ectlobfNtEZYIZUtxL jvu4Q7iO8OoNP5pZr5D9hBo0IXe9hSDYhzdaXbq0Il+C7KfIufO2QVmyoVsWdb96 X-Gm-Gg: ASbGncvvnObSzhkRdALpdksnkpRJNH20e75smM/le4DLo4Gx9xFdk8/mWTAS7Empqey 4MAjt77PS/YHwxCrsDVO/7FToxanH+arjNEeMz/xoZ7pOk13+iAg4qcQlbytVcK0neZnCgApBBe ITFBpHW7fS4SRBf2KW2ycqMvzjztW8w+sEsJ4FXT7DOqdi+MdW6mkR7FAR/Q/NcOLvwaklKOfhM 7kgTQjoBFYQgUpcTr52BTmMo6tfCSsuMMEo4lSLFZB3r2BVUi75l0jnvB5T8902YXG7yOk1vo6e ZetJZW3XXeg1xjQAytBJeaqEIywuVNEkD/YkJXrqKH4iFt5ZSc0wVCfw8g== X-Google-Smtp-Source: AGHT+IEQz20erHCbse8zbyNwTN0s1QNpPzk6zAOl5sMf0G50+eiW+TkoreP7g7/2f5K9BuFQCUQGVw== X-Received: by 2002:a05:620a:17a2:b0:7d3:b26b:f306 with SMTP id af79cd13be357-7d3bc37b7d9mr274192185a.12.1749787970672; Thu, 12 Jun 2025 21:12:50 -0700 (PDT) Received: from bellini.. ([198.58.151.12]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7d3b8dc9e15sm124772285a.9.2025.06.12.21.12.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jun 2025 21:12:50 -0700 (PDT) From: Tristan Matthews To: ffmpeg-devel@ffmpeg.org Date: Fri, 13 Jun 2025 00:12:29 -0400 Message-ID: <20250613041229.2804268-1-tmatth@videolan.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/1] 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 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/checkasm/h264dsp.c b/tests/checkasm/h264dsp.c index d1228ed985..96540565af 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,38 @@ 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 * 2]); + LOCAL_ALIGNED_16(int16_t, dst1, [16 * 16 * 2]); + 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; + + for (i = 0; i < FF_ARRAY_ELEMS(depths); i++) { + bit_depth = depths[i]; + ff_h264dsp_init(&h, bit_depth, 1); + + memset(dst0, 0, 16 * 16 * SIZEOF_COEF); + memset(dst1, 0, 16 * 16 * SIZEOF_COEF); + + 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); + checkasm_check(int16_t, dst0, 16*sizeof(int16_t), dst1, 16*sizeof(int16_t), 16, 16, "dst"); + bench_new(dst1, src, qmul); + } + } +} + static void check_loop_filter(void) { @@ -453,6 +486,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".