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

Daniel Playfair Cal daniel.playfair.cal at gmail.com
Sun Mar 21 14:44:12 EET 2021


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 at gmail.com>
---
 libavfilter/vf_v360.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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:
-- 
2.31.0



More information about the ffmpeg-devel mailing list