History

avfilter/vf_v360: remove uneeded array element

Paul B Mahol committed 7 years ago

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

Showing the changes to libavfilter (2 of 2 files). Show all

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
121121 int in_transpose, out_transpose;
122122
123123 float h_fov, v_fov, d_fov;
124− float flat_range[3];
124+ float flat_range[2];
125125
126126 float rot_mat[3][3];
127127
libavfilter/vf_v360.c+5−7
@@ -1916,9 +1916,8 @@ static int prepare_flat_out(AVFilterContext *ctx) · 1915 unmodified lines
19161916 const float h_angle = 0.5f * s->h_fov * M_PI / 180.f;
19171917 const float v_angle = 0.5f * s->v_fov * M_PI / 180.f;
19181918
1919− s->flat_range[0] = tanf(h_angle);
1920− s->flat_range[1] = tanf(v_angle);
1921− s->flat_range[2] = -1.f;
1919+ s->flat_range[0] = tanf(h_angle);
1920+ s->flat_range[1] = tanf(v_angle);
19221921
19231922 return 0;
19241923 }
@@ -1939,11 +1938,10 @@ static void flat_to_xyz(const V360Context *s, · 14 unmodified lines
19391938 {
19401939 const float l_x = s->flat_range[0] * (2.f * i / width - 1.f);
19411940 const float l_y = -s->flat_range[1] * (2.f * j / height - 1.f);
1942− const float l_z = s->flat_range[2];
19431941
1944− vec[0] = l_x;
1945− vec[1] = l_y;
1946− vec[2] = l_z;
1942+ vec[0] = l_x;
1943+ vec[1] = l_y;
1944+ vec[2] = -1.f;
19471945
19481946 normalize_vector(vec);
19491947 }

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