[vlc-devel] [PATCH] picture: move the multiview left eye flag in the pictures
Steve Lhomme
robux4 at ycbcr.xyz
Fri Oct 23 06:50:35 CEST 2020
On 2020-10-22 17:25, Rémi Denis-Courmont wrote:
> Le torstaina 22. lokakuuta 2020, 11.18.40 EEST Steve Lhomme a écrit :
>> This flag flips on every picture. It should be set in the video_format_t
>> should be stable when only this value changes.
>> ---
>> 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 */
>
> I would add it after the existing booleans to avoid gratuitious ABI breaks.
If bool was a bitfield that could make a difference but it is not. So
unless it's put at the very end of the structure, the ABI breakage is
unavoidable.
>> 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
>
>
> --
> 雷米‧德尼-库尔蒙
> http://www.remlab.net/
>
>
>
> _______________________________________________
> 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