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

James Almer jamrial at gmail.com
Fri Jan 31 16:00:19 EET 2025


Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavfilter/vf_showinfo.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index 8109ca7fce..c706d00c96 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/tdrdi.h"
 #include "libavutil/timestamp.h"
 #include "libavutil/timecode.h"
 #include "libavutil/mastering_display_metadata.h"
@@ -152,6 +153,14 @@ static void dump_roi(AVFilterContext *ctx, const AVFrameSideData *sd)
     }
 }
 
+static void dump_tdrdi(AVFilterContext *ctx, const AVFrameSideData *sd)
+{
+    const AV3DReferenceDisplaysInfo *tdrdi = (const AV3DReferenceDisplaysInfo *)sd->data;
+
+
+    av_log(ctx, AV_LOG_INFO, "number of reference displays: %u", tdrdi->num_ref_displays);
+}
+
 static void dump_detection_bbox(AVFilterContext *ctx, const AVFrameSideData *sd)
 {
     int nb_bboxes;
@@ -860,6 +869,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_tdrdi(ctx, sd);
+            break;
         default:
             if (name)
                 av_log(ctx, AV_LOG_INFO,
-- 
2.48.1



More information about the ffmpeg-devel mailing list