[vlc-devel] [PATCH 8/9] mkv: parse the StereoMode element on video tracks

Felix Abecassis felix.abecassis at gmail.com
Sat Aug 9 16:04:54 CEST 2014


2014-08-08 20:42 GMT+02:00 Jean-Baptiste Kempf <jb at videolan.org>:
> So, we're missing 4, 5 (checkboard), 10, 12 (anaglyph), 13,  14 (laced) modes ?
>

Exactly.
The checkerboard mode has been omitted from this WIP patch set but is
not difficult to add.
The anaglyph mode will require reusing the existing video filter.
I'm not sure of how to handle frame sequential modes correctly,
dropping a single picture in such a mode would be catastrophic so this
should be avoided at all costs.

> On 08 Aug, Felix Abecassis wrote :
>> ---
>>  modules/demux/mkv/matroska_segment_parse.cpp | 38 +++++++++++++++++++++++++++-
>>  1 file changed, 37 insertions(+), 1 deletion(-)
>>
>> diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
>> index 975b053..336f8df 100644
>> --- a/modules/demux/mkv/matroska_segment_parse.cpp
>> +++ b/modules/demux/mkv/matroska_segment_parse.cpp
>> @@ -545,7 +545,43 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
>>                  {
>>                      KaxVideoStereoMode &stereo = *(KaxVideoStereoMode*)l;
>>
>> -                    msg_Dbg( &sys.demuxer, "|   |   |   |   + Track Video Stereo Mode=%u", uint8( stereo ) );
>> +                    int stereo_mode = uint8( stereo );
>> +                    msg_Dbg( &sys.demuxer, "|   |   |   |   + Track Video Stereo Mode=%u", stereo_mode );
>> +
>> +                    stereo3d_format_t format = {};
>> +                    switch (stereo_mode)
>> +                    {
>> +                    case 11:
>> +                        format.flags = VLC_STEREO3D_SWAP_EYES;
>> +                    case 1:
>> +                        format.mode = VLC_STEREO3D_SBS;
>> +                        break;
>> +
>> +                    case 2:
>> +                        format.flags = VLC_STEREO3D_SWAP_EYES;
>> +                    case 3:
>> +                        format.mode = VLC_STEREO3D_TB;
>> +                        break;
>> +
>> +                    case 6:
>> +                        format.flags = VLC_STEREO3D_SWAP_EYES;
>> +                    case 7:
>> +                        format.mode = VLC_STEREO3D_ROW;
>> +                        break;
>> +
>> +                    case 8:
>> +                        format.flags = VLC_STEREO3D_SWAP_EYES;
>> +                    case 9:
>> +                        format.mode = VLC_STEREO3D_COL;
>> +                        break;
>> +
>> +                    default:
>> +                        format.mode = VLC_STEREO3D_2D;
>> +                        break;
>> +                    }
>> +
>> +                    tk->fmt.video.stereo_format = format;
>> +
>>                  }
>>                  else if( MKV_IS_ID( l, KaxVideoPixelWidth ) )
>>                  {
>> --
>> 1.9.1
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>
> --
> With my kindest regards,
>
> --
> Jean-Baptiste Kempf
> http://www.jbkempf.com/ - +33 672 704 734
> Sent from my Electronic Device
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



-- 
Félix Abecassis
http://felix.abecassis.me



More information about the vlc-devel mailing list