Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Nuo Mi <nuomi2021@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v3 4/4] tests/checkasm/vvc_alf: add check_alf_classify
Date: Tue, 14 May 2024 19:25:24 +0800
Message-ID: <CAFXK13cbnjO-St8n6a4dryV2=cv0VmjoF72d3fZyEJNeQ-Y66w@mail.gmail.com> (raw)
In-Reply-To: <OSZP286MB2173887A0BBF4B1B091042F6CAE22@OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM>

On Mon, May 13, 2024 at 8:32 PM <toqsxw@outlook.com> wrote:

> From: Wu Jianhua <toqsxw@outlook.com>
>
> Perforamnce Test (fps):
> clip                                      before  after delta
> Tango2_3840x2160_60_10_420_27_LD.266      56      115   105.36%
> RitualDance_1920x1080_60_10_420_32_LD.266 272     481   76.83%
> RitualDance_1920x1080_60_10_420_37_RA.266 303     426   40.59%
>
Applied.
Thank you.

>
> Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
> ---
>  tests/checkasm/vvc_alf.c | 47 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 47 insertions(+)
>
> diff --git a/tests/checkasm/vvc_alf.c b/tests/checkasm/vvc_alf.c
> index 10469e1528..9526260598 100644
> --- a/tests/checkasm/vvc_alf.c
> +++ b/tests/checkasm/vvc_alf.c
> @@ -121,6 +121,47 @@ static void check_alf_filter(VVCDSPContext *c, const
> int bit_depth)
>      }
>  }
>
> +static void check_alf_classify(VVCDSPContext *c, const int bit_depth)
> +{
> +    LOCAL_ALIGNED_32(int, class_idx0, [SRC_BUF_SIZE]);
> +    LOCAL_ALIGNED_32(int, transpose_idx0, [SRC_BUF_SIZE]);
> +    LOCAL_ALIGNED_32(int, class_idx1, [SRC_BUF_SIZE]);
> +    LOCAL_ALIGNED_32(int, transpose_idx1, [SRC_BUF_SIZE]);
> +    LOCAL_ALIGNED_32(uint8_t, src0, [SRC_BUF_SIZE]);
> +    LOCAL_ALIGNED_32(uint8_t, src1, [SRC_BUF_SIZE]);
> +    LOCAL_ALIGNED_32(int32_t, alf_gradient_tmp, [ALF_GRADIENT_SIZE *
> ALF_GRADIENT_SIZE * ALF_NUM_DIR]);
> +
> +    ptrdiff_t stride = SRC_PIXEL_STRIDE * SIZEOF_PIXEL;
> +    int offset = (3 * SRC_PIXEL_STRIDE + 3) * SIZEOF_PIXEL;
> +
> +    declare_func_emms(AV_CPU_FLAG_AVX2, void, int *class_idx, int
> *transpose_idx,
> +        const uint8_t *src, ptrdiff_t src_stride, int width, int height,
> int vb_pos, int *gradient_tmp);
> +
> +    randomize_buffers(src0, src1, SRC_BUF_SIZE);
> +
> +    for (int h = 4; h <= MAX_CTU_SIZE; h += 4) {
> +        for (int w = 4; w <= MAX_CTU_SIZE; w += 4) {
> +            const int id_size = w * h / ALF_BLOCK_SIZE / ALF_BLOCK_SIZE *
> sizeof(int);
> +            const int vb_pos  = MAX_CTU_SIZE - ALF_BLOCK_SIZE;
> +            if (check_func(c->alf.classify, "vvc_alf_classify_%dx%d_%d",
> w, h, bit_depth)) {
> +                memset(class_idx0, 0, id_size);
> +                memset(class_idx1, 0, id_size);
> +                memset(transpose_idx0, 0, id_size);
> +                memset(transpose_idx1, 0, id_size);
> +                call_ref(class_idx0, transpose_idx0, src0 + offset,
> stride, w, h, vb_pos, alf_gradient_tmp);
> +
> +                call_new(class_idx1, transpose_idx1, src1 + offset,
> stride, w, h, vb_pos, alf_gradient_tmp);
> +
> +                if (memcmp(class_idx0, class_idx1, id_size))
> +                    fail();
> +                if (memcmp(transpose_idx0, transpose_idx1, id_size))
> +                    fail();
> +                bench_new(class_idx1, transpose_idx1, src1 + offset,
> stride, w, h, vb_pos, alf_gradient_tmp);
> +            }
> +        }
> +    }
> +}
> +
>  void checkasm_check_vvc_alf(void)
>  {
>      int bit_depth;
> @@ -130,4 +171,10 @@ void checkasm_check_vvc_alf(void)
>          check_alf_filter(&h, bit_depth);
>      }
>      report("alf_filter");
> +
> +    for (bit_depth = 8; bit_depth <= 12; bit_depth += 2) {
> +        ff_vvc_dsp_init(&h, bit_depth);
> +        check_alf_classify(&h, bit_depth);
> +    }
> +    report("alf_classify");
>  }
> --
> 2.44.0.windows.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".
>
_______________________________________________
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:[~2024-05-14 11:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240513123106.232-1-toqsxw@outlook.com>
2024-05-13 12:31 ` [FFmpeg-devel] [PATCH v3 2/4] tests/checkasm: add checkasm_check_vvc_alf and check_alf_filter toqsxw
2024-05-13 12:31 ` [FFmpeg-devel] [PATCH v3 3/4] avcodec/x86/vvc/vvc_alf: add alf classify avx2 optimizations toqsxw
2024-05-13 12:31 ` [FFmpeg-devel] [PATCH v3 4/4] tests/checkasm/vvc_alf: add check_alf_classify toqsxw
2024-05-14 11:25   ` Nuo Mi [this message]
2024-05-23  1:57     ` James Almer

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='CAFXK13cbnjO-St8n6a4dryV2=cv0VmjoF72d3fZyEJNeQ-Y66w@mail.gmail.com' \
    --to=nuomi2021@gmail.com \
    --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