diff mbox series

[FFmpeg-devel,2/4] avfilter/vf_v360: stop doubling width for fisheye

Message ID 20210321124414.1223626-2-daniel.playfair.cal@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/4] avfilter/vf_v360: fix fov_from_hfov for fisheye
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Daniel Playfair Cal March 21, 2021, 12:44 p.m. UTC
This resulted in the default aspect ratio being doubled relative to most
input formats like flat/rectilinear. After this patch the default aspect
ratio is the same as a rectilinear input.

Signed-off-by: Daniel Playfair Cal <daniel.playfair.cal@gmail.com>
---
 libavfilter/vf_v360.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index 425f04da94..be886e9bb1 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -4365,7 +4365,7 @@  static int config_output(AVFilterLink *outlink)
     case FISHEYE:
         s->in_transform = xyz_to_fisheye;
         err = prepare_fisheye_in(ctx);
-        wf = w * 2;
+        wf = w;
         hf = h;
         break;
     case PANNINI:
@@ -4513,7 +4513,7 @@  static int config_output(AVFilterLink *outlink)
     case FISHEYE:
         s->out_transform = fisheye_to_xyz;
         prepare_out = prepare_fisheye_out;
-        w = lrintf(wf * 0.5f);
+        w = lrintf(wf);
         h = lrintf(hf);
         break;
     case PANNINI: