[FFmpeg-devel] [PATCH 1/3] libavfilter/scale2ref: Add constants for the non-ref input

Gyan gyandoshi at gmail.com
Sun May 28 19:14:56 EEST 2017


On Sun, May 28, 2017 at 8:06 PM, Kevin Mark <kmark937 at gmail.com> wrote:


> Any thoughts on creating shorthand variables? I don't
> see a particular need for them but it would put these new variables in
> line with the others. mw for main_w, mh for main_h. Potentially ma for
> main_a. I don't have a strong feeling on it one way or another.
>

If you do, I suggest 'mdar' for main_dar which is the only one that ought
to be required.

The scale filter adjusts the SAR of the result so that the DAR is preserved
i.e. when a 100x100 canvas w/ SAR of 2.0 is scaled to 50x100, the result
will have SAR 4.0. In the scale2ref filter, this adjustment is made so that
the ref's DAR is effected onto the scaled result. I don't believe your
patch changes this behaviour. Now, the overlay filter does not respect the
overlay input's SAR - a 100x100 canvas of SAR 2 is overlaid as a square -
so having a shorthand for the main DAR and promoting its use will silently
enforce a visually correct-looking input for overlays and other compositing
uses.


More information about the ffmpeg-devel mailing list