diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-09-22 11:29:03 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-09-22 14:12:51 +0200 |
commit | 79d14a3cc8e9105385044dbe2c4f696f0c9c1c07 (patch) | |
tree | ea1b94f8e693410ed4826c22f48643957eac817e | |
parent | ba24b24aab3b9c4fb9444b00c77834f21b8fe969 (diff) | |
download | ffmpeg-79d14a3cc8e9105385044dbe2c4f696f0c9c1c07.tar.gz |
avfilter/vf_v360: remove intermediate variables
-rw-r--r-- | libavfilter/vf_v360.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c index 8339998454..fa28f31ae0 100644 --- a/libavfilter/vf_v360.c +++ b/libavfilter/vf_v360.c @@ -1414,11 +1414,8 @@ static int prepare_stereographic_out(AVFilterContext *ctx) { V360Context *s = ctx->priv; - 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; + s->flat_range[0] = tanf(FFMIN(s->h_fov, 359.f) * M_PI / 720.f); + s->flat_range[1] = tanf(FFMIN(s->v_fov, 359.f) * M_PI / 720.f); return 0; } @@ -1990,11 +1987,8 @@ static int prepare_flat_out(AVFilterContext *ctx) { V360Context *s = ctx->priv; - 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] = tanf(h_angle); - s->flat_range[1] = tanf(v_angle); + s->flat_range[0] = tanf(0.5f * s->h_fov * M_PI / 180.f); + s->flat_range[1] = tanf(0.5f * s->v_fov * M_PI / 180.f); return 0; } |