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 9FC644F42C for ; Wed, 25 Feb 2026 02:03:01 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'IH8YpE5mnksDZIFqAspC3Kjer23y5r4d9b6/tBKNKyM=', expected b'+cr+JwmtvLznXpdY5pMaJ4FkZ+U1Bl+X4NXt7UXVwr8=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1771956138; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=IH8YpE5mnksDZIFqAspC3Kjer23y5r4d9b6/tBKNKyM=; b=fiMy0wSM20XEjp9ogrxh6p8orLqArJzMzaCUzs/vf7gg3HrGensnDbD2yLKiieeQ02yWc VhTHA8Uw+Ui94ULT9JQLoDB4Fl2hkPpuqdfh6LzEO6YAAp1BL+7Bz0zNoEvH//tghEDUwyl tPP3/tM571bjjn16qi4cxOajLU1WmTGcdoozue/XY+a1iTRlzDGSw3L7PUIvdDPrjSyP8Kr M0YLQT+R8cnb7WLkrzm6Qj4qjWlJot7fz88StTzI6XnupLMTvYmJAF0LZEoqAj5UuPbO5wq +ZoOSvrm+4mC3JPCvGoZMHtVNehz2497E1pS2YZ00nTT65vgG8qnfwLQDUww== Received: from [172.18.0.3] (unknown [172.18.0.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id A74E3691792; Tue, 24 Feb 2026 20:02:18 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1771956110; b=tfyySZeO66jIQBmo/wYHyvX+Rtvi1i1HyaYMpjPL+A+i4Ysirj3ZPGCaYGFIgKdAg3gP2 1mszUOw0yNbu660rkigphlHIefe7dfqAZymY3qzR/3kPMD1TACDpf4llmqJk5yjlVjpCXaE uTNmQIe3Is7vZgyxnkOymstOW4djxh1pqC5MephgxB3wxDtZ++PcGxR8vw3yKBnrGRaaT/f Op6TAX4gL+MlgIvIADEog3ugM201bzzX15fuZZjBbb+2a0EoVikOpmw4+J4VwFinagJR1k6 DaqeALaGL1slrYUNJ6J3OVPM1Vv9nugvt4YHkvsw8ovo1L/JhI8cgQ0zRKqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1771956110; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=6R9E1wX0CsLxqVyqYha+zuEffgYi5dl57ywHYC8Q+/M=; b=E61wbX00ijOBEpIoagyS3cW6CzzB4Kz/+b4OJMpCG04RvhUrKsHtcn2t6X5WSAAFmXcS2 LOgoKNlzI9jdAQvuDvkyFsMfqBSrNWiYZFC1LfA4wKHR3SqVL0lnYx7GYYg1nNr6VSl9ZU6 C0OejbhqlFhJ5h8ANX4Q9KqKUvRF9lRuoGG0B8zfRUS4hrIgA0Cafs5m6/Y10DVi7unwfOd T2P4rL3RVyA3g8166qxzKy9qkP3qs1OmPDLDhshtaznSpijFxuY4+ac8SpqsxxxNLniXDlv qDZ189cuK8TeCMQAcR1FqCizndSSCacnDizCvMLEdktQpXOHPKKU8E1p5POw== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1771956096; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=+cr+JwmtvLznXpdY5pMaJ4FkZ+U1Bl+X4NXt7UXVwr8=; b=DslgHcSHvRwUZVbxAo13Azz+PCR/DRB3PjzUikbESESpFFLkFgEQqnI8qXxi7l8jDVxmV UDEbSgr3d4JJdevhi8mfg+sp+nWl9pndNqFiNiHXMmMldDLHXnH9CliWl7no4bF30ta14sA mmeClCeMu4hVB5wdDZfF8oZxUr5XhMOoAADB1RGowhD33nCxEInkbKixRoRq6JNvp7CL1/6 4JFWg+0TJUXW/QpyvVCiOG6PAOBpeTae47n5tZVyql/gkhMklMj9I3Sy4R7YrbmLlBFwmBk WRhSR/blX+aMQbSB41Q6CzwL7HvvojSwGVG2kNhpmnEPGilk/Ghkzz3of7mA== MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Tue, 24 Feb 2026 18:01:35 -0000 Message-ID: <177195609712.25.6172120555435446121@29965ddac10e> Message-ID-Hash: UPHJZMGOPFD742PZTJQB5PK3OPCVJ4WV X-Message-ID-Hash: UPHJZMGOPFD742PZTJQB5PK3OPCVJ4WV X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PR] tests/checkasm/h264chroma: Fix initialization, range of values (PR #22279) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: mkver via ffmpeg-devel Cc: mkver Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #22279 opened by mkver URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22279 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22279.patch >>From 6f10bf5149f30695d5c761776d0fe02be4f15042 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 24 Feb 2026 18:33:44 +0100 Subject: [PATCH 1/3] tests/checkasm/h264chroma: Fix initialization, range of values This commit fixes four related bugs: 1. The >8bpp codepath only initializes half the buffer. The remaining half used leftover samples from the 8bpp codepath which initialized the complete buffer. 2. The 8bpp codepath tests only 2 bit inputs (&3). This means that the second half of the buffer only uses 10 bits (in fact, only values of the form 000000xx000000xxb) when treated as uint16_t in the >8bpp test. Due to 1., using more bits in the 8bpp test would make the >8bpp tests fail (the intermediates would no longer fit into 16bits). 3. For the >8bpp tests, the first half of the buffer would only be tested with 8bpp input. 4. The 8bpp codepath initializes the whole buffer, but only uses half of it. Signed-off-by: Andreas Rheinhardt --- tests/checkasm/h264chroma.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/checkasm/h264chroma.c b/tests/checkasm/h264chroma.c index 52aa220152..b5b8d64855 100644 --- a/tests/checkasm/h264chroma.c +++ b/tests/checkasm/h264chroma.c @@ -30,11 +30,12 @@ #define randomize_buffers(bit_depth) \ do { \ if (bit_depth == 8) { \ - for (int i = 0; i < 16*18*2; i++) \ - src[i] = rnd() & 0x3; \ + for (int i = 0; i < 16*18; i++) \ + src[i] = rnd(); \ } else { \ - for (int i = 0; i < 16*18; i += 2) \ - AV_WN16(&src[i], rnd() & 0xFF); \ + unsigned mask = (1 << bit_depth) - 1;\ + for (int i = 0; i < 16*18*2; i += 2) \ + AV_WN16A(&src[i], rnd() & mask); \ } \ } while (0) -- 2.52.0 >>From cb5bb4e66bd37b73908fc5fb6d89a138aaa34b46 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 24 Feb 2026 18:53:22 +0100 Subject: [PATCH 2/3] tests/checkasm/h264chroma: Add bit depth to error output Signed-off-by: Andreas Rheinhardt --- tests/checkasm/h264chroma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/checkasm/h264chroma.c b/tests/checkasm/h264chroma.c index b5b8d64855..8a96d1b973 100644 --- a/tests/checkasm/h264chroma.c +++ b/tests/checkasm/h264chroma.c @@ -64,7 +64,7 @@ static void check_chroma_mc(void) call_ref(dst0, src, 16 * SIZEOF_PIXEL, 16, x, y); \ call_new(dst1, src, 16 * SIZEOF_PIXEL, 16, x, y); \ if (memcmp(dst0, dst1, 16 * 16 * SIZEOF_PIXEL)) { \ - fprintf(stderr, #name ": x:%i, y:%i\n", x, y); \ + fprintf(stderr, #name "_%d: x:%i, y:%i\n", bit_depth, x, y); \ fail(); \ } \ bench_new(dst1, src, 16 * SIZEOF_PIXEL, 16, x, y); \ -- 2.52.0 >>From 4c1e72ac273fddc0846304db728d593688eb95d4 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 24 Feb 2026 18:57:27 +0100 Subject: [PATCH 3/3] tests/checkasm/h264chroma: Don't overalign The input only need to have natural alignment (i.e. 1 in the 8bpp case, 2 otherwise), the output need only have 16 (namely in the width 8 >8bpp case). Signed-off-by: Andreas Rheinhardt --- tests/checkasm/h264chroma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/checkasm/h264chroma.c b/tests/checkasm/h264chroma.c index 8a96d1b973..732e992983 100644 --- a/tests/checkasm/h264chroma.c +++ b/tests/checkasm/h264chroma.c @@ -42,9 +42,9 @@ static void check_chroma_mc(void) { H264ChromaContext h; - LOCAL_ALIGNED_32(uint8_t, src, [16 * 18 * 2]); - LOCAL_ALIGNED_32(uint8_t, dst0, [16 * 18 * 2]); - LOCAL_ALIGNED_32(uint8_t, dst1, [16 * 18 * 2]); + DECLARE_ALIGNED_4(uint8_t, src) [16 * 18 * 2]; + DECLARE_ALIGNED_16(uint8_t, dst0)[16 * 18 * 2]; + DECLARE_ALIGNED_16(uint8_t, dst1)[16 * 18 * 2]; declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org