On 28.01.20 15:46, Paul B Mahol wrote:
On 1/28/20, Robert Deibel <deibel.rob...@googlemail.com> wrote:
On 27.01.20 16:44, Paul B Mahol wrote:
On 1/27/20, Robert Deibel <deibel.rob...@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?
Frame w/h should be exactly same as outlink w/h.
Otherwise output will not have always same w/h.
Why are you changing w/h at all?

The idea was to build a slightly larger frame than output to compensate for rounding errors and crop it to the correct size afterwards.

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to