[vlc-commits] packetizer: mpegvideo: parse/set multiview
Francois Cartegnie
git at videolan.org
Thu Jul 27 00:03:35 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jul 26 22:55:51 2017 +0200| [d23e9e287c468e3c32021e3007203606e7c368e7] | committer: Francois Cartegnie
packetizer: mpegvideo: parse/set multiview
untested
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d23e9e287c468e3c32021e3007203606e7c368e7
---
modules/packetizer/mpegvideo.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/modules/packetizer/mpegvideo.c b/modules/packetizer/mpegvideo.c
index e4c9cbc8d0..a116839193 100644
--- a/modules/packetizer/mpegvideo.c
+++ b/modules/packetizer/mpegvideo.c
@@ -817,8 +817,27 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag )
}
}
- else if( p_frag->p_buffer[3] == 0xb2 && p_frag->i_buffer > 4 )
+ else if( p_frag->p_buffer[3] == 0xb2 && p_frag->i_buffer > 8 )
{
+ /* Frame Packing extension identifier as H262 2012 Amd4 Annex L */
+ if( !memcmp( &p_frag->p_buffer[4], "JP3D", 4 ) &&
+ p_frag->i_buffer > 11 && p_frag->p_buffer[8] == 0x03 &&
+ p_dec->fmt_in.video.multiview_mode == MULTIVIEW_2D )
+ {
+ video_multiview_mode_t mode;
+ switch( p_frag->p_buffer[9] & 0x7F )
+ {
+ case 0x03:
+ mode = MULTIVIEW_STEREO_SBS; break;
+ case 0x04:
+ mode = MULTIVIEW_STEREO_TB; break;
+ case 0x08:
+ default:
+ mode = MULTIVIEW_2D; break;
+ }
+ p_dec->fmt_out.video.multiview_mode = mode;
+ }
+ else
cc_ProbeAndExtract( &p_sys->cc, p_sys->i_top_field_first,
&p_frag->p_buffer[4], p_frag->i_buffer - 4 );
}
More information about the vlc-commits
mailing list