Index: /branches/SHM-dev/cfg/encoder_intra_main.cfg
===================================================================
--- /branches/SHM-dev/cfg/encoder_intra_main.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/encoder_intra_main.cfg	(revision 941)
@@ -4,5 +4,12 @@
 
 #======== Profile/Level ================
-Profile                       : main
+#Profile                      : main
+NumProfileTierLevel           : 3
+#Profile for the whole bitstream
+Profile0                      : main        
+#Profile for the base layer --- this will be ignored when BL is not HEVC
+Profile1                      : main
+#Profile for the enhancement layer
+Profile2                      : main
 
 #======== Unit definition ================
Index: /branches/SHM-dev/cfg/encoder_intra_main10.cfg
===================================================================
--- /branches/SHM-dev/cfg/encoder_intra_main10.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/encoder_intra_main10.cfg	(revision 941)
@@ -4,5 +4,12 @@
 
 #======== Profile/Level ================
-Profile                       : main10
+#Profile                      : main10
+NumProfileTierLevel           : 3
+#Profile for the whole bitstream
+Profile0                      : main10       
+#Profile for the base layer --- this will be ignored when BL is not HEVC
+Profile1                      : main10
+#Profile for the enhancement layer
+Profile2                      : main10
 
 #======== Unit definition ================
Index: /branches/SHM-dev/cfg/encoder_lowdelay_P_main.cfg
===================================================================
--- /branches/SHM-dev/cfg/encoder_lowdelay_P_main.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/encoder_lowdelay_P_main.cfg	(revision 941)
@@ -4,5 +4,12 @@
 
 #======== Profile/Level ================
-Profile                       : main
+#Profile                      : main
+NumProfileTierLevel           : 3
+#Profile for the whole bitstream
+Profile0                      : main       
+#Profile for the base layer --- this will be ignored when BL is not HEVC
+Profile1                      : main
+#Profile for the enhancement layer
+Profile2                      : main
 
 #======== Unit definition ================
Index: /branches/SHM-dev/cfg/encoder_lowdelay_P_main10.cfg
===================================================================
--- /branches/SHM-dev/cfg/encoder_lowdelay_P_main10.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/encoder_lowdelay_P_main10.cfg	(revision 941)
@@ -4,5 +4,12 @@
 
 #======== Profile/Level ================
-Profile                       : main10
+#Profile                      : main10
+NumProfileTierLevel           : 3
+#Profile for the whole bitstream
+Profile0                      : main10       
+#Profile for the base layer --- this will be ignored when BL is not HEVC
+Profile1                      : main10
+#Profile for the enhancement layer
+Profile2                      : main10
 
 #======== Unit definition ================
Index: /branches/SHM-dev/cfg/encoder_lowdelay_main.cfg
===================================================================
--- /branches/SHM-dev/cfg/encoder_lowdelay_main.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/encoder_lowdelay_main.cfg	(revision 941)
@@ -4,5 +4,12 @@
 
 #======== Profile/Level ================
-Profile                       : main
+#Profile                       : main
+NumProfileTierLevel           : 3
+#Profile for the whole bitstream
+Profile0                      : main        
+#Profile for the base layer --- this will be ignored when BL is not HEVC
+Profile1                      : main
+#Profile for the enhancement layer
+Profile2                      : main
 
 #======== Unit definition ================
Index: /branches/SHM-dev/cfg/encoder_lowdelay_main10.cfg
===================================================================
--- /branches/SHM-dev/cfg/encoder_lowdelay_main10.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/encoder_lowdelay_main10.cfg	(revision 941)
@@ -4,5 +4,12 @@
 
 #======== Profile/Level ================
-Profile                       : main10
+#Profile                      : main10
+NumProfileTierLevel           : 3
+#Profile for the whole bitstream
+Profile0                      : main10
+#Profile for the base layer --- this will be ignored when BL is not HEVC
+Profile1                      : main10
+#Profile for the enhancement layer
+Profile2                      : main10
 
 #======== Unit definition ================
Index: /branches/SHM-dev/cfg/encoder_randomaccess_main.cfg
===================================================================
--- /branches/SHM-dev/cfg/encoder_randomaccess_main.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/encoder_randomaccess_main.cfg	(revision 941)
@@ -4,5 +4,12 @@
 
 #======== Profile/Level ================
-Profile                       : main
+#Profile                      : main
+NumProfileTierLevel           : 3
+#Profile for the whole bitstream
+Profile0                      : main       
+#Profile for the base layer --- this will be ignored when BL is not HEVC
+Profile1                      : main
+#Profile for the enhancement layer
+Profile2                      : main
 
 #======== Unit definition ================
Index: /branches/SHM-dev/cfg/encoder_randomaccess_main10.cfg
===================================================================
--- /branches/SHM-dev/cfg/encoder_randomaccess_main10.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/encoder_randomaccess_main10.cfg	(revision 941)
@@ -4,5 +4,12 @@
 
 #======== Profile/Level ================
-Profile                       : main10
+#Profile                      : main10
+NumProfileTierLevel           : 3
+#Profile for the whole bitstream
+Profile0                      : main10       
+#Profile for the base layer --- this will be ignored when BL is not HEVC
+Profile1                      : main10
+#Profile for the enhancement layer
+Profile2                      : main10
 
 #======== Unit definition ================
Index: /branches/SHM-dev/cfg/layers.cfg
===================================================================
--- /branches/SHM-dev/cfg/layers.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/layers.cfg	(revision 941)
@@ -59,2 +59,3 @@
 # ListOfOutputLayers0 need not be specified
 ListOfOutputLayers1	          : 1
