[FFmpeg-devel] [PATCH] avfilter/vf_pad: add aspect option
Paul B Mahol
onemda at gmail.com
Mon Apr 3 00:13:08 EEST 2017
On 4/2/17, Paul B Mahol <onemda at gmail.com> wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> doc/filters.texi | 3 +++
> libavfilter/vf_pad.c | 14 ++++++++++++++
> 2 files changed, 17 insertions(+)
>
> + if (adjusted_aspect.num && adjusted_aspect.den) {
> + adjusted_aspect = av_mul_q(adjusted_aspect, av_make_q(s->w,
^ changed to
sample aspect ratio locally.
> s->h));
> + if (s->h < av_rescale(s->w, adjusted_aspect.den,
> adjusted_aspect.num)) {
> + s->h = var_values[VAR_OUT_H] = var_values[VAR_OH] =
> av_rescale(s->w, adjusted_aspect.den, adjusted_aspect.num);
> + } else {
> + s->w = var_values[VAR_OUT_W] = var_values[VAR_OW] =
> av_rescale(s->h, adjusted_aspect.num, adjusted_aspect.den);
> + }
> + }
> +
More information about the ffmpeg-devel
mailing list