From 4c7fec50068e40734116008866f424710882eb38 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 6 Oct 2021 23:47:16 +0200 Subject: avfilter/vf_v360: fix dfisheye input regression --- libavfilter/vf_v360.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'libavfilter') diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c index 25456ac9f4..f7c45286e2 100644 --- a/libavfilter/vf_v360.c +++ b/libavfilter/vf_v360.c @@ -3392,6 +3392,23 @@ static int xyz_to_tetrahedron(const V360Context *s, return 1; } +/** + * Prepare data for processing double fisheye input format. + * + * @param ctx filter context + * + * @return error code + */ +static int prepare_dfisheye_in(AVFilterContext *ctx) +{ + V360Context *s = ctx->priv; + + s->iflat_range[0] = s->ih_fov / 360.f; + s->iflat_range[1] = s->iv_fov / 360.f; + + return 0; +} + /** * Calculate 3D coordinates on sphere for corresponding frame position in dual fisheye format. * @@ -4514,7 +4531,7 @@ static int config_output(AVFilterLink *outlink) return AVERROR(EINVAL); case DUAL_FISHEYE: s->in_transform = xyz_to_dfisheye; - err = prepare_fisheye_in(ctx); + err = prepare_dfisheye_in(ctx); wf = w; hf = h; break; -- cgit v1.2.3