diff options
author | Daniel Playfair Cal <daniel.playfair.cal@gmail.com> | 2021-07-17 11:28:56 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2021-07-17 11:28:56 +0200 |
commit | 7f6d20931b1b14031f585610a8d81a86368ab46d (patch) | |
tree | f20f60567251e68a85e7674c90aa00dd7559bb84 /libavfilter | |
parent | 748c3fa52aac58f1a716ef5972a1c623076a0182 (diff) | |
download | ffmpeg-7f6d20931b1b14031f585610a8d81a86368ab46d.tar.gz |
avfilter/vf_v360: fix visibility test for fisheye projection
Previously the visibility test referred to a circle in the input. This
changes it so that it refers accurately to the entire area in the input.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_v360.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c index 0c47883d4d..c5c4e3bf65 100644 --- a/libavfilter/vf_v360.c +++ b/libavfilter/vf_v360.c @@ -2926,7 +2926,7 @@ static int xyz_to_fisheye(const V360Context *s, float uf = vec[0] / lh * phi / s->iflat_range[0]; float vf = vec[1] / lh * phi / s->iflat_range[1]; - const int visible = hypotf(uf, vf) <= 0.5f; + const int visible = -0.5f < uf && uf < 0.5f && -0.5f < vf && vf < 0.5f; int ui, vi; uf = (uf + 0.5f) * width; |