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

Robert Deibel deibel.robert at googlemail.com
Tue Jan 28 16:44:39 EET 2020


On 27.01.20 16:44, Paul B Mahol wrote:
> On 1/27/20, Robert Deibel <deibel.robert at googlemail.com> wrote:
>> -    y = *dy = av_clipd(*dy, 0, FFMAX(in->height - h, 0));
>> -    var_values[VAR_Y] = *dy;
>> -    y &= ~((1 << s->desc->log2_chroma_h) - 1);
>> -
>> -    out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
>> +    out = ff_get_video_buffer(outlink, overscaled_w, overscaled_h);
> This is wrong. outlink->w/h should be used always, otherwise outlink
> w/h differs from frame w/h.
>
So how should I create a video buffer? I tried av_frame_alloc + setting 
width, height and format + av_frame_get_buffer, but this resulted in a 
heavy performance impact. Apart from the fact, that I can't get the 
correct data copied.

Also, if it's not allowed to pass other w/h why is it even possible? Or 
is it only a problem if I use the outlink? Could I request a buffer from 
the inlink with the modified sizes?



More information about the ffmpeg-devel mailing list