summaryrefslogtreecommitdiff
path: root/libavfilter/vf_v360.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-09-21 10:31:59 +0200
committerPaul B Mahol <onemda@gmail.com>2019-09-21 10:31:59 +0200
commitde1d6cb34ffea4867b2c9b0b860f5a3e8177ac8e (patch)
tree08f0e9c4084555156c267d86c97b1678b9685443 /libavfilter/vf_v360.c
parent2f87c9f646f36763be186e53186b813f821494c1 (diff)
avfilter/vf_v360: fix small artifacts between corners in EAC format
Diffstat (limited to 'libavfilter/vf_v360.c')
-rw-r--r--libavfilter/vf_v360.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index 11fdd0061f..8af7985435 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -1768,8 +1768,8 @@ static void eac_to_xyz(const V360Context *s,
float l_x, l_y, l_z;
- float uf = (float)i / width;
- float vf = (float)j / height;
+ float uf = (i + 0.5f) / width;
+ float vf = (j + 0.5f) / height;
// EAC has 2-pixel padding on faces except between faces on the same row
// Padding pixels seems not to be stretched with tangent as regular pixels
@@ -1888,6 +1888,9 @@ static void xyz_to_eac(const V360Context *s,
uf *= width;
vf *= height;
+ uf -= 0.5f;
+ vf -= 0.5f;
+
ui = floorf(uf);
vi = floorf(vf);