1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/vf_v360: improve fisheye_to_xyz() output

This commit is contained in:
Paul B Mahol 2020-02-23 21:55:35 +01:00
parent 9e0ddb5e80
commit e6ea0e7429

View File

@ -2401,7 +2401,7 @@ static int fisheye_to_xyz(const V360Context *s,
float *vec) float *vec)
{ {
const float uf = s->flat_range[0] * ((2.f * i) / width - 1.f); 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 phi = -atan2f(vf, uf);
const float theta = -M_PI_2 * (1.f - hypotf(uf, vf)); const float theta = -M_PI_2 * (1.f - hypotf(uf, vf));