From: CheryDan via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: CheryDan <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] checkasm/hevc_sao.c: add sign for sao offset_val (PR #20730)
Date: Tue, 21 Oct 2025 07:27:44 -0000
Message-ID: <176103166469.62.7702462988356107379@bf907ddaa564> (raw)
PR #20730 opened by CheryDan
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20730
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20730.patch
This patch adds a sign bit to the randomly generated sao_offset_val.
>From 5fff7ab8459576885b3c0e0ef62cd7b7a2213c1c Mon Sep 17 00:00:00 2001
From: daichengrong <daichengrong@iscas.ac.cn>
Date: Tue, 21 Oct 2025 15:18:26 +0800
Subject: [PATCH] checkasm/hevc_sao.c: add sign for sao offset_val
Signed-off-by: daichengrong <daichengrong@iscas.ac.cn>
---
tests/checkasm/hevc_sao.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/tests/checkasm/hevc_sao.c b/tests/checkasm/hevc_sao.c
index 37f6ba8c5c..990df28313 100644
--- a/tests/checkasm/hevc_sao.c
+++ b/tests/checkasm/hevc_sao.c
@@ -53,13 +53,17 @@ static const uint32_t sao_size[5] = {8, 16, 32, 48, 64};
int k; \
if (bit_depth == 8) { \
for (k = 0; k < size; k++) { \
- uint8_t r = rnd() % max_offset; \
- buf[k] = r; \
+ uint8_t r = rnd(); \
+ uint8_t sign = r & max_offset; \
+ uint8_t val = r % max_offset; \
+ buf[k] = sign ? val : -val; \
} \
} else { \
for (k = 0; k < size; k++) { \
- uint16_t r = rnd() % max_offset; \
- buf[k] = r; \
+ uint16_t r = rnd(); \
+ uint16_t sign = r & max_offset; \
+ uint16_t val = r % max_offset; \
+ buf[k] = sign ? val : -val; \
} \
} \
} while (0)
--
2.49.1
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
reply other threads:[~2025-10-21 7:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=176103166469.62.7702462988356107379@bf907ddaa564 \
--to=ffmpeg-devel@ffmpeg.org \
--cc=code@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git