[vlc-commits] core: add 3D stereo information to video_format_t
Felix Abecassis
git at videolan.org
Sun May 29 10:31:49 CEST 2016
vlc | branch: master | Felix Abecassis <felix.abecassis at gmail.com> | Tue Sep 9 19:03:20 2014 +0200| [9578a0a3908ff2541dee27d6cb018ffaf295b6e8] | committer: Jean-Baptiste Kempf
core: add 3D stereo information to video_format_t
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9578a0a3908ff2541dee27d6cb018ffaf295b6e8
---
include/vlc_es.h | 26 ++++++++++++++++++++++++++
src/input/decoder.c | 3 ++-
src/misc/es_format.c | 3 +++
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/include/vlc_es.h b/include/vlc_es.h
index e0957bb..a933b11 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -192,6 +192,30 @@ typedef enum video_transform_t
TRANSFORM_ANTI_TRANSPOSE = ORIENT_ANTI_TRANSPOSED
} video_transform_t;
+typedef enum video_multiview_mode_t
+{
+ /* No stereoscopy: 2D picture. */
+ MULTIVIEW_2D = 0,
+
+ /* Side-by-side with left eye first. */
+ MULTIVIEW_STEREO_SBS,
+
+ /* Top-bottom with left eye first. */
+ MULTIVIEW_STEREO_TB,
+
+ /* Row sequential with left eye first. */
+ MULTIVIEW_STEREO_ROW,
+
+ /* Column sequential with left eye first. */
+ MULTIVIEW_STEREO_COL,
+
+ /* Frame sequential with left eye first. */
+ MULTIVIEW_STEREO_FRAME,
+
+ /* Checkerboard pattern with left eye first. */
+ MULTIVIEW_STEREO_CHECKERBOARD,
+} video_multiview_mode_t;
+
/**
* Video projection mode.
*/
@@ -288,6 +312,8 @@ struct video_format_t
bool b_color_range_full; /**< 0-255 instead of 16-235 */
video_chroma_location_t chroma_location; /**< YCbCr chroma location */
+ video_multiview_mode_t multiview_mode; /** Multiview mode, 2D, 3D */
+
video_projection_mode_t projection_mode; /**< projection mode */
float f_pose_yaw_degrees; /**< view point yaw in degrees ]-180;180] */
float f_pose_pitch_degrees; /**< view point pitch in degrees ]-90;90] */
diff --git a/src/input/decoder.c b/src/input/decoder.c
index bd966c1..2df09a9 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -328,7 +328,8 @@ static int vout_update_format( decoder_t *p_dec )
|| p_dec->fmt_out.i_codec != p_owner->fmt.video.i_chroma
|| (int64_t)p_dec->fmt_out.video.i_sar_num * p_owner->fmt.video.i_sar_den !=
(int64_t)p_dec->fmt_out.video.i_sar_den * p_owner->fmt.video.i_sar_num ||
- p_dec->fmt_out.video.orientation != p_owner->fmt.video.orientation )
+ p_dec->fmt_out.video.orientation != p_owner->fmt.video.orientation ||
+ p_dec->fmt_out.video.multiview_mode != p_owner->fmt.video.multiview_mode )
{
vout_thread_t *p_vout;
diff --git a/src/misc/es_format.c b/src/misc/es_format.c
index 0375767..b4090e9 100644
--- a/src/misc/es_format.c
+++ b/src/misc/es_format.c
@@ -395,6 +395,9 @@ bool video_format_IsSimilar( const video_format_t *f1,
if( f1->orientation != f2->orientation)
return false;
+ if( f1->multiview_mode!= f2->multiview_mode )
+ return false;
+
if( f1->i_chroma == VLC_CODEC_RGB15 ||
f1->i_chroma == VLC_CODEC_RGB16 ||
f1->i_chroma == VLC_CODEC_RGB24 ||
More information about the vlc-commits
mailing list