History

avfilter/vf_v360: remove uneeded array element

Paul B Mahol committed 7 years ago

Commit 8b58d9c1 parent 5c93a0a2 files · +6 −8Browse files

Unified · Split

2 files
  1. libavfilter/v360.h +1 −1
  2. libavfilter/vf_v360.c +5 −7
libavfilter/v360.h+1−1
@@ -121,7 +121,7 @@ typedef struct V360Context { · 120 unmodified lines
121 int in_transpose, out_transpose;121 int in_transpose, out_transpose;
122 122
123 float h_fov, v_fov, d_fov;123 float h_fov, v_fov, d_fov;
124 float flat_range[3];124 float flat_range[2];
125 125
126 float rot_mat[3][3];126 float rot_mat[3][3];
127 127
libavfilter/vf_v360.c+5−7
@@ -1916,9 +1916,8 @@ static int prepare_flat_out(AVFilterContext *ctx) · 1915 unmodified lines
1916 const float h_angle = 0.5f * s->h_fov * M_PI / 180.f;1916 const float h_angle = 0.5f * s->h_fov * M_PI / 180.f;
1917 const float v_angle = 0.5f * s->v_fov * M_PI / 180.f;1917 const float v_angle = 0.5f * s->v_fov * M_PI / 180.f;
1918 1918
1919 s->flat_range[0] = tanf(h_angle);1919 s->flat_range[0] = tanf(h_angle);
1920 s->flat_range[1] = tanf(v_angle);1920 s->flat_range[1] = tanf(v_angle);
1921 s->flat_range[2] = -1.f;
1922 1921
1923 return 0;1922 return 0;
1924}1923}
@@ -1939,11 +1938,10 @@ static void flat_to_xyz(const V360Context *s, · 14 unmodified lines
1939{1938{
1940 const float l_x = s->flat_range[0] * (2.f * i / width - 1.f);1939 const float l_x = s->flat_range[0] * (2.f * i / width - 1.f);
1941 const float l_y = -s->flat_range[1] * (2.f * j / height - 1.f);1940 const float l_y = -s->flat_range[1] * (2.f * j / height - 1.f);
1942 const float l_z = s->flat_range[2];
1943 1941
1944 vec[0] = l_x;1942 vec[0] = l_x;
1945 vec[1] = l_y;1943 vec[1] = l_y;
1946 vec[2] = l_z;1944 vec[2] = -1.f;
1947 1945
1948 normalize_vector(vec);1946 normalize_vector(vec);
1949}1947}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t