+ListOfProfileTierLevelOls1    : 1 2
Index: /branches/SHM-dev/cfg/layers_avcbase.cfg
===================================================================
--- /branches/SHM-dev/cfg/layers_avcbase.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/layers_avcbase.cfg	(revision 941)
@@ -54,3 +54,5 @@
 NumLayersInOutputLayerSet     : 1           # The number of layers in the 0-th OLS should not be specified, 
 # ListOfOutputLayers0 need not be specified
-ListOfOutputLayers1	          : 1
+ListOfOutputLayers1	      : 1
+ListOfProfileTierLevelOls1    : 1 2
+
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BQTerrace-1.5x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BQTerrace-1.5x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BQTerrace-1.5x.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 600         # Number of frames to be coded
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BQTerrace_1920x1080_60.yuv
@@ -23,2 +30,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BQTerrace-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BQTerrace-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BQTerrace-2x.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 600         # Number of frames to be coded
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BQTerrace_1920x1080_60.yuv
@@ -29,3 +36,3 @@
 ResamplePhaseSetPresentFlag1     : 0        # List of resample phase set present flags
 QP1                           : 20
-
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BQTerrace-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BQTerrace-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BQTerrace-SNR.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 600         # Number of frames to be coded
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BQTerrace_1920x1080_60.yuv
@@ -29,2 +36,3 @@
 ResamplePhaseSetPresentFlag1     : 0        # List of resample phase set present flags
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BasketballDrive-1.5x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BasketballDrive-1.5x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BasketballDrive-1.5x.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 500         # Number of frames to be coded
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BasketballDrive_1920x1080_50.yuv
@@ -23,2 +30,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BasketballDrive-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BasketballDrive-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BasketballDrive-2x.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 500         # Number of frames to be coded
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BasketballDrive_1920x1080_50.yuv
@@ -29,3 +36,3 @@
 ResamplePhaseSetPresentFlag1     : 0        # List of resample phase set present flags
 QP1                           : 20
-
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BasketballDrive-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BasketballDrive-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/BasketballDrive-SNR.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 500         # Number of frames to be coded
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BasketballDrive_1920x1080_50.yuv
@@ -29,2 +36,3 @@
 ResamplePhaseSetPresentFlag1     : 0        # List of resample phase set present flags
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Cactus-1.5x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Cactus-1.5x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Cactus-1.5x.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 500         # Number of frames to be coded
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Cactus_1920x1080_50.yuv
@@ -23,2 +30,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Cactus-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Cactus-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Cactus-2x.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 500         # Number of frames to be coded
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Cactus_1920x1080_50.yuv
@@ -29,3 +36,3 @@
 ResamplePhaseSetPresentFlag1     : 0        # List of resample phase set present flags
 QP1                           : 20
-
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Cactus-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Cactus-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Cactus-SNR.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 500         # Number of frames to be coded
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Cactus_1920x1080_50.yuv
@@ -29,2 +36,3 @@
 ResamplePhaseSetPresentFlag1     : 0        # List of resample phase set present flags
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Kimono-1.5x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Kimono-1.5x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Kimono-1.5x.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 240         # Number of frames to be coded
-Level                         : 4
+#Level                         : 4
+#This is level of the whole bitstream
+Level0                         : 4
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Kimono1_1920x1080_24.yuv
@@ -23,2 +30,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Kimono-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Kimono-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Kimono-2x.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 240         # Number of frames to be coded
-Level                         : 4
+#Level                         : 4
+#This is level of the whole bitstream
+Level0                         : 4
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : O:/Kimono1_1920x1080_24.yuv
@@ -29,2 +36,3 @@
 ResamplePhaseSetPresentFlag1     : 0        # List of resample phase set present flags
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Kimono-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Kimono-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Kimono-SNR.cfg	(revision 941)
@@ -1,5 +1,12 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 240         # Number of frames to be coded
-Level                         : 4
+#Level                         : 4
+#This is level of the whole bitstream
+Level0                         : 4
+#This is level of the base layer
+Level1                         : 4
+#This is level of the enhancement layer
+Level2                         : 4
+
 
 #======== File I/O ===============
@@ -13,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Kimono1_1920x1080_24.yuv
@@ -29,2 +37,3 @@
 ResamplePhaseSetPresentFlag1     : 0        # List of resample phase set present flags
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/ParkScene-1.5x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/ParkScene-1.5x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/ParkScene-1.5x.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 240         # Number of frames to be coded
-Level                         : 4
+#Level                         : 4
+#This is level of the whole bitstream
+Level0                         : 4
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : ParkScene_1920x1080_24.yuv
@@ -23,2 +30,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/ParkScene-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/ParkScene-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/ParkScene-2x.cfg	(revision 941)
@@ -1,6 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 240         # Number of frames to be coded
-Level                         : 4
-
+#Level                         : 4
+#This is level of the whole bitstream
+Level0                         : 4
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4
 #======== File I/O ===============
 InputFile0                    : ParkScene_960x544_24_zerophase_0.9pi.yuv
@@ -13,4 +18,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : ParkScene_1920x1080_24.yuv
@@ -29,2 +35,3 @@
 ResamplePhaseSetPresentFlag1     : 0        # List of resample phase set present flags
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/ParkScene-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/ParkScene-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/ParkScene-SNR.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 240         # Number of frames to be coded
-Level                         : 4
+#Level                         : 4
+#This is level of the whole bitstream
+Level0                         : 4
+#This is level of the base layer
+Level1                         : 4
+#This is level of the enhancement layer
+Level2                         : 4
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : ParkScene_1920x1080_24.yuv
@@ -29,2 +36,3 @@
 ResamplePhaseSetPresentFlag1     : 0        # List of resample phase set present flags
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/PeopleOnStreet-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/PeopleOnStreet-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/PeopleOnStreet-2x.cfg	(revision 941)
@@ -1,6 +1,13 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 150         # Number of frames to be coded
-Level                         : 5
+#Level                         : 5
+#This is level of the whole bitstream
+Level0                         : 5
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 5
 
