summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-09-10 23:34:53 +0200
committerPaul B Mahol <onemda@gmail.com>2019-09-11 00:37:02 +0200
commitccaeabd092d35d9fab3523c456739f0865c8aed8 (patch)
tree4ce7894f01792ed83696de2c73c241323a453052 /libavfilter
parent7fddf4b2662b25f048f4dbed74cf28cd375694fc (diff)
downloadffmpeg-ccaeabd092d35d9fab3523c456739f0865c8aed8.tar.gz
avfilter/vf_v360: fix fov calculation for stereographic output
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_v360.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index 245b4e6707..72cb1d82b8 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -1410,8 +1410,8 @@ static void stereographic_to_xyz(const V360Context *s,
int i, int j, int width, int height,
float *vec)
{
- const float x = ((2.f * i) / width - 1.f) * (s->h_fov / 180.f) * M_PI;
- const float y = ((2.f * j) / height - 1.f) * (s->v_fov / 90.f) * M_PI_2;
+ const float x = ((2.f * i) / width - 1.f) * (s->h_fov / 180.f);
+ const float y = ((2.f * j) / height - 1.f) * (s->v_fov / 180.f);
const float xy = x * x + y * y;
vec[0] = 2.f * x / (1.f + xy);