[FFmpeg-devel] [PATCH v4] avfilter/vf_zoompan: fix shaking when zooming

Robert Deibel deibel.robert at googlemail.com
Wed Jan 29 13:37:45 EET 2020


On 29.01.20 11:49, Paul B Mahol wrote:
> On 1/29/20, Robert Deibel <deibel.robert at googlemail.com> wrote:
>> -
>> -    av_opt_set_int(s->sws, "srcw", w, 0);
>> -    av_opt_set_int(s->sws, "srch", h, 0);
>> +    av_opt_set_int(s->sws, "srcw", crop_w, 0);
>> +    av_opt_set_int(s->sws, "srch", crop_h, 0);
> Is this really needed?
>
>>       av_opt_set_int(s->sws, "src_format", in->format, 0);
>> -    av_opt_set_int(s->sws, "dstw", outlink->w, 0);
>> -    av_opt_set_int(s->sws, "dsth", outlink->h, 0);
>> +    av_opt_set_int(s->sws, "dstw", overscaled_w, 0);
>> +    av_opt_set_int(s->sws, "dsth", overscaled_h, 0);
> ditto
Yes, I'm afraid so. Omitting these lines will result in faulty output, 
so is any combination of the original and the modified parameters. In 
fact the only combination to produce any image (apart from the one in 
the patch) is crop_w/crop_/h and outlink->w/outlink->h but even that's 
faulty.


More information about the ffmpeg-devel mailing list