[FFmpeg-devel] [PATCH v2 3/6] avfilter/vf_showinfo: add support for 3D Reference Displays Information side data

James Almer jamrial at gmail.com
Tue Feb 4 00:35:43 EET 2025


Signed-off-by: James Almer <jamrial at gmail.com>
---
No changes since last version.

 libavfilter/vf_showinfo.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index 8109ca7fce..29700f5d68 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -38,6 +38,7 @@
 #include "libavutil/pixdesc.h"
 #include "libavutil/spherical.h"
 #include "libavutil/stereo3d.h"
+#include "libavutil/ref_displays_info.h"
 #include "libavutil/timestamp.h"
 #include "libavutil/timecode.h"
 #include "libavutil/mastering_display_metadata.h"
@@ -152,6 +153,13 @@ static void dump_roi(AVFilterContext *ctx, const AVFrameSideData *sd)
     }
 }
 
+static void dump_ref_displays_info(AVFilterContext *ctx, const AVFrameSideData *sd)
+{
+    const AV3DReferenceDisplaysInfo *rdi = (const AV3DReferenceDisplaysInfo *)sd->data;
+
+    av_log(ctx, AV_LOG_INFO, "number of reference displays: %u", rdi->num_ref_displays);
+}
+
 static void dump_detection_bbox(AVFilterContext *ctx, const AVFrameSideData *sd)
 {
     int nb_bboxes;
@@ -860,6 +868,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
         case AV_FRAME_DATA_VIEW_ID:
             av_log(ctx, AV_LOG_INFO, "view id: %d\n", *(int*)sd->data);
             break;
+        case AV_FRAME_DATA_3D_REFERENCE_DISPLAYS:
+            dump_ref_displays_info(ctx, sd);
+            break;
         default:
             if (name)
                 av_log(ctx, AV_LOG_INFO,
-- 
2.48.1



More information about the ffmpeg-devel mailing list