Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Martin Storsjö" <martin@martin.st>
To: Tristan Matthews <tmatth@videolan.org>
Cc: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] checkasm: h264dsp: test luma_dc_dequant
Date: Fri, 13 Jun 2025 16:26:42 +0300 (EEST)
Message-ID: <e09c3e1c-f42d-2afc-aca6-6f1cd4790a8@martin.st> (raw)
In-Reply-To: <CAN8HRDkk=GcGSVLmrHDXmDvUDnLYkaJTPBEL=QZR2kbQXjeRBw@mail.gmail.com>

On Fri, 13 Jun 2025, Tristan Matthews wrote:

> On Fri, Jun 13, 2025 at 2:08 AM Martin Storsjö <martin@martin.st> wrote:
>>
>> On Fri, 13 Jun 2025, Tristan Matthews wrote:
>>
>>> Good catch, also I realized that the output buffers were too small,
>>> will be fixed in the next version.
>>
>> Why was that too small? If we write (and check) 16x16 int16_t elements,
>> the previous allocation of LOCAL_ALIGNED_16(int16_t, dst0, [16 * 16])
>> sounds just right? Or does the function use the [16*16,2*16*16) area of
>> the destination as scratch space?
>
> That's what I thought too until I noticed the FATE failures (e.g.
> https://patchwork.ffmpeg.org/check/124147/), and on further digging
> realized that dctcoef (used for dst here:
> https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/fb65ecbc9b805571e5ff707b935c343803137e54:/libavcodec/h264idct_template.c#l256
> ) will be either 2 or 4 bytes depending on bit-depth IIUC (see
> https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/fb65ecbc9b805571e5ff707b935c343803137e54:/libavcodec/bit_depth_template.c#l54
> )

Oh, I see. Well in that case, I think that using int16_t and *2 feels 
quite confusing; I think I'd rather have it be uint8 and *sizeof(int32_t) 
or something like that, to clarify what's going on.

I see that other preexisting tests, like vp9dsp.c, do use int16_t and an 
extra magical *2, but I think going plain uint8_t is clearer when it isn't 
always specifically int16_t.

In that case, using checkasm_check(int16_t) also is going to be wrong; we 
have similar cases for pixels, see the checkasm_check_pixel() macros in 
checkasm.h. Perhaps we need a similar checkasm_check_dctcoef() macro, 
which checks int16_t or int32_t depending on bit_depth?

// 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".

  reply	other threads:[~2025-06-13 13:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12 17:25 Tristan Matthews
2025-06-12 20:13 ` Martin Storsjö
2025-06-13  4:11   ` Tristan Matthews
2025-06-13  4:12     ` [FFmpeg-devel] [PATCH 1/1] " Tristan Matthews
2025-06-13  6:08     ` [FFmpeg-devel] [PATCH] " Martin Storsjö
2025-06-13 13:21       ` Tristan Matthews
2025-06-13 13:26         ` Martin Storsjö [this message]
2025-06-13 14:04           ` [FFmpeg-devel] [PATCH 1/2] checkasm: add checkasm_check_dctcoef Tristan Matthews
2025-06-13 14:04             ` [FFmpeg-devel] [PATCH 2/2] checkasm: h264dsp: test luma_dc_dequant Tristan Matthews
2025-06-13 14:08               ` Martin Storsjö
2025-06-15 23:39                 ` Michael Niedermayer
2025-06-16  6:53                   ` Zhao Zhili
2025-06-16 13:58                     ` Michael Niedermayer

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=e09c3e1c-f42d-2afc-aca6-6f1cd4790a8@martin.st \
    --to=martin@martin.st \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=tmatth@videolan.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