+#======
 #======== File I/O ===============
 InputFile0                    : PeopleOnStreet_1280x800_30_crop_zerophase_0.9pi.yuv
@@ -13,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : PeopleOnStreet_2560x1600_30_crop.yuv
@@ -23,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/PeopleOnStreet-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/PeopleOnStreet-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/PeopleOnStreet-SNR.cfg	(revision 941)
@@ -1,6 +1,13 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 150         # Number of frames to be coded
-Level                         : 5
+#Level                         : 5
+#This is level of the whole bitstream
+Level0                         : 5
+#This is level of the base layer
+Level1                         : 5
+#This is level of the enhancement layer
+Level2                         : 5
 
+#======
 #======== File I/O ===============
 InputFile0                    : PeopleOnStreet_2560x1600_30_crop.yuv
@@ -13,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : PeopleOnStreet_2560x1600_30_crop.yuv
@@ -23,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Traffic-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Traffic-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Traffic-2x.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 150         # Number of frames to be coded
-Level                         : 5
+#Level                         : 5
+#This is level of the whole bitstream
+Level0                         : 5
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 5
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Traffic_2560x1600_30_crop.yuv
@@ -23,2 +30,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Traffic-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Traffic-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc-avcbase/Traffic-SNR.cfg	(revision 941)
@@ -1,5 +1,11 @@
 FrameSkip                     : 0           # Number of frames to be skipped in input
 FramesToBeEncoded             : 150         # Number of frames to be coded
-Level                         : 5
+#Level                         : 5
+#This is level of the whole bitstream
+Level0                         : 5
+#This is level of the base layer
+Level1                         : 5
+#This is level of the enhancement layer
+Level2                         : 5
 
 #======== File I/O ===============
@@ -13,4 +19,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Traffic_2560x1600_30_crop.yuv
@@ -23,2 +30,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/BQTerrace-1.5x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/BQTerrace-1.5x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/BQTerrace-1.5x.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 600         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BQTerrace_1920x1080_60.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/BQTerrace-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/BQTerrace-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/BQTerrace-2x.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 600         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BQTerrace_1920x1080_60.yuv
@@ -24,4 +31,5 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
 
 #============= Reference location offset parameters ==================
Index: /branches/SHM-dev/cfg/per-sequence-svc/BQTerrace-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/BQTerrace-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/BQTerrace-SNR.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 600         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BQTerrace_1920x1080_60.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/BasketballDrive-1.5x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/BasketballDrive-1.5x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/BasketballDrive-1.5x.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 500         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BasketballDrive_1920x1080_50.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/BasketballDrive-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/BasketballDrive-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/BasketballDrive-2x.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 500         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BasketballDrive_1920x1080_50.yuv
@@ -24,4 +31,5 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
 
 #============= Reference location offset parameters ==================
Index: /branches/SHM-dev/cfg/per-sequence-svc/BasketballDrive-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/BasketballDrive-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/BasketballDrive-SNR.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 500         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BasketballDrive_1920x1080_50.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/CGS-Birthday-b10-1x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/CGS-Birthday-b10-1x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/CGS-Birthday-b10-1x.cfg	(revision 941)
@@ -3,5 +3,11 @@
 FramesToBeEncoded             : 300         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -16,4 +22,5 @@
 InternalBitDepth0             : 10          # codec operating bit-depth for layer 0
 RepFormatIdx0                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BT2020_Birthday_1920x1080_60_10bit_zerophase_0.9pi.yuv
@@ -27,2 +34,3 @@
 InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 RepFormatIdx1                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/CGS-Birthday-b8-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/CGS-Birthday-b8-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/CGS-Birthday-b8-2x.cfg	(revision 941)
@@ -3,5 +3,11 @@
 FramesToBeEncoded             : 300         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 5.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 5.1
 
 #======== File I/O ===============
@@ -16,4 +22,5 @@
 InternalBitDepth0             : 8           # codec operating bit-depth for layer 0
 RepFormatIdx0                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BT2020_Birthday_3840x2160_60_10bit.yuv
@@ -27,2 +34,3 @@
 InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 RepFormatIdx1                 : 1           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/CGS-BirthdayFlashPart1-b10-1x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/CGS-BirthdayFlashPart1-b10-1x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/CGS-BirthdayFlashPart1-b10-1x.cfg	(revision 941)
@@ -3,5 +3,11 @@
 FramesToBeEncoded             : 300         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -16,4 +22,5 @@
 InternalBitDepth0             : 10          # codec operating bit-depth for layer 0
 RepFormatIdx0                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BT2020_BirthdayFlashPart1_1920x1080_60_10bit_zerophase_0.9pi.yuv
@@ -27,2 +34,3 @@
 InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 RepFormatIdx1                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/CGS-BirthdayFlashPart1-b8-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/CGS-BirthdayFlashPart1-b8-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/CGS-BirthdayFlashPart1-b8-2x.cfg	(revision 941)
@@ -3,5 +3,11 @@
 FramesToBeEncoded             : 300         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 5.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 5.1
 
 #======== File I/O ===============
@@ -16,4 +22,5 @@
 InternalBitDepth0             : 8           # codec operating bit-depth for layer 0
 RepFormatIdx0                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BT2020_BirthdayFlashPart1_3840x2160_60_10bit.yuv
@@ -27,2 +34,3 @@
 InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 RepFormatIdx1                 : 1           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/CGS-BirthdayFlashPart2-b10-1x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/CGS-BirthdayFlashPart2-b10-1x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/CGS-BirthdayFlashPart2-b10-1x.cfg	(revision 941)
