Browse Source

avfilter/vf_v360: use always float version instead of double floating-point function

tags/n4.3
Paul B Mahol 5 years ago
parent
commit
ed4ad6e1ed
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      libavfilter/vf_v360.c

+ 4
- 4
libavfilter/vf_v360.c View File

@@ -1408,8 +1408,8 @@ static int prepare_stereographic_out(AVFilterContext *ctx)
{
V360Context *s = ctx->priv;

const float h_angle = tan(FFMIN(s->h_fov, 359.f) * M_PI / 720.f);
const float v_angle = tan(FFMIN(s->v_fov, 359.f) * M_PI / 720.f);
const float h_angle = tanf(FFMIN(s->h_fov, 359.f) * M_PI / 720.f);
const float v_angle = tanf(FFMIN(s->v_fov, 359.f) * M_PI / 720.f);

s->flat_range[0] = h_angle;
s->flat_range[1] = v_angle;
@@ -1777,8 +1777,8 @@ static int prepare_flat_out(AVFilterContext *ctx)
const float h_angle = 0.5f * s->h_fov * M_PI / 180.f;
const float v_angle = 0.5f * s->v_fov * M_PI / 180.f;

s->flat_range[0] = tan(h_angle);
s->flat_range[1] = tan(v_angle);
s->flat_range[0] = tanf(h_angle);
s->flat_range[1] = tanf(v_angle);
s->flat_range[2] = -1.f;

return 0;


Loading…
Cancel
Save