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.
pull/359/head
Daniel Playfair Cal 4 years ago committed by Paul B Mahol
parent 748c3fa52a
commit 7f6d20931b
  1. 2
      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;

Loading…
Cancel
Save