@@ -3,5 +3,11 @@
 FramesToBeEncoded             : 300         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -16,4 +22,5 @@
 InternalBitDepth0             : 10          # codec operating bit-depth for layer 0
 RepFormatIdx0                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BT2020_BirthdayFlashPart2_1920x1080_60_10bit_zerophase_0.9pi.yuv
@@ -27,2 +34,3 @@
 InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 RepFormatIdx1                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/CGS-BirthdayFlashPart2-b8-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/CGS-BirthdayFlashPart2-b8-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/CGS-BirthdayFlashPart2-b8-2x.cfg	(revision 941)
@@ -3,5 +3,11 @@
 FramesToBeEncoded             : 300         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 5.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 5.1
 
 #======== File I/O ===============
@@ -16,4 +22,5 @@
 InternalBitDepth0             : 8           # codec operating bit-depth for layer 0
 RepFormatIdx0                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BT2020_BirthdayFlashPart2_3840x2160_60_10bit.yuv
@@ -27,2 +34,3 @@
 InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 RepFormatIdx1                 : 1           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/CGS-Parakeets-b10-1x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/CGS-Parakeets-b10-1x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/CGS-Parakeets-b10-1x.cfg	(revision 941)
@@ -3,5 +3,11 @@
 FramesToBeEncoded             : 250         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -16,4 +22,5 @@
 InternalBitDepth0             : 10          # codec operating bit-depth for layer 0
 RepFormatIdx0                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BT2020_Parakeets_1920x1080_50_10bit_zerophase_0.9pi.yuv
@@ -27,2 +34,3 @@
 InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 RepFormatIdx1                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/CGS-Parakeets-b8-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/CGS-Parakeets-b8-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/CGS-Parakeets-b8-2x.cfg	(revision 941)
@@ -3,5 +3,11 @@
 FramesToBeEncoded             : 250         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 5.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 5.1
 
 #======== File I/O ===============
@@ -16,4 +22,5 @@
 InternalBitDepth0             : 8           # codec operating bit-depth for layer 0
 RepFormatIdx0                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BT2020_Parakeets_3840x2160_50_10bit.yuv
@@ -27,2 +34,3 @@
 InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 RepFormatIdx1                 : 1           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/CGS-TableCar-b10-1x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/CGS-TableCar-b10-1x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/CGS-TableCar-b10-1x.cfg	(revision 941)
@@ -3,5 +3,11 @@
 FramesToBeEncoded             : 300         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -16,4 +22,5 @@
 InternalBitDepth0             : 10          # codec operating bit-depth for layer 0
 RepFormatIdx0                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BT2020_TableCar_1920x1080_60_10bit_zerophase_0.9pi.yuv
@@ -27,2 +34,3 @@
 InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 RepFormatIdx1                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/CGS-TableCar-b8-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/CGS-TableCar-b8-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/CGS-TableCar-b8-2x.cfg	(revision 941)
@@ -3,5 +3,11 @@
 FramesToBeEncoded             : 300         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 5.1
+#This is level of the base layer
+Level1                         : 4.1
+#This is level of the enhancement layer
+Level2                         : 5.1
 
 #======== File I/O ===============
@@ -16,4 +22,5 @@
 InternalBitDepth0             : 8           # codec operating bit-depth for layer 0
 RepFormatIdx0                 : 0           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex0                : 1 
 
 InputFile1                    : BT2020_TableCar_3840x2160_60_10bit.yuv
@@ -27,2 +34,3 @@
 InternalBitDepth1             : 10          # codec operating bit-depth for layer 1
 RepFormatIdx1                 : 1           # Index of corresponding rep_format() in the VPS
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/Cactus-1.5x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/Cactus-1.5x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/Cactus-1.5x.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 500         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Cactus_1920x1080_50.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/Cactus-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/Cactus-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/Cactus-2x.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 500         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Cactus_1920x1080_50.yuv
@@ -24,4 +31,5 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
 
 #============= Reference location offset parameters ==================
Index: /branches/SHM-dev/cfg/per-sequence-svc/Cactus-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/Cactus-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/Cactus-SNR.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 500         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4.1
+#Level                         : 4.1
+#This is level of the whole bitstream
+Level0                         : 4.1
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4.1
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Cactus_1920x1080_50.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/Kimono-1.5x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/Kimono-1.5x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/Kimono-1.5x.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 240         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4
+#Level                         : 4
+#This is level of the whole bitstream
+Level0                         : 4
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Kimono1_1920x1080_24.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/Kimono-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/Kimono-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/Kimono-2x.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 240         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4
+#Level                         : 4
+#This is level of the whole bitstream
+Level0                         : 4
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Kimono1_1920x1080_24.yuv
@@ -24,4 +31,5 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
 
 #============= Reference location offset parameters ==================
Index: /branches/SHM-dev/cfg/per-sequence-svc/Kimono-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/Kimono-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/Kimono-SNR.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 240         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4
+#Level                         : 4
+#This is level of the whole bitstream
+Level0                         : 4
+#This is level of the base layer
+Level1                         : 4
+#This is level of the enhancement layer
+Level2                         : 4
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Kimono1_1920x1080_24.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/ParkScene-1.5x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/ParkScene-1.5x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/ParkScene-1.5x.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 240         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4
+#Level                         : 4
+#This is level of the whole bitstream
+Level0                         : 4
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : ParkScene_1920x1080_24.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/ParkScene-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/ParkScene-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/ParkScene-2x.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 240         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4
+#Level                         : 4
+#This is level of the whole bitstream
+Level0                         : 4
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 4
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : ParkScene_1920x1080_24.yuv
@@ -24,4 +31,5 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
 
 #============= Reference location offset parameters ==================
Index: /branches/SHM-dev/cfg/per-sequence-svc/ParkScene-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/ParkScene-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/ParkScene-SNR.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 240         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 4
+#Level                         : 4
+#This is level of the whole bitstream
+Level0                         : 4
+#This is level of the base layer
+Level1                         : 4
+#This is level of the enhancement layer
+Level2                         : 4
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : ParkScene_1920x1080_24.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/PeopleOnStreet-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/PeopleOnStreet-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/PeopleOnStreet-2x.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 150         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 5
+#Level                         : 5
+#This is level of the whole bitstream
+Level0                         : 5
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 5
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : PeopleOnStreet_2560x1600_30_crop.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/PeopleOnStreet-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/PeopleOnStreet-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/PeopleOnStreet-SNR.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 150         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 5
+#Level                         : 5
+#This is level of the whole bitstream
+Level0                         : 5
+#This is level of the base layer
+Level1                         : 5
+#This is level of the enhancement layer
+Level2                         : 5
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : PeopleOnStreet_2560x1600_30_crop.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/Traffic-2x.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/Traffic-2x.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/Traffic-2x.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 150         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 5
+#Level                         : 5
+#This is level of the whole bitstream
+Level0                         : 5
+#This is level of the base layer
+Level1                         : 3.1
+#This is level of the enhancement layer
+Level2                         : 5
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Traffic_2560x1600_30_crop.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/cfg/per-sequence-svc/Traffic-SNR.cfg
===================================================================
--- /branches/SHM-dev/cfg/per-sequence-svc/Traffic-SNR.cfg	(revision 940)
+++ /branches/SHM-dev/cfg/per-sequence-svc/Traffic-SNR.cfg	(revision 941)
@@ -2,5 +2,11 @@
 FramesToBeEncoded             : 150         # Number of frames to be coded
 PhaseAlignment                : 0           # Sample location alignment between layers (0: zero position aligned, 1: central position aligned)
-Level                         : 5
+#Level                         : 5
+#This is level of the whole bitstream
+Level0                         : 5
+#This is level of the base layer
+Level1                         : 5
+#This is level of the enhancement layer
+Level2                         : 5
 
 #======== File I/O ===============
@@ -14,4 +20,5 @@
 ConformanceMode0              : 1           # conformance mode
 QP0                           : 22
+LayerPTLIndex0                : 1 
 
 InputFile1                    : Traffic_2560x1600_30_crop.yuv
@@ -24,2 +31,3 @@
 ConformanceMode1              : 1           # conformance mode
 QP1                           : 20
+LayerPTLIndex1                : 2 
Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 940)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 941)
@@ -608,4 +608,7 @@
   string* cfg_outputLayerSetIdx      = new string;
 #endif
+#if MULTIPLE_PTL_SUPPORT
+  string* cfg_listOfLayerPTLOfOlss   = new string[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1];
+#endif
 #if AVC_BASE
   string  cfg_BLInputFile;
@@ -837,4 +840,5 @@
   
   // Profile and level
+#if !MULTIPLE_PTL_SUPPORT
   ("Profile", m_profile,   Profile::NONE, "Profile to be used when encoding (Incomplete)")
   ("Level",   m_level,     Level::NONE,   "Level limit to be used, eg 5.1 (Incomplete)")
@@ -845,4 +849,18 @@
   ("NonPackedSource",   m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing")
   ("FrameOnly",         m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames")
+#else
+  ("NumProfileTierLevel", m_numPTLInfo, 2, "Number of Profile, Tier and Level information")
+  ("Profile%d", m_profileList,   Profile::NONE, NUM_POSSIBLE_LEVEL, "Profile to be used when encoding (Incomplete)")
+  ("Level%d",   m_levelList,     Level::NONE, NUM_POSSIBLE_LEVEL, "Level limit to be used, eg 5.1 (Incomplete)")
+  ("Tier%d",    m_levelTierList, Level::MAIN, NUM_POSSIBLE_LEVEL, "Tier to use for interpretation of --Level")
+
+  ("ProgressiveSource%d", m_progressiveSourceFlagList, false, MAX_VPS_LAYER_ID_PLUS1, "Indicate that source is progressive")
+  ("InterlacedSource%d",  m_interlacedSourceFlagList,  false, MAX_VPS_LAYER_ID_PLUS1, "Indicate that source is interlaced")
+  ("NonPackedSource%d",   m_nonPackedConstraintFlagList, false, MAX_VPS_LAYER_ID_PLUS1, "Indicate that source does not contain frame packing")
+  ("FrameOnly%d",         m_frameOnlyConstraintFlagList, false, MAX_VPS_LAYER_ID_PLUS1, "Indicate that the bitstream contains only frames")
+    
+  ("LayerPTLIndex%d", m_layerPTLIdx, 0, MAX_VPS_LAYER_ID_PLUS1, "Index of PTL for each layer")
+  ("ListOfProfileTierLevelOls%d", cfg_listOfLayerPTLOfOlss, string(""), MAX_VPS_LAYER_ID_PLUS1, "PTL Index for each layer in each OLS except the first OLS. The PTL index for layer in the first OLS is set to 1")
+#endif
 
 #if LAYER_CTB
@@ -1922,4 +1940,9 @@
   // Layers in the output layer set
   m_listOfOutputLayers.resize(m_numOutputLayerSets);
+
+#if MULTIPLE_PTL_SUPPORT
+  m_listOfLayerPTLofOlss.resize(m_numOutputLayerSets);
+#endif
+
   Int startOlsCtr = 1;
   if( m_defaultTargetOutputLayerIdc == 0 || m_defaultTargetOutputLayerIdc == 1 )
@@ -1941,5 +1964,19 @@
       assert( scanStringToArray( cfg_listOfOutputLayers[olsCtr], m_numLayersInOutputLayerSet[olsCtr], "ListOfOutputLayers", m_listOfOutputLayers[olsCtr] ) );
     }
-  }
+#if MULTIPLE_PTL_SUPPORT
+    if (olsCtr > m_numLayerSets)
+    {
+      scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[m_outputLayerSetIdx[olsCtr - m_numLayerSets]], "ListOfOutputLayers", m_listOfLayerPTLofOlss[olsCtr] );
+    }
+    else
+    {
+      scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsCtr], "List of PTL for each layer in OLS", m_listOfLayerPTLofOlss[olsCtr] );
+    }
+#endif
+  }
+#if MULTIPLE_PTL_SUPPORT
+  m_listOfLayerPTLofOlss[0].push_back(m_layerPTLIdx[0]);
+  delete [] cfg_listOfLayerPTLOfOlss;
+#endif
   delete cfg_numLayersInOutputLayerSet;
   delete [] cfg_listOfOutputLayers;
@@ -2503,4 +2540,6 @@
     fprintf(stderr, "******************************************************************\n");
   }
+  
+#if !MULTIPLE_PTL_SUPPORT
   if( m_profile==Profile::NONE )
   {
@@ -2515,4 +2554,23 @@
     fprintf(stderr, "***************************************************************************\n");
   }
+#else
+  int ii = 0;
+  while ( ii < m_numPTLInfo )
+  {
+    if( m_profileList[ii] == Profile::NONE )
+    {
+      fprintf(stderr, "***************************************************************************\n");
+      fprintf(stderr, "** WARNING: For conforming bitstreams a valid Profile value must be set! **\n");
+      fprintf(stderr, "***************************************************************************\n");
+    }
+    if( m_levelList[ii] == Level::NONE )
+    {
+      fprintf(stderr, "***************************************************************************\n");
+      fprintf(stderr, "** WARNING: For conforming bitstreams a valid Level value must be set!   **\n");
+      fprintf(stderr, "***************************************************************************\n");
+    }
+    ii++;
+  }
+#endif
 
   Bool check_failed = false; /* abort if there is a fatal configuration problem */
Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 940)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 941)
@@ -120,4 +120,5 @@
 
   // profile/level
+#if !MULTIPLE_PTL_SUPPORT
   Profile::Name m_profile;
   Level::Tier   m_levelTier;
@@ -127,5 +128,17 @@
   Bool m_nonPackedConstraintFlag;
   Bool m_frameOnlyConstraintFlag;
-  
+#else
+  Int           m_numPTLInfo;
+  Int           m_layerPTLIdx[MAX_VPS_LAYER_ID_PLUS1]; ///< scalability_mask
+  Profile::Name m_profileList[NUM_POSSIBLE_LEVEL];
+  Level::Tier   m_levelTierList[NUM_POSSIBLE_LEVEL];
+  Level::Name   m_levelList[NUM_POSSIBLE_LEVEL];
+  Bool          m_progressiveSourceFlagList[NUM_POSSIBLE_LEVEL];
+  Bool          m_interlacedSourceFlagList[NUM_POSSIBLE_LEVEL];
+  Bool          m_nonPackedConstraintFlagList[NUM_POSSIBLE_LEVEL];
+  Bool          m_frameOnlyConstraintFlagList[NUM_POSSIBLE_LEVEL];
+
+  std::vector< std::vector<Int> > m_listOfLayerPTLofOlss;
+#endif
   // coding structure
 #if !SVC_EXTENSION
Index: /branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 940)
+++ /branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 941)
@@ -200,4 +200,38 @@
 #endif
 
+#if MULTIPLE_PTL_SUPPORT
+  //Populate PTL in VPS
+  TComVPS *pVPS = m_acTEncTop[0].getVPS();
+  ProfileTierLevel& profileTierLevel = *(pVPS->getPTL(0)->getGeneralPTL());
+  for (int ii = 0; ii < m_numPTLInfo; ii++)
+  {
+    profileTierLevel = *(pVPS->getPTL(ii)->getGeneralPTL());
+
+    profileTierLevel.setLevelIdc(m_levelList[ii]);
+    profileTierLevel.setTierFlag(m_levelTierList[ii]);
+    profileTierLevel.setProfileIdc(m_profileList[ii]);
+    profileTierLevel.setProfileCompatibilityFlag(m_profileList[ii], 1);
+    profileTierLevel.setProgressiveSourceFlag(m_progressiveSourceFlagList[ii]);
+    profileTierLevel.setInterlacedSourceFlag(m_interlacedSourceFlagList[ii]);
+    profileTierLevel.setNonPackedConstraintFlag(m_nonPackedConstraintFlagList[ii]);
+    profileTierLevel.setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlagList[ii]);
+  }
+  pVPS->setNumProfileTierLevel(m_numPTLInfo);
+
+  std::vector<int> myvector;
+  vps->getProfileLevelTierIdx()->resize(m_numOutputLayerSets);
+  for (int ii = 0; ii < m_numOutputLayerSets; ii++)
+  {
+    myvector =  m_listOfLayerPTLofOlss[ii];
+    vps->getProfileLevelTierIdx()->resize(myvector.size());
+    for (std::vector<int>::iterator it = myvector.begin() ; it != myvector.end(); ++it)
+    {
+      pVPS->addProfileLevelTierIdx(ii, it[0]);
+    }
+  }
+
+  //pVPS->setProfileLevelTierIdx(
+#endif
+
   assert( m_numLayers <= MAX_LAYERS );
 
@@ -228,4 +262,5 @@
     m_acTEncTop[layer].setFramesToBeEncoded            ( m_framesToBeEncoded );
 
