Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -1561,8 +1561,8 @@ static int equirect_to_xyz(const V360Context *s, · 1560 unmodified lines | ||
| 1561 | 1561 | int i, int j, int width, int height, |
| 1562 | 1562 | float *vec) |
| 1563 | 1563 | { |
| 1564 | − const float phi = ((2.f * i) / width - 1.f) * M_PI; | |
| 1565 | − const float theta = ((2.f * j) / height - 1.f) * M_PI_2; | |
| 1564 | + const float phi = ((2.f * i + 0.5f) / width - 1.f) * M_PI; | |
| 1565 | + const float theta = ((2.f * j + 0.5f) / height - 1.f) * M_PI_2; | |
| 1566 | 1566 | |
| 1567 | 1567 | const float sin_phi = sinf(phi); |
| 1568 | 1568 | const float cos_phi = cosf(phi); |