[FFmpeg-devel] Fixes #10509

Poorva 2003gaikarpoorva at gmail.com
Sun Mar 24 16:28:22 EET 2024


>

On Mon, Mar 18, 2024 at 10:34 PM Poorva <2003gaikarpoorva at gmail.com> wrote:
>
> >
>
> On Sun, Mar 17, 2024 at 12:26 AM Marton Balint <cus at passwd.hu> wrote:
> >
> >
> >
> > On Sun, 17 Mar 2024, Poorva wrote:
> >
> > > On Mon, Mar 11, 2024 at 1:10 AM Leo Izen <leo.izen at gmail.com> wrote:
> > >>
> > >> On 3/9/24 15:49, Poorva wrote:
> > >>> I have attached the git patch containing the changes for your review.
> > >>>
> > >>> This patch is submitted as part of my qualification task for Google Summer
> > >>> of Code (GSoC)
> > >>>
> > >>
> > >> Your editor appears to have stripped the newline at the end of the file.
> >
> > > diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c
> > > index 9b330a0673..965f5a0b54 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] = inlink->h;
> > > +    select->var_values[VAR_IW] = inlink->w;
> >
> > Initial valaues should be NAN. This may well be an audio filter, when
> > ih/iw is not available.
> >
> > > +
> > >      select->var_values[VAR_SAMPLE_RATE] =
> > >          inlink->type == AVMEDIA_TYPE_AUDIO ? inlink->sample_rate : NAN;
> > >
> > > @@ -371,6 +380,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
> > >          break;
> > >      }
> > >
> > > +    select->var_values[VAR_IH] = frame->height;
> > > +    select->var_values[VAR_IW] = frame->width;
> >
> > You shold only set these for the VIDEO case.
> >
> > > +
> > >      select->select = res = av_expr_eval(select->expr, select->var_values, NULL);
> > >      av_log(inlink->dst, AV_LOG_DEBUG,
> > >             "n:%f pts:%f t:%f key:%d",
> > > @@ -546,3 +558,4 @@ const AVFilter ff_vf_select = {
> > >      .flags         = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY,
> > >  };
> > >  #endif /* CONFIG_SELECT_FILTER */
> > > +
> >
> > Extra added line.
> >
> > > --
> > > 2.43.0.windows.1
> >
> > Documentation update missing.
> Sir, I have made the changes as per your suggestions:
>
> 1)Initial values are now set to NaN.
> 2)Values are only set for the VIDEO case.
> 3)Documentation has been updated to reflect these changes accurately.
> I have attached the patch with the updated code for your review.
>
  I wanted to follow up on a patch I submitted earlier and provide an
update based on the feedback received.

Changes made in the update were:

1)Initial values are now set to NaN.
2)Values are only set for the VIDEO case.
3)Documentation has been updated to reflect these changes accurately.
Despite the changes made, I have not received any further feedback or
comments on the patch. Therefore, I kindly request the community to
review the updated patch attached to this email.

Your feedback and suggestions are highly valuable and appreciated.
>
> > Regards,
> > Marton
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-avfilter-f_select.c-add-support-for-iw-and-ih-con.patch
Type: application/octet-stream
Size: 2408 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240324/fdfd57d2/attachment.obj>


More information about the ffmpeg-devel mailing list