packetizer: hevc: set multiview
authorFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 26 Jul 2017 20:08:36 +0000 (22:08 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 26 Jul 2017 22:02:47 +0000 (00:02 +0200)
modules/packetizer/hevc.c

index 3f7a36f..73e8bc6 100644 (file)
@@ -856,6 +856,32 @@ static bool ParseSEICallback( const hxxx_sei_data_t *p_sei_data, void *cbdata )
                                                        p_sei_data->itu_t35.u.cc.i_data );
             }
         } break;
+        case HXXX_SEI_FRAME_PACKING_ARRANGEMENT:
+        {
+            if( p_dec->fmt_in.video.multiview_mode == MULTIVIEW_2D )
+            {
+                video_multiview_mode_t mode;
+                switch( p_sei_data->frame_packing.type )
+                {
+                    case FRAME_PACKING_INTERLEAVED_CHECKERBOARD:
+                        mode = MULTIVIEW_STEREO_CHECKERBOARD; break;
+                    case FRAME_PACKING_INTERLEAVED_COLUMN:
+                        mode = MULTIVIEW_STEREO_COL; break;
+                    case FRAME_PACKING_INTERLEAVED_ROW:
+                        mode = MULTIVIEW_STEREO_ROW; break;
+                    case FRAME_PACKING_SIDE_BY_SIDE:
+                        mode = MULTIVIEW_STEREO_SBS; break;
+                    case FRAME_PACKING_TOP_BOTTOM:
+                        mode = MULTIVIEW_STEREO_TB; break;
+                    case FRAME_PACKING_TEMPORAL:
+                        mode = MULTIVIEW_STEREO_FRAME; break;
+                    case FRAME_PACKING_TILED:
+                    default:
+                        mode = MULTIVIEW_2D; break;
+                }
+                p_dec->fmt_out.video.multiview_mode = mode;
+            }
+        } break;
         case HXXX_SEI_MASTERING_DISPLAY_COLOUR_VOLUME:
         {
             video_format_t *p_fmt = &p_dec->fmt_out.video;