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.
This commit is contained in:
Daniel Playfair Cal 2021-07-17 11:28:56 +02:00 committed by Paul B Mahol
parent 748c3fa52a
commit 7f6d20931b
1 changed files with 1 additions and 1 deletions

View File

@ -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;