Commit 9578a0a3 authored by Felix Abecassis's avatar Felix Abecassis Committed by Jean-Baptiste Kempf

core: add 3D stereo information to video_format_t

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent f7db69dc
......@@ -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] */
......
......@@ -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;
......
......@@ -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 ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment