mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/vf_v360: speedup fisheye output
This commit is contained in:
parent
460001981f
commit
85025162da
|
@ -2531,9 +2531,14 @@ static int fisheye_to_xyz(const V360Context *s,
|
||||||
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));
|
||||||
|
|
||||||
vec[0] = cosf(theta) * cosf(phi);
|
const float sin_phi = sinf(phi);
|
||||||
vec[1] = cosf(theta) * sinf(phi);
|
const float cos_phi = cosf(phi);
|
||||||
vec[2] = sinf(theta);
|
const float sin_theta = sinf(theta);
|
||||||
|
const float cos_theta = cosf(theta);
|
||||||
|
|
||||||
|
vec[0] = cos_theta * cos_phi;
|
||||||
|
vec[1] = cos_theta * sin_phi;
|
||||||
|
vec[2] = sin_theta;
|
||||||
|
|
||||||
normalize_vector(vec);
|
normalize_vector(vec);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue