Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Wu, Tong1" <tong1.wu-at-intel.com@ffmpeg.org>
To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v4 5/5] lavfi/format: add a hwmap auto conversion filter
Date: Fri, 15 Jul 2022 05:19:05 +0000
Message-ID: <SN6PR11MB29903E08AC63EBE1763C00D2C08B9@SN6PR11MB2990.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220704080957.425-5-tong1.wu@intel.com>

Ping for the patchset. Is there any comment on adding this auto hwmap filter?

Thanks,
Tong

> -----Original Message-----
> From: Wu, Tong1 <tong1.wu@intel.com>
> Sent: Monday, July 4, 2022 4:10 PM
> To: ffmpeg-devel@ffmpeg.org
> Cc: Wu, Tong1 <tong1.wu@intel.com>
> Subject: [PATCH v4 5/5] lavfi/format: add a hwmap auto conversion filter
> 
> When two formats lists cannot be merged, a scale filter is auto-inserted.
> However, when it comes to hardware map, we have to manually add a
> hwmap filter to do the conversion. This patch introduces an auto hwmap
> filter to do the hwmap conversion automatically.
> 
> Signed-off-by: Tong Wu <tong1.wu@intel.com>
> ---
>  libavfilter/avfiltergraph.c | 3 ++-
>  libavfilter/formats.c       | 4 ++++
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index
> 102c1f7693..8e63007cac 100644
> --- a/libavfilter/avfiltergraph.c
> +++ b/libavfilter/avfiltergraph.c
> @@ -402,7 +402,8 @@ static int insert_auto_filter(AVFilterContext **convert,
> AVFilterGraph *graph,
>      AVFilterContext *ctx;
>      AVFilterLink *inlink, *outlink;
>      char inst_name[30];
> -    const char *opts = FF_FIELD_AT(char *, neg-
> >conversion_filters[conv_step].conversion_opts_offset, *graph);
> +    const char *opts = neg-
> >conversion_filters[conv_step].conversion_opts_offset == 0 ? NULL :
> +                       FF_FIELD_AT(char *,
> + neg->conversion_filters[conv_step].conversion_opts_offset, *graph);
>      const char *name = neg->conversion_filters[conv_step].conversion_filter;
> 
>      if (!(filter = avfilter_get_by_name(name))) { diff --git a/libavfilter/formats.c
> b/libavfilter/formats.c index c8e20e5b20..fee10fa0ee 100644
> --- a/libavfilter/formats.c
> +++ b/libavfilter/formats.c
> @@ -331,6 +331,10 @@ static const AVFilterFormatsFilter filters_video[] = {
>          .conversion_filter = "scale",
>          .conversion_opts_offset = offsetof(AVFilterGraph, scale_sws_opts),
>      },
> +    {
> +        .conversion_filter = "hwmap",
> +        .conversion_opts_offset = 0,
> +    }
>  };
> 
>  static const AVFilterFormatsFilter filters_audio[] = {
> --
> 2.35.1.windows.2

_______________________________________________
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-07-15  5:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04  8:09 [FFmpeg-devel] [PATCH v4 1/5] avutil/hwcontext: add a function to get the AVHWDeviceType Tong Wu
2022-07-04  8:09 ` [FFmpeg-devel] [PATCH v4 2/5] avfilter/vf_hwmap: get the AVHWDeviceType from outlink format Tong Wu
2022-07-04  8:09 ` [FFmpeg-devel] [PATCH v4 3/5] lavfi/avfiltergraph: move convert codes into functions Tong Wu
2022-07-04  8:09 ` [FFmpeg-devel] [PATCH v4 4/5] lavfi/format: wrap auto filters into structures Tong Wu
2022-07-04  8:09 ` [FFmpeg-devel] [PATCH v4 5/5] lavfi/format: add a hwmap auto conversion filter Tong Wu
2022-07-15  5:19   ` Wu, Tong1 [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=SN6PR11MB29903E08AC63EBE1763C00D2C08B9@SN6PR11MB2990.namprd11.prod.outlook.com \
    --to=tong1.wu-at-intel.com@ffmpeg.org \
    --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