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: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] checkasm: improve hevc_sao test
Date: Tue, 24 May 2022 23:27:52 +0300 (EEST)
Message-ID: <d86f818-83a3-cc8e-7a63-f7e5eec9dab5@martin.st> (raw)
In-Reply-To: <20220517115429.2020-1-jdek@itanimul.li>

On Tue, 17 May 2022, J. Dekker wrote:

> The HEVC decoder can call these functions with smaller widths than the
> functions themselves are designed to operate on so we should only check
> the relevant output
>
> Signed-off-by: J. Dekker <jdek@itanimul.li>
> ---
> tests/checkasm/hevc_sao.c | 51 ++++++++++++++++++++++++---------------
> 1 file changed, 31 insertions(+), 20 deletions(-)
>
> diff --git a/tests/checkasm/hevc_sao.c b/tests/checkasm/hevc_sao.c
> index 6b750758e2..72cdb87dd1 100644
> --- a/tests/checkasm/hevc_sao.c
> +++ b/tests/checkasm/hevc_sao.c
> @@ -78,20 +78,26 @@ static void check_sao_band(HEVCDSPContext h, int bit_depth)
>
>     for (i = 0; i <= 4; i++) {
>         int block_size = sao_size[i];
> +        int prev_size = i > 0 ? sao_size[i - 1] : 0;
>         ptrdiff_t stride = PIXEL_STRIDE*SIZEOF_PIXEL;
>         declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, uint8_t *src, ptrdiff_t dst_stride, ptrdiff_t src_stride,
>                           int16_t *sao_offset_val, int sao_left_class, int width, int height);
>
> -        randomize_buffers(src0, src1, BUF_SIZE);
> -        randomize_buffers2(offset_val, OFFSET_LENGTH);
> -        memset(dst0, 0, BUF_SIZE);
> -        memset(dst1, 0, BUF_SIZE);
> -
> -        if (check_func(h.sao_band_filter[i], "hevc_sao_band_%dx%d_%d", block_size, block_size, bit_depth)) {
> -            call_ref(dst0, src0, stride, stride, offset_val, left_class, block_size, block_size);
> -            call_new(dst1, src1, stride, stride, offset_val, left_class, block_size, block_size);
> -            if (memcmp(dst0, dst1, BUF_SIZE))
> -                fail();
> +        if (check_func(h.sao_band_filter[i], "hevc_sao_band_%d_%d", block_size, bit_depth)) {
> +
> +            for (int w = prev_size + 4; w <= block_size; w += 4) {
> +                randomize_buffers(src0, src1, BUF_SIZE);
> +                randomize_buffers2(offset_val, OFFSET_LENGTH);
> +                memset(dst0, 0, BUF_SIZE);
> +                memset(dst1, 0, BUF_SIZE);
> +
> +                call_ref(dst0, src0, stride, stride, offset_val, left_class, w, block_size);
> +                call_new(dst1, src1, stride, stride, offset_val, left_class, w, block_size);
> +                for (int j = 0; j < block_size; j++) {
> +                    if (memcmp(dst0 + j*MAX_PB_SIZE*2, dst1 + j*MAX_PB_SIZE*2, w))

I'm not quite sure about the MAX_PB_SIZE*2 part here - shouldn't that be 
just the 'stride' variable instead? And for the compared length ('w'), 
shouldn't that be multiplied by SIZEOF_PIXEL?

Other than that, this looks good to me!

// 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:[~2022-05-24 20:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 13:42 [FFmpeg-devel] [PATCH 1/3] lavc/aarch64: fix hevc sao band filter J. Dekker
2022-04-28 13:42 ` [FFmpeg-devel] [PATCH 2/3] lavc/aarch64: add hevc sao edge 16x16 J. Dekker
2022-04-28 13:42 ` [FFmpeg-devel] [PATCH 3/3] lavc/aarch64: add hevc sao edge 8x8 J. Dekker
2022-04-28 19:50   ` Martin Storsjö
2022-05-17 11:53     ` J. Dekker
2022-05-17 11:54     ` [FFmpeg-devel] [PATCH] checkasm: improve hevc_sao test J. Dekker
2022-05-24 20:27       ` Martin Storsjö [this message]
2022-05-25  7:21         ` J. Dekker
2022-05-25  7:40           ` Martin Storsjö
2022-04-28 13:43 ` [FFmpeg-devel] [PATCH 1/3] lavc/aarch64: fix hevc sao band filter J. Dekker

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=d86f818-83a3-cc8e-7a63-f7e5eec9dab5@martin.st \
    --to=martin@martin.st \
    --cc=ffmpeg-devel@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