Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Thomas Mundt <tmundt75@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 1/3] avfilter: move bwdif's filter_line init into a dedicated function
Date: Thu, 23 Feb 2023 19:19:29 -0600
Message-ID: <CAC5+Sy6Hi4w+aQtaibg31uqNAQ+1mN0t-aAV8yZdEhuMnxkbDg@mail.gmail.com> (raw)
In-Reply-To: <20230220195703.1297421-1-jdarnley@obe.tv>

Hi James,

James Darnley <jdarnley@obe.tv> schrieb am Mo., 20. Feb. 2023, 13:59:

> ---
>  libavfilter/bwdif.h             |  3 ++-
>  libavfilter/vf_bwdif.c          | 13 +++++++++----
>  libavfilter/x86/vf_bwdif_init.c |  4 +---
>  3 files changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/libavfilter/bwdif.h b/libavfilter/bwdif.h
> index 889ff772ed..5749345f78 100644
> --- a/libavfilter/bwdif.h
> +++ b/libavfilter/bwdif.h
> @@ -37,6 +37,7 @@ typedef struct BWDIFContext {
>                          int parity, int clip_max, int spat);
>  } BWDIFContext;
>
> -void ff_bwdif_init_x86(BWDIFContext *bwdif);
> +void ff_bwdif_init_filter_line(BWDIFContext *bwdif, int bit_depth);
> +void ff_bwdif_init_x86(BWDIFContext *bwdif, int bit_depth);
>
>  #endif /* AVFILTER_BWDIF_H */
> diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c
> index 65c617ebb3..34e8c5e234 100644
> --- a/libavfilter/vf_bwdif.c
> +++ b/libavfilter/vf_bwdif.c
> @@ -340,7 +340,14 @@ static int config_props(AVFilterLink *link)
>
>      yadif->csp = av_pix_fmt_desc_get(link->format);
>      yadif->filter = filter;
> -    if (yadif->csp->comp[0].depth > 8) {
> +    ff_bwdif_init_filter_line(s, yadif->csp->comp[0].depth);
> +
> +    return 0;
> +}
> +
> +av_cold void ff_bwdif_init_filter_line(BWDIFContext *s, int bit_depth)
> +{
> +    if (bit_depth > 8) {
>          s->filter_intra = filter_intra_16bit;
>          s->filter_line  = filter_line_c_16bit;
>          s->filter_edge  = filter_edge_16bit;
> @@ -351,10 +358,8 @@ static int config_props(AVFilterLink *link)
>      }
>
>  #if ARCH_X86
> -    ff_bwdif_init_x86(s);
> +    ff_bwdif_init_x86(s, bit_depth);
>  #endif
> -
> -    return 0;
>  }
>
>
> diff --git a/libavfilter/x86/vf_bwdif_init.c
> b/libavfilter/x86/vf_bwdif_init.c
> index e24e5cd9b1..ba7bc40c3d 100644
> --- a/libavfilter/x86/vf_bwdif_init.c
> +++ b/libavfilter/x86/vf_bwdif_init.c
> @@ -42,11 +42,9 @@ void ff_bwdif_filter_line_12bit_ssse3(void *dst, void
> *prev, void *cur, void *ne
>                                        int mrefs2, int prefs3, int mrefs3,
> int prefs4,
>                                        int mrefs4, int parity, int
> clip_max);
>
> -av_cold void ff_bwdif_init_x86(BWDIFContext *bwdif)
> +av_cold void ff_bwdif_init_x86(BWDIFContext *bwdif, int bit_depth)
>  {
> -    YADIFContext *yadif = &bwdif->yadif;
>      int cpu_flags = av_get_cpu_flags();
> -    int bit_depth = (!yadif->csp) ? 8 : yadif->csp->comp[0].depth;
>
>      if (bit_depth <= 8) {
>          if (EXTERNAL_SSE2(cpu_flags))
> --
> 2.39.1
>

I'm travelling at the moment and can only look at your patch set on my
phone. At first glance it looks good. If you are not in a hurry, I would
test it in two to three weeks when I am back home and have time.

Best Regards,
Thomas

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

      parent reply	other threads:[~2023-02-24  1:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 19:57 James Darnley
2023-02-20 19:57 ` [FFmpeg-devel] [PATCH 2/3] checkasm: add test for bwdif James Darnley
2023-03-11 16:18   ` Thomas Mundt
2023-03-13 11:04     ` James Darnley
2023-02-20 19:57 ` [FFmpeg-devel] [PATCH 3/3] avfilter: add avx2 filter_line function " James Darnley
2023-03-11 16:14   ` Thomas Mundt
2023-03-13 11:08     ` James Darnley
2023-02-24  1:19 ` Thomas Mundt [this message]

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=CAC5+Sy6Hi4w+aQtaibg31uqNAQ+1mN0t-aAV8yZdEhuMnxkbDg@mail.gmail.com \
    --to=tmundt75@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