[FFmpeg-cvslog] avfilter/vf_v360: fix dfisheye input regression

Paul B Mahol git at videolan.org
Thu Oct 7 00:49:15 EEST 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Oct  6 23:47:16 2021 +0200| [4c7fec50068e40734116008866f424710882eb38] | committer: Paul B Mahol

avfilter/vf_v360: fix dfisheye input regression

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c7fec50068e40734116008866f424710882eb38
---

 libavfilter/vf_v360.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

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;



More information about the ffmpeg-cvslog mailing list