[FFmpeg-devel] [PATCH 2/2] avfilter/vf_scale2ref: switch to FFFrameSync

Niklas Haas ffmpeg at haasn.xyz
Sat Mar 23 19:50:44 EET 2024


On Wed, 20 Mar 2024 20:55:26 +0100 Michael Niedermayer <michael at niedermayer.cc> wrote:
> On Wed, Mar 20, 2024 at 03:23:53PM +0100, Niklas Haas wrote:
> > On Tue, 19 Mar 2024 22:55:56 +0100 Michael Niedermayer <michael at niedermayer.cc> wrote:
> > > is it neccessary to drop compatibility to the old syntax ?
> > 
> > Only if we want to use framesync. If we don't care about synchronizing
> > the streams, then we could drop FS and just use a custom activate
> > function which forwards output status only to the *corresponding* input.
> 
> if the full bugfix cant be done in the same filter then i guess we need a 2nd
> filter, maybe scale1ref

I think we can do this by extending vf_scale itself to support taking
a second input, that way we don't need a second filter at all.

My proposal for this:
- Add new variables ref_w, ref_h (and related fields), possibly aliased
  to 'rw' and 'rh'.
- When `ref_*` is referenced in any expression, vf_scale will init()
  with a second input stream.
- Semantics will be equivalent to this patch.
- Fully deprecate scale2ref, and eventually remove it and the main_*
  series of variables.

That way, scale2ref just becomes `scale=w=rw:h=rh`, and also allows us
to simplify these filters a bit.


More information about the ffmpeg-devel mailing list