[FFmpeg-cvslog] avfilter/vf_v360: remove uneeded array element
Paul B Mahol
git at videolan.org
Fri Sep 20 22:42:43 EEST 2019
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Sep 20 21:41:12 2019 +0200| [8b58d9cb474c81da83157e858e2a115c6cc480cd] | committer: Paul B Mahol
avfilter/vf_v360: remove uneeded array element
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b58d9cb474c81da83157e858e2a115c6cc480cd
---
libavfilter/v360.h | 2 +-
libavfilter/vf_v360.c | 12 +++++-------
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/libavfilter/v360.h b/libavfilter/v360.h
index 50ed91ed89..70b30264a0 100644
--- a/libavfilter/v360.h
+++ b/libavfilter/v360.h
@@ -121,7 +121,7 @@ typedef struct V360Context {
int in_transpose, out_transpose;
float h_fov, v_fov, d_fov;
- float flat_range[3];
+ float flat_range[2];
float rot_mat[3][3];
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index 6f1359d2c8..11fdd0061f 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -1916,9 +1916,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] = tanf(h_angle);
- s->flat_range[1] = tanf(v_angle);
- s->flat_range[2] = -1.f;
+ s->flat_range[0] = tanf(h_angle);
+ s->flat_range[1] = tanf(v_angle);
return 0;
}
@@ -1939,11 +1938,10 @@ static void flat_to_xyz(const V360Context *s,
{
const float l_x = s->flat_range[0] * (2.f * i / width - 1.f);
const float l_y = -s->flat_range[1] * (2.f * j / height - 1.f);
- const float l_z = s->flat_range[2];
- vec[0] = l_x;
- vec[1] = l_y;
- vec[2] = l_z;
+ vec[0] = l_x;
+ vec[1] = l_y;
+ vec[2] = -1.f;
normalize_vector(vec);
}
More information about the ffmpeg-cvslog
mailing list