Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Marton Balint <cus@passwd.hu>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] Fixes #10509
Date: Sun, 24 Mar 2024 21:34:08 +0100 (CET)
Message-ID: <cff37b7e-a3b0-c109-882c-c9afdfc24a8a@passwd.hu> (raw)
In-Reply-To: <CAJdhrg=MhR--TtcZ=3PNZt42srPqmfK9xV9tWMWF_mfXBjcxYQ@mail.gmail.com>



On Sun, 24 Mar 2024, Poorva wrote:

> From 0874a55ad33bb4df2789cbafc5247c0ae3d97e6a Mon Sep 17 00:00:00 2001
> From: PoorvaGaikar <pbgaikar_b21@el.vjti.ac.in>
> Date: Sat, 9 Mar 2024 00:27:25 +0530
> Subject: [PATCH v2] avfilter/f_select.c: add support for iw and ih constants

You should mention the fixed ticket number in the commit message.

> 
> ---
>  doc/filters.texi       |  6 ++++++
>  libavfilter/f_select.c | 14 ++++++++++++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/doc/filters.texi b/doc/filters.texi
> index 913365671d..e73dc9c1bf 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -30737,6 +30737,12 @@ missing.
>  That basically means that an input frame is selected if its pts is within the
>  interval set by the concat demuxer.
> 
> +@item iw @emph{(video only)}
> +Represents the width of the input video frame
> +
> +@item ih @emph{(video only)}
> +Represents the height of the input video frame
> +
>  @end table
>
>  The default value of the select expression is "1".
> diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c
> index 9b330a0673..ccfe915ee1 100644
> --- a/libavfilter/f_select.c
> +++ b/libavfilter/f_select.c
> @@ -90,6 +90,9 @@ static const char *const var_names[] = {
>
>      "concatdec_select",  ///< frame is within the interval set by the concat demuxer
> 
> +    "ih",                ///< ih: Represents the height of the input video frame.
> +    "iw",                ///< iw: Represents the width of the input video frame.
> +
>      NULL
>  };
> 
> @@ -144,6 +147,9 @@ enum var_name {
>
>      VAR_CONCATDEC_SELECT,
> 
> +    VAR_IH,
> +    VAR_IW,
> +
>      VAR_VARS_NB
>  };
> 
> @@ -264,6 +270,9 @@ static int config_input(AVFilterLink *inlink)
>      select->var_values[VAR_CONSUMED_SAMPLES_N] = NAN;
>      select->var_values[VAR_SAMPLES_N]          = NAN;
> 
> +    select->var_values[VAR_IH] = NAN;
> +    select->var_values[VAR_IW] = NAN;
> +
>      select->var_values[VAR_SAMPLE_RATE] =
>          inlink->type == AVMEDIA_TYPE_AUDIO ? inlink->sample_rate : NAN;
> 
> @@ -370,6 +379,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
>          }
>          break;
>      }
> +    if (inlink->type == AVMEDIA_TYPE_VIDEO){
> +        select->var_values[VAR_IH] = frame->height;
> +        select->var_values[VAR_IW] = frame->width;
> +    }

There is a switch(inlink->type) just above this, so you should put these 
there to the corresponding case AVMEDIA_TYPE_VIDEO, and not create a new 
block.

>
>      select->select = res = av_expr_eval(select->expr, select->var_values, NULL);
>      av_log(inlink->dst, AV_LOG_DEBUG,
> @@ -546,3 +559,4 @@ const AVFilter ff_vf_select = {
>      .flags         = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY,
>  };
>  #endif /* CONFIG_SELECT_FILTER */
> +

This is still an uneeded newline.

Regards,
Marton
_______________________________________________
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-03-24 20:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-09 20:49 Poorva
2024-03-10 19:40 ` Leo Izen
2024-03-16 18:47   ` Poorva
2024-03-16 18:56     ` Marton Balint
2024-03-18 17:04       ` Poorva
2024-03-24 14:28         ` Poorva
2024-03-24 20:34           ` Marton Balint [this message]
2024-03-25 21:06             ` Poorva
2024-03-28 19:34               ` Poorva
2024-03-31 15:05                 ` Marton Balint
2024-04-01 14:37                   ` Poorva
2024-04-04 20:38                     ` Marton Balint
2024-05-01  9:50                       ` Poorva
2024-05-07 22:04                         ` Marton Balint

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=cff37b7e-a3b0-c109-882c-c9afdfc24a8a@passwd.hu \
    --to=cus@passwd.hu \
    --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