ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Sun Apr 11 10:09:48 2021 +0200| [e917cd9828f63aba27a5647c012d62a85bf0c977] | committer: Paul B Mahol
avfilter/vf_v360: unbreak fov_from_dfov() for (d)fisheye when width != height Based on patch by Daniel Playfair Cal. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e917cd9828f63aba27a5647c012d62a85bf0c977 --- libavfilter/vf_v360.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c index 87105dbe92..053ea8868e 100644 --- a/libavfilter/vf_v360.c +++ b/libavfilter/vf_v360.c @@ -4078,18 +4078,18 @@ static void fov_from_dfov(int format, float d_fov, float w, float h, float *h_fo break; case DUAL_FISHEYE: { - const float d = 0.5f * hypotf(w * 0.5f, h); + const float d = hypotf(w * 0.5f, h); - *h_fov = d / w * 2.f * d_fov; - *v_fov = d / h * d_fov; + *h_fov = 0.5f * w / d * d_fov; + *v_fov = h / d * d_fov; } break; case FISHEYE: { - const float d = 0.5f * hypotf(w, h); + const float d = hypotf(w, h); - *h_fov = d / w * d_fov; - *v_fov = d / h * d_fov; + *h_fov = w / d * d_fov; + *v_fov = h / d * d_fov; } break; case FLAT: _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".