summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-09-30 00:05:02 +0200
committerPaul B Mahol <onemda@gmail.com>2020-09-30 00:09:22 +0200
commit23d075416544f55a605b1818a8491c818312a62d (patch)
tree52fee962f2bb89e3798fcc82ada055f8e894177c /libavfilter
parenta96743a05c544d0fc0a41f301eaf3a2a839b61ba (diff)
avfilter/vf_v360: stop using floats variables in xyz_to_octahedron
Use proper integer variables.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_v360.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index ed84c05fcc..1266ddc3b6 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -3725,10 +3725,10 @@ static int octahedron_to_xyz(const V360Context *s,
int i, int j, int width, int height,
float *vec)
{
- float x = ((i + 0.5f) / width) * 2.f - 1.f;
- float y = ((j + 0.5f) / height) * 2.f - 1.f;
- float ax = fabsf(x);
- float ay = fabsf(y);
+ const float x = ((i + 0.5f) / width) * 2.f - 1.f;
+ const float y = ((j + 0.5f) / height) * 2.f - 1.f;
+ const float ax = fabsf(x);
+ const float ay = fabsf(y);
vec[2] = 1.f - (ax + ay);
if (ax + ay > 1.f) {
@@ -3788,8 +3788,8 @@ static int xyz_to_octahedron(const V360Context *s,
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
- us[i][j] = av_clip(uf + j - 1, 0, width - 1);
- vs[i][j] = av_clip(vf + i - 1, 0, height - 1);
+ us[i][j] = av_clip(ui + j - 1, 0, width - 1);
+ vs[i][j] = av_clip(vi + i - 1, 0, height - 1);
}
}