[FFmpeg-devel] [PATCH 5/8 v2] fftools/ffprobe: infer AVStereo3D.view when it's not explicit
James Almer
jamrial at gmail.com
Sat Jun 22 18:31:19 EEST 2024
Signed-off-by: James Almer <jamrial at gmail.com>
---
Better infer it than not printing it, following the logic from 5140d8334e3b.
fftools/ffprobe.c | 6 +++++-
tests/ref/fate/matroska-stereo_mode | 8 ++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index d7ba980ff9..397ea848fc 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -2542,9 +2542,13 @@ static void print_pkt_side_data(WriterContext *w,
print_int("rotation", rotation);
} else if (sd->type == AV_PKT_DATA_STEREO3D) {
const AVStereo3D *stereo = (AVStereo3D *)sd->data;
+ enum AVStereo3DView view = stereo->view;
print_str("type", av_stereo3d_type_name(stereo->type));
print_int("inverted", !!(stereo->flags & AV_STEREO3D_FLAG_INVERT));
- print_str("view", av_stereo3d_view_name(stereo->view));
+ if (stereo->type != AV_STEREO3D_VIEW)
+ view = (stereo->type == AV_STEREO3D_2D) ?
+ AV_STEREO3D_VIEW_MONO : AV_STEREO3D_VIEW_PACKED;
+ print_str("view", av_stereo3d_view_name(view));
print_str("primary_eye", av_stereo3d_primary_eye_name(stereo->primary_eye));
print_int("baseline", stereo->baseline);
print_q("horizontal_disparity_adjustment", stereo->horizontal_disparity_adjustment, '/');
diff --git a/tests/ref/fate/matroska-stereo_mode b/tests/ref/fate/matroska-stereo_mode
index e35425ae76..26c325b20e 100644
--- a/tests/ref/fate/matroska-stereo_mode
+++ b/tests/ref/fate/matroska-stereo_mode
@@ -132,7 +132,7 @@ TAG:DURATION=00:00:10.000000000
side_data_type=Stereo 3D
type=side by side
inverted=0
-view=monoscopic
+view=packed
primary_eye=none
baseline=0
horizontal_disparity_adjustment=0/1
@@ -152,7 +152,7 @@ TAG:DURATION=00:00:10.000000000
side_data_type=Stereo 3D
type=top and bottom
inverted=1
-view=monoscopic
+view=packed
primary_eye=none
baseline=0
horizontal_disparity_adjustment=0/1
@@ -170,7 +170,7 @@ TAG:DURATION=00:00:10.000000000
side_data_type=Stereo 3D
type=interleaved lines
inverted=1
-view=monoscopic
+view=packed
primary_eye=none
baseline=0
horizontal_disparity_adjustment=0/1
@@ -189,7 +189,7 @@ TAG:DURATION=00:00:10.000000000
side_data_type=Stereo 3D
type=interleaved columns
inverted=1
-view=monoscopic
+view=packed
primary_eye=none
baseline=0
horizontal_disparity_adjustment=0/1
--
2.45.2
More information about the ffmpeg-devel
mailing list