[FFmpeg-cvslog] avfilter/vf_v360: improve xyz_to_fisheye()

Paul B Mahol git at videolan.org
Sat Jan 29 18:37:50 EET 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Jan 29 17:18:16 2022 +0100| [e13f0b9456a5028594090e4f6f10f0a9d76f1bd2] | committer: Paul B Mahol

avfilter/vf_v360: improve xyz_to_fisheye()

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

 libavfilter/vf_v360.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index e2c90e7eb7..a216aeebdd 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -2941,8 +2941,8 @@ static int xyz_to_fisheye(const V360Context *s,
     const int visible = -0.5f < uf && uf < 0.5f && -0.5f < vf && vf < 0.5f;
     int ui, vi;
 
-    uf = (uf + 0.5f) * width;
-    vf = (vf + 0.5f) * height;
+    uf = scale(uf * 2.f, width);
+    vf = scale(vf * 2.f, height);
 
     ui = floorf(uf);
     vi = floorf(vf);



More information about the ffmpeg-cvslog mailing list