[FFmpeg-devel] [PATCH] libavfilter/scale: Populate ow/oh when using 0 as w/h

Kevin Mark kmark937 at gmail.com
Mon Jun 12 09:08:00 EEST 2017


Still interested in thoughts on this patch/discussion.

Thanks,
Kevin

On Wed, Jun 7, 2017 at 3:54 AM, Kevin Mark <kmark937 at gmail.com> wrote:
> I also have to wonder if it would be advantageous to add the cast on
> the right side as well. That way the var_values variables will have
> the proper truncated values on future evaluations. Open to comments on
> that.
>
> On Wed, Jun 7, 2017 at 3:45 AM, Kevin Mark <kmark937 at gmail.com> wrote:
>> -    eval_w = var_values[VAR_OUT_W] = var_values[VAR_OW] = res;
>> +    eval_w = var_values[VAR_OUT_W] = var_values[VAR_OW] = (int) res == 0 ? inlink->w : res;
>
> to perhaps:
> +    eval_w = var_values[VAR_OUT_W] = var_values[VAR_OW] = (int) res
> == 0 ? inlink->w : (int) res;
>
> Without that extra cast I assume the values in eval_w and
> var_values[VAR_OUT_W], var_values[VAR_OW] could be different. I doubt
> most users expect that those values could ever be non-integers which
> has implications for how you're writing your expression.


More information about the ffmpeg-devel mailing list