History

avfilter/vf_v360: avoid doubles in fov_from_dfov()

Paul B Mahol committed 5 years ago

Commit 305be411 parent c320b781 file · +2 −2Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_v360.c+2−2
@@ -4161,8 +4161,8 @@ static void fov_from_dfov(int format, float d_fov, float w, float h, float *h_fo · 4160 unmodified lines
4161 const float d = 0.5f * hypotf(w, h);4161 const float d = 0.5f * hypotf(w, h);
4162 const float l = sinf(d_fov * M_PI / 360.f) / d;4162 const float l = sinf(d_fov * M_PI / 360.f) / d;
4163 4163
4164 *h_fov = asinf(w * 0.5 * l) * 360.f / M_PI;4164 *h_fov = asinf(w * 0.5f * l) * 360.f / M_PI;
4165 *v_fov = asinf(h * 0.5 * l) * 360.f / M_PI;4165 *v_fov = asinf(h * 0.5f * l) * 360.f / M_PI;
4166 4166
4167 if (d_fov > 180.f) {4167 if (d_fov > 180.f) {
4168 *h_fov = 180.f - *h_fov;4168 *h_fov = 180.f - *h_fov;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t