[vlc-commits] picture: move the multiview left eye flag in the pictures

Steve Lhomme git at videolan.org
Fri Oct 23 13:02:25 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Oct 22 10:10:48 2020 +0200| [d1edf13b2f623e4afd513d99069b1b136bff8394] | committer: Steve Lhomme

picture: move the multiview left eye flag in the pictures

This flag flips on every picture. It should not be set in the video_format_t
which should be stable when only this value changes.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d1edf13b2f623e4afd513d99069b1b136bff8394
---

 include/vlc_es.h              | 1 -
 include/vlc_picture.h         | 1 +
 modules/codec/avcodec/video.c | 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/vlc_es.h b/include/vlc_es.h
index 841fa05bf6..404a937d83 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -375,7 +375,6 @@ struct video_format_t
 
     video_multiview_mode_t multiview_mode;        /** Multiview mode, 2D, 3D */
     bool b_multiview_right_eye_first;   /** Multiview left or right eye first*/
-    bool b_multiview_left_eye;
 
     video_projection_mode_t projection_mode;            /**< projection mode */
     vlc_viewpoint_t pose;
diff --git a/include/vlc_picture.h b/include/vlc_picture.h
index 02fe7ea6a2..acc856d8f5 100644
--- a/include/vlc_picture.h
+++ b/include/vlc_picture.h
@@ -148,6 +148,7 @@ struct picture_t
      */
     bool            b_progressive;          /**< is it a progressive frame? */
     bool            b_top_field_first;             /**< which field is first */
+    bool            b_multiview_left_eye; /**< left eye or right eye in multiview */
     unsigned int    i_nb_fields;                  /**< number of displayed fields */
     picture_context_t *context;      /**< video format-specific data pointer */
     /**@}*/
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 4c5943d22e..c17954228c 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -943,7 +943,7 @@ static int DecodeSidedata( decoder_t *p_dec, const AVFrame *frame, picture_t *p_
         }
 #if LIBAVUTIL_VERSION_CHECK( 56, 7, 0, 4, 100 )
         p_pic->format.b_multiview_right_eye_first = stereo_data->flags & AV_STEREO3D_FLAG_INVERT;
-        p_pic->format.b_multiview_left_eye = (stereo_data->view == AV_STEREO3D_VIEW_LEFT);
+        p_pic->b_multiview_left_eye = (stereo_data->view == AV_STEREO3D_VIEW_LEFT);
 
         p_dec->fmt_out.video.b_multiview_right_eye_first = p_pic->format.b_multiview_right_eye_first;
 #endif



More information about the vlc-commits mailing list