]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_v360.c
avfilter/vf_v360: improve fisheye_to_xyz() output
[ffmpeg] / libavfilter / vf_v360.c
index dee632c25828c9e3154fdff6f4601df4470d7b59..4bd545697fa882171a0cdc97a3baf7ba4d9f64a5 100644 (file)
@@ -2401,7 +2401,7 @@ static int fisheye_to_xyz(const V360Context *s,
                           float *vec)
 {
     const float uf = s->flat_range[0] * ((2.f * i) / width  - 1.f);
-    const float vf = s->flat_range[1] * ((2.f * j) / height - 1.f);
+    const float vf = s->flat_range[1] * ((2.f * j + 1.f) / height - 1.f);
 
     const float phi   = -atan2f(vf, uf);
     const float theta = -M_PI_2 * (1.f - hypotf(uf, vf));