summaryrefslogtreecommitdiff
path: root/libavfilter/vf_v360.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-01-23 11:16:13 +0100
committerPaul B Mahol <onemda@gmail.com>2020-01-23 11:20:18 +0100
commitd033f403d67bedfd35d39a37561ef7af98f5a080 (patch)
tree4e70bc13f0e022706e04041edd44b1d950dfa3a1 /libavfilter/vf_v360.c
parent05d3d09cf5fe5e1aec4ba6107a2da543962d6b6a (diff)
avfilter/vf_v360: support input flips for tetrahedron format
Diffstat (limited to 'libavfilter/vf_v360.c')
-rw-r--r--libavfilter/vf_v360.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index 39dd07af6e..cd7ad9be04 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -2647,13 +2647,13 @@ static void xyz_to_tetrahedron(const V360Context *s,
y = vec[1] / d;
z = -vec[2] / d;
- vf = 0.5f - y * 0.5f;
+ vf = 0.5f - y * 0.5f * s->input_mirror_modifier[1];
if ((x + y >= 0.f && y + z >= 0.f && -z - x <= 0.f) ||
(x + y <= 0.f && -y + z >= 0.f && z - x >= 0.f)) {
- uf = 0.25f * x + 0.25f;
+ uf = 0.25f * x * s->input_mirror_modifier[0] + 0.25f;
} else {
- uf = 0.75f - 0.25f * x;
+ uf = 0.75f - 0.25f * x * s->input_mirror_modifier[0];
}
uf *= width;