summaryrefslogtreecommitdiff
path: root/libavfilter/vf_v360.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-02-23 18:15:06 +0100
committerPaul B Mahol <onemda@gmail.com>2020-02-23 18:15:06 +0100
commitebc8806b9fcc8a2130773ddfd2f1678f78c24200 (patch)
treee84fb9de114f553d281c441f889894209f7efd01 /libavfilter/vf_v360.c
parentc48e5431c8edeae1e10482df5e179a9c02479662 (diff)
avfilter/vf_v360: improve equirect_to_xyz() quality
Diffstat (limited to 'libavfilter/vf_v360.c')
-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 de79fcdcf2..dee632c258 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -1561,8 +1561,8 @@ static int equirect_to_xyz(const V360Context *s,
int i, int j, int width, int height,
float *vec)
{
- const float phi = ((2.f * i) / width - 1.f) * M_PI;
- const float theta = ((2.f * j) / height - 1.f) * M_PI_2;
+ const float phi = ((2.f * i + 0.5f) / width - 1.f) * M_PI;
+ const float theta = ((2.f * j + 0.5f) / height - 1.f) * M_PI_2;
const float sin_phi = sinf(phi);
const float cos_phi = cosf(phi);