diff mbox series

[FFmpeg-devel,1/5] avfilter/vf_showinfo: print more Stereo 3D fields

Message ID 20240626141014.6442-1-jamrial@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/5] avfilter/vf_showinfo: print more Stereo 3D fields | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

James Almer June 26, 2024, 2:10 p.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavfilter/vf_showinfo.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

James Almer June 28, 2024, 2:50 p.m. UTC | #1
On 6/26/2024 11:10 AM, James Almer wrote:
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>   libavfilter/vf_showinfo.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
> index 28d8ea76e9..9790c202f5 100644
> --- a/libavfilter/vf_showinfo.c
> +++ b/libavfilter/vf_showinfo.c
> @@ -121,6 +121,16 @@ static void dump_stereo3d(AVFilterContext *ctx, const AVFrameSideData *sd)
>   
>       if (stereo->flags & AV_STEREO3D_FLAG_INVERT)
>           av_log(ctx, AV_LOG_INFO, " (inverted)");
> +
> +    av_log(ctx, AV_LOG_INFO, ", view - %s, primary_eye - %s", av_stereo3d_view_name(stereo->view),
> +                                                              av_stereo3d_primary_eye_name(stereo->primary_eye));
> +    if (stereo->baseline)
> +        av_log(ctx, AV_LOG_INFO, ", baseline: %"PRIu32"", stereo->baseline);
> +    if (stereo->horizontal_disparity_adjustment.num && stereo->horizontal_disparity_adjustment.den)
> +        av_log(ctx, AV_LOG_INFO, ", horizontal_disparity_adjustment: %0.4f",
> +               av_q2d(stereo->horizontal_disparity_adjustment));
> +    if (stereo->horizontal_field_of_view.num && stereo->horizontal_field_of_view.den)
> +        av_log(ctx, AV_LOG_INFO, ", horizontal_field_of_view: %0.3f", av_q2d(stereo->horizontal_field_of_view));
>   }
>   
>   static void dump_s12m_timecode(AVFilterContext *ctx, AVRational frame_rate, const AVFrameSideData *sd)

Will apply set.
diff mbox series

Patch

diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index 28d8ea76e9..9790c202f5 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -121,6 +121,16 @@  static void dump_stereo3d(AVFilterContext *ctx, const AVFrameSideData *sd)
 
     if (stereo->flags & AV_STEREO3D_FLAG_INVERT)
         av_log(ctx, AV_LOG_INFO, " (inverted)");
+
+    av_log(ctx, AV_LOG_INFO, ", view - %s, primary_eye - %s", av_stereo3d_view_name(stereo->view),
+                                                              av_stereo3d_primary_eye_name(stereo->primary_eye));
+    if (stereo->baseline)
+        av_log(ctx, AV_LOG_INFO, ", baseline: %"PRIu32"", stereo->baseline);
+    if (stereo->horizontal_disparity_adjustment.num && stereo->horizontal_disparity_adjustment.den)
+        av_log(ctx, AV_LOG_INFO, ", horizontal_disparity_adjustment: %0.4f",
+               av_q2d(stereo->horizontal_disparity_adjustment));
+    if (stereo->horizontal_field_of_view.num && stereo->horizontal_field_of_view.den)
+        av_log(ctx, AV_LOG_INFO, ", horizontal_field_of_view: %0.3f", av_q2d(stereo->horizontal_field_of_view));
 }
 
 static void dump_s12m_timecode(AVFilterContext *ctx, AVRational frame_rate, const AVFrameSideData *sd)