summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-10-06 23:47:16 +0200
committerPaul B Mahol <onemda@gmail.com>2021-10-06 23:48:45 +0200
commit4c7fec50068e40734116008866f424710882eb38 (patch)
treed01a249ad87836a1f9cfdae7c590406bb7fa8271
parent21979cf98e2df41ee42e6a11f71491fc2ee1976c (diff)
avfilter/vf_v360: fix dfisheye input regression
-rw-r--r--libavfilter/vf_v360.c19
1 files changed, 18 insertions, 1 deletions
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
@@ -3393,6 +3393,23 @@ static int xyz_to_tetrahedron(const V360Context *s,
}
/**
+ * 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.
*
* @param s filter private context
@@ -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;