+#if !MULTIPLE_PTL_SUPPORT
     m_acTEncTop[layer].setProfile(m_profile);
     m_acTEncTop[layer].setLevel(m_levelTier, m_level);
@@ -234,4 +269,12 @@
     m_acTEncTop[layer].setNonPackedConstraintFlag(m_nonPackedConstraintFlag);
     m_acTEncTop[layer].setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag);
+#else
+    m_acTEncTop[layer].setProfile(m_profileList[m_layerPTLIdx[layer]]);
+    m_acTEncTop[layer].setLevel(m_levelTierList[m_layerPTLIdx[layer]], m_levelList[m_layerPTLIdx[layer]]);
+    m_acTEncTop[layer].setProgressiveSourceFlag(m_progressiveSourceFlagList[m_layerPTLIdx[layer]]);
+    m_acTEncTop[layer].setInterlacedSourceFlag(m_interlacedSourceFlagList[m_layerPTLIdx[layer]]);
+    m_acTEncTop[layer].setNonPackedConstraintFlag(m_nonPackedConstraintFlagList[m_layerPTLIdx[layer]]);
+    m_acTEncTop[layer].setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlagList[m_layerPTLIdx[layer]]);
+#endif
 
 #if REF_IDX_MFM
@@ -1385,5 +1428,5 @@
     vps->setIlpSshSignalingEnabledFlag(false);
 #if VPS_EXTN_PROFILE_INFO
-
+#if !MULTIPLE_PTL_SUPPORT
 #if LIST_OF_PTL
   vps->getPTLForExtnPtr()->resize(1);   // Dummy object - unused.
@@ -1414,4 +1457,5 @@
     *(vps->getPTLForExtn(setId)) = *(m_acTEncTop[setId].getSPS()->getPTL());
   }
+#endif
 #endif
 #endif
@@ -1524,4 +1568,5 @@
 #endif
   // Target output layer
+#if !MULTIPLE_PTL_SUPPORT
 #if LIST_OF_PTL
   vps->setNumProfileTierLevel( vps->getPTLForExtnPtr()->size() ); // +1 for the base VPS PTL()
@@ -1529,4 +1574,5 @@
   vps->setNumOutputLayerSets(vps->getNumLayerSets());
   vps->setNumProfileTierLevel(vps->getNumLayerSets());
+#endif
 #endif
 #if !OUTPUT_LAYER_SETS_CONFIG // Taken care by configuration file parameter
@@ -1619,4 +1665,5 @@
   vps->checkNecessaryLayerFlagCondition();
 #endif
+#if !MULTIPLE_PTL_SUPPORT
 #if PER_LAYER_PTL
   vps->getProfileLevelTierIdx()->resize(vps->getNumOutputLayerSets());
@@ -1639,4 +1686,5 @@
     }
   }
+#endif
 #endif
 #if SUB_LAYERS_IN_LAYER_SET
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 940)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 941)
@@ -582,5 +582,9 @@
   Bool        m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1];
 #endif
+#if !MULTIPLE_PTL_SUPPORT
   TComPTL     m_pcPTL;
+#else
+  TComPTL     m_pcPTLList[NUM_POSSIBLE_LEVEL];
+#endif
   TimingInfo  m_timingInfo;
 
@@ -649,5 +653,7 @@
   UInt       m_profileLayerSetRef[MAX_VPS_LAYER_SETS_PLUS1];    // The value with index 0 will not be used.
 #endif
-  std::vector<TComPTL>    m_pcPTLForExtn;  
+#if !MULTIPLE_PTL_SUPPORT
+  std::vector<TComPTL>    m_pcPTLForExtn;
+#endif
 #endif
 #if VPS_EXTN_OP_LAYER_SETS
@@ -964,5 +970,10 @@
   Void    setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id)  { m_layerIdIncludedFlag[opsIdx][id] = v;    }
 
+#if !MULTIPLE_PTL_SUPPORT
   TComPTL* getPTL() { return &m_pcPTL; }
+#else
+  TComPTL* getPTL() { return &m_pcPTLList[0]; }
+  TComPTL* getPTL(UInt idx) { return &m_pcPTLList[idx]; }
+#endif
   TimingInfo* getTimingInfo() { return &m_timingInfo; }
 
@@ -1065,6 +1076,8 @@
 #endif
 
+#if !MULTIPLE_PTL_SUPPORT
   std::vector<TComPTL>* getPTLForExtnPtr()                      { return &m_pcPTLForExtn;          }
   TComPTL* getPTLForExtn(Int id)                                { return &m_pcPTLForExtn[id];      }
+#endif
 #endif
 #if VPS_EXTN_OP_LAYER_SETS
@@ -1132,4 +1145,7 @@
   Int    getProfileLevelTierIdx(Int const olsIdx, Int const layerIdx)     { return m_profileLevelTierIdx[olsIdx][layerIdx]; }
   Void   setProfileLevelTierIdx(Int const olsIdx, Int const layerIdx, Int const ptlIdx)     { m_profileLevelTierIdx[olsIdx][layerIdx] = ptlIdx; }
+#if MULTIPLE_PTL_SUPPORT
+  Void   addProfileLevelTierIdx(Int const olsIdx, Int const ptlIdx)     { m_profileLevelTierIdx[olsIdx].push_back(ptlIdx); }
+#endif
   Int calculateLenOfSyntaxElement( Int const numVal );
 #else
Index: /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 940)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 941)
@@ -69,4 +69,7 @@
 #define VPS_VUI_BSP_HRD_PARAMS           1      ///< JCTVC-R0231: Define the VPS VUI BSP hrd_params() as a separate function, and apply changes adopted.
 #define O0137_MAX_LAYERID                1      ///< JCTVC-O0137, JCTVC-O0200, JCTVC-O0223: restrict nuh_layer_id and vps_max_layers_minus1
+
+#define MULTIPLE_PTL_SUPPORT             1      ///< Fixing profile, tier and level signalling
+#define NUM_POSSIBLE_LEVEL               13     ///< Number of possible level as described in R1013
 
 #define R0226_CONSTRAINT_TMVP_SEI        1      ///< JCTVC-R0226, Modification to semantics in temporal motion vector prediction constraints SEI message
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 940)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 941)
@@ -1375,8 +1375,12 @@
   {
     vps->setProfilePresentFlag(1, false);
+#if !MULTIPLE_PTL_SUPPORT
     vps->getPTLForExtnPtr()->empty();
     vps->getPTLForExtnPtr()->resize(2);
     vps->getPTLForExtn(1)->copyProfileInfo( vps->getPTL() );
     parsePTL( vps->getPTLForExtn(1), vps->getProfilePresentFlag(1), vps->getMaxTLayers() - 1 );
+#else
+    parsePTL( vps->getPTL(1), vps->getProfilePresentFlag(1), vps->getMaxTLayers() - 1 );
+#endif
   }
 #endif
@@ -1600,10 +1604,15 @@
   READ_CODE(  6, uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 );
 #else
-  READ_UVLC(  uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 );
+  READ_UVLC(  uiCode, "vps_num_profile_tier_level_minus1"); 
+  vps->setNumProfileTierLevel( uiCode + 1 );
+  //vps->setNumProfileTierLevel( 3 );
+  int aa = vps->getNumProfileTierLevel();
 #endif
 #if PER_LAYER_PTL
   Int const numBitsForPtlIdx = vps->calculateLenOfSyntaxElement( vps->getNumProfileTierLevel() );
 #endif
+#if !MULTIPLE_PTL_SUPPORT
   vps->getPTLForExtnPtr()->resize(vps->getNumProfileTierLevel());
+#endif 
 #if LIST_OF_PTL
   for(Int idx = vps->getBaseLayerInternalFlag() ? 2 : 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
@@ -1612,10 +1621,15 @@
 #endif
   {
-    READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); vps->setProfilePresentFlag(idx, uiCode ? true : false);
+    READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); 
+    vps->setProfilePresentFlag(idx, uiCode ? true : false);
     if( !vps->getProfilePresentFlag(idx) )
     {
 #if P0048_REMOVE_PROFILE_REF
       // Copy profile information from previous one
+#if !MULTIPLE_PTL_SUPPORT
       vps->getPTLForExtn(idx)->copyProfileInfo( (idx==1) ? vps->getPTL() : vps->getPTLForExtn( idx - 1 ) );
+#else
+      vps->getPTL(idx)->copyProfileInfo( vps->getPTL( idx - 1 ) );
+#endif
 #else
       READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1);
@@ -1629,5 +1643,9 @@
 #endif
     }
+#if !MULTIPLE_PTL_SUPPORT
     parsePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
+#else
+    parsePTL( vps->getPTL(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
+#endif
   }
 #endif
@@ -1673,5 +1691,6 @@
   if( vps->getNumLayerSets() > 1 )
   {
-    READ_UVLC( uiCode, "num_add_olss" );            vps->setNumAddOutputLayerSets( uiCode );
+    READ_UVLC( uiCode, "num_add_olss" );            
+    vps->setNumAddOutputLayerSets( uiCode );
     READ_CODE( 2, uiCode, "default_output_layer_idc" );   vps->setDefaultTargetOutputLayerIdc( uiCode );
   }
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 940)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 941)
@@ -354,5 +354,4 @@
 #else
     m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1( getCommonDecoderParams()->getTargetOutputLayerSetIdx(), pcSlice->getLayerId(), pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
-    //TODO: HENDRY -- Do the checking here.
 #endif
   }
@@ -1088,7 +1087,4 @@
     m_isNoOutputPriorPics = false;
   }
-
-  //TODO: HENDRY -- Probably do the checking for max number of positive and negative pics here
-
 
   //For inference of PicOutputFlag
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 940)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 941)
@@ -1088,5 +1088,9 @@
   if( vps->getMaxLayers() > 1 && vps->getBaseLayerInternalFlag() )
   {
+#if !MULTIPLE_PTL_SUPPORT
     codePTL( vps->getPTLForExtn(1), false, vps->getMaxTLayers() - 1 );
+#else
+    codePTL( vps->getPTL(1), false, vps->getMaxTLayers() - 1 );
+#endif
   }
 #endif
@@ -1254,5 +1258,9 @@
 #endif
 #if LIST_OF_PTL
+#if !MULTIPLE_PTL_SUPPORT
   assert( vps->getNumProfileTierLevel() == vps->getPTLForExtnPtr()->size());
+#else
+  //Do something here to make sure the loop is correct to consider base layer internal stuff
+#endif
   for(Int idx = vps->getBaseLayerInternalFlag() ? 2 : 1; idx <= vps->getNumProfileTierLevel() - 1; idx++)
 #else
@@ -1260,4 +1268,7 @@
 #endif
   {
+#if MULTIPLE_PTL_SUPPORT
+    vps->setProfilePresentFlag(idx, true);
+#endif
     WRITE_FLAG( vps->getProfilePresentFlag(idx),       "vps_profile_present_flag[i]" );
 #if !P0048_REMOVE_PROFILE_REF
@@ -1267,5 +1278,9 @@
     }
 #endif
+#if !MULTIPLE_PTL_SUPPORT
     codePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
+#else
+    codePTL( vps->getPTL(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
+#endif
   }
 #endif
