[vlc-devel] [PATCH] picture: move the multiview left eye flag in the pictures
Alexandre Janniaux
ajanni at videolabs.io
Thu Oct 22 12:51:21 CEST 2020
Hi,
On Thu, Oct 22, 2020 at 10:27:08AM +0200, Steve Lhomme wrote:
> On 2020-10-22 10:18, Steve Lhomme wrote:
> > This flag flips on every picture. It should be set in the video_format_t should
> > be stable when only this value changes.
>
> It should *not* be set in the video_format_t *which* should be stable when
> only this value changes.
LGTM with the typo fix, it's quite similar to top_field_first. We could
probably move to an enum in the future though.
Regards,
--
Alexandre Janiaux
Videolabs
> > ---
> > 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 841fa05bf60..404a937d833 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 280471db953..9fa7b46911d 100644
> > --- a/include/vlc_picture.h
> > +++ b/include/vlc_picture.h
> > @@ -146,6 +146,7 @@ struct picture_t
> > * Those properties can be changed by the decoder
> > * @{
> > */
> > + bool b_multiview_left_eye; /**< left eye or right eye in multiview */
> > bool b_progressive; /**< is it a progressive frame? */
> > bool b_top_field_first; /**< which field is first */
> > unsigned int i_nb_fields; /**< number of displayed fields */
> > diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
> > index 21626c62921..990e9e39b9f 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
> > --
> > 2.26.2
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> >
> _______________________________________________
> 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