[FFmpeg-devel] [PATCH] vf_v360: stop doubling width for fisheye projection

Daniel Playfair Cal daniel.playfair.cal at gmail.com
Fri Mar 19 11:46:04 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 94473cd5b3..3d01df4cf3 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