[vlc-devel] [RFC PATCH 2/2] core: add 3D stereo information to video_format_t
Tristan Matthews
tmatth at videolan.org
Fri May 27 19:15:55 CEST 2016
On Fri, May 27, 2016 at 9:18 AM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> From: Felix Abecassis <felix.abecassis at gmail.com>
>
> Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> ---
> 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 2c6fe57..9cf5e0e 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_ROW,
> +
> + /* Column sequential with left eye first. */
> + MULTIVIEW_COL,
> +
> + /* Frame sequential with left eye first. */
> + MULTIVIEW_FRAME,
> +
> + /* Checkerboard pattern with left eye first. */
> + MULTIVIEW_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 */
> int32_t i_pose_yaw_degrees; /**< view point yaw in 16.16 fixed point */
> int32_t i_pose_pitch_degrees; /**< view point pitch in 16.16 fixed point */
> 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 )
nit: whitespace
> + return false;
> +
> if( f1->i_chroma == VLC_CODEC_RGB15 ||
> f1->i_chroma == VLC_CODEC_RGB16 ||
> f1->i_chroma == VLC_CODEC_RGB24 ||
> --
> 2.8.1.369.geae769a
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list