]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_v360: improve dfisheye_to_xyz() output
authorPaul B Mahol <onemda@gmail.com>
Sun, 23 Feb 2020 21:00:32 +0000 (22:00 +0100)
committerPaul B Mahol <onemda@gmail.com>
Sun, 23 Feb 2020 21:00:32 +0000 (22:00 +0100)
libavfilter/vf_v360.c

index 4bd545697fa882171a0cdc97a3baf7ba4d9f64a5..6477303ca57c67b847495ec6cc34614ea8e349b4 100644 (file)
@@ -2777,7 +2777,7 @@ static int dfisheye_to_xyz(const V360Context *s,
     const float m = i >= ew ? -1.f : 1.f;
 
     const float uf = ((2.f * ei) / ew - 1.f) * scale;
-    const float vf = ((2.f *  j) / eh - 1.f) * scale;
+    const float vf = ((2.f * j + 1.f) / eh - 1.f) * scale;
 
     const float h     = hypotf(uf, vf);
     const float lh    = h > 0.f ? h : 1.f;