Index: trunk/COPYING
===================================================================
--- trunk/COPYING	(revision 1397)
+++ trunk/COPYING	(revision 1405)
@@ -4,5 +4,5 @@
 granted under this license.   
 
-Copyright (c) 2010-2015, ITU/ISO/IEC
+Copyright (c) 2010-2016, ITU/ISO/IEC
 All rights reserved.
 
Index: trunk/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view+depth_AllIntra.cfg
===================================================================
--- trunk/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view+depth_AllIntra.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view+depth_AllIntra.cfg	(revision 1405)
@@ -79,11 +79,11 @@
 DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
 GOPSize                       : 1           # GOP Size (number of B slice = GOPSize-1)
-Frame1    : B  1  1  0.442   0  0  0  4  0                  0                    0             0
-FrameI_l1:  I  0  0  0.442   0  0  0  0  0                  0                    0             1
-Frame1_l1 : B  1  1  0.442   0  0  0  4  0                  0                    0             1
-FrameI_l2 : I  0  0  0.442   0  0  0  0  0                  0                    0             1
-Frame1_l2 : B  1  1  0.442   0  0  0  4  0                  0                    0             1
-FrameI_l3 : I  0  0  0.442   0  0  0  0  0                  0                    0             1
-Frame1_l3 : B  1  1  0.442   0  0  0  4  0                  0                    0             1
+Frame1    : B  1  1  0 0 0.442   0  0  0  4  0                  0                    0             0
+FrameI_l1:  I  0  0  0 0 0.442   0  0  0  0  0                  0                    0             1
+Frame1_l1 : B  1  1  0 0 0.442   0  0  0  4  0                  0                    0             1
+FrameI_l2 : I  0  0  0 0 0.442   0  0  0  0  0                  0                    0             1
+Frame1_l2 : B  1  1  0 0 0.442   0  0  0  4  0                  0                    0             1
+FrameI_l3 : I  0  0  0 0 0.442   0  0  0  0  0                  0                    0             1
+Frame1_l3 : B  1  1  0 0 0.442   0  0  0  4  0                  0                    0             1
 
 #=========== Motion Search =============
@@ -101,4 +101,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view_AllIntra.cfg
===================================================================
--- trunk/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view_AllIntra.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view_AllIntra.cfg	(revision 1405)
@@ -67,7 +67,7 @@
 DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
 GOPSize                       : 1           # GOP Size (number of B slice = GOPSize-1)
-Frame1    : B  1  1  0.442   0  0  0  4  0                  0                    0             0
-FrameI_l1:  I  0  0  0.442   0  0  0  0  0                  0                    0             0
-Frame1_l1 : B  1  1  0.442   0  0  0  4  0                  0                    0             0
+Frame1    : B  1  1  0 0 0.442   0  0  0  4  0                  0                    0             0
+FrameI_l1:  I  0  0  0 0 0.442   0  0  0  0  0                  0                    0             0
+Frame1_l1 : B  1  1  0 0 0.442   0  0  0  4  0                  0                    0             0
 
 #=========== Motion Search =============
@@ -86,4 +86,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view+depth_AllIntra.cfg
===================================================================
--- trunk/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view+depth_AllIntra.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view+depth_AllIntra.cfg	(revision 1405)
@@ -94,15 +94,15 @@
 GOPSize                       : 1           # GOP Size (number of B slice = GOPSize-1)
 
-Frame1    : B  1  1  0.442   0  0  0  4  0                  0                    0             0
-FrameI_l1:  I  0  0  0.442   0  0  0  0  0                  0                    0             1
-Frame1_l1 : B  1  1  0.442   0  0  0  4  0                  0                    0             1
-FrameI_l2 : I  0  0  0.442   0  0  0  0  0                  0                    0             1
-Frame1_l2 : B  1  1  0.442   0  0  0  4  0                  0                    0             1
-FrameI_l3 : I  0  0  0.442   0  0  0  0  0                  0                    0             1
-Frame1_l3 : B  1  1  0.442   0  0  0  4  0                  0                    0             1
-FrameI_l4 : I  0  0  0.442   0  0  0  0  0                  0                    0             1
-Frame1_l4 : B  1  1  0.442   0  0  0  4  0                  0                    0             1
-FrameI_l5 : I  0  0  0.442   0  0  0  0  0                  0                    0             1
-Frame1_l5 : B  1  1  0.442   0  0  0  4  0                  0                    0             1
+Frame1    : B  1  1 0 0  0.442   0  0  0  4  0                  0                    0             0
+FrameI_l1:  I  0  0 0 0  0.442   0  0  0  0  0                  0                    0             1
+Frame1_l1 : B  1  1 0 0  0.442   0  0  0  4  0                  0                    0             1
+FrameI_l2 : I  0  0 0 0  0.442   0  0  0  0  0                  0                    0             1
+Frame1_l2 : B  1  1 0 0  0.442   0  0  0  4  0                  0                    0             1
+FrameI_l3 : I  0  0 0 0  0.442   0  0  0  0  0                  0                    0             1
+Frame1_l3 : B  1  1 0 0  0.442   0  0  0  4  0                  0                    0             1
+FrameI_l4 : I  0  0 0 0  0.442   0  0  0  0  0                  0                    0             1
+Frame1_l4 : B  1  1 0 0  0.442   0  0  0  4  0                  0                    0             1
+FrameI_l5 : I  0  0 0 0  0.442   0  0  0  0  0                  0                    0             1
+Frame1_l5 : B  1  1 0 0  0.442   0  0  0  4  0                  0                    0             1
 
 
@@ -121,4 +121,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view_AllIntra.cfg
===================================================================
--- trunk/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view_AllIntra.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view_AllIntra.cfg	(revision 1405)
@@ -78,9 +78,9 @@
 DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
 GOPSize                       : 1           # GOP Size (number of B slice = GOPSize-1)
-Frame1    : B  1  1  0.442   0  0  0  4  0                  0                    0            0
-FrameI_l1:  I  0  0  0.442   0  0  0  0  0                  0                    0            0
-Frame1_l1 : B  1  1  0.442   0  0  0  4  0                  0                    0            0
-FrameI_l2 : I  0  0  0.442   0  0  0  0  0                  0                    0            0
-Frame1_l2 : B  1  1  0.442   0  0  0  4  0                  0                    0            0
+Frame1    : B  1  1 0 0 0.442   0  0  0  4  0                  0                    0            0
+FrameI_l1:  I  0  0 0 0 0.442   0  0  0  0  0                  0                    0            0
+Frame1_l1 : B  1  1 0 0 0.442   0  0  0  4  0                  0                    0            0
+FrameI_l2 : I  0  0 0 0 0.442   0  0  0  0  0                  0                    0            0
+Frame1_l2 : B  1  1 0 0 0.442   0  0  0  4  0                  0                    0            0
 
 #=========== Motion Search =============
@@ -99,4 +99,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/cfg/3D-HEVC/NonCTC/allintra/deltaCfg_3view+depth_AllIntra.cfg
===================================================================
--- trunk/cfg/3D-HEVC/NonCTC/allintra/deltaCfg_3view+depth_AllIntra.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/NonCTC/allintra/deltaCfg_3view+depth_AllIntra.cfg	(revision 1405)
@@ -4,15 +4,15 @@
 GOPSize                       : 1           # GOP Size (number of B slice = GOPSize-1)
 
-Frame1    : B  1  1  0.442   0  0  0  4  0                  0                    0   0
-FrameI_l1:  I  0  0  0.442   0  0  0  0  0                  0                    0   1             
-Frame1_l1 : B  1  1  0.442   0  0  0  4  0                  0                    0   1
-FrameI_l2 : I  0  0  0.442   0  0  0  0  0                  0                    0   1
-Frame1_l2 : B  1  1  0.442   0  0  0  4  0                  0                    0   1
-FrameI_l3 : I  0  0  0.442   0  0  0  0  0                  0                    0   1
-Frame1_l3 : B  1  1  0.442   0  0  0  4  0                  0                    0   1
-FrameI_l4 : I  0  0  0.442   0  0  0  0  0                  0                    0   1
-Frame1_l4 : B  1  1  0.442   0  0  0  4  0                  0                    0   1
-FrameI_l5 : I  0  0  0.442   0  0  0  0  0                  0                    0   1
-Frame1_l5 : B  1  1  0.442   0  0  0  4  0                  0                    0   1
+Frame1    : B  1  1  0 0 0.442   0  0  0  4  0                  0                    0   0
+FrameI_l1:  I  0  0  0 0 0.442   0  0  0  0  0                  0                    0   1             
+Frame1_l1 : B  1  1  0 0 0.442   0  0  0  4  0                  0                    0   1
+FrameI_l2 : I  0  0  0 0 0.442   0  0  0  0  0                  0                    0   1
+Frame1_l2 : B  1  1  0 0 0.442   0  0  0  4  0                  0                    0   1
+FrameI_l3 : I  0  0  0 0 0.442   0  0  0  0  0                  0                    0   1
+Frame1_l3 : B  1  1  0 0 0.442   0  0  0  4  0                  0                    0   1
+FrameI_l4 : I  0  0  0 0 0.442   0  0  0  0  0                  0                    0   1
+Frame1_l4 : B  1  1  0 0 0.442   0  0  0  4  0                  0                    0   1
+FrameI_l5 : I  0  0  0 0 0.442   0  0  0  0  0                  0                    0   1
+Frame1_l5 : B  1  1  0 0 0.442   0  0  0  4  0                  0                    0   1
 
 Frame2:   
Index: trunk/cfg/3D-HEVC/NonCTC/fco/baseCfg_3view+depth.cfg
===================================================================
--- trunk/cfg/3D-HEVC/NonCTC/fco/baseCfg_3view+depth.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/NonCTC/fco/baseCfg_3view+depth.cfg	(revision 1405)
@@ -96,62 +96,62 @@
 #                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
 #         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0   
-Frame1:     B    8     1        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0
-Frame2:     B    4     2        0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0
-Frame3:     B    2     3        0.3536   0            0              0           2                4         -2 -4  2 6         1       2        4         1 1 1 1         0
-Frame4:     B    1     4        0.68     0            0              0           2                4         -1  1  3 7         1       1        5         1 0 1 1 1       0
-Frame5:     B    3     4        0.68     0            0              0           2                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       0
-Frame6:     B    6     3        0.3536   0            0              0           2                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       0
-Frame7:     B    5     4        0.68     0            0              0           2                4         -1 -5  1 3         1       1        5         1 0 1 1 1       0
-Frame8:     B    7     4        0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0
-    
-FrameI_l1:  I    0     0        0.442    0            0              0           0                0                            0                                          0             
-Frame1_l1:  B    8     1        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0             
-Frame2_l1:  B    4     2        0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0             
-Frame3_l1:  B    2     3        0.3536   0            0              0           2                4         -2 -4  2 6         1       2        4         1 1 1 1         0             
-Frame4_l1:  B    1     4        0.68     0            0              0           2                4         -1  1  3 7         1       1        5         1 0 1 1 1       0             
-Frame5_l1:  B    3     4        0.68     0            0              0           2                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       0             
-Frame6_l1:  B    6     3        0.3536   0            0              0           2                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       0             
-Frame7_l1:  B    5     4        0.68     0            0              0           2                4         -1 -5  1 3         1       1        5         1 0 1 1 1       0             
-Frame8_l1:  B    7     4        0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0             
-
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
-
-FrameI_l3:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
-
-FrameI_l4:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l4:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l4:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l4:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l4:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l4:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l4:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l4:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l4:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
-
-FrameI_l5:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l5:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l5:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l5:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l5:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l5:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l5:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l5:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l5:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame1:     B    8     1  0 0    0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0
+Frame2:     B    4     2  0 0    0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0
+Frame3:     B    2     3  0 0    0.3536   0            0              0           2                4         -2 -4  2 6         1       2        4         1 1 1 1         0
+Frame4:     B    1     4  0 0    0.68     0            0              0           2                4         -1  1  3 7         1       1        5         1 0 1 1 1       0
+Frame5:     B    3     4  0 0    0.68     0            0              0           2                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       0
+Frame6:     B    6     3  0 0    0.3536   0            0              0           2                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       0
+Frame7:     B    5     4  0 0    0.68     0            0              0           2                4         -1 -5  1 3         1       1        5         1 0 1 1 1       0
+Frame8:     B    7     4  0 0    0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0
+
+FrameI_l1:  I    0     0  0 0    0.442    0            0              0           0                0                            0                                          0             
+Frame1_l1:  B    8     1  0 0    0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0             
+Frame2_l1:  B    4     2  0 0    0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0             
+Frame3_l1:  B    2     3  0 0    0.3536   0            0              0           2                4         -2 -4  2 6         1       2        4         1 1 1 1         0             
+Frame4_l1:  B    1     4  0 0    0.68     0            0              0           2                4         -1  1  3 7         1       1        5         1 0 1 1 1       0             
+Frame5_l1:  B    3     4  0 0    0.68     0            0              0           2                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       0             
+Frame6_l1:  B    6     3  0 0    0.3536   0            0              0           2                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       0             
+Frame7_l1:  B    5     4  0 0    0.68     0            0              0           2                4         -1 -5  1 3         1       1        5         1 0 1 1 1       0             
+Frame8_l1:  B    7     4  0 0    0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0             
+
+FrameI_l2:  P    0     3  0 0 0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l2:  B    8     4  0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l2:  B    4     5  0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l2:  B    2     6  0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l2:  B    1     7  0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l2:  B    3     7  0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l2:  B    6     6  0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l2:  B    5     7  0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l2:  B    7     7  0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+
+FrameI_l3:  P    0     3  0 0 0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l3:  B    8     4  0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l3:  B    4     5  0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l3:  B    2     6  0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l3:  B    1     7  0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l3:  B    3     7  0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l3:  B    6     6  0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l3:  B    5     7  0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l3:  B    7     7  0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+
+FrameI_l4:  P    0     3  0 0 0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l4:  B    8     4  0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l4:  B    4     5  0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l4:  B    2     6  0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l4:  B    1     7  0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l4:  B    3     7  0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l4:  B    6     6  0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l4:  B    5     7  0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l4:  B    7     7  0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+
+FrameI_l5:  P    0     3  0 0 0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l5:  B    8     4  0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l5:  B    4     5  0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l5:  B    2     6  0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l5:  B    1     7  0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l5:  B    3     7  0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l5:  B    6     6  0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l5:  B    5     7  0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l5:  B    7     7  0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
 
 #=========== Motion Search =============
@@ -169,4 +169,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/cfg/3D-HEVC/NonCTC/ibp/gopCfg_IBP_3view+depth.cfg
===================================================================
--- trunk/cfg/3D-HEVC/NonCTC/ibp/gopCfg_IBP_3view+depth.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/NonCTC/ibp/gopCfg_IBP_3view+depth.cfg	(revision 1405)
@@ -53,62 +53,62 @@
 #                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
 #         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0       interCompPred
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0         
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
-                                                                                                                                                                             
-FrameI_l1:  I    0     0     0.442    0        0        0        0      0                        0                                 0                                             1         
-Frame1_l1:  B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             1         
-Frame2_l1:  B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             1         
-Frame3_l1:  B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             1         
-Frame4_l1:  B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             1         
-Frame5_l1:  B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             1         
-Frame6_l1:  B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             1         
-Frame7_l1:  B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             1         
-Frame8_l1:  B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             1
-                                                                                                                                                                             
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1          1   
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1          1   
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1          1   
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1          1   
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1          1   
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1          1   
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1          1   
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1          1   
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1          1   
-                                                                                                                                                                             
-FrameI_l3:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1          1   
-Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1          1   
-Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1          1   
-Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1          1   
-Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1          1   
-Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1          1   
-Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1          1   
-Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1          1   
-Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1          1   
-                                                                                                                                                                             
-FrameI_l4:  B    0     3     0.442    0        0        0        1      0                        0                                 2            0 1       0 -1       -1 0        1 
-Frame1_l4:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 2            0 1       1 -1       -1 1        1 
-Frame2_l4:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       2            0 1       1 -1       -1 1        1 
-Frame3_l4:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         2            0 1       1 -1       -1 1        1 
-Frame4_l4:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       2            0 1       1 -1       -1 1        1 
-Frame5_l4:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       2            0 1       2 -1       -1 2        1 
-Frame6_l4:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       2            0 1       2 -1       -1 2        1 
-Frame7_l4:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       2            0 1       2 -1       -1 2        1 
-Frame8_l4:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       2            0 1       2 -1       -1 2        1 
-                                                                                                                                                                             
-FrameI_l5:  B    0     3     0.442    0        0        0        1      0                        0                                 2            0 1       0 -1       -1 0        1   
-Frame1_l5:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 2            0 1       1 -1       -1 1        1   
-Frame2_l5:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       2            0 1       1 -1       -1 1        1   
-Frame3_l5:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         2            0 1       1 -1       -1 1        1   
-Frame4_l5:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       2            0 1       1 -1       -1 1        1   
-Frame5_l5:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       2            0 1       2 -1       -1 2        1   
-Frame6_l5:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       2            0 1       2 -1       -1 2        1   
-Frame7_l5:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       2            0 1       2 -1       -1 2        1   
-Frame8_l5:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       2            0 1       2 -1       -1 2        1   
+Frame1:     B    8     1 0 0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0
+Frame2:     B    4     2 0 0  0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0
+Frame3:     B    2     3 0 0  0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0
+Frame4:     B    1     4 0 0  0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0
+Frame5:     B    3     4 0 0  0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0
+Frame6:     B    6     3 0 0  0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0         
+Frame7:     B    5     4 0 0  0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0
+Frame8:     B    7     4 0 0  0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
+
+FrameI_l1:  I    0     0 0 0  0.442    0        0        0        0      0                        0                                 0                                             1         
+Frame1_l1:  B    8     1 0 0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             1         
+Frame2_l1:  B    4     2 0 0  0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             1         
+Frame3_l1:  B    2     3 0 0  0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             1         
+Frame4_l1:  B    1     4 0 0  0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             1         
+Frame5_l1:  B    3     4 0 0  0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             1         
+Frame6_l1:  B    6     3 0 0  0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             1         
+Frame7_l1:  B    5     4 0 0  0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             1         
+Frame8_l1:  B    7     4 0 0  0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             1
+
+FrameI_l2:  P    0     3 0 0  0.442    0        0        0        1      0                        0                                 1            0         0          -1          1   
+Frame1_l2:  B    8     4 0 0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1          1   
+Frame2_l2:  B    4     5 0 0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1          1   
+Frame3_l2:  B    2     6 0 0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1          1   
+Frame4_l2:  B    1     7 0 0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1          1   
+Frame5_l2:  B    3     7 0 0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1          1   
+Frame6_l2:  B    6     6 0 0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1          1   
+Frame7_l2:  B    5     7 0 0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1          1   
+Frame8_l2:  B    7     7 0 0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1          1   
+
+FrameI_l3:  P    0     3 0 0  0.442    0        0        0        1      0                        0                                 1            0         0          -1          1   
+Frame1_l3:  B    8     4 0 0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1          1   
+Frame2_l3:  B    4     5 0 0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1          1   
+Frame3_l3:  B    2     6 0 0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1          1   
+Frame4_l3:  B    1     7 0 0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1          1   
+Frame5_l3:  B    3     7 0 0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1          1   
+Frame6_l3:  B    6     6 0 0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1          1   
+Frame7_l3:  B    5     7 0 0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1          1   
+Frame8_l3:  B    7     7 0 0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1          1   
+
+FrameI_l4:  B    0     3 0 0  0.442    0        0        0        1      0                        0                                 2            0 1       0 -1       -1 0        1 
+Frame1_l4:  B    8     4 0 0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 2            0 1       1 -1       -1 1        1 
+Frame2_l4:  B    4     5 0 0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       2            0 1       1 -1       -1 1        1 
+Frame3_l4:  B    2     6 0 0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         2            0 1       1 -1       -1 1        1 
+Frame4_l4:  B    1     7 0 0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       2            0 1       1 -1       -1 1        1 
+Frame5_l4:  B    3     7 0 0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       2            0 1       2 -1       -1 2        1 
+Frame6_l4:  B    6     6 0 0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       2            0 1       2 -1       -1 2        1 
+Frame7_l4:  B    5     7 0 0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       2            0 1       2 -1       -1 2        1 
+Frame8_l4:  B    7     7 0 0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       2            0 1       2 -1       -1 2        1 
+
+FrameI_l5:  B    0     3 0 0  0.442    0        0        0        1      0                        0                                 2            0 1       0 -1       -1 0        1   
+Frame1_l5:  B    8     4 0 0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 2            0 1       1 -1       -1 1        1   
+Frame2_l5:  B    4     5 0 0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       2            0 1       1 -1       -1 1        1   
+Frame3_l5:  B    2     6 0 0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         2            0 1       1 -1       -1 1        1   
+Frame4_l5:  B    1     7 0 0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       2            0 1       1 -1       -1 1        1   
+Frame5_l5:  B    3     7 0 0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       2            0 1       2 -1       -1 2        1   
+Frame6_l5:  B    6     6 0 0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       2            0 1       2 -1       -1 2        1   
+Frame7_l5:  B    5     7 0 0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       2            0 1       2 -1       -1 2        1   
+Frame8_l5:  B    7     7 0 0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       2            0 1       2 -1       -1 2        1   
 
 ### DO NOT ADD ANYTHING BELOW THIS LINE ###
Index: trunk/cfg/3D-HEVC/NonCTC/ibp/gopCfg_IBP_3view.cfg
===================================================================
--- trunk/cfg/3D-HEVC/NonCTC/ibp/gopCfg_IBP_3view.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/NonCTC/ibp/gopCfg_IBP_3view.cfg	(revision 1405)
@@ -40,32 +40,32 @@
 #         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0       interCompPred
                                                                                                                                                                                   
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0                                           0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1         0                                           0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1           0                                           0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1         0                                           0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0                                           0        
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0                                           0
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0                                           0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0                                           0
-                                                                                                                                                                                          
-FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0         0          -1          0        
-Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1          0        
-Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1          0        
-Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1          0        
-Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1          0        
-Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1          0        
-Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1          0        
-Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1          0
-Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1          0
-                                                                                                                                                                            
-FrameI_l2:  B    0     3     0.442    0        0        0        1      0                        0                                   2          0 1       0 -1       -1 0        0
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   2          0 1       1 -1       -1 1        0
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         2          0 1       1 -1       -1 1        0
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           2          0 1       1 -1       -1 1        0
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         2          0 1       1 -1       -1 1        0
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         2          0 1       2 -1       -1 2        0
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         2          0 1       2 -1       -1 2        0
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         2          0 1       2 -1       -1 2        0
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         2          0 1       2 -1       -1 2        0
+Frame1:     B    8     1 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0                                           0
+Frame2:     B    4     2 0 0 0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1         0                                           0
+Frame3:     B    2     3 0 0 0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1           0                                           0
+Frame4:     B    1     4 0 0 0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1         0                                           0
+Frame5:     B    3     4 0 0 0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0                                           0        
+Frame6:     B    6     3 0 0 0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0                                           0
+Frame7:     B    5     4 0 0 0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0                                           0
+Frame8:     B    7     4 0 0 0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0                                           0
+                                                                                                                                   
+FrameI_l1:  P    0     3 0 0 0.442    0        0        0        1      0                        0                                   1          0         0          -1          0        
+Frame1_l1:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1          0        
+Frame2_l1:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1          0        
+Frame3_l1:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1          0        
+Frame4_l1:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1          0        
+Frame5_l1:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1          0        
+Frame6_l1:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1          0        
+Frame7_l1:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1          0
+Frame8_l1:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1          0
+
+FrameI_l2:  B    0     3 0 0 0.442    0        0        0        1      0                        0                                   2          0 1       0 -1       -1 0        0
+Frame1_l2:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   2          0 1       1 -1       -1 1        0
+Frame2_l2:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         2          0 1       1 -1       -1 1        0
+Frame3_l2:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           2          0 1       1 -1       -1 1        0
+Frame4_l2:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         2          0 1       1 -1       -1 1        0
+Frame5_l2:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         2          0 1       2 -1       -1 2        0
+Frame6_l2:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         2          0 1       2 -1       -1 2        0
+Frame7_l2:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         2          0 1       2 -1       -1 2        0
+Frame8_l2:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         2          0 1       2 -1       -1 2        0
 
 ### DO NOT ADD ANYTHING BELOW THIS LINE ###
Index: trunk/cfg/3D-HEVC/NonCTC/misc/gopCfg_ILP_on_IRAP_3view+depth.cfg
===================================================================
--- trunk/cfg/3D-HEVC/NonCTC/misc/gopCfg_ILP_on_IRAP_3view+depth.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/NonCTC/misc/gopCfg_ILP_on_IRAP_3view+depth.cfg	(revision 1405)
@@ -45,62 +45,62 @@
 #                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
 #         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0       interCompPred
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0         
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
-                                                                                                                                                                             
-FrameI_l1:  I    0     0     0.442    0        0        0        0      0                        0                                 0                                             1         
-Frame1_l1:  B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0         
-Frame2_l1:  B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0         
-Frame3_l1:  B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0         
-Frame4_l1:  B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0         
-Frame5_l1:  B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0         
-Frame6_l1:  B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0         
-Frame7_l1:  B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0         
-Frame8_l1:  B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
-                                                                                                                                                                             
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1          1
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
-                                                                                                                                                                             
-FrameI_l3:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1          1
-Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0
-Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0
-Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0
-Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0
-Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0
-Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0
-Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0
-Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
-                                                                                                                                                                             
-FrameI_l4:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1          1
-Frame1_l4:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0
-Frame2_l4:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0
-Frame3_l4:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0
-Frame4_l4:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0
-Frame5_l4:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0
-Frame6_l4:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0
-Frame7_l4:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0
-Frame8_l4:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
-                                                                                                                                                                             
-FrameI_l5:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1          1
-Frame1_l5:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0
-Frame2_l5:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0
-Frame3_l5:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0
-Frame4_l5:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0
-Frame5_l5:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0
-Frame6_l5:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0
-Frame7_l5:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0
-Frame8_l5:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
+Frame1:     B    8     1 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0
+Frame2:     B    4     2 0 0 0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0
+Frame3:     B    2     3 0 0 0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0
+Frame4:     B    1     4 0 0 0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0
+Frame5:     B    3     4 0 0 0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0
+Frame6:     B    6     3 0 0 0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0         
+Frame7:     B    5     4 0 0 0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0
+Frame8:     B    7     4 0 0 0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
+
+FrameI_l1:  I    0     0 0 0 0.442    0        0        0        0      0                        0                                 0                                             1         
+Frame1_l1:  B    8     1 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0         
+Frame2_l1:  B    4     2 0 0 0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0         
+Frame3_l1:  B    2     3 0 0 0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0         
+Frame4_l1:  B    1     4 0 0 0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0         
+Frame5_l1:  B    3     4 0 0 0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0         
+Frame6_l1:  B    6     3 0 0 0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0         
+Frame7_l1:  B    5     4 0 0 0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0         
+Frame8_l1:  B    7     4 0 0 0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
+
+FrameI_l2:  P    0     3 0 0 0.442    0        0        0        1      0                        0                                 1            0         0          -1          1
+Frame1_l2:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0
+Frame2_l2:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0
+Frame3_l2:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0
+Frame4_l2:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0
+Frame5_l2:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0
+Frame6_l2:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0
+Frame7_l2:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0
+Frame8_l2:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
+
+FrameI_l3:  P    0     3 0 0 0.442    0        0        0        1      0                        0                                 1            0         0          -1          1
+Frame1_l3:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0
+Frame2_l3:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0
+Frame3_l3:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0
+Frame4_l3:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0
+Frame5_l3:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0
+Frame6_l3:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0
+Frame7_l3:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0
+Frame8_l3:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
+
+FrameI_l4:  P    0     3 0 0 0.442    0        0        0        1      0                        0                                 1            0         0          -1          1
+Frame1_l4:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0
+Frame2_l4:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0
+Frame3_l4:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0
+Frame4_l4:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0
+Frame5_l4:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0
+Frame6_l4:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0
+Frame7_l4:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0
+Frame8_l4:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
+
+FrameI_l5:  P    0     3 0 0 0.442    0        0        0        1      0                        0                                 1            0         0          -1          1
+Frame1_l5:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                             0
+Frame2_l5:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                             0
+Frame3_l5:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                             0
+Frame4_l5:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                             0
+Frame5_l5:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                             0
+Frame6_l5:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                             0
+Frame7_l5:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                             0
+Frame8_l5:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                             0
 
 ### DO NOT ADD ANYTHING BELOW THIS LINE ###
Index: trunk/cfg/3D-HEVC/NonCTC/misc/gopCfg_NoIv_3view+depth.cfg
===================================================================
--- trunk/cfg/3D-HEVC/NonCTC/misc/gopCfg_NoIv_3view+depth.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/NonCTC/misc/gopCfg_NoIv_3view+depth.cfg	(revision 1405)
@@ -41,62 +41,62 @@
 #                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
 #         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0   interCompPred
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         0         
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         0
-                                                                                                                                                                         
-FrameI_l1:  I    0     0     0.442    0        0        0        0      0                        0                                 0                                         1         
-Frame1_l1:  B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         1         
-Frame2_l1:  B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         1         
-Frame3_l1:  B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         1         
-Frame4_l1:  B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         1         
-Frame5_l1:  B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         1         
-Frame6_l1:  B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         1         
-Frame7_l1:  B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         1         
-Frame8_l1:  B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         1
-                                                                                                                                                                         
-FrameI_l2:  I    0     3     0.442    0        0        0        1      0                        0                                 0                                         0
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         0
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         0
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         0
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         0
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         0
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         0
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         0
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         0
-                                                                                                                                                                         
-FrameI_l3:  I    0     3     0.442    0        0        0        1      0                        0                                 0                                         1
-Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         1
-Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         1
-Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         1
-Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         1
-Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         1
-Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         1
-Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         1
-Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         1
-                                                                                                                                                                         
-FrameI_l4:  I    0     3     0.442    0        0        0        1      0                        0                                 0                                         0
-Frame1_l4:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         0
-Frame2_l4:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         0
-Frame3_l4:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         0
-Frame4_l4:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         0
-Frame5_l4:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         0
-Frame6_l4:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         0
-Frame7_l4:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         0
-Frame8_l4:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         0
-                                                                                                                                                                         
-FrameI_l5:  I    0     3     0.442    0        0        0        1      0                        0                                 0                                         1
-Frame1_l5:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         1
-Frame2_l5:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         1
-Frame3_l5:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         1
-Frame4_l5:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         1
-Frame5_l5:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         1
-Frame6_l5:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         1
-Frame7_l5:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         1
-Frame8_l5:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         1
+Frame1:     B    8     1 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         0
+Frame2:     B    4     2 0 0 0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         0
+Frame3:     B    2     3 0 0 0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         0
+Frame4:     B    1     4 0 0 0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         0
+Frame5:     B    3     4 0 0 0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         0
+Frame6:     B    6     3 0 0 0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         0         
+Frame7:     B    5     4 0 0 0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         0
+Frame8:     B    7     4 0 0 0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         0
+
+FrameI_l1:  I    0     0 0 0 0.442    0        0        0        0      0                        0                                 0                                         1         
+Frame1_l1:  B    8     1 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         1         
+Frame2_l1:  B    4     2 0 0 0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         1         
+Frame3_l1:  B    2     3 0 0 0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         1         
+Frame4_l1:  B    1     4 0 0 0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         1         
+Frame5_l1:  B    3     4 0 0 0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         1         
+Frame6_l1:  B    6     3 0 0 0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         1         
+Frame7_l1:  B    5     4 0 0 0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         1         
+Frame8_l1:  B    7     4 0 0 0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         1
+
+FrameI_l2:  I    0     3 0 0 0.442    0        0        0        1      0                        0                                 0                                         0
+Frame1_l2:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         0
+Frame2_l2:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         0
+Frame3_l2:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         0
+Frame4_l2:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         0
+Frame5_l2:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         0
+Frame6_l2:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         0
+Frame7_l2:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         0
+Frame8_l2:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         0
+
+FrameI_l3:  I    0     3 0 0 0.442    0        0        0        1      0                        0                                 0                                         1
+Frame1_l3:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         1
+Frame2_l3:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         1
+Frame3_l3:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         1
+Frame4_l3:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         1
+Frame5_l3:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         1
+Frame6_l3:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         1
+Frame7_l3:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         1
+Frame8_l3:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         1
+
+FrameI_l4:  I    0     3 0 0 0.442    0        0        0        1      0                        0                                 0                                         0
+Frame1_l4:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         0
+Frame2_l4:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         0
+Frame3_l4:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         0
+Frame4_l4:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         0
+Frame5_l4:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         0
+Frame6_l4:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         0
+Frame7_l4:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         0
+Frame8_l4:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         0
+
+FrameI_l5:  I    0     3 0 0 0.442    0        0        0        1      0                        0                                 0                                         1
+Frame1_l5:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         1
+Frame2_l5:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         1
+Frame3_l5:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         1
+Frame4_l5:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         1
+Frame5_l5:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         1
+Frame6_l5:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         1
+Frame7_l5:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         1
+Frame8_l5:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         1
 
 ### DO NOT ADD ANYTHING BELOW THIS LINE ###
Index: trunk/cfg/3D-HEVC/NonCTC/misc/gopCfg_NoIv_3view.cfg
===================================================================
--- trunk/cfg/3D-HEVC/NonCTC/misc/gopCfg_NoIv_3view.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/NonCTC/misc/gopCfg_NoIv_3view.cfg	(revision 1405)
@@ -33,32 +33,32 @@
 #                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
 #         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0    interCompPred 
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0                                        0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1         0                                        0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1           0                                        0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1         0                                        0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0                                        0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0                                        0         
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0                                        0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0                                        0
-                                                                                                                                                                          
-FrameI_l1:  I    0     3     0.442    0        0        0        1      0                        0                                   0                                        0         
-Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0                                        0         
-Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         0                                        0         
-Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           0                                        0         
-Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         0                                        0         
-Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0                                        0         
-Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0                                        0         
-Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0                                        0         
-Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0                                        0
-                                                                                                                                                                          
-FrameI_l2:  I    0     3     0.442    0        0        0        1      0                        0                                   0                                        0
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0                                        0
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         0                                        0
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           0                                        0
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         0                                        0
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0                                        0
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0                                        0
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0                                        0
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0                                        0
+Frame1:     B    8     1 0 0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0                                        0
+Frame2:     B    4     2 0 0  0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1         0                                        0
+Frame3:     B    2     3 0 0  0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1           0                                        0
+Frame4:     B    1     4 0 0  0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1         0                                        0
+Frame5:     B    3     4 0 0  0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0                                        0
+Frame6:     B    6     3 0 0  0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0                                        0         
+Frame7:     B    5     4 0 0  0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0                                        0
+Frame8:     B    7     4 0 0  0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0                                        0
+
+FrameI_l1:  I    0     3 0 0  0.442    0        0        0        1      0                        0                                   0                                        0         
+Frame1_l1:  B    8     4 0 0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0                                        0         
+Frame2_l1:  B    4     5 0 0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         0                                        0         
+Frame3_l1:  B    2     6 0 0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           0                                        0         
+Frame4_l1:  B    1     7 0 0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         0                                        0         
+Frame5_l1:  B    3     7 0 0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0                                        0         
+Frame6_l1:  B    6     6 0 0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0                                        0         
+Frame7_l1:  B    5     7 0 0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0                                        0         
+Frame8_l1:  B    7     7 0 0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0                                        0
+                                                                                                                                               
+FrameI_l2:  I    0     3 0 0  0.442    0        0        0        1      0                        0                                   0                                        0
+Frame1_l2:  B    8     4 0 0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0                                        0
+Frame2_l2:  B    4     5 0 0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         0                                        0
+Frame3_l2:  B    2     6 0 0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           0                                        0
+Frame4_l2:  B    1     7 0 0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         0                                        0
+Frame5_l2:  B    3     7 0 0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0                                        0
+Frame6_l2:  B    6     6 0 0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0                                        0
+Frame7_l2:  B    5     7 0 0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0                                        0
+Frame8_l2:  B    7     7 0 0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0                                        0
                                                                                                                                                                           
 ### DO NOT ADD ANYTHING BELOW THIS LINE ###                                                                                                                                   
Index: trunk/cfg/3D-HEVC/NonCTC/rc/baseCfg_3view+depth_rate_control.cfg
===================================================================
--- trunk/cfg/3D-HEVC/NonCTC/rc/baseCfg_3view+depth_rate_control.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/NonCTC/rc/baseCfg_3view+depth_rate_control.cfg	(revision 1405)
@@ -96,62 +96,62 @@
 #                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
 #         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0   
-Frame1:     B    8     1        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0
-Frame2:     B    4     2        0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0
-Frame3:     B    2     3        0.3536   0            0              0           2                4         -2 -4  2 6         1       2        4         1 1 1 1         0
-Frame4:     B    1     4        0.68     0            0              0           2                4         -1  1  3 7         1       1        5         1 0 1 1 1       0
-Frame5:     B    3     4        0.68     0            0              0           2                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       0
-Frame6:     B    6     3        0.3536   0            0              0           2                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       0
-Frame7:     B    5     4        0.68     0            0              0           2                4         -1 -5  1 3         1       1        5         1 0 1 1 1       0
-Frame8:     B    7     4        0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0
-    
-FrameI_l1:  I    0     0        0.442    0            0              0           0                0                            0                                          0             
-Frame1_l1:  B    8     1        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0             
-Frame2_l1:  B    4     2        0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0             
-Frame3_l1:  B    2     3        0.3536   0            0              0           2                4         -2 -4  2 6         1       2        4         1 1 1 1         0             
-Frame4_l1:  B    1     4        0.68     0            0              0           2                4         -1  1  3 7         1       1        5         1 0 1 1 1       0             
-Frame5_l1:  B    3     4        0.68     0            0              0           2                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       0             
-Frame6_l1:  B    6     3        0.3536   0            0              0           2                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       0             
-Frame7_l1:  B    5     4        0.68     0            0              0           2                4         -1 -5  1 3         1       1        5         1 0 1 1 1       0             
-Frame8_l1:  B    7     4        0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0             
-
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
-
-FrameI_l3:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
-
-FrameI_l4:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l4:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l4:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l4:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l4:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l4:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l4:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l4:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l4:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
-
-FrameI_l5:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l5:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l5:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l5:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l5:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l5:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l5:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l5:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l5:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame1:     B    8     1 0 0    0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0
+Frame2:     B    4     2 0 0    0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0
+Frame3:     B    2     3 0 0    0.3536   0            0              0           2                4         -2 -4  2 6         1       2        4         1 1 1 1         0
+Frame4:     B    1     4 0 0    0.68     0            0              0           2                4         -1  1  3 7         1       1        5         1 0 1 1 1       0
+Frame5:     B    3     4 0 0    0.68     0            0              0           2                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       0
+Frame6:     B    6     3 0 0    0.3536   0            0              0           2                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       0
+Frame7:     B    5     4 0 0    0.68     0            0              0           2                4         -1 -5  1 3         1       1        5         1 0 1 1 1       0
+Frame8:     B    7     4 0 0    0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0
+                         
+FrameI_l1:  I    0     0 0 0    0.442    0            0              0           0                0                            0                                          0             
+Frame1_l1:  B    8     1 0 0    0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0             
+Frame2_l1:  B    4     2 0 0    0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0             
+Frame3_l1:  B    2     3 0 0    0.3536   0            0              0           2                4         -2 -4  2 6         1       2        4         1 1 1 1         0             
+Frame4_l1:  B    1     4 0 0    0.68     0            0              0           2                4         -1  1  3 7         1       1        5         1 0 1 1 1       0             
+Frame5_l1:  B    3     4 0 0    0.68     0            0              0           2                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       0             
+Frame6_l1:  B    6     3 0 0    0.3536   0            0              0           2                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       0             
+Frame7_l1:  B    5     4 0 0    0.68     0            0              0           2                4         -1 -5  1 3         1       1        5         1 0 1 1 1       0             
+Frame8_l1:  B    7     4 0 0    0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0             
+                         
+FrameI_l2:  P    0     3 0 0 0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l2:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l2:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l2:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l2:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l2:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l2:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l2:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l2:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+                         
+FrameI_l3:  P    0     3 0 0 0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l3:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l3:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l3:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l3:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l3:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l3:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l3:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l3:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+                         
+FrameI_l4:  P    0     3 0 0 0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l4:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l4:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l4:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l4:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l4:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l4:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l4:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l4:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+                         
+FrameI_l5:  P    0     3 0 0 0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l5:  B    8     4 0 0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l5:  B    4     5 0 0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l5:  B    2     6 0 0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l5:  B    1     7 0 0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l5:  B    3     7 0 0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l5:  B    6     6 0 0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l5:  B    5     7 0 0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l5:  B    7     7 0 0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
 
 #=========== Motion Search =============
@@ -169,4 +169,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/cfg/3D-HEVC/baseCfg_2view+depth.cfg
===================================================================
--- trunk/cfg/3D-HEVC/baseCfg_2view+depth.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/baseCfg_2view+depth.cfg	(revision 1405)
@@ -80,44 +80,44 @@
 GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id   #ref_pics                 predict     #ref_idcs         #ActiveRefLayerPics     refLayerPicPosIl_L0     interCompPred
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         0        
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         0
-                                                                                                                                                                         
-FrameI_l1:  I    0     0     0.442    0        0        0        0      0                        0                                 0                                         1        
-Frame1_l1:  B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         1        
-Frame2_l1:  B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         1        
-Frame3_l1:  B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         1        
-Frame4_l1:  B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         1        
-Frame5_l1:  B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         1        
-Frame6_l1:  B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         1        
-Frame7_l1:  B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         1        
-Frame8_l1:  B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         1
-                                                                                                                                                                         
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1      1
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1      1
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1      1
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1      1
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1      1
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1      1
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1      1
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1      1
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1      1
-                                                                                                                                                                         
-FrameI_l3:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1      1
-Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1      1
-Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1      1
-Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1      1
-Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1      1
-Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1      1
-Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1      1
-Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1      1
-Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1      1
+#                         CbQPoffset  QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset CrQPoffset  cOffsetDiv2      temporal_id   #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0         interCompPred     
+Frame1:     B    8     1    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         0
+Frame2:     B    4     2    0   0     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         0
+Frame3:     B    2     3    0   0     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         0
+Frame4:     B    1     4    0   0     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         0
+Frame5:     B    3     4    0   0     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         0
+Frame6:     B    6     3    0   0     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         0        
+Frame7:     B    5     4    0   0     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         0
+Frame8:     B    7     4    0   0     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         0
+
+FrameI_l1:  I    0     0    0   0     0.442    0        0        0        0      0                        0                                 0                                         1        
+Frame1_l1:  B    8     1    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                         1        
+Frame2_l1:  B    4     2    0   0     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                         1        
+Frame3_l1:  B    2     3    0   0     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                         1        
+Frame4_l1:  B    1     4    0   0     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                         1        
+Frame5_l1:  B    3     4    0   0     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                         1        
+Frame6_l1:  B    6     3    0   0     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                         1        
+Frame7_l1:  B    5     4    0   0     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                         1        
+Frame8_l1:  B    7     4    0   0     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                         1
+
+FrameI_l2:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                 1            0         0          -1      1
+Frame1_l2:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1      1
+Frame2_l2:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1      1
+Frame3_l2:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1      1
+Frame4_l2:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1      1
+Frame5_l2:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1      1
+Frame6_l2:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1      1
+Frame7_l2:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1      1
+Frame8_l2:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1      1
+                                                                                                                                             
+FrameI_l3:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                 1            0         0          -1      1
+Frame1_l3:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1      1
+Frame2_l3:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1      1
+Frame3_l3:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1      1
+Frame4_l3:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1      1
+Frame5_l3:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1      1
+Frame6_l3:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1      1
+Frame7_l3:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1      1
+Frame8_l3:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1      1
 
 #=========== Motion Search =============
@@ -135,4 +135,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/cfg/3D-HEVC/baseCfg_2view.cfg
===================================================================
--- trunk/cfg/3D-HEVC/baseCfg_2view.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/baseCfg_2view.cfg	(revision 1405)
@@ -69,24 +69,24 @@
 
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id   #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0         interCompPred     
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                            0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                            0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                            0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                            0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                            0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                            0        
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                            0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                            0
-                                                                                                                                                                            
-FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                  1          0         0          -1          0        
-Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                  1          0         1          -1          0        
-Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1       4    5     1 1 0 0 1       1          0         1          -1          0        
-Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1       2    4     1 1 1 1         1          0         1          -1          0        
-Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1       1    5     1 0 1 1 1       1          0         1          -1          0        
-Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1      -2    5     1 1 1 1 0       1          0         2          -1          0        
-Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1      -3    5     1 1 1 1 0       1          0         2          -1          0        
-Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1       1    5     1 0 1 1 1       1          0         2          -1          0        
-Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1      -2    5     1 1 1 1 0       1          0         2          -1          0
+#                         CbQPoffset  QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset CrQPoffset  cOffsetDiv2      temporal_id   #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0         interCompPred     
+Frame1:     B    8     1    0 0    0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                            0
+Frame2:     B    4     2    0 0    0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                            0
+Frame3:     B    2     3    0 0    0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                            0
+Frame4:     B    1     4    0 0    0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                            0
+Frame5:     B    3     4    0 0    0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                            0
+Frame6:     B    6     3    0 0    0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                            0        
+Frame7:     B    5     4    0 0    0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                            0
+Frame8:     B    7     4    0 0    0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                            0
+                                   
+FrameI_l1:  P    0     3    0 0   0.442    0        0        0        1      0                        0                                  1          0         0          -1          0        
+Frame1_l1:  B    8     4    0 0   0.442    0        0        0        4      4     -8 -10 -12 -16     0                                  1          0         1          -1          0        
+Frame2_l1:  B    4     5    0 0   0.3536   0        0        0        3      3     -4 -6  4           1       4    5     1 1 0 0 1       1          0         1          -1          0        
+Frame3_l1:  B    2     6    0 0   0.3536   0        0        0        3      4     -2 -4  2 6         1       2    4     1 1 1 1         1          0         1          -1          0        
+Frame4_l1:  B    1     7    0 0   0.68     0        0        0        3      4     -1  1  3 7         1       1    5     1 0 1 1 1       1          0         1          -1          0        
+Frame5_l1:  B    3     7    0 0   0.68     0        0        0        3      4     -1 -3  1 5         1      -2    5     1 1 1 1 0       1          0         2          -1          0        
+Frame6_l1:  B    6     6    0 0   0.3536   0        0        0        3      4     -2 -4 -6 2         1      -3    5     1 1 1 1 0       1          0         2          -1          0        
+Frame7_l1:  B    5     7    0 0   0.68     0        0        0        3      4     -1 -5  1 3         1       1    5     1 0 1 1 1       1          0         2          -1          0        
+Frame8_l1:  B    7     7    0 0   0.68     0        0        0        3      4     -1 -3 -7 1         1      -2    5     1 1 1 1 0       1          0         2          -1          0
 
 #=========== Motion Search =============
@@ -105,4 +105,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/cfg/3D-HEVC/baseCfg_3view+depth.cfg
===================================================================
--- trunk/cfg/3D-HEVC/baseCfg_3view+depth.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/baseCfg_3view+depth.cfg	(revision 1405)
@@ -94,64 +94,64 @@
 GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0      interCompPred
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                            0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                            0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                            0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                            0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                            0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                            0        
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                            0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                            0
-                                                                                                                                                                            
-FrameI_l1:  I    0     0     0.442    0        0        0        0      0                        0                                 0                                            1        
-Frame1_l1:  B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                            1        
-Frame2_l1:  B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                            1        
-Frame3_l1:  B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                            1        
-Frame4_l1:  B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                            1        
-Frame5_l1:  B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                            1        
-Frame6_l1:  B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                            1        
-Frame7_l1:  B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                            1        
-Frame8_l1:  B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                            1
-                                                                                                                                                                            
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-                                                                                                                                                                            
-FrameI_l3:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
-Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
-Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
-Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
-Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
-Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
-Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
-Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-                                                                                                                                                                            
-FrameI_l4:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
-Frame1_l4:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
-Frame2_l4:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
-Frame3_l4:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
-Frame4_l4:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
-Frame5_l4:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-Frame6_l4:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
-Frame7_l4:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
-Frame8_l4:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-                                                                                                                                                                            
-FrameI_l5:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
-Frame1_l5:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
-Frame2_l5:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
-Frame3_l5:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
-Frame4_l5:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
-Frame5_l5:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-Frame6_l5:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
-Frame7_l5:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
-Frame8_l5:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+#                         CbQPoffset  QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset CrQPoffset  cOffsetDiv2      temporal_id   #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0         interCompPred     
+Frame1:     B    8     1    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                            0
+Frame2:     B    4     2    0   0     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                            0
+Frame3:     B    2     3    0   0     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                            0
+Frame4:     B    1     4    0   0     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                            0
+Frame5:     B    3     4    0   0     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                            0
+Frame6:     B    6     3    0   0     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                            0        
+Frame7:     B    5     4    0   0     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                            0
+Frame8:     B    7     4    0   0     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                            0
+
+FrameI_l1:  I    0     0    0   0     0.442    0        0        0        0      0                        0                                 0                                            1        
+Frame1_l1:  B    8     1    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                            1        
+Frame2_l1:  B    4     2    0   0     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                            1        
+Frame3_l1:  B    2     3    0   0     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                            1        
+Frame4_l1:  B    1     4    0   0     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                            1        
+Frame5_l1:  B    3     4    0   0     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                            1        
+Frame6_l1:  B    6     3    0   0     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                            1        
+Frame7_l1:  B    5     4    0   0     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                            1        
+Frame8_l1:  B    7     4    0   0     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                            1
+                                                                                                                                                                            
+FrameI_l2:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
+Frame1_l2:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
+Frame2_l2:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
+Frame3_l2:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
+Frame4_l2:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
+Frame5_l2:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+Frame6_l2:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
+Frame7_l2:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
+Frame8_l2:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+                                                                                                                                                                            
+FrameI_l3:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
+Frame1_l3:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
+Frame2_l3:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
+Frame3_l3:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
+Frame4_l3:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
+Frame5_l3:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+Frame6_l3:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
+Frame7_l3:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
+Frame8_l3:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+                                                                                                                                                                            
+FrameI_l4:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
+Frame1_l4:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
+Frame2_l4:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
+Frame3_l4:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
+Frame4_l4:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
+Frame5_l4:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+Frame6_l4:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
+Frame7_l4:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
+Frame8_l4:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+                                                                                                                                                                            
+FrameI_l5:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
+Frame1_l5:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
+Frame2_l5:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
+Frame3_l5:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
+Frame4_l5:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
+Frame5_l5:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+Frame6_l5:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
+Frame7_l5:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
+Frame8_l5:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
 
 #=========== Motion Search =============
@@ -169,4 +169,8 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+
 
 #=========== Deblock Filter ============
Index: trunk/cfg/3D-HEVC/baseCfg_3view.cfg
===================================================================
--- trunk/cfg/3D-HEVC/baseCfg_3view.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/baseCfg_3view.cfg	(revision 1405)
@@ -80,35 +80,35 @@
 GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0      interCompPred
+#                         CbQPoffset  QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset CrQPoffset  cOffsetDiv2      temporal_id   #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0         interCompPred     
                                                                                                                                                                                 
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                            0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                            0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                            0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                            0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                            0        
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                            0
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                            0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                            0
-                                                                                                                                                                                        
-FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                  1          0         0          -1          0        
-Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                  1          0         1          -1          0        
-Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1       4    5     1 1 0 0 1       1          0         1          -1          0        
-Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1       2    4     1 1 1 1         1          0         1          -1          0        
-Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1       1    5     1 0 1 1 1       1          0         1          -1          0        
-Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1      -2    5     1 1 1 1 0       1          0         2          -1          0        
-Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1      -3    5     1 1 1 1 0       1          0         2          -1          0        
-Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1       1    5     1 0 1 1 1       1          0         2          -1          0
-Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1      -2    5     1 1 1 1 0       1          0         2          -1          0
+Frame1:     B    8     1    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                            0
+Frame2:     B    4     2    0   0     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                            0
+Frame3:     B    2     3    0   0     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                            0
+Frame4:     B    1     4    0   0     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                            0
+Frame5:     B    3     4    0   0     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                            0        
+Frame6:     B    6     3    0   0     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                            0
+Frame7:     B    5     4    0   0     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                            0
+Frame8:     B    7     4    0   0     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                            0
+                            
+FrameI_l1:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                  1          0         0          -1          0        
+Frame1_l1:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                  1          0         1          -1          0        
+Frame2_l1:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1       4    5     1 1 0 0 1       1          0         1          -1          0        
+Frame3_l1:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1       2    4     1 1 1 1         1          0         1          -1          0        
+Frame4_l1:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1       1    5     1 0 1 1 1       1          0         1          -1          0        
+Frame5_l1:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1      -2    5     1 1 1 1 0       1          0         2          -1          0        
+Frame6_l1:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1      -3    5     1 1 1 1 0       1          0         2          -1          0        
+Frame7_l1:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1       1    5     1 0 1 1 1       1          0         2          -1          0
+Frame8_l1:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1      -2    5     1 1 1 1 0       1          0         2          -1          0
                                                                                                                                                                                 
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                  1          0         0          -1          0
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                  1          0         1          -1          0
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1       4    5     1 1 0 0 1       1          0         1          -1          0
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1       2    4     1 1 1 1         1          0         1          -1          0
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1       1    5     1 0 1 1 1       1          0         1          -1          0
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1      -2    5     1 1 1 1 0       1          0         2          -1          0
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1      -3    5     1 1 1 1 0       1          0         2          -1          0
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1       1    5     1 0 1 1 1       1          0         2          -1          0
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1      -2    5     1 1 1 1 0       1          0         2          -1          0
+FrameI_l2:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                  1          0         0          -1          0
+Frame1_l2:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                  1          0         1          -1          0
+Frame2_l2:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1       4    5     1 1 0 0 1       1          0         1          -1          0
+Frame3_l2:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1       2    4     1 1 1 1         1          0         1          -1          0
+Frame4_l2:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1       1    5     1 0 1 1 1       1          0         1          -1          0
+Frame5_l2:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1      -2    5     1 1 1 1 0       1          0         2          -1          0
+Frame6_l2:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1      -3    5     1 1 1 1 0       1          0         2          -1          0
+Frame7_l2:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1       1    5     1 0 1 1 1       1          0         2          -1          0
+Frame8_l2:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1      -2    5     1 1 1 1 0       1          0         2          -1          0
 
 #=========== Motion Search =============
@@ -127,4 +127,8 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+
 
 #=========== Deblock Filter ============
Index: trunk/cfg/3D-HEVC/deltaCfg_3view.cfg
===================================================================
--- trunk/cfg/3D-HEVC/deltaCfg_3view.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/deltaCfg_3view.cfg	(revision 1405)
@@ -46,23 +46,23 @@
 
     
-FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                  1          0         0          -1        0
-Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                  1          0         1          -1        0
-Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1       4    5     1 1 0 0 1       1          0         1          -1        0
-Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1       2    4     1 1 1 1         1          0         1          -1        0
-Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1       1    5     1 0 1 1 1       1          0         1          -1        0
-Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1      -2    5     1 1 1 1 0       1          0         2          -1        0
-Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1      -3    5     1 1 1 1 0       1          0         2          -1        0
-Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1       1    5     1 0 1 1 1       1          0         2          -1        0
-Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1      -2    5     1 1 1 1 0       1          0         2          -1        0
+FrameI_l1:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                  1          0         0          -1        0
+Frame1_l1:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                  1          0         1          -1        0
+Frame2_l1:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1       4    5     1 1 0 0 1       1          0         1          -1        0
+Frame3_l1:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1       2    4     1 1 1 1         1          0         1          -1        0
+Frame4_l1:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1       1    5     1 0 1 1 1       1          0         1          -1        0
+Frame5_l1:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1      -2    5     1 1 1 1 0       1          0         2          -1        0
+Frame6_l1:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1      -3    5     1 1 1 1 0       1          0         2          -1        0
+Frame7_l1:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1       1    5     1 0 1 1 1       1          0         2          -1        0
+Frame8_l1:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1      -2    5     1 1 1 1 0       1          0         2          -1        0
 
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                  1          0         0          -1          0
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                  1          0         1          -1          0
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1       4    5     1 1 0 0 1       1          0         1          -1          0
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1       2    4     1 1 1 1         1          0         1          -1          0
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1       1    5     1 0 1 1 1       1          0         1          -1          0
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1      -2    5     1 1 1 1 0       1          0         2          -1          0
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1      -3    5     1 1 1 1 0       1          0         2          -1          0
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1       1    5     1 0 1 1 1       1          0         2          -1          0
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1      -2    5     1 1 1 1 0       1          0         2          -1          0
+FrameI_l2:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                  1          0         0          -1          0
+Frame1_l2:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                  1          0         1          -1          0
+Frame2_l2:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1       4    5     1 1 0 0 1       1          0         1          -1          0
+Frame3_l2:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1       2    4     1 1 1 1         1          0         1          -1          0
+Frame4_l2:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1       1    5     1 0 1 1 1       1          0         1          -1          0
+Frame5_l2:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1      -2    5     1 1 1 1 0       1          0         2          -1          0
+Frame6_l2:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1      -3    5     1 1 1 1 0       1          0         2          -1          0
+Frame7_l2:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1       1    5     1 0 1 1 1       1          0         2          -1          0
+Frame8_l2:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1      -2    5     1 1 1 1 0       1          0         2          -1          0
 
 
Index: trunk/cfg/3D-HEVC/fullCfg.cfg
===================================================================
--- trunk/cfg/3D-HEVC/fullCfg.cfg	(revision 1397)
+++ trunk/cfg/3D-HEVC/fullCfg.cfg	(revision 1405)
@@ -158,64 +158,64 @@
 GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0      interCompPred
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                            0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                            0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                            0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                            0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                            0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                            0                                                
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                            0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                            0
+#                         CbQPoffset  QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset CrQPoffset  cOffsetDiv2      temporal_id   #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0         interCompPred     
+Frame1:     B    8     1    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                            0
+Frame2:     B    4     2    0   0     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                            0
+Frame3:     B    2     3    0   0     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                            0
+Frame4:     B    1     4    0   0     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                            0
+Frame5:     B    3     4    0   0     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                            0
+Frame6:     B    6     3    0   0     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                            0                                                
+Frame7:     B    5     4    0   0     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                            0
+Frame8:     B    7     4    0   0     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                            0
                                                                               
-FrameI_l1:  I    0     0     0.442    0        0        0        0      0                        0                                 0                                            1                    
-Frame1_l1:  B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                            1             
-Frame2_l1:  B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                            1             
-Frame3_l1:  B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                            1             
-Frame4_l1:  B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                            1             
-Frame5_l1:  B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                            1             
-Frame6_l1:  B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                            1             
-Frame7_l1:  B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                            1             
-Frame8_l1:  B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                            1
-
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-
-FrameI_l3:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
-Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
-Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
-Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
-Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
-Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
-Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
-Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-
-FrameI_l4:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
-Frame1_l4:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
-Frame2_l4:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
-Frame3_l4:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
-Frame4_l4:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
-Frame5_l4:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-Frame6_l4:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
-Frame7_l4:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
-Frame8_l4:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-
-FrameI_l5:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
-Frame1_l5:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
-Frame2_l5:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
-Frame3_l5:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
-Frame4_l5:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
-Frame5_l5:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
-Frame6_l5:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
-Frame7_l5:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
-Frame8_l5:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+FrameI_l1:  I    0     0    0   0     0.442    0        0        0        0      0                        0                                 0                                            1                    
+Frame1_l1:  B    8     1    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0                                            1             
+Frame2_l1:  B    4     2    0   0     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0                                            1             
+Frame3_l1:  B    2     3    0   0     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0                                            1             
+Frame4_l1:  B    1     4    0   0     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0                                            1             
+Frame5_l1:  B    3     4    0   0     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0                                            1             
+Frame6_l1:  B    6     3    0   0     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0                                            1             
+Frame7_l1:  B    5     4    0   0     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0                                            1             
+Frame8_l1:  B    7     4    0   0     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0                                            1
+
+FrameI_l2:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
+Frame1_l2:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
+Frame2_l2:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
+Frame3_l2:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
+Frame4_l2:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
+Frame5_l2:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+Frame6_l2:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
+Frame7_l2:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
+Frame8_l2:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+
+FrameI_l3:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
+Frame1_l3:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
+Frame2_l3:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
+Frame3_l3:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
+Frame4_l3:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
+Frame5_l3:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+Frame6_l3:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
+Frame7_l3:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
+Frame8_l3:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+
+FrameI_l4:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
+Frame1_l4:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
+Frame2_l4:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
+Frame3_l4:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
+Frame4_l4:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
+Frame5_l4:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+Frame6_l4:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
+Frame7_l4:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
+Frame8_l4:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+
+FrameI_l5:  P    0     3    0   0     0.442    0        0        0        1      0                        0                                 1            0         0          -1         1
+Frame1_l5:  B    8     4    0   0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1         1
+Frame2_l5:  B    4     5    0   0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1         1
+Frame3_l5:  B    2     6    0   0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1         1
+Frame4_l5:  B    1     7    0   0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1         1
+Frame5_l5:  B    3     7    0   0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1         1
+Frame6_l5:  B    6     6    0   0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1         1
+Frame7_l5:  B    5     7    0   0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1         1
+Frame8_l5:  B    7     7    0   0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1         1
 
 #=========== Motion Search =============
@@ -234,4 +234,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/cfg/HM/encoder_lowdelay_P_main.cfg
===================================================================
--- trunk/cfg/HM/encoder_lowdelay_P_main.cfg	(revision 1397)
+++ trunk/cfg/HM/encoder_lowdelay_P_main.cfg	(revision 1405)
@@ -21,9 +21,9 @@
 DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
 GOPSize                       : 4           # GOP Size (number of B slice = GOPSize-1)
-#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs 
-Frame1:  P    1   3        0.4624   0            0               0           4                4         -1 -5 -9 -13       0
-Frame2:  P    2   2        0.4624   0            0               0           4                4         -1 -2 -6 -10       1      -1       5         1 1 1 0 1
-Frame3:  P    3   3        0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1            
-Frame4:  P    4   1        0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
+#        Type POC QPoffset CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs 
+Frame1:  P    1   3        0          0          0.4624   0            0               0           4                4         -1 -5 -9 -13       0
+Frame2:  P    2   2        0          0          0.4624   0            0               0           4                4         -1 -2 -6 -10       1      -1       5         1 1 1 0 1
+Frame3:  P    3   3        0          0          0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1            
+Frame4:  P    4   1        0          0          0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
 
 #=========== Motion Search =============
@@ -44,7 +44,9 @@
 TransformSkip                 : 1           # Transform skipping (0: OFF, 1: ON)
 TransformSkipFast             : 1           # Fast Transform skipping (0: OFF, 1: ON)
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
-
 LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1 (default) =constant params in PPS, param = base_param)
 LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter)
Index: trunk/cfg/HM/encoder_lowdelay_P_main10.cfg
===================================================================
--- trunk/cfg/HM/encoder_lowdelay_P_main10.cfg	(revision 1397)
+++ trunk/cfg/HM/encoder_lowdelay_P_main10.cfg	(revision 1405)
@@ -21,9 +21,9 @@
 DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
 GOPSize                       : 4           # GOP Size (number of B slice = GOPSize-1)
-#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs 
-Frame1:  P    1   3        0.4624   0            0               0           4                4         -1 -5 -9 -13       0
-Frame2:  P    2   2        0.4624   0            0               0           4                4         -1 -2 -6 -10       1      -1       5         1 1 1 0 1
-Frame3:  P    3   3        0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1            
-Frame4:  P    4   1        0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
+#        Type POC QPoffset CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs 
+Frame1:  P    1   3        0          0          0.4624   0            0               0           4                4         -1 -5 -9 -13       0
+Frame2:  P    2   2        0          0          0.4624   0            0               0           4                4         -1 -2 -6 -10       1      -1       5         1 1 1 0 1
+Frame3:  P    3   3        0          0          0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1            
+Frame4:  P    4   1        0          0          0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
 
 #=========== Motion Search =============
@@ -44,7 +44,9 @@
 TransformSkip                 : 1           # Transform skipping (0: OFF, 1: ON)
 TransformSkipFast             : 1           # Fast Transform skipping (0: OFF, 1: ON)
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
-
 LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1 (default) =constant params in PPS, param = base_param)
 LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter)
Index: trunk/cfg/HM/encoder_lowdelay_main.cfg
===================================================================
--- trunk/cfg/HM/encoder_lowdelay_main.cfg	(revision 1397)
+++ trunk/cfg/HM/encoder_lowdelay_main.cfg	(revision 1405)
@@ -21,9 +21,9 @@
 DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
 GOPSize                       : 4           # GOP Size (number of B slice = GOPSize-1)
-#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs 
-Frame1:  B    1   3        0.4624   0            0               0           4                4         -1 -5 -9 -13       0
-Frame2:  B    2   2        0.4624   0            0               0           4                4         -1 -2 -6 -10       1      -1       5         1 1 1 0 1
-Frame3:  B    3   3        0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1            
-Frame4:  B    4   1        0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
+#        Type POC QPoffset CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs 
+Frame1:  B    1   3        0          0          0.4624   0            0               0           4                4         -1 -5 -9 -13       0
+Frame2:  B    2   2        0          0          0.4624   0            0               0           4                4         -1 -2 -6 -10       1      -1       5         1 1 1 0 1
+Frame3:  B    3   3        0          0          0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1            
+Frame4:  B    4   1        0          0          0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
 
 #=========== Motion Search =============
@@ -42,7 +42,9 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
-
 LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1 (default) =constant params in PPS, param = base_param)
 LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter)
Index: trunk/cfg/HM/encoder_lowdelay_main10.cfg
===================================================================
--- trunk/cfg/HM/encoder_lowdelay_main10.cfg	(revision 1397)
+++ trunk/cfg/HM/encoder_lowdelay_main10.cfg	(revision 1405)
@@ -21,9 +21,9 @@
 DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
 GOPSize                       : 4           # GOP Size (number of B slice = GOPSize-1)
-#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs 
-Frame1:  B    1   3        0.4624   0            0               0           4                4         -1 -5 -9 -13       0
-Frame2:  B    2   2        0.4624   0            0               0           4                4         -1 -2 -6 -10       1      -1       5         1 1 1 0 1
-Frame3:  B    3   3        0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1            
-Frame4:  B    4   1        0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
+#        Type POC QPoffset CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs 
+Frame1:  B    1   3        0          0          0.4624   0            0               0           4                4         -1 -5 -9 -13       0
+Frame2:  B    2   2        0          0          0.4624   0            0               0           4                4         -1 -2 -6 -10       1      -1       5         1 1 1 0 1
+Frame3:  B    3   3        0          0          0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1            
+Frame4:  B    4   1        0          0          0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
 
 #=========== Motion Search =============
@@ -42,7 +42,9 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
-
 LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1 (default) =constant params in PPS, param = base_param)
 LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter)
Index: trunk/cfg/HM/encoder_lowdelay_main_rext.cfg
===================================================================
--- trunk/cfg/HM/encoder_lowdelay_main_rext.cfg	(revision 1397)
+++ trunk/cfg/HM/encoder_lowdelay_main_rext.cfg	(revision 1405)
@@ -22,9 +22,9 @@
 DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
 GOPSize                       : 4           # GOP Size (number of B slice = GOPSize-1)
-#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs 
-Frame1:  B    1   3        0.4624   0            0               0           4                4         -1 -5 -9 -13       0
-Frame2:  B    2   2        0.4624   0            0               0           4                4         -1 -2 -6 -10       1      -1       5         1 1 1 0 1
-Frame3:  B    3   3        0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1            
-Frame4:  B    4   1        0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
+#        Type POC QPoffset CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs 
+Frame1:  B    1   3        0          0          0.4624   0            0               0           4                4         -1 -5 -9 -13       0
+Frame2:  B    2   2        0          0          0.4624   0            0               0           4                4         -1 -2 -6 -10       1      -1       5         1 1 1 0 1
+Frame3:  B    3   3        0          0          0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1            
+Frame4:  B    4   1        0          0          0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
 
 #=========== Motion Search =============
@@ -43,4 +43,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/cfg/HM/encoder_randomaccess_main.cfg
===================================================================
--- trunk/cfg/HM/encoder_randomaccess_main.cfg	(revision 1397)
+++ trunk/cfg/HM/encoder_randomaccess_main.cfg	(revision 1405)
@@ -21,13 +21,13 @@
 DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
 GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
-#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures     predict deltaRPS #ref_idcs reference idcs 
-Frame1:  B    8   1        0.442    0            0              0           2                3         -8 -12 -16             0
-Frame2:  B    4   2        0.3536   0            0              1           2                3         -4  -8   4             1       4        4         1 1 0 1
-Frame3:  B    2   3        0.3536   0            0              2           2                4         -2  -6   2 6           1       2        4         1 1 1 1
-Frame4:  B    1   4        0.68     0            0              3           2                4         -1   1   3 7           1       1        5         1 0 1 1 1
-Frame5:  B    3   4        0.68     0            0              3           2                4         -1  -3   1 5           1      -2        5         1 1 1 1 0
-Frame6:  B    6   3        0.3536   0            0              2           2                3         -2  -6   2             1      -3        5         0 1 1 1 0
-Frame7:  B    5   4        0.68     0            0              3           2                4         -1  -5   1 3           1       1        4         1 1 1 1
-Frame8:  B    7   4        0.68     0            0              3           2                4         -1  -3  -7 1           1      -2        5         1 1 1 1 0
+#        Type POC QPoffset CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures     predict deltaRPS #ref_idcs reference idcs 
+Frame1:  B    8   1        0          0          0.442    0            0              0           2                3         -8 -12 -16             0
+Frame2:  B    4   2        0          0          0.3536   0            0              1           2                3         -4  -8   4             1       4        4         1 1 0 1
+Frame3:  B    2   3        0          0          0.3536   0            0              2           2                4         -2  -6   2 6           1       2        4         1 1 1 1
+Frame4:  B    1   4        0          0          0.68     0            0              3           2                4         -1   1   3 7           1       1        5         1 0 1 1 1
+Frame5:  B    3   4        0          0          0.68     0            0              3           2                4         -1  -3   1 5           1      -2        5         1 1 1 1 0
+Frame6:  B    6   3        0          0          0.3536   0            0              2           2                3         -2  -6   2             1      -3        5         0 1 1 1 0
+Frame7:  B    5   4        0          0          0.68     0            0              3           2                4         -1  -5   1 3           1       1        4         1 1 1 1
+Frame8:  B    7   4        0          0          0.68     0            0              3           2                4         -1  -3  -7 1           1      -2        5         1 1 1 1 0
 
 #=========== Motion Search =============
@@ -46,7 +46,9 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
-
 LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1 (default) =constant params in PPS, param = base_param)
 LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter)
Index: trunk/cfg/HM/encoder_randomaccess_main10.cfg
===================================================================
--- trunk/cfg/HM/encoder_randomaccess_main10.cfg	(revision 1397)
+++ trunk/cfg/HM/encoder_randomaccess_main10.cfg	(revision 1405)
@@ -21,13 +21,13 @@
 DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
 GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
-#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures     predict deltaRPS #ref_idcs reference idcs 
-Frame1:  B    8   1        0.442    0            0              0           2                3         -8 -12 -16             0
-Frame2:  B    4   2        0.3536   0            0              1           2                3         -4  -8   4             1       4        4         1 1 0 1
-Frame3:  B    2   3        0.3536   0            0              2           2                4         -2  -6   2 6           1       2        4         1 1 1 1
-Frame4:  B    1   4        0.68     0            0              3           2                4         -1   1   3 7           1       1        5         1 0 1 1 1
-Frame5:  B    3   4        0.68     0            0              3           2                4         -1  -3   1 5           1      -2        5         1 1 1 1 0
-Frame6:  B    6   3        0.3536   0            0              2           2                3         -2  -6   2             1      -3        5         0 1 1 1 0
-Frame7:  B    5   4        0.68     0            0              3           2                4         -1  -5   1 3           1       1        4         1 1 1 1
-Frame8:  B    7   4        0.68     0            0              3           2                4         -1  -3  -7 1           1      -2        5         1 1 1 1 0
+#        Type POC QPoffset CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures     predict deltaRPS #ref_idcs reference idcs 
+Frame1:  B    8   1        0          0          0.442    0            0              0           2                3         -8 -12 -16             0
+Frame2:  B    4   2        0          0          0.3536   0            0              1           2                3         -4  -8   4             1       4        4         1 1 0 1
+Frame3:  B    2   3        0          0          0.3536   0            0              2           2                4         -2  -6   2 6           1       2        4         1 1 1 1
+Frame4:  B    1   4        0          0          0.68     0            0              3           2                4         -1   1   3 7           1       1        5         1 0 1 1 1
+Frame5:  B    3   4        0          0          0.68     0            0              3           2                4         -1  -3   1 5           1      -2        5         1 1 1 1 0
+Frame6:  B    6   3        0          0          0.3536   0            0              2           2                3         -2  -6   2             1      -3        5         0 1 1 1 0
+Frame7:  B    5   4        0          0          0.68     0            0              3           2                4         -1  -5   1 3           1       1        4         1 1 1 1
+Frame8:  B    7   4        0          0          0.68     0            0              3           2                4         -1  -3  -7 1           1      -2        5         1 1 1 1 0
 
 #=========== Motion Search =============
@@ -46,7 +46,9 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
-
 LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1 (default) =constant params in PPS, param = base_param)
 LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter)
Index: trunk/cfg/HM/encoder_randomaccess_main_rext.cfg
===================================================================
--- trunk/cfg/HM/encoder_randomaccess_main_rext.cfg	(revision 1397)
+++ trunk/cfg/HM/encoder_randomaccess_main_rext.cfg	(revision 1405)
@@ -22,13 +22,13 @@
 DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
 GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
-#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures     predict deltaRPS #ref_idcs reference idcs 
-Frame1:  B    8   1        0.442    0            0              0           2                3         -8 -12 -16             0
-Frame2:  B    4   2        0.3536   0            0              1           2                3         -4  -8   4             1       4        4         1 1 0 1
-Frame3:  B    2   3        0.3536   0            0              2           2                4         -2  -6   2 6           1       2        4         1 1 1 1
-Frame4:  B    1   4        0.68     0            0              3           2                4         -1   1   3 7           1       1        5         1 0 1 1 1
-Frame5:  B    3   4        0.68     0            0              3           2                4         -1  -3   1 5           1      -2        5         1 1 1 1 0
-Frame6:  B    6   3        0.3536   0            0              2           2                3         -2  -6   2             1      -3        5         0 1 1 1 0
-Frame7:  B    5   4        0.68     0            0              3           2                4         -1  -5   1 3           1       1        4         1 1 1 1
-Frame8:  B    7   4        0.68     0            0              3           2                4         -1  -3  -7 1           1      -2        5         1 1 1 1 0
+#        Type POC QPoffset CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures     predict deltaRPS #ref_idcs reference idcs 
+Frame1:  B    8   1        0          0          0.442    0            0              0           2                3         -8 -12 -16             0
+Frame2:  B    4   2        0          0          0.3536   0            0              1           2                3         -4  -8   4             1       4        4         1 1 0 1
+Frame3:  B    2   3        0          0          0.3536   0            0              2           2                4         -2  -6   2 6           1       2        4         1 1 1 1
+Frame4:  B    1   4        0          0          0.68     0            0              3           2                4         -1   1   3 7           1       1        5         1 0 1 1 1
+Frame5:  B    3   4        0          0          0.68     0            0              3           2                4         -1  -3   1 5           1      -2        5         1 1 1 1 0
+Frame6:  B    6   3        0          0          0.3536   0            0              2           2                3         -2  -6   2             1      -3        5         0 1 1 1 0
+Frame7:  B    5   4        0          0          0.68     0            0              3           2                4         -1  -5   1 3           1       1        4         1 1 1 1
+Frame8:  B    7   4        0          0          0.68     0            0              3           2                4         -1  -3  -7 1           1      -2        5         1 1 1 1 0
 
 #=========== Motion Search =============
@@ -47,4 +47,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/cfg/HM/misc/encoder_lowdelay_main_field_coding.cfg
===================================================================
--- trunk/cfg/HM/misc/encoder_lowdelay_main_field_coding.cfg	(revision 1397)
+++ trunk/cfg/HM/misc/encoder_lowdelay_main_field_coding.cfg	(revision 1405)
@@ -40,13 +40,13 @@
 GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
 
-#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures     				predict deltaRPS #ref_idcs reference idcs 
-Frame1:  B    2   3        0.4624   0		 	 0 				0           8                8         -1 -2 -9 -10	-17 -18 -25 -26	    	0
-Frame2:  B    3   4        0.4624   0		 	 0 				0           8                9         -1 -2 -3 -10 -11 -18 -19 -26 -27	    1      	-1       9         1 1 1 1 1 1 1 1 1
-Frame3:  B    4   2        0.4624   0		 	 0 				0           8                8         -1 -2 -3 -4  -11 -12 -19 -20     	1      	-1       10        1 1 1 1 1 1 1 0 0 1          
-Frame4:  B    5   3        0.4624   0		 	 0 				0           8                9         -1 -2 -3 -4  -5  -12 -13 -20 -21   	1      	-1       9         1 1 1 1 1 1 1 1 1
-Frame5:  B    6   3        0.4624   0		 	 0 				0           8                8         -1 -2 -5 -6  -13 -14 -21 -22	    	1      	-1	     10   	   1 0 0 1 1 1 1 1 1 1
-Frame6:  B    7   4        0.4624   0		 	 0 				0           8                9         -1 -2 -3 -6  -7  -14 -15 -22 -23     1      	-1       9         1 1 1 1 1 1 1 1 1
-Frame7:  B    8   1        0.578    0		 	 0 				0           8                8         -1 -2 -7 -8  -15 -16 -23 -24     	1      	-1       10        1 0 0 1 1 1 1 1 1 1            
-Frame8:  B    9   1        0.578    0		 	 0 				0           8                9         -1 -2 -3 -8  -9  -16 -17 -24 -25     1      	-1       9         1 1 1 1 1 1 1 1 1
+#        Type POC QPoffset CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures                predict deltaRPS #ref_idcs reference idcs 
+Frame1:  B    2   3        0          0          0.4624   0            0              0           8                8         -1 -2 -9 -10	-17 -18 -25 -26        0
+Frame2:  B    3   4        0          0          0.4624   0            0              0           8                9         -1 -2 -3 -10 -11 -18 -19 -26 -27    1      -1       9         1 1 1 1 1 1 1 1 1
+Frame3:  B    4   2        0          0          0.4624   0            0              0           8                8         -1 -2 -3 -4  -11 -12 -19 -20        1      -1       10        1 1 1 1 1 1 1 0 0 1
+Frame4:  B    5   3        0          0          0.4624   0            0              0           8                9         -1 -2 -3 -4  -5  -12 -13 -20 -21    1      -1       9         1 1 1 1 1 1 1 1 1
+Frame5:  B    6   3        0          0          0.4624   0            0              0           8                8         -1 -2 -5 -6  -13 -14 -21 -22        1      -1       10        1 0 0 1 1 1 1 1 1 1
+Frame6:  B    7   4        0          0          0.4624   0            0              0           8                9         -1 -2 -3 -6  -7  -14 -15 -22 -23    1      -1       9         1 1 1 1 1 1 1 1 1
+Frame7:  B    8   1        0          0          0.578    0            0              0           8                8         -1 -2 -7 -8  -15 -16 -23 -24        1      -1       10        1 0 0 1 1 1 1 1 1 1
+Frame8:  B    9   1        0          0          0.578    0            0              0           8                9         -1 -2 -3 -8  -9  -16 -17 -24 -25    1      -1       9         1 1 1 1 1 1 1 1 1
 
 #=========== Motion Search =============
@@ -65,8 +65,10 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
-
-LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1 =constant params in PPS, param = base_param)
+LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
 LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter)
 LoopFilterBetaOffset_div2     : 0           # base_param: -6 ~ 6
Index: trunk/cfg/HM/misc/encoder_randomaccess_main_2tids.cfg
===================================================================
--- trunk/cfg/HM/misc/encoder_randomaccess_main_2tids.cfg	(revision 1397)
+++ trunk/cfg/HM/misc/encoder_randomaccess_main_2tids.cfg	(revision 1405)
@@ -21,13 +21,13 @@
 DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
 GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
-#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures     predict deltaRPS #ref_idcs reference idcs 
-Frame1:  B    8   1        0.442    0            0              0           4                4         -8 -10 -12 -16         0
-Frame2:  B    4   2        0.3536   0            0              0           2                3         -4 -6  4               1       4        5         1 1 0 0 1
-Frame3:  B    2   3        0.3536   0            0              0           2                4         -2 -4  2 6             1       2        4         1 1 1 1  
-Frame4:  B    1   4        0.68     0            0              1           2                4         -1  1  3 7             1       1        5         1 0 1 1 1 
-Frame5:  B    3   4        0.68     0            0              1           2                4         -1 -3  1 5             1      -2        5         1 1 1 1 0
-Frame6:  B    6   3        0.3536   0            0              0           2                4         -2 -4 -6 2             1      -3        5         1 1 1 1 0
-Frame7:  B    5   4        0.68     0            0              1           2                4         -1 -5  1 3             1       1        5         1 0 1 1 1  
-Frame8:  B    7   4        0.68     0            0              1           2                4         -1 -3 -7 1             1      -2        5         1 1 1 1 0
+#        Type POC QPoffset CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures     predict deltaRPS #ref_idcs reference idcs 
+Frame1:  B    8   1        0          0          0.442    0            0              0           4                4         -8 -10 -12 -16         0
+Frame2:  B    4   2        0          0          0.3536   0            0              0           2                3         -4 -6  4               1       4        5         1 1 0 0 1
+Frame3:  B    2   3        0          0          0.3536   0            0              0           2                4         -2 -4  2 6             1       2        4         1 1 1 1  
+Frame4:  B    1   4        0          0          0.68     0            0              1           2                4         -1  1  3 7             1       1        5         1 0 1 1 1 
+Frame5:  B    3   4        0          0          0.68     0            0              1           2                4         -1 -3  1 5             1      -2        5         1 1 1 1 0
+Frame6:  B    6   3        0          0          0.3536   0            0              0           2                4         -2 -4 -6 2             1      -3        5         1 1 1 1 0
+Frame7:  B    5   4        0          0          0.68     0            0              1           2                4         -1 -5  1 3             1       1        5         1 0 1 1 1  
+Frame8:  B    7   4        0          0          0.68     0            0              1           2                4         -1 -3 -7 1             1      -2        5         1 1 1 1 0
 
 #=========== Motion Search =============
@@ -46,8 +46,10 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
-
-LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1  =constant params in PPS, param = base_param)
+LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
 LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter)
 LoopFilterBetaOffset_div2     : 0           # base_param: -6 ~ 6
Index: trunk/cfg/HM/misc/encoder_randomaccess_main_field_coding.cfg
===================================================================
--- trunk/cfg/HM/misc/encoder_randomaccess_main_field_coding.cfg	(revision 1397)
+++ trunk/cfg/HM/misc/encoder_randomaccess_main_field_coding.cfg	(revision 1405)
@@ -41,24 +41,24 @@
 
 # field coding GOP: Exchanged coding order of 16th and 17th field for more efficient encoding
-#                    When EfficientFieldIRAPEnabled=1 is enabled, this has no additional effect
+#                   When EfficientFieldIRAPEnabled=1 is enabled, this has no additional effect
 
-#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics  reference pictures   predict deltaRPS #ref_idcs reference idcs 
+#        Type POC QPoffset CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics  reference pictures   predict deltaRPS #ref_idcs reference idcs 
               
-Frame1:  B    17  1        0.442    0		 	 0 				0           4                4         -16 -17 -20 -21        0
-Frame2:  B    16  1        0.442    0		 	 0 				0           3                3         -15 -16 1              1       1        5         1 1 0 0 1
-Frame3:  B    8   2        0.3536   0		 	 0 				0           2                4         -7 -8 8 9              1       8        4         1 1 1 1
-Frame4:  B    9   2        0.3536   0		 	 0 				0           2                5         -1 -8 -9 7 8           1      -1        5         1 1 1 1 1
-Frame5:  B    4   3        0.3536   0		 	 0 				0           2                6         -3 -4 4 5 12 13        1       5        6         1 1 1 1 1 1
-Frame6:  B    5   3        0.3536   0		 	 0 				0           2                7         -1 -4 -5 3 4 11 12     1      -1        7         1 1 1 1 1 1 1 
-Frame7:  B    2   3        0.3536   0		 	 0 				0           2                8         -1 -2 2 3 6 7 14 15    1       3        8         1 1 1 1 1 1 1 1  
-Frame8:  B    3   4        0.68     0		 	 0 				0           2                8         -1 -2 1 2 5 6 13 14    1      -1        9         1 0 1 1 1 1 1 1 1 
-Frame9:  B    6   3        0.3536   0		 	 0 				0           2                6         -1 -2 2 3 10 11        1      -3        9         0 0 1 1 1 1 1 1 0
-Frame10: B    7   4        0.68     0		 	 0 				0           2                7         -1 -2 -3 1 2 9 10      1      -1        7         1 1 1 1 1 1 1 
-Frame11: B    12  3        0.3536   0		 	 0 				0           2                4         -3 -4 4 5              1      -5        8         0 0 0 1 1 1 1 0
-Frame12: B    13  3        0.3536   0		 	 0 				0           2                5         -1 -4 -5 3 4           1      -1        5         1 1 1 1 1
-Frame13: B    10  3        0.3536   0		 	 0 				0           2                6         -1 -2 2 3 6 7          1       3        6         1 1 1 1 1 1
-Frame14: B    11  4        0.68     0		 	 0 				0           2                7         -1 -2 -3 1 2 5 6       1      -1        7         1 1 1 1 1 1 1
-Frame15: B    14  3        0.3536   0			 0 				0           2                5         -1 -2 -5 2 3           1      -3        8         0 1 0 1 1 1 1 0
-Frame16: B    15  4        0.68     0			 0 				0           2                6         -1 -2 -3 -6 1 2        1      -1        6         1 1 1 1 1 1 
+Frame1:  B    17  1        0          0          0.442    0            0              0           4                4         -16 -17 -20 -21        0
+Frame2:  B    16  1        0          0          0.442    0            0              0           3                3         -15 -16 1              1       1        5         1 1 0 0 1
+Frame3:  B    8   2        0          0          0.3536   0            0              0           2                4         -7 -8 8 9              1       8        4         1 1 1 1
+Frame4:  B    9   2        0          0          0.3536   0            0              0           2                5         -1 -8 -9 7 8           1      -1        5         1 1 1 1 1
+Frame5:  B    4   3        0          0          0.3536   0            0              0           2                6         -3 -4 4 5 12 13        1       5        6         1 1 1 1 1 1
+Frame6:  B    5   3        0          0          0.3536   0            0              0           2                7         -1 -4 -5 3 4 11 12     1      -1        7         1 1 1 1 1 1 1 
+Frame7:  B    2   3        0          0          0.3536   0            0              0           2                8         -1 -2 2 3 6 7 14 15    1       3        8         1 1 1 1 1 1 1 1  
+Frame8:  B    3   4        0          0          0.68     0            0              0           2                8         -1 -2 1 2 5 6 13 14    1      -1        9         1 0 1 1 1 1 1 1 1 
+Frame9:  B    6   3        0          0          0.3536   0            0              0           2                6         -1 -2 2 3 10 11        1      -3        9         0 0 1 1 1 1 1 1 0
+Frame10: B    7   4        0          0          0.68     0            0              0           2                7         -1 -2 -3 1 2 9 10      1      -1        7         1 1 1 1 1 1 1 
+Frame11: B    12  3        0          0          0.3536   0            0              0           2                4         -3 -4 4 5              1      -5        8         0 0 0 1 1 1 1 0
+Frame12: B    13  3        0          0          0.3536   0            0              0           2                5         -1 -4 -5 3 4           1      -1        5         1 1 1 1 1
+Frame13: B    10  3        0          0          0.3536   0            0              0           2                6         -1 -2 2 3 6 7          1       3        6         1 1 1 1 1 1
+Frame14: B    11  4        0          0          0.68     0            0              0           2                7         -1 -2 -3 1 2 5 6       1      -1        7         1 1 1 1 1 1 1
+Frame15: B    14  3        0          0          0.3536   0            0              0           2                5         -1 -2 -5 2 3           1      -3        8         0 1 0 1 1 1 1 0
+Frame16: B    15  4        0          0          0.68     0            0              0           2                6         -1 -2 -3 -6 1 2        1      -1        6         1 1 1 1 1 1 
 
 #=========== Motion Search =============
@@ -77,8 +77,10 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
-
-LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1  =constant params in PPS, param = base_param)
+LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
 LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter)
 LoopFilterBetaOffset_div2     : 0           # base_param: -6 ~ 6
Index: trunk/cfg/HM/misc/encoder_randomaccess_main_field_coding_simple_GOP.cfg
===================================================================
--- trunk/cfg/HM/misc/encoder_randomaccess_main_field_coding_simple_GOP.cfg	(revision 1397)
+++ trunk/cfg/HM/misc/encoder_randomaccess_main_field_coding_simple_GOP.cfg	(revision 1405)
@@ -40,24 +40,24 @@
 GOPSize                       : 16          # GOP Size (number of B slice = GOPSize-1)
 
-#  simple field coding GOP: When EfficientFieldIRAPEnabled=1 is enabled, the order of frames 16 and 17 is exchanged
+# simple field coding GOP: When EfficientFieldIRAPEnabled=1 is enabled, the order of frames 16 and 17 is exchanged
 
-#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics  reference pictures   predict deltaRPS #ref_idcs reference idcs 
+#        Type POC QPoffset CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics  reference pictures   predict deltaRPS #ref_idcs reference idcs 
               
-Frame1:  B    16  1        0.442    0            0              0           8                8         -15 -16 -19 -20 -23 -24 -31 -32        0
-Frame2:  B    17  1        0.442    0            0              0           4                9         -1  -16 -17 -20 -21 -24 -25 -32 -33    1      -1        9         1 1 1 1 1 1 1 1 1
-Frame3:  B    8   2        0.3536   0            0              0           4                6         -7  -8  -11 -12  8   9                 1       9        10        1 1 1 1 1 0 0 0 0 1
-Frame4:  B    9   3        0.3536   0            0              0           4                7         -1  -8  -9  -12 -13  7   8             1      -1        7         1 1 1 1 1 1 1
-Frame5:  B    4   3        0.3536   0            0              0           4                8         -3  -4  -7  -8   4   5   12  13        1       5        8         1 1 1 1 1 1 1 1
-Frame6:  B    5   4        0.68     0            0              0           4                9         -1  -4  -5  -8  -9   3   4   11  12    1      -1        9         1 1 1 1 1 1 1 1 1 
-Frame7:  B    2   3        0.3536   0            0              0           4                8         -1  -2   2   3   6   7   14  15        1       3        10        1 1 1 0 0 1 1 1 1 1  
-Frame8:  B    3   4        0.68     0            0              0           4                9         -1  -2  -3   1   2   5   6   13  14    1      -1        9         1 1 1 1 1 1 1 1 1 
-Frame9:  B    6   3        0.3536   0            0              0           4                8         -1  -2  -5  -6   2   3   10  11        1      -3        10        0 1 1 1 1 1 1 1 1 0
-Frame10: B    7   4        0.68     0            0              0           4                9         -1  -2  -3  -6  -7   1   2   9   10    1      -1        9         1 1 1 1 1 1 1 1 1 
-Frame11: B    12  3        0.3536   0            0              0           4                8         -3  -4  -7  -8  -11 -12  4   5         1      -5        10        0 1 1 1 1 1 1 1 1 0
-Frame12: B    13  4        0.68     0            0              0           4                9         -1  -4  -5  -8  -9  -12 -13  3   4     1      -1        9         1 1 1 1 1 1 1 1 1
-Frame13: B    10  3        0.3536   0            0              0           4                8         -1  -2  -9  -10  2   3   6   7         1       3        10        1 1 1 0 0 1 1 1 1 1
-Frame14: B    11  4        0.68     0            0              0           4                9         -1  -2  -3  -10 -11  1   2   5   6     1      -1        9         1 1 1 1 1 1 1 1 1
-Frame15: B    14  3        0.3536   0            0              0           4                8         -1  -2  -5  -6  -13 -14  2   3         1      -3        10        0 1 1 1 1 1 1 1 1 0
-Frame16: B    15  4        0.68     0            0              0           4                9         -1  -2  -3  -6  -7  -14 -15  1   2     1      -1        9         1 1 1 1 1 1 1 1 1  
+Frame1:  B    16  1        0          0          0.442    0            0              0           8                8         -15 -16 -19 -20 -23 -24 -31 -32        0
+Frame2:  B    17  1        0          0          0.442    0            0              0           4                9         -1  -16 -17 -20 -21 -24 -25 -32 -33    1      -1        9         1 1 1 1 1 1 1 1 1
+Frame3:  B    8   2        0          0          0.3536   0            0              0           4                6         -7  -8  -11 -12  8   9                 1       9        10        1 1 1 1 1 0 0 0 0 1
+Frame4:  B    9   3        0          0          0.3536   0            0              0           4                7         -1  -8  -9  -12 -13  7   8             1      -1        7         1 1 1 1 1 1 1
+Frame5:  B    4   3        0          0          0.3536   0            0              0           4                8         -3  -4  -7  -8   4   5   12  13        1       5        8         1 1 1 1 1 1 1 1
+Frame6:  B    5   4        0          0          0.68     0            0              0           4                9         -1  -4  -5  -8  -9   3   4   11  12    1      -1        9         1 1 1 1 1 1 1 1 1 
+Frame7:  B    2   3        0          0          0.3536   0            0              0           4                8         -1  -2   2   3   6   7   14  15        1       3        10        1 1 1 0 0 1 1 1 1 1  
+Frame8:  B    3   4        0          0          0.68     0            0              0           4                9         -1  -2  -3   1   2   5   6   13  14    1      -1        9         1 1 1 1 1 1 1 1 1 
+Frame9:  B    6   3        0          0          0.3536   0            0              0           4                8         -1  -2  -5  -6   2   3   10  11        1      -3        10        0 1 1 1 1 1 1 1 1 0
+Frame10: B    7   4        0          0          0.68     0            0              0           4                9         -1  -2  -3  -6  -7   1   2   9   10    1      -1        9         1 1 1 1 1 1 1 1 1 
+Frame11: B    12  3        0          0          0.3536   0            0              0           4                8         -3  -4  -7  -8  -11 -12  4   5         1      -5        10        0 1 1 1 1 1 1 1 1 0
+Frame12: B    13  4        0          0          0.68     0            0              0           4                9         -1  -4  -5  -8  -9  -12 -13  3   4     1      -1        9         1 1 1 1 1 1 1 1 1
+Frame13: B    10  3        0          0          0.3536   0            0              0           4                8         -1  -2  -9  -10  2   3   6   7         1       3        10        1 1 1 0 0 1 1 1 1 1
+Frame14: B    11  4        0          0          0.68     0            0              0           4                9         -1  -2  -3  -10 -11  1   2   5   6     1      -1        9         1 1 1 1 1 1 1 1 1
+Frame15: B    14  3        0          0          0.3536   0            0              0           4                8         -1  -2  -5  -6  -13 -14  2   3         1      -3        10        0 1 1 1 1 1 1 1 1 0
+Frame16: B    15  4        0          0          0.68     0            0              0           4                9         -1  -2  -3  -6  -7  -14 -15  1   2     1      -1        9         1 1 1 1 1 1 1 1 1  
 
 #=========== Motion Search =============
@@ -76,8 +76,10 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
-
-LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1  =constant params in PPS, param = base_param)
+LoopFilterOffsetInPPS         : 1           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
 LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter)
 LoopFilterBetaOffset_div2     : 0           # base_param: -6 ~ 6
Index: trunk/cfg/MV-HEVC/NonCTC/aux_3view.cfg
===================================================================
--- trunk/cfg/MV-HEVC/NonCTC/aux_3view.cfg	(revision 1397)
+++ trunk/cfg/MV-HEVC/NonCTC/aux_3view.cfg	(revision 1405)
@@ -96,62 +96,62 @@
 DecodingRefreshType    : 1        #  Random Accesss 0:none, 1:CDR, 2:IDR
 GOPSize                : 8        #  GOP Size (number of B slice = GOPSize-1)
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0   
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0      0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1       0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1         0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1       0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0       0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0       0
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1       0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0       0
-    
-FrameI_l1:  I    0     0     0.442    0        0        0        0      0                        0                                 0             
-Frame1_l1:  B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0             
-Frame2_l1:  B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1       0             
-Frame3_l1:  B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1         0             
-Frame4_l1:  B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1       0             
-Frame5_l1:  B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0       0             
-Frame6_l1:  B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0       0             
-Frame7_l1:  B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1       0             
-Frame8_l1:  B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0       0             
+#                      CbQPoffset    QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset  CrQPoffset  tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
+Frame1:     B    8     1   0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0      0
+Frame2:     B    4     2   0      0  0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1       0
+Frame3:     B    2     3   0      0  0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1         0
+Frame4:     B    1     4   0      0  0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1       0
+Frame5:     B    3     4   0      0  0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0       0
+Frame6:     B    6     3   0      0  0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0       0
+Frame7:     B    5     4   0      0  0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1       0
+Frame8:     B    7     4   0      0  0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0       0
 
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+FrameI_l1:  I    0     0   0      0  0.442    0        0        0        0      0                        0                                 0             
+Frame1_l1:  B    8     1   0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0             
+Frame2_l1:  B    4     2   0      0  0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1       0             
+Frame3_l1:  B    2     3   0      0  0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1         0             
+Frame4_l1:  B    1     4   0      0  0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1       0             
+Frame5_l1:  B    3     4   0      0  0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0       0             
+Frame6_l1:  B    6     3   0      0  0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0       0             
+Frame7_l1:  B    5     4   0      0  0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1       0             
+Frame8_l1:  B    7     4   0      0  0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0       0             
 
-FrameI_l3:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+FrameI_l2:  P    0     3   0      0  0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l2:  B    8     4   0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l2:  B    4     5   0      0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l2:  B    2     6   0      0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l2:  B    1     7   0      0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l2:  B    3     7   0      0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l2:  B    6     6   0      0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l2:  B    5     7   0      0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l2:  B    7     7   0      0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
 
-FrameI_l4:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l4:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l4:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l4:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l4:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l4:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l4:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l4:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l4:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+FrameI_l3:  P    0     3   0      0  0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l3:  B    8     4   0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l3:  B    4     5   0      0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l3:  B    2     6   0      0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l3:  B    1     7   0      0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l3:  B    3     7   0      0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l3:  B    6     6   0      0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l3:  B    5     7   0      0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l3:  B    7     7   0      0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
 
-FrameI_l5:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l5:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l5:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l5:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l5:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l5:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l5:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l5:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l5:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+FrameI_l4:  P    0     3   0      0  0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l4:  B    8     4   0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l4:  B    4     5   0      0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l4:  B    2     6   0      0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l4:  B    1     7   0      0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l4:  B    3     7   0      0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l4:  B    6     6   0      0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l4:  B    5     7   0      0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l4:  B    7     7   0      0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+
+FrameI_l5:  P    0     3   0      0  0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l5:  B    8     4   0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l5:  B    4     5   0      0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l5:  B    2     6   0      0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l5:  B    1     7   0      0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l5:  B    3     7   0      0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l5:  B    6     6   0      0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l5:  B    5     7   0      0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l5:  B    7     7   0      0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
Index: trunk/cfg/MV-HEVC/NonCTC/delta_aux_3view.cfg
===================================================================
--- trunk/cfg/MV-HEVC/NonCTC/delta_aux_3view.cfg	(revision 1397)
+++ trunk/cfg/MV-HEVC/NonCTC/delta_aux_3view.cfg	(revision 1405)
@@ -84,64 +84,64 @@
 #======== Coding Structure =============
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0   
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0      0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1       0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1         0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1       0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0       0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0       0
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1       0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0       0
-    
-FrameI_l1:  I    0     0     0.442    0        0        0        0      0                        0                                 0             
-Frame1_l1:  B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0             
-Frame2_l1:  B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1       0             
-Frame3_l1:  B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1         0             
-Frame4_l1:  B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1       0             
-Frame5_l1:  B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0       0             
-Frame6_l1:  B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0       0             
-Frame7_l1:  B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1       0             
-Frame8_l1:  B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0       0             
+#                      CbQPoffset    QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset  CrQPoffset  tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
+Frame1:     B    8     1    0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0      0
+Frame2:     B    4     2    0      0  0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1       0
+Frame3:     B    2     3    0      0  0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1         0
+Frame4:     B    1     4    0      0  0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1       0
+Frame5:     B    3     4    0      0  0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0       0
+Frame6:     B    6     3    0      0  0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0       0
+Frame7:     B    5     4    0      0  0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1       0
+Frame8:     B    7     4    0      0  0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0       0
 
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+FrameI_l1:  I    0     0    0      0  0.442    0        0        0        0      0                        0                                 0             
+Frame1_l1:  B    8     1    0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0             
+Frame2_l1:  B    4     2    0      0  0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1       0             
+Frame3_l1:  B    2     3    0      0  0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1         0             
+Frame4_l1:  B    1     4    0      0  0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1       0             
+Frame5_l1:  B    3     4    0      0  0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0       0             
+Frame6_l1:  B    6     3    0      0  0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0       0             
+Frame7_l1:  B    5     4    0      0  0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1       0             
+Frame8_l1:  B    7     4    0      0  0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0       0             
 
-FrameI_l3:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+FrameI_l2:  P    0     3    0      0  0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l2:  B    8     4    0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l2:  B    4     5    0      0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l2:  B    2     6    0      0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l2:  B    1     7    0      0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l2:  B    3     7    0      0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l2:  B    6     6    0      0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l2:  B    5     7    0      0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l2:  B    7     7    0      0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
 
-FrameI_l4:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l4:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l4:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l4:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l4:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l4:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l4:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l4:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l4:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+FrameI_l3:  P    0     3    0      0  0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l3:  B    8     4    0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l3:  B    4     5    0      0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l3:  B    2     6    0      0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l3:  B    1     7    0      0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l3:  B    3     7    0      0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l3:  B    6     6    0      0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l3:  B    5     7    0      0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l3:  B    7     7    0      0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
 
-FrameI_l5:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1    
-Frame1_l5:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
-Frame2_l5:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
-Frame3_l5:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
-Frame4_l5:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
-Frame5_l5:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
-Frame6_l5:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
-Frame7_l5:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
-Frame8_l5:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+FrameI_l4:  P    0     3    0      0  0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l4:  B    8     4    0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l4:  B    4     5    0      0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l4:  B    2     6    0      0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l4:  B    1     7    0      0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l4:  B    3     7    0      0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l4:  B    6     6    0      0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l4:  B    5     7    0      0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l4:  B    7     7    0      0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
+
+FrameI_l5:  P    0     3    0      0  0.442    0        0        0        1      0                        0                                 1            0         0          -1    
+Frame1_l5:  B    8     4    0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1    
+Frame2_l5:  B    4     5    0      0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1    
+Frame3_l5:  B    2     6    0      0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1    
+Frame4_l5:  B    1     7    0      0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1    
+Frame5_l5:  B    3     7    0      0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1    
+Frame6_l5:  B    6     6    0      0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1    
+Frame7_l5:  B    5     7    0      0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1    
+Frame8_l5:  B    7     7    0      0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1    
 
 LoopFilterDisable             : 0 1         # Disable deblocking filter (0=Filter, 1=No Filter) (mc)
Index: trunk/cfg/MV-HEVC/NonCTC/delta_aux_3view_simu.cfg
===================================================================
--- trunk/cfg/MV-HEVC/NonCTC/delta_aux_3view_simu.cfg	(revision 1397)
+++ trunk/cfg/MV-HEVC/NonCTC/delta_aux_3view_simu.cfg	(revision 1405)
@@ -78,64 +78,64 @@
 #======== Coding Structure =============
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0   
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0      0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1       0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1         0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1       0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0       0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0       0
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1       0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0       0
-    
-FrameI_l1:  I    0     0     0.442    0        0        0        0      0                        0                                 0             
-Frame1_l1:  B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0             
-Frame2_l1:  B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1       0             
-Frame3_l1:  B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1         0             
-Frame4_l1:  B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1       0             
-Frame5_l1:  B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0       0             
-Frame6_l1:  B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0       0             
-Frame7_l1:  B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1       0             
-Frame8_l1:  B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0       0             
+#                      CbQPoffset    QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset  CrQPoffset  tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
+Frame1:     B    8     1   0       0  0.442    0        0        0        4      4     -8 -10 -12 -16     0      0
+Frame2:     B    4     2   0       0  0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1       0
+Frame3:     B    2     3   0       0  0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1         0
+Frame4:     B    1     4   0       0  0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1       0
+Frame5:     B    3     4   0       0  0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0       0
+Frame6:     B    6     3   0       0  0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0       0
+Frame7:     B    5     4   0       0  0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1       0
+Frame8:     B    7     4   0       0  0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0       0
 
-FrameI_l2:  I    0     3     0.442    0        0        0        1      0                        0                                 0            
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0            
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0            
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0            
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0            
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0            
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0            
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0            
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0            
+FrameI_l1:  I    0     0   0       0  0.442    0        0        0        0      0                        0                                 0             
+Frame1_l1:  B    8     1   0       0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0             
+Frame2_l1:  B    4     2   0       0  0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1       0             
+Frame3_l1:  B    2     3   0       0  0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1         0             
+Frame4_l1:  B    1     4   0       0  0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1       0             
+Frame5_l1:  B    3     4   0       0  0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0       0             
+Frame6_l1:  B    6     3   0       0  0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0       0             
+Frame7_l1:  B    5     4   0       0  0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1       0             
+Frame8_l1:  B    7     4   0       0  0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0       0             
 
-FrameI_l3:  I    0     3     0.442    0        0        0        1      0                        0                                 0            
-Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0            
-Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0            
-Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0            
-Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0            
-Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0            
-Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0            
-Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0            
-Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0            
+FrameI_l2:  I    0     3   0       0  0.442    0        0        0        1      0                        0                                 0            
+Frame1_l2:  B    8     4   0       0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0            
+Frame2_l2:  B    4     5   0       0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0            
+Frame3_l2:  B    2     6   0       0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0            
+Frame4_l2:  B    1     7   0       0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0            
+Frame5_l2:  B    3     7   0       0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0            
+Frame6_l2:  B    6     6   0       0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0            
+Frame7_l2:  B    5     7   0       0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0            
+Frame8_l2:  B    7     7   0       0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0            
 
-FrameI_l4:  I    0     3     0.442    0        0        0        1      0                        0                                 0            
-Frame1_l4:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0            
-Frame2_l4:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0            
-Frame3_l4:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0            
-Frame4_l4:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0            
-Frame5_l4:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0            
-Frame6_l4:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0            
-Frame7_l4:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0            
-Frame8_l4:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0            
+FrameI_l3:  I    0     3   0       0  0.442    0        0        0        1      0                        0                                 0            
+Frame1_l3:  B    8     4   0       0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0            
+Frame2_l3:  B    4     5   0       0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0            
+Frame3_l3:  B    2     6   0       0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0            
+Frame4_l3:  B    1     7   0       0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0            
+Frame5_l3:  B    3     7   0       0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0            
+Frame6_l3:  B    6     6   0       0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0            
+Frame7_l3:  B    5     7   0       0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0            
+Frame8_l3:  B    7     7   0       0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0            
 
-FrameI_l5:  I    0     3     0.442    0        0        0        1      0                        0                                 0            
-Frame1_l5:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0            
-Frame2_l5:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0            
-Frame3_l5:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0            
-Frame4_l5:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0            
-Frame5_l5:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0            
-Frame6_l5:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0            
-Frame7_l5:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0            
-Frame8_l5:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0            
+FrameI_l4:  I    0     3   0       0  0.442    0        0        0        1      0                        0                                 0            
+Frame1_l4:  B    8     4   0       0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0            
+Frame2_l4:  B    4     5   0       0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0            
+Frame3_l4:  B    2     6   0       0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0            
+Frame4_l4:  B    1     7   0       0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0            
+Frame5_l4:  B    3     7   0       0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0            
+Frame6_l4:  B    6     6   0       0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0            
+Frame7_l4:  B    5     7   0       0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0            
+Frame8_l4:  B    7     7   0       0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0            
+
+FrameI_l5:  I    0     3   0       0  0.442    0        0        0        1      0                        0                                 0            
+Frame1_l5:  B    8     4   0       0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0            
+Frame2_l5:  B    4     5   0       0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0            
+Frame3_l5:  B    2     6   0       0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0            
+Frame4_l5:  B    1     7   0       0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0            
+Frame5_l5:  B    3     7   0       0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0            
+Frame6_l5:  B    6     6   0       0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0            
+Frame7_l5:  B    5     7   0       0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0            
+Frame8_l5:  B    7     7   0       0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0            
 
 
Index: trunk/cfg/MV-HEVC/NonCTC/gopCfg_IBP_3view.cfg
===================================================================
--- trunk/cfg/MV-HEVC/NonCTC/gopCfg_IBP_3view.cfg	(revision 1397)
+++ trunk/cfg/MV-HEVC/NonCTC/gopCfg_IBP_3view.cfg	(revision 1405)
@@ -39,35 +39,35 @@
 
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
+#                      CbQPoffset    QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset  CrQPoffset  tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
 
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1         0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1           0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1         0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0
-                                                                                                                                   
-FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0         0          -1  
-Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1  
-Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1  
-Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1  
-Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1  
-Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1  
-Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1  
-Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1  
-Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1  
-                                                                                                                                                                         
-FrameI_l2:  B    0     3     0.442    0        0        0        1      0                        0                                   2          0 1       0 -1       -1 0
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   2          0 1       1 -1       -1 1
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         2          0 1       1 -1       -1 1
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           2          0 1       1 -1       -1 1
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         2          0 1       1 -1       -1 1
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         2          0 1       2 -1       -1 2
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         2          0 1       2 -1       -1 2
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         2          0 1       2 -1       -1 2
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         2          0 1       2 -1       -1 2
+Frame1:     B    8     1  0       0   0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0
+Frame2:     B    4     2  0       0   0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1         0
+Frame3:     B    2     3  0       0   0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1           0
+Frame4:     B    1     4  0       0   0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1         0
+Frame5:     B    3     4  0       0   0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0
+Frame6:     B    6     3  0       0   0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0
+Frame7:     B    5     4  0       0   0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0
+Frame8:     B    7     4  0       0   0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0
+
+FrameI_l1:  P    0     3  0       0   0.442    0        0        0        1      0                        0                                   1          0         0          -1  
+Frame1_l1:  B    8     4  0       0   0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1  
+Frame2_l1:  B    4     5  0       0   0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1  
+Frame3_l1:  B    2     6  0       0   0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1  
+Frame4_l1:  B    1     7  0       0   0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1  
+Frame5_l1:  B    3     7  0       0   0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1  
+Frame6_l1:  B    6     6  0       0   0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1  
+Frame7_l1:  B    5     7  0       0   0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1  
+Frame8_l1:  B    7     7  0       0   0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1  
+
+FrameI_l2:  B    0     3  0       0   0.442    0        0        0        1      0                        0                                   2          0 1       0 -1       -1 0
+Frame1_l2:  B    8     4  0       0   0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   2          0 1       1 -1       -1 1
+Frame2_l2:  B    4     5  0       0   0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         2          0 1       1 -1       -1 1
+Frame3_l2:  B    2     6  0       0   0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           2          0 1       1 -1       -1 1
+Frame4_l2:  B    1     7  0       0   0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         2          0 1       1 -1       -1 1
+Frame5_l2:  B    3     7  0       0   0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         2          0 1       2 -1       -1 2
+Frame6_l2:  B    6     6  0       0   0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         2          0 1       2 -1       -1 2
+Frame7_l2:  B    5     7  0       0   0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         2          0 1       2 -1       -1 2
+Frame8_l2:  B    7     7  0       0   0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         2          0 1       2 -1       -1 2
 
 ### DO NOT ADD ANYTHING BELOW THIS LINE ###
Index: trunk/cfg/MV-HEVC/NonCTC/gopCfg_IPB_on_IRAP_3view.cfg
===================================================================
--- trunk/cfg/MV-HEVC/NonCTC/gopCfg_IPB_on_IRAP_3view.cfg	(revision 1397)
+++ trunk/cfg/MV-HEVC/NonCTC/gopCfg_IPB_on_IRAP_3view.cfg	(revision 1405)
@@ -34,34 +34,34 @@
 
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0
-    
-FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1
-Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0
-Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0
-Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0
-Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0
-Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0
-Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0
-Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0
-Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0
+#                      CbQPoffset    QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset  CrQPoffset  tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
+Frame1:     B    8     1   0       0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0
+Frame2:     B    4     2   0       0 0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0
+Frame3:     B    2     3   0       0 0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0
+Frame4:     B    1     4   0       0 0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0
+Frame5:     B    3     4   0       0 0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0
+Frame6:     B    6     3   0       0 0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0
+Frame7:     B    5     4   0       0 0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0
+Frame8:     B    7     4   0       0 0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0
 
-FrameI_l2:  B    0     3     0.442    0        0        0        1      0                        0                                 2            0 1       0 -1      -1 0
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         0         -1
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0  
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0  
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0  
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0  
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0  
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0  
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0  
+FrameI_l1:  P    0     3   0       0 0.442    0        0        0        1      0                        0                                 1            0         0          -1
+Frame1_l1:  B    8     4   0       0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0
+Frame2_l1:  B    4     5   0       0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0
+Frame3_l1:  B    2     6   0       0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0
+Frame4_l1:  B    1     7   0       0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0
+Frame5_l1:  B    3     7   0       0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0
+Frame6_l1:  B    6     6   0       0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0
+Frame7_l1:  B    5     7   0       0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0
+Frame8_l1:  B    7     7   0       0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0
+
+FrameI_l2:  B    0     3   0       0 0.442    0        0        0        1      0                        0                                 2            0 1       0 -1      -1 0
+Frame1_l2:  B    8     4   0       0 0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         0         -1
+Frame2_l2:  B    4     5   0       0 0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0  
+Frame3_l2:  B    2     6   0       0 0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0  
+Frame4_l2:  B    1     7   0       0 0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0  
+Frame5_l2:  B    3     7   0       0 0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0  
+Frame6_l2:  B    6     6   0       0 0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0  
+Frame7_l2:  B    5     7   0       0 0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0  
+Frame8_l2:  B    7     7   0       0 0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0  
 
 
Index: trunk/cfg/MV-HEVC/NonCTC/gopCfg_NoIv_3view.cfg
===================================================================
--- trunk/cfg/MV-HEVC/NonCTC/gopCfg_NoIv_3view.cfg	(revision 1397)
+++ trunk/cfg/MV-HEVC/NonCTC/gopCfg_NoIv_3view.cfg	(revision 1405)
@@ -40,34 +40,34 @@
 DependencyTypes_2             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1         0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1           0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1         0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0
-                                                                                                                                   
-FrameI_l1:  I    0     3     0.442    0        0        0        1      0                        0                                   0
-Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0
-Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         0
-Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           0
-Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         0
-Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0
-Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0
-Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0
-Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0
-                                                                                                                                     
-FrameI_l2:  I    0     3     0.442    0        0        0        1      0                        0                                   0
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         0
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           0
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         0
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0
+#                      CbQPoffset    QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset  CrQPoffset  tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
+Frame1:     B    8     1   0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0
+Frame2:     B    4     2   0      0  0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1         0
+Frame3:     B    2     3   0      0  0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1           0
+Frame4:     B    1     4   0      0  0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1         0
+Frame5:     B    3     4   0      0  0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0
+Frame6:     B    6     3   0      0  0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0
+Frame7:     B    5     4   0      0  0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0
+Frame8:     B    7     4   0      0  0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0
+
+FrameI_l1:  I    0     3   0      0  0.442    0        0        0        1      0                        0                                   0
+Frame1_l1:  B    8     4   0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0
+Frame2_l1:  B    4     5   0      0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         0
+Frame3_l1:  B    2     6   0      0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           0
+Frame4_l1:  B    1     7   0      0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         0
+Frame5_l1:  B    3     7   0      0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0
+Frame6_l1:  B    6     6   0      0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0
+Frame7_l1:  B    5     7   0      0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0
+Frame8_l1:  B    7     7   0      0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0
+
+FrameI_l2:  I    0     3   0      0  0.442    0        0        0        1      0                        0                                   0
+Frame1_l2:  B    8     4   0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   0
+Frame2_l2:  B    4     5   0      0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         0
+Frame3_l2:  B    2     6   0      0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           0
+Frame4_l2:  B    1     7   0      0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         0
+Frame5_l2:  B    3     7   0      0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         0
+Frame6_l2:  B    6     6   0      0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         0
+Frame7_l2:  B    5     7   0      0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         0
+Frame8_l2:  B    7     7   0      0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         0
 
 ### DO NOT ADD ANYTHING BELOW THIS LINE ###
Index: trunk/cfg/MV-HEVC/NonCTC/gopCfg_PIP_on_IRAP_3view.cfg
===================================================================
--- trunk/cfg/MV-HEVC/NonCTC/gopCfg_PIP_on_IRAP_3view.cfg	(revision 1397)
+++ trunk/cfg/MV-HEVC/NonCTC/gopCfg_PIP_on_IRAP_3view.cfg	(revision 1405)
@@ -36,34 +36,34 @@
 
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0
-    
-FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1
-Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0
-Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0
-Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0
-Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0
-Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0
-Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0
-Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0
-Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0
+#                      CbQPoffset    QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset  CrQPoffset  tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
+Frame1:     B    8     1   0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0
+Frame2:     B    4     2   0      0  0.3536   0        0        0        2      3     -4 -6  4           1     4     5     1 1 0 0 1       0
+Frame3:     B    2     3   0      0  0.3536   0        0        0        2      4     -2 -4  2 6         1     2     4     1 1 1 1         0
+Frame4:     B    1     4   0      0  0.68     0        0        0        2      4     -1  1  3 7         1     1     5     1 0 1 1 1       0
+Frame5:     B    3     4   0      0  0.68     0        0        0        2      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0
+Frame6:     B    6     3   0      0  0.3536   0        0        0        2      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0
+Frame7:     B    5     4   0      0  0.68     0        0        0        2      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0
+Frame8:     B    7     4   0      0  0.68     0        0        0        2      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0
 
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0  
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0  
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0  
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0  
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0  
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0  
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0  
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0  
+FrameI_l1:  P    0     3   0      0  0.442    0        0        0        1      0                        0                                 1            0         0          -1
+Frame1_l1:  B    8     4   0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0
+Frame2_l1:  B    4     5   0      0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0
+Frame3_l1:  B    2     6   0      0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0
+Frame4_l1:  B    1     7   0      0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0
+Frame5_l1:  B    3     7   0      0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0
+Frame6_l1:  B    6     6   0      0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0
+Frame7_l1:  B    5     7   0      0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0
+Frame8_l1:  B    7     7   0      0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0
+
+FrameI_l2:  P    0     3   0      0  0.442    0        0        0        1      0                        0                                 1            0         0          -1
+Frame1_l2:  B    8     4   0      0  0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 0  
+Frame2_l2:  B    4     5   0      0  0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       0  
+Frame3_l2:  B    2     6   0      0  0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         0  
+Frame4_l2:  B    1     7   0      0  0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       0  
+Frame5_l2:  B    3     7   0      0  0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       0  
+Frame6_l2:  B    6     6   0      0  0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       0  
+Frame7_l2:  B    5     7   0      0  0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       0  
+Frame8_l2:  B    7     7   0      0  0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       0  
 
 
Index: trunk/cfg/MV-HEVC/NonCTC/layerwise_startup_IBP_3view.cfg
===================================================================
--- trunk/cfg/MV-HEVC/NonCTC/layerwise_startup_IBP_3view.cfg	(revision 1397)
+++ trunk/cfg/MV-HEVC/NonCTC/layerwise_startup_IBP_3view.cfg	(revision 1405)
@@ -46,30 +46,31 @@
 DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI  // Currently only working for CDR
 GOPSize                       : 4           # GOP Size (number of B slice = GOPSize-1)
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
-Frame1:     B    1     3     0.4624   0        0        0        4      4     -1 -5 -9 -13       0                                   0
-Frame2:     B    2     2     0.4624   0        0        0        4      4     -1 -2 -6 -10       1    -1     5     1 1 1 0 1         0
-Frame3:     B    3     3     0.4624   0        0        0        4      4     -1 -3 -7 -11       1    -1     5     0 1 1 1 1         0            
-Frame4:     B    4     1     0.578    0        0        0        4      4     -1 -4 -8 -12       1    -1     5     0 1 1 1 1         0
-Frame5: 
-Frame6: 
-Frame7: 
-Frame8: 
 
-FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0         0          -1  
-Frame1_l1:  B    1     3     0.4624   0        0        0        4      4     -1 -5 -9 -13       0                                   1          0         0          -1     
-Frame2_l1:  B    2     2     0.4624   0        0        0        4      4     -1 -2 -6 -10       1    -1     5     1 1 1 0 1         1          0         0          -1     
-Frame3_l1:  B    3     3     0.4624   0        0        0        4      4     -1 -3 -7 -11       1    -1     5     0 1 1 1 1         1          0         0          -1                 
-Frame4_l1:  B    4     1     0.578    0        0        0        4      4     -1 -4 -8 -12       1    -1     5     0 1 1 1 1         1          0         0          -1     
-Frame5_l1: 
-Frame6_l1:
-Frame7_l1:
-Frame8_l1:
-
-FrameI_l2:  B    0     3     0.442    0        0        0        1      0                        0                                   1          0         0          -1  
-Frame1_l2:  B    1     3     0.4624   0        0        0        4      4     -1 -5 -9 -13       0                                   2          0 1       0 -1       -1 0
-Frame2_l2:  B    2     2     0.4624   0        0        0        4      4     -1 -2 -6 -10       1    -1     5     1 1 1 0 1         2          0 1       0 -1       -1 0
-Frame3_l2:  B    3     3     0.4624   0        0        0        4      4     -1 -3 -7 -11       1    -1     5     0 1 1 1 1         2          0 1       0 -1       -1 0            
-Frame4_l2:  B    4     1     0.578    0        0        0        4      4     -1 -4 -8 -12       1    -1     5     0 1 1 1 1         2          0 1       0 -1       -1 0
+#                      CbQPoffset    QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset  CrQPoffset  tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
+Frame1:     B    1     3   0       0 0.4624   0        0        0        4      4     -1 -5 -9 -13       0                                   0
+Frame2:     B    2     2   0       0 0.4624   0        0        0        4      4     -1 -2 -6 -10       1    -1     5     1 1 1 0 1         0
+Frame3:     B    3     3   0       0 0.4624   0        0        0        4      4     -1 -3 -7 -11       1    -1     5     0 1 1 1 1         0            
+Frame4:     B    4     1   0       0 0.578    0        0        0        4      4     -1 -4 -8 -12       1    -1     5     0 1 1 1 1         0
+Frame5:                    
+Frame6:                    
+Frame7:                    
+Frame8:                    
+                           
+FrameI_l1:  P    0     3   0       0 0.442    0        0        0        1      0                        0                                   1          0         0          -1  
+Frame1_l1:  B    1     3   0       0 0.4624   0        0        0        4      4     -1 -5 -9 -13       0                                   1          0         0          -1     
+Frame2_l1:  B    2     2   0       0 0.4624   0        0        0        4      4     -1 -2 -6 -10       1    -1     5     1 1 1 0 1         1          0         0          -1     
+Frame3_l1:  B    3     3   0       0 0.4624   0        0        0        4      4     -1 -3 -7 -11       1    -1     5     0 1 1 1 1         1          0         0          -1                 
+Frame4_l1:  B    4     1   0       0 0.578    0        0        0        4      4     -1 -4 -8 -12       1    -1     5     0 1 1 1 1         1          0         0          -1     
+Frame5_l1:                 
+Frame6_l1:                 
+Frame7_l1:                 
+Frame8_l1:                 
+                           
+FrameI_l2:  B    0     3   0       0 0.442    0        0        0        1      0                        0                                   1          0         0          -1  
+Frame1_l2:  B    1     3   0       0 0.4624   0        0        0        4      4     -1 -5 -9 -13       0                                   2          0 1       0 -1       -1 0
+Frame2_l2:  B    2     2   0       0 0.4624   0        0        0        4      4     -1 -2 -6 -10       1    -1     5     1 1 1 0 1         2          0 1       0 -1       -1 0
+Frame3_l2:  B    3     3   0       0 0.4624   0        0        0        4      4     -1 -3 -7 -11       1    -1     5     0 1 1 1 1         2          0 1       0 -1       -1 0            
+Frame4_l2:  B    4     1   0       0 0.578    0        0        0        4      4     -1 -4 -8 -12       1    -1     5     0 1 1 1 1         2          0 1       0 -1       -1 0
 Frame5_l2:
 Frame6_l2:
Index: trunk/cfg/MV-HEVC/baseCfg_2view.cfg
===================================================================
--- trunk/cfg/MV-HEVC/baseCfg_2view.cfg	(revision 1397)
+++ trunk/cfg/MV-HEVC/baseCfg_2view.cfg	(revision 1405)
@@ -62,24 +62,24 @@
 GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0      0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1         0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1           0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1         0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0         0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0         0
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1         0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0         0
-    
-FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0          0          -1       
-Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0          1          -1       
-Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0          1          -1       
-Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0          1          -1       
-Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0          1          -1       
-Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0          2          -1       
-Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0          2          -1       
-Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0          2          -1       
-Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0          2          -1       
+#                      CbQPoffset    QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset  CrQPoffset  tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
+Frame1:     B    8     1   0  0     0.442    0        0        0        4      4     -8 -10 -12 -16     0      0
+Frame2:     B    4     2   0  0     0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1         0
+Frame3:     B    2     3   0  0     0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1           0
+Frame4:     B    1     4   0  0     0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1         0
+Frame5:     B    3     4   0  0     0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0         0
+Frame6:     B    6     3   0  0     0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0         0
+Frame7:     B    5     4   0  0     0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1         0
+Frame8:     B    7     4   0  0     0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0         0
+                                    
+FrameI_l1:  P    0     3   0  0     0.442    0        0        0        1      0                        0                                   1          0          0          -1       
+Frame1_l1:  B    8     4   0  0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0          1          -1       
+Frame2_l1:  B    4     5   0  0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0          1          -1       
+Frame3_l1:  B    2     6   0  0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0          1          -1       
+Frame4_l1:  B    1     7   0  0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0          1          -1       
+Frame5_l1:  B    3     7   0  0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0          2          -1       
+Frame6_l1:  B    6     6   0  0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0          2          -1       
+Frame7_l1:  B    5     7   0  0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0          2          -1       
+Frame8_l1:  B    7     7   0  0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0          2          -1       
 
 #=========== Motion Search =============
@@ -100,4 +100,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/cfg/MV-HEVC/baseCfg_3view.cfg
===================================================================
--- trunk/cfg/MV-HEVC/baseCfg_3view.cfg	(revision 1397)
+++ trunk/cfg/MV-HEVC/baseCfg_3view.cfg	(revision 1405)
@@ -81,35 +81,35 @@
 GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
-
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0      0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1         0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1           0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1         0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0         0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0         0
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1         0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0         0
-    
-FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0         0          -1        
-Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1        
-Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1        
-Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1        
-Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1        
-Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1        
-Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1        
-Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1        
-Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1        
-
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0         0          -1        
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1        
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1        
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1        
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1        
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1        
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1        
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1        
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1        
+#                      CbQPoffset    QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset  CrQPoffset  tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
+
+Frame1:     B    8     1    0  0     0.442    0        0        0        4      4     -8 -10 -12 -16     0      0
+Frame2:     B    4     2    0  0     0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1         0
+Frame3:     B    2     3    0  0     0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1           0
+Frame4:     B    1     4    0  0     0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1         0
+Frame5:     B    3     4    0  0     0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0         0
+Frame6:     B    6     3    0  0     0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0         0
+Frame7:     B    5     4    0  0     0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1         0
+Frame8:     B    7     4    0  0     0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0         0
+                                     
+FrameI_l1:  P    0     3    0  0     0.442    0        0        0        1      0                        0                                   1          0         0          -1        
+Frame1_l1:  B    8     4    0  0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1        
+Frame2_l1:  B    4     5    0  0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1        
+Frame3_l1:  B    2     6    0  0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1        
+Frame4_l1:  B    1     7    0  0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1        
+Frame5_l1:  B    3     7    0  0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1        
+Frame6_l1:  B    6     6    0  0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1        
+Frame7_l1:  B    5     7    0  0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1        
+Frame8_l1:  B    7     7    0  0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1        
+                                    
+FrameI_l2:  P    0     3    0  0     0.442    0        0        0        1      0                        0                                   1          0         0          -1        
+Frame1_l2:  B    8     4    0  0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1        
+Frame2_l2:  B    4     5    0  0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1        
+Frame3_l2:  B    2     6    0  0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1        
+Frame4_l2:  B    1     7    0  0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1        
+Frame5_l2:  B    3     7    0  0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1        
+Frame6_l2:  B    6     6    0  0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1        
+Frame7_l2:  B    5     7    0  0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1        
+Frame8_l2:  B    7     7    0  0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1        
 
 #=========== Motion Search =============
@@ -130,4 +130,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/cfg/MV-HEVC/fullCfg.cfg
===================================================================
--- trunk/cfg/MV-HEVC/fullCfg.cfg	(revision 1397)
+++ trunk/cfg/MV-HEVC/fullCfg.cfg	(revision 1405)
@@ -156,35 +156,35 @@
 GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
 
-#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
-#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
-
-Frame1:     B    8     1     0.442    0        0        0        4      4     -8 -10 -12 -16     0      0
-Frame2:     B    4     2     0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1         0
-Frame3:     B    2     3     0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1           0
-Frame4:     B    1     4     0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1         0
-Frame5:     B    3     4     0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0         0
-Frame6:     B    6     3     0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0         0
-Frame7:     B    5     4     0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1         0
-Frame8:     B    7     4     0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0         0
-    
-FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0         0          -1        
-Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1        
-Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1        
-Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1        
-Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1        
-Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1        
-Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1        
-Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1        
-Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1        
-
-FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0         0          -1        
-Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1        
-Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1        
-Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1        
-Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1        
-Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1        
-Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1        
-Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1        
-Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1        
+#                      CbQPoffset    QPfactor     betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
+#         Type  POC QPoffset  CrQPoffset  tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     
+
+Frame1:     B    8     1  0  0     0.442    0        0        0        4      4     -8 -10 -12 -16     0      0
+Frame2:     B    4     2  0  0     0.3536   0        0        0        2      3     -4 -6  4           1      4    5     1 1 0 0 1         0
+Frame3:     B    2     3  0  0     0.3536   0        0        0        2      4     -2 -4  2 6         1      2    4     1 1 1 1           0
+Frame4:     B    1     4  0  0     0.68     0        0        0        2      4     -1  1  3 7         1      1    5     1 0 1 1 1         0
+Frame5:     B    3     4  0  0     0.68     0        0        0        2      4     -1 -3  1 5         1     -2    5     1 1 1 1 0         0
+Frame6:     B    6     3  0  0     0.3536   0        0        0        2      4     -2 -4 -6 2         1     -3    5     1 1 1 1 0         0
+Frame7:     B    5     4  0  0     0.68     0        0        0        2      4     -1 -5  1 3         1      1    5     1 0 1 1 1         0
+Frame8:     B    7     4  0  0     0.68     0        0        0        2      4     -1 -3 -7 1         1     -2    5     1 1 1 1 0         0
+                                   
+FrameI_l1:  P    0     3  0  0     0.442    0        0        0        1      0                        0                                   1          0         0          -1        
+Frame1_l1:  B    8     4  0  0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1        
+Frame2_l1:  B    4     5  0  0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1        
+Frame3_l1:  B    2     6  0  0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1        
+Frame4_l1:  B    1     7  0  0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1        
+Frame5_l1:  B    3     7  0  0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1        
+Frame6_l1:  B    6     6  0  0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1        
+Frame7_l1:  B    5     7  0  0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1        
+Frame8_l1:  B    7     7  0  0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1        
+
+FrameI_l2:  P    0     3  0  0     0.442    0        0        0        1      0                        0                                   1          0         0          -1        
+Frame1_l2:  B    8     4  0  0     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1        
+Frame2_l2:  B    4     5  0  0     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1        
+Frame3_l2:  B    2     6  0  0     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1        
+Frame4_l2:  B    1     7  0  0     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1        
+Frame5_l2:  B    3     7  0  0     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1        
+Frame6_l2:  B    6     6  0  0     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1        
+Frame7_l2:  B    5     7  0  0     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1        
+Frame8_l2:  B    7     7  0  0     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1        
 
 FrameI_l3:
@@ -236,4 +236,7 @@
 RDOQ                          : 1           # RDOQ
 RDOQTS                        : 1           # RDOQ for transform skip
+SliceChromaQPOffsetPeriodicity: 0           # Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+SliceCbQpOffsetIntraOrPeriodic: 0           # Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+SliceCrQpOffsetIntraOrPeriodic: 0           # Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
 
 #=========== Deblock Filter ============
Index: trunk/doc/Doxyfile
===================================================================
--- trunk/doc/Doxyfile	(revision 1397)
+++ trunk/doc/Doxyfile	(revision 1405)
@@ -39,5 +39,5 @@
 # control system is used.
 
-PROJECT_NUMBER         = HM-16.7
+PROJECT_NUMBER         = HM-16.9
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
Index: trunk/doc/mainpage.h
===================================================================
--- trunk/doc/mainpage.h	(revision 1397)
+++ trunk/doc/mainpage.h	(revision 1405)
@@ -25,5 +25,5 @@
  * granted under this license.  
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/doc/software-manual.tex
===================================================================
--- trunk/doc/software-manual.tex	(revision 1397)
+++ trunk/doc/software-manual.tex	(revision 1405)
@@ -191,5 +191,5 @@
 \begin{abstract}
 This document is a user manual describing usage of reference software
-for the HEVC project. It applies to version 16.7
+for the HEVC project. It applies to version 16.9
 of the software.
 \end{abstract}
@@ -322,4 +322,8 @@
 the final QP value to use for this frame.
 
+\item[]\textbf{SliceCbQPOffset}: The slice-level Cb QP offset.
+
+\item[]\textbf{SliceCrQPOffset}: The slice-level Cr QP offset.
+
 \item[]\textbf{QPFactor}: Weight used during rate distortion
 optimization. Higher values mean lower quality and less bits. Typical
@@ -451,5 +455,7 @@
 Type                &   P  &    B   &      B   &       B \\
 POC                 &   4  &    2   &      1   &       3 \\
-QPoffset            &   1  &    2   &      3   &       3 \\
+QPOffset            &   1  &    2   &      3   &       3 \\
+SliceCbQPOffset     &   0  &    0   &      0   &       0 \\
+SliceCrQPOffset     &   0  &    0   &      0   &       0 \\
 QPfactor            & 0.5  &  0.5   &    0.5   &     0.5 \\
 tcOffsetDiv2        &   0  &    1   &      2   &       2 \\  
@@ -476,8 +482,8 @@
 
 \begin{verbatim}
-Frame1: P 4 1 0.5 0 0 0 1 1 -4 0
-Frame2: B 2 2 0.5 1 0 1 1 2 -2 2 1 0 2 2 1 1
-Frame3: B 1 3 0.5 2 0 2 1 3 -1 1 3 1 0 1 3 1 1 1
-Frame4: B 3 3 0.5 2 0 2 1 2 -1 1 1 0 -2 4 0 1 1 0
+Frame1: P 4 1 0 0 0.5 0 0 0 1 1 -4 0
+Frame2: B 2 2 0 0 0.5 1 0 1 1 2 -2 2 1 0 2 2 1 1
+Frame3: B 1 3 0 0 0.5 2 0 2 1 3 -1 1 3 1 0 1 3 1 1 1
+Frame4: B 3 3 0 0 0.5 2 0 2 1 2 -1 1 1 0 -2 4 0 1 1 0
 \end{verbatim}
 
@@ -760,5 +766,11 @@
 %\ShortOption{-f} &
 \Default{0} &
-Specifies the number of frames to be encoded. When 0, all frames are coded.
+Specifies the number of frames to be encoded (see note regarding TemporalSubsampleRatio). When 0, all frames are coded.
+\\
+
+\Option{TemporalSubsampleRatio (-ts)} &
+%\ShortOption{-fs} &
+\Default{1} &
+Temporally subsamples the input video sequence. A value of $N$ will skip $(N-1)$ frames of input video after each coded input video frame. Note the FramesToBeEncoded does not account for the temporal skipping of frames, which will reduce the number of frames encoded accordingly. The reported bit rates will be reduced and VUI information is scaled so as to present the video at the correct speed. The minimum and default value is 1.
 \\
 
@@ -1221,4 +1233,15 @@
 \\
 
+\Option{SliceChromaQPOffsetPeriodicity} &
+\Default{0} &
+Defines the periodicity for inter slices that use the slice-level chroma QP offsets, as defined by SliceCbQpOffsetIntraOrPeriodic and SliceCrQpOffsetIntraOrPeriodic. A value of 0 disables the periodicity. It is intended to be used in low-delay configurations where an regular intra period is not defined.
+\\
+
+\Option{SliceCbQpOffsetIntraOrPeriodic}%
+\Option{SliceCrQpOffsetIntraOrPeriodic} &
+\Default{0} &
+Defines the slice-level QP offset to be used for intra slices, or once every 'SliceChromaQPOffsetPeriodicity' pictures.
+\\
+
 \Option{MaxCuDQPDepth (-dqd)} &
 %\ShortOption{\None} &
@@ -1479,7 +1502,7 @@
 \Option{DeblockingFilterMetric}&
 %\ShortOption{\None}&
-\Default{false}&
-Enables or disables the use of a deblocking filter metric to evaluate the suitability of deblocking. If enabled then
-LoopFilterOffsetInPPS and LoopFilterDisable must be 0.
+\Default{0}&
+Specifies the use of a deblocking filter metric to evaluate the suitability of deblocking. If non-zero then
+LoopFilterOffsetInPPS and LoopFilterDisable must be 0. Currently excepted values are 0, 1 and 2.
 \\
 
@@ -1535,4 +1558,10 @@
 Enables or disables SAO parameter estimation using non-deblocked pixels
 for LCU bottom and right boundary areas.
+\\
+
+\Option{SAOResetEncoderStateAfterIRAP} &
+%\ShortOption{\None} &
+\Default{false} &
+When true, resets the encoder's SAO state after an IRAP (POC order).
 \\
 
Index: trunk/source/App/TAppDecoder/TAppDecCfg.cpp
===================================================================
--- trunk/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 1397)
+++ trunk/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppDecoder/TAppDecCfg.h
===================================================================
--- trunk/source/App/TAppDecoder/TAppDecCfg.h	(revision 1397)
+++ trunk/source/App/TAppDecoder/TAppDecCfg.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- trunk/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1397)
+++ trunk/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppDecoder/TAppDecTop.h
===================================================================
--- trunk/source/App/TAppDecoder/TAppDecTop.h	(revision 1397)
+++ trunk/source/App/TAppDecoder/TAppDecTop.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppDecoder/decmain.cpp
===================================================================
--- trunk/source/App/TAppDecoder/decmain.cpp	(revision 1397)
+++ trunk/source/App/TAppDecoder/decmain.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1397)
+++ trunk/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -239,4 +239,8 @@
   in>>entry.m_POC;
   in>>entry.m_QPOffset;
+#if W0038_CQP_ADJ
+  in>>entry.m_CbQPoffset;
+  in>>entry.m_CrQPoffset;
+#endif
   in>>entry.m_QPFactor;
   in>>entry.m_tcOffsetDiv2;
@@ -769,5 +773,5 @@
   const Int defaultPrimaryCodes[6]     = { 0,50000, 0,0, 50000,0 };
   const Int defaultWhitePointCode[2]   = { 16667, 16667 };
-  SMultiValueInput<Int>  cfg_DisplayPrimariesCode            (0, 50000, 3, 3, defaultPrimaryCodes,   sizeof(defaultPrimaryCodes  )/sizeof(Int));
+  SMultiValueInput<Int>  cfg_DisplayPrimariesCode            (0, 50000, 6, 6, defaultPrimaryCodes,   sizeof(defaultPrimaryCodes  )/sizeof(Int));
   SMultiValueInput<Int>  cfg_DisplayWhitePointCode           (0, 50000, 2, 2, defaultWhitePointCode, sizeof(defaultWhitePointCode)/sizeof(Int));
 
@@ -877,4 +881,5 @@
   ("FrameRate,-fr",                                   m_iFrameRate,                                         0, "Frame rate")
   ("FrameSkip,-fs",                                   m_FrameSkip,                                         0u, "Number of frames to skip at start of input YUV")
+  ("TemporalSubsampleRatio,-ts",                      m_temporalSubsampleRatio,                            1u, "Temporal sub-sample ratio when reading input YUV")
   ("FramesToBeEncoded,f",                             m_framesToBeEncoded,                                  0, "Number of frames to be encoded (default=all)")
   ("ClipInputVideoToRec709Range",                     m_bClipInputVideoToRec709Range,                   false, "If true then clip input video to the Rec. 709 Range on loading when InternalBitDepth is less than MSBExtendedBitDepth")
@@ -950,5 +955,6 @@
 
   ("HadamardME",                                      m_bUseHADME,                                       true, "Hadamard ME for fractional-pel")
-  ("ASR",                                             m_bUseASR,                                        false, "Adaptive motion search range")
+  ("ASR",                                             m_bUseASR,                                        false, "Adaptive motion search range");
+  opts.addOptions()
 
   // Mode decision parameters
@@ -978,4 +984,9 @@
   ("CrQpOffset,-crqpofs",                             m_crQpOffset,                                         0, "Chroma Cr QP Offset")
 
+#if W0038_CQP_ADJ
+  ("SliceChromaQPOffsetPeriodicity",                  m_sliceChromaQpOffsetPeriodicity,                    0u, "Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.")
+  ("SliceCbQpOffsetIntraOrPeriodic",                  m_sliceChromaQpOffsetIntraOrPeriodic[0],              0, "Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.")
+  ("SliceCrQpOffsetIntraOrPeriodic",                  m_sliceChromaQpOffsetIntraOrPeriodic[1],              0, "Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.")
+#endif
 #if ADAPTIVE_QP_SELECTION
   ("AdaptiveQpSelection,-aqps",                       m_bUseAdaptQpSelect,                              false, "AdaptiveQpSelection")
@@ -1001,6 +1012,9 @@
   ("LoopFilterBetaOffset_div2",                       m_loopFilterBetaOffsetDiv2,                           0)
   ("LoopFilterTcOffset_div2",                         m_loopFilterTcOffsetDiv2,                             0)
+#if W0038_DB_OPT
+  ("DeblockingFilterMetric",                          m_deblockingFilterMetric,                             0)
+#else
   ("DeblockingFilterMetric",                          m_DeblockingFilterMetric,                         false)
-
+#endif
   // Coding tools
   ("AMP",                                             m_enableAMP,                                       true, "Enable asymmetric motion partitions")
@@ -1028,4 +1042,7 @@
   ("MaxNumOffsetsPerPic",                             m_maxNumOffsetsPerPic,                             2048, "Max number of SAO offset per picture (Default: 2048)")
   ("SAOLcuBoundary",                                  m_saoCtuBoundary,                                 false, "0: right/bottom CTU boundary areas skipped from SAO parameter estimation, 1: non-deblocked pixels are used for those areas")
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+  ("SAOResetEncoderStateAfterIRAP",                   m_saoResetEncoderStateAfterIRAP,                  false, "When true, resets the encoder's SAO state after an IRAP (POC order). Disabled by default.")
+#endif
   ("SliceMode",                                       tmpSliceMode,                            Int(NO_SLICES), "0: Disable all Recon slice limits, 1: Enforce max # of CTUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice")
   ("SliceArgument",                                   m_sliceArgument,                                      0, "Depending on SliceMode being:"
@@ -1138,5 +1155,6 @@
   ("RecalculateQPAccordingToLambda",                  m_recalculateQPAccordingToLambda,                 false, "Recalculate QP values according to lambda values. Do not suggest to be enabled in all intra case")
   ("StrongIntraSmoothing,-sis",                       m_useStrongIntraSmoothing,                         true, "Enable strong intra smoothing for 32x32 blocks")
-  ("SEIActiveParameterSets",                          m_activeParameterSetsSEIEnabled,                      0, "Enable generation of active parameter sets SEI messages")
+  ("SEIActiveParameterSets",                          m_activeParameterSetsSEIEnabled,                      0, "Enable generation of active parameter sets SEI messages");
+  opts.addOptions()
   ("VuiParametersPresent,-vui",                       m_vuiParametersPresentFlag,                       false, "Enable generation of vui_parameters()")
   ("AspectRatioInfoPresent",                          m_aspectRatioInfoPresentFlag,                     false, "Signals whether aspect_ratio_idc is present")
@@ -1171,5 +1189,6 @@
   ("MaxBitsPerMinCuDenom",                            m_maxBitsPerMinCuDenom,                               1, "Indicates an upper bound for the number of bits of coding_unit() data")
   ("Log2MaxMvLengthHorizontal",                       m_log2MaxMvLengthHorizontal,                         15, "Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units")
-  ("Log2MaxMvLengthVertical",                         m_log2MaxMvLengthVertical,                           15, "Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units")
+  ("Log2MaxMvLengthVertical",                         m_log2MaxMvLengthVertical,                           15, "Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units");
+  opts.addOptions()
   ("SEIColourRemappingInfoFileRoot,-cri",             m_colourRemapSEIFileRoot,                    string(""), "Colour Remapping Information SEI parameters root file name (wo num ext)")
   ("SEIRecoveryPoint",                                m_recoveryPointSEIEnabled,                        false, "Control generation of recovery point SEI messages")
@@ -1277,4 +1296,7 @@
   ("SEIMasteringDisplayPrimaries",                    cfg_DisplayPrimariesCode,       cfg_DisplayPrimariesCode, "Mastering display primaries for all three colour planes in CIE xy coordinates in increments of 1/50000 (results in the ranges 0 to 50000 inclusive)")
   ("SEIMasteringDisplayWhitePoint",                   cfg_DisplayWhitePointCode,     cfg_DisplayWhitePointCode, "Mastering display white point CIE xy coordinates in normalised increments of 1/50000 (e.g. 0.333 = 16667)")
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+  ("SEIPreferredTransferCharacterisics",              m_preferredTransferCharacteristics,                   -1, "Value for the preferred_transfer_characteristics field of the Alternative transfer characteristics SEI which will override the corresponding entry in the VUI. If negative, do not produce the respective SEI message")
+#endif
 #if NH_MV
   ("SeiCfgFileName_%d",                               m_seiCfgFileNames,             (TChar *) 0 ,MAX_NUM_SEIS , "SEI cfg file name %d")
@@ -1416,4 +1438,6 @@
    * Set any derived parameters
    */
+
+  m_framesToBeEncoded = ( m_framesToBeEncoded + m_temporalSubsampleRatio - 1 ) / m_temporalSubsampleRatio;
   m_adIntraLambdaModifier = cfg_adIntraLambdaModifier.values;
   if(m_isField)
@@ -2259,4 +2283,5 @@
   xConfirmPara( m_InputChromaFormatIDC >= NUM_CHROMA_FORMAT,                                "InputChromaFormatIDC must be either 400, 420, 422 or 444" );
   xConfirmPara( m_iFrameRate <= 0,                                                          "Frame rate must be more than 1" );
+  xConfirmPara( m_temporalSubsampleRatio < 1,                                               "Temporal subsample rate must be no less than 1" );
   xConfirmPara( m_framesToBeEncoded <= 0,                                                   "Total Number Of Frames encoded must be more than 0" );
 #if NH_MV
@@ -2507,9 +2532,13 @@
   {
     xConfirmPara( m_iQP[layer] <  -6 * (m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8) || m_iQP[layer] > 51,      "QP exceeds supported range (-QpBDOffsety to 51)" );
-    xConfirmPara( m_DeblockingFilterMetric && (m_bLoopFilterDisable[layer] || m_loopFilterOffsetInPPS), "If DeblockingFilterMetric is true then both LoopFilterDisable and LoopFilterOffsetInPPS must be 0");
+    xConfirmPara( m_deblockingFilterMetric!=0 && (m_bLoopFilterDisable[layer] || m_loopFilterOffsetInPPS), "If DeblockingFilterMetric is true then both LoopFilterDisable and LoopFilterOffsetInPPS must be 0");
   }
 #else
   xConfirmPara( m_iQP <  -6 * (m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8) || m_iQP > 51,    "QP exceeds supported range (-QpBDOffsety to 51)" );
+#if W0038_DB_OPT
+  xConfirmPara( m_deblockingFilterMetric!=0 && (m_bLoopFilterDisable || m_loopFilterOffsetInPPS), "If DeblockingFilterMetric is non-zero then both LoopFilterDisable and LoopFilterOffsetInPPS must be 0");
+#else
   xConfirmPara( m_DeblockingFilterMetric && (m_bLoopFilterDisable || m_loopFilterOffsetInPPS), "If DeblockingFilterMetric is true then both LoopFilterDisable and LoopFilterOffsetInPPS must be 0");
+#endif
 #endif
   
@@ -2537,7 +2566,21 @@
     {
       xConfirmPara( m_iIntraPeriod[i] > 0 && m_iIntraPeriod[i] <= m_iGOPSize ,                      "Intra period must be larger than GOP size for periodic IDR pictures");
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+  if (m_saoResetEncoderStateAfterIRAP)
+  {
+    xConfirmPara( m_iIntraPeriod[i] > 0 && m_iIntraPeriod[i] <= m_iGOPSize ,                      "Intra period must be larger than GOP size when SAOResetEncoderStateAfterIRAP is enabled");
+  }
+#endif
+
     }
 #else
-    xConfirmPara( m_iIntraPeriod > 0 && m_iIntraPeriod <= m_iGOPSize ,                      "Intra period must be larger than GOP size for periodic IDR pictures");
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+  if (m_saoResetEncoderStateAfterIRAP)
+  {
+    xConfirmPara( m_iIntraPeriod > 0 && m_iIntraPeriod <= m_iGOPSize ,                      "Intra period must be larger than GOP size when SAOResetEncoderStateAfterIRAP is enabled");
+  }
+#endif
+
+   xConfirmPara( m_iIntraPeriod > 0 && m_iIntraPeriod <= m_iGOPSize ,                      "Intra period must be larger than GOP size for periodic IDR pictures");
 #endif
   }
@@ -2876,4 +2919,18 @@
     }
   }
+
+#if W0038_CQP_ADJ
+  for(Int i=0; i<m_iGOPSize; i++)
+  {
+    xConfirmPara( abs(m_GOPList[i].m_CbQPoffset               ) > 12, "Cb QP Offset for one of the GOP entries exceeds supported range (-12 to 12)" );
+    xConfirmPara( abs(m_GOPList[i].m_CbQPoffset + m_cbQpOffset) > 12, "Cb QP Offset for one of the GOP entries, when combined with the PPS Cb offset, exceeds supported range (-12 to 12)" );
+    xConfirmPara( abs(m_GOPList[i].m_CrQPoffset               ) > 12, "Cr QP Offset for one of the GOP entries exceeds supported range (-12 to 12)" );
+    xConfirmPara( abs(m_GOPList[i].m_CrQPoffset + m_crQpOffset) > 12, "Cr QP Offset for one of the GOP entries, when combined with the PPS Cr offset, exceeds supported range (-12 to 12)" );
+  }
+  xConfirmPara( abs(m_sliceChromaQpOffsetIntraOrPeriodic[0]                 > 12), "Intra/periodic Cb QP Offset exceeds supported range (-12 to 12)" );
+  xConfirmPara( abs(m_sliceChromaQpOffsetIntraOrPeriodic[0]  + m_cbQpOffset > 12), "Intra/periodic Cb QP Offset, when combined with the PPS Cb offset, exceeds supported range (-12 to 12)" );
+  xConfirmPara( abs(m_sliceChromaQpOffsetIntraOrPeriodic[1]                 > 12), "Intra/periodic Cr QP Offset exceeds supported range (-12 to 12)" );
+  xConfirmPara( abs(m_sliceChromaQpOffsetIntraOrPeriodic[1]  + m_crQpOffset > 12), "Intra/periodic Cr QP Offset, when combined with the PPS Cr offset, exceeds supported range (-12 to 12)" );
+#endif
 
   m_extraRPSs=0;
@@ -3342,4 +3399,8 @@
   }
 
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+  xConfirmPara(m_preferredTransferCharacteristics > 255, "transfer_characteristics_idc should not be greater than 255.");
+#endif
+
 #undef xConfirmPara
   if (check_failed)
@@ -3408,6 +3469,6 @@
 #endif
 
-  printf("Real     Format                   : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate );
-  printf("Internal Format                   : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate );
+  printf("Real     Format                        : %dx%d %gHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, (Double)m_iFrameRate/m_temporalSubsampleRatio );
+  printf("Internal Format                        : %dx%d %gHz\n", m_iSourceWidth, m_iSourceHeight, (Double)m_iFrameRate/m_temporalSubsampleRatio );
   printf("Sequence PSNR output              : %s\n", (m_printMSEBasedSequencePSNR ? "Linear average, MSE-based" : "Linear average only") );
   printf("Sequence MSE output               : %s\n", (m_printSequenceMSE ? "Enabled" : "Disabled") );
Index: trunk/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncCfg.h	(revision 1397)
+++ trunk/source/App/TAppEncoder/TAppEncCfg.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -144,4 +144,5 @@
   Int       m_iFrameRate;                                     ///< source frame-rates (Hz)
   UInt      m_FrameSkip;                                   ///< number of skipped frames from the beginning
+  UInt      m_temporalSubsampleRatio;                         ///< temporal subsample ratio, 2 means code every two frames
   Int       m_iSourceWidth;                                   ///< source width in pixel
   Int       m_iSourceHeight;                                  ///< source height in pixel (when interlaced = field height)
@@ -254,4 +255,8 @@
   Int       m_crQpOffset;                                     ///< Chroma Cr QP Offset (0:default)
 
+#if W0038_CQP_ADJ
+  UInt      m_sliceChromaQpOffsetPeriodicity;                 ///< Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+  Int       m_sliceChromaQpOffsetIntraOrPeriodic[2/*Cb,Cr*/]; ///< Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+#endif
 #if ADAPTIVE_QP_SELECTION
   Bool      m_bUseAdaptQpSelect;
@@ -312,4 +317,7 @@
   Int       m_maxNumOffsetsPerPic;                            ///< SAO maximun number of offset per picture
   Bool      m_saoCtuBoundary;                                 ///< SAO parameter estimation using non-deblocked pixels for CTU bottom and right boundary areas
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+  Bool      m_saoResetEncoderStateAfterIRAP;                  ///< When true, SAO encoder state will be reset following an IRAP.
+#endif
   // coding tools (loop filter)
 #if NH_MV
@@ -321,6 +329,9 @@
   Int       m_loopFilterBetaOffsetDiv2;                     ///< beta offset for deblocking filter
   Int       m_loopFilterTcOffsetDiv2;                       ///< tc offset for deblocking filter
+#if W0038_DB_OPT
+  Int       m_deblockingFilterMetric;                         ///< blockiness metric in encoder
+#else
   Bool      m_DeblockingFilterMetric;                         ///< blockiness metric in encoder
-
+#endif
   // coding tools (PCM)
   Bool      m_usePCM;                                         ///< flag for using IPCM
@@ -440,4 +451,8 @@
   Int*      m_kneeSEIInputKneePoint;
   Int*      m_kneeSEIOutputKneePoint;
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+  Int       m_preferredTransferCharacteristics;
+#endif
+
   // weighted prediction
   Bool      m_useWeightedPred;                    ///< Use of weighted prediction in P slices
Index: trunk/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1397)
+++ trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -354,4 +354,5 @@
   m_cTEncTop.setFrameRate                                         ( m_iFrameRate );
   m_cTEncTop.setFrameSkip                                         ( m_FrameSkip );
+  m_cTEncTop.setTemporalSubsampleRatio                            ( m_temporalSubsampleRatio );
   m_cTEncTop.setSourceWidth                                       ( m_iSourceWidth );
   m_cTEncTop.setSourceHeight                                      ( m_iSourceHeight );
@@ -417,5 +418,9 @@
   m_cTEncTop.setLoopFilterBetaOffset                              ( m_loopFilterBetaOffsetDiv2  );
   m_cTEncTop.setLoopFilterTcOffset                                ( m_loopFilterTcOffsetDiv2    );
+#if W0038_DB_OPT
+  m_cTEncTop.setDeblockingFilterMetric                            ( m_deblockingFilterMetric );
+#else
   m_cTEncTop.setDeblockingFilterMetric                            ( m_DeblockingFilterMetric );
+#endif
 
   //====== Motion search ========
@@ -439,4 +444,7 @@
   m_cTEncTop.setChromaCbQpOffset                                  ( m_cbQpOffset     );
   m_cTEncTop.setChromaCrQpOffset                                  ( m_crQpOffset  );
+#if W0038_CQP_ADJ
+  m_cTEncTop.setSliceChromaOffsetQpIntraOrPeriodic                ( m_sliceChromaQpOffsetPeriodicity, m_sliceChromaQpOffsetIntraOrPeriodic );
+#endif
 
 #if NH_3D
@@ -554,4 +562,7 @@
 
   m_cTEncTop.setSaoCtuBoundary                                    ( m_saoCtuBoundary);
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+  m_cTEncTop.setSaoResetEncoderStateAfterIRAP                     ( m_saoResetEncoderStateAfterIRAP);
+#endif
   m_cTEncTop.setPCMInputBitDepthFlag                              ( m_bPCMInputBitDepthFlag);
   m_cTEncTop.setPCMFilterDisableFlag                              ( m_bPCMFilterDisableFlag);
@@ -628,4 +639,8 @@
   m_cTEncTop.setColourRemapInfoSEIFileRoot                        ( m_colourRemapSEIFileRoot );
   m_cTEncTop.setMasteringDisplaySEI                               ( m_masteringDisplay );
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+  m_cTEncTop.setSEIAlternativeTransferCharacteristicsSEIEnable    ( m_preferredTransferCharacteristics>=0     );
+  m_cTEncTop.setSEIPreferredTransferCharacteristics               ( UChar(m_preferredTransferCharacteristics) );
+#endif
 
 #if NH_MV
@@ -1124,4 +1139,9 @@
       outputAccessUnits.clear();
     }
+    // temporally skip frames
+    if( m_temporalSubsampleRatio > 1 )
+    {
+      m_cTVideoIOYuvInputFile.skipFrames(m_temporalSubsampleRatio-1, m_iSourceWidth - m_aiPad[0], m_iSourceHeight - m_aiPad[1], m_InputChromaFormatIDC);
+    }
   }
 
@@ -1420,8 +1440,8 @@
 {
 #if NH_MV
-  Double time = (Double) m_frameRcvd[0] / m_iFrameRate;
+  Double time = (Double) m_frameRcvd[0] / m_iFrameRate * m_temporalSubsampleRatio;
   printf("\n");
 #else
-  Double time = (Double) m_iFrameRcvd / m_iFrameRate;
+  Double time = (Double) m_iFrameRcvd / m_iFrameRate * m_temporalSubsampleRatio;
 #endif
   printf("Bytes written to file: %u (%.3f kbps)\n", m_totalBytes, 0.008 * m_totalBytes / time);
Index: trunk/source/App/TAppEncoder/TAppEncTop.h
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncTop.h	(revision 1397)
+++ trunk/source/App/TAppEncoder/TAppEncTop.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppEncoder/encmain.cpp
===================================================================
--- trunk/source/App/TAppEncoder/encmain.cpp	(revision 1397)
+++ trunk/source/App/TAppEncoder/encmain.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppExtractor/TAppExtrCfg.cpp
===================================================================
--- trunk/source/App/TAppExtractor/TAppExtrCfg.cpp	(revision 1397)
+++ trunk/source/App/TAppExtractor/TAppExtrCfg.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppExtractor/TAppExtrCfg.h
===================================================================
--- trunk/source/App/TAppExtractor/TAppExtrCfg.h	(revision 1397)
+++ trunk/source/App/TAppExtractor/TAppExtrCfg.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppExtractor/TAppExtrTop.cpp
===================================================================
--- trunk/source/App/TAppExtractor/TAppExtrTop.cpp	(revision 1397)
+++ trunk/source/App/TAppExtractor/TAppExtrTop.cpp	(revision 1405)
@@ -4,5 +4,5 @@
 // * granted under this license.  
 // *
-// * Copyright (c) 2010-2015, ITU/ISO/IEC
+// * Copyright (c) 2010-2016, ITU/ISO/IEC
 // * All rights reserved.
 // *
Index: trunk/source/App/TAppExtractor/TAppExtrTop.h
===================================================================
--- trunk/source/App/TAppExtractor/TAppExtrTop.h	(revision 1397)
+++ trunk/source/App/TAppExtractor/TAppExtrTop.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppExtractor/extrmain.cpp
===================================================================
--- trunk/source/App/TAppExtractor/extrmain.cpp	(revision 1397)
+++ trunk/source/App/TAppExtractor/extrmain.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppRenderer/RendererMain.cpp
===================================================================
--- trunk/source/App/TAppRenderer/RendererMain.cpp	(revision 1397)
+++ trunk/source/App/TAppRenderer/RendererMain.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppRenderer/TAppRendererCfg.cpp
===================================================================
--- trunk/source/App/TAppRenderer/TAppRendererCfg.cpp	(revision 1397)
+++ trunk/source/App/TAppRenderer/TAppRendererCfg.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppRenderer/TAppRendererCfg.h
===================================================================
--- trunk/source/App/TAppRenderer/TAppRendererCfg.h	(revision 1397)
+++ trunk/source/App/TAppRenderer/TAppRendererCfg.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppRenderer/TAppRendererTop.cpp
===================================================================
--- trunk/source/App/TAppRenderer/TAppRendererTop.cpp	(revision 1397)
+++ trunk/source/App/TAppRenderer/TAppRendererTop.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/TAppRenderer/TAppRendererTop.h
===================================================================
--- trunk/source/App/TAppRenderer/TAppRendererTop.h	(revision 1397)
+++ trunk/source/App/TAppRenderer/TAppRendererTop.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/utils/BitrateTargeting/ExtractBitrates.cpp
===================================================================
--- trunk/source/App/utils/BitrateTargeting/ExtractBitrates.cpp	(revision 1397)
+++ trunk/source/App/utils/BitrateTargeting/ExtractBitrates.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/utils/BitrateTargeting/ExtractBitrates.h
===================================================================
--- trunk/source/App/utils/BitrateTargeting/ExtractBitrates.h	(revision 1397)
+++ trunk/source/App/utils/BitrateTargeting/ExtractBitrates.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/utils/BitrateTargeting/ExtractBitratesMain.cpp
===================================================================
--- trunk/source/App/utils/BitrateTargeting/ExtractBitratesMain.cpp	(revision 1397)
+++ trunk/source/App/utils/BitrateTargeting/ExtractBitratesMain.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiers.cpp
===================================================================
--- trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiers.cpp	(revision 1397)
+++ trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiers.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiers.h
===================================================================
--- trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiers.h	(revision 1397)
+++ trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiers.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiersMain.cpp
===================================================================
--- trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiersMain.cpp	(revision 1397)
+++ trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiersMain.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/utils/BitrateTargeting/RuntimeError.h
===================================================================
--- trunk/source/App/utils/BitrateTargeting/RuntimeError.h	(revision 1397)
+++ trunk/source/App/utils/BitrateTargeting/RuntimeError.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/utils/annexBbytecount.cpp
===================================================================
--- trunk/source/App/utils/annexBbytecount.cpp	(revision 1397)
+++ trunk/source/App/utils/annexBbytecount.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/App/utils/convert_NtoMbit_YCbCr.cpp
===================================================================
--- trunk/source/App/utils/convert_NtoMbit_YCbCr.cpp	(revision 1397)
+++ trunk/source/App/utils/convert_NtoMbit_YCbCr.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TAppCommon/TAppComCamPara.cpp
===================================================================
--- trunk/source/Lib/TAppCommon/TAppComCamPara.cpp	(revision 1397)
+++ trunk/source/Lib/TAppCommon/TAppComCamPara.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TAppCommon/TAppComCamPara.h
===================================================================
--- trunk/source/Lib/TAppCommon/TAppComCamPara.h	(revision 1397)
+++ trunk/source/Lib/TAppCommon/TAppComCamPara.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TAppCommon/program_options_lite.cpp
===================================================================
--- trunk/source/Lib/TAppCommon/program_options_lite.cpp	(revision 1397)
+++ trunk/source/Lib/TAppCommon/program_options_lite.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TAppCommon/program_options_lite.h
===================================================================
--- trunk/source/Lib/TAppCommon/program_options_lite.h	(revision 1397)
+++ trunk/source/Lib/TAppCommon/program_options_lite.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/AccessUnit.h
===================================================================
--- trunk/source/Lib/TLibCommon/AccessUnit.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/AccessUnit.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/CommonDef.h
===================================================================
--- trunk/source/Lib/TLibCommon/CommonDef.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/CommonDef.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -72,7 +72,7 @@
 #if NH_MV
 #define NV_VERSION        "16.1"                ///< Current software version
-#define HM_VERSION        "16.7"                ///< 
-#else
-#define NV_VERSION        "16.7"                 ///< Current software version
+#define HM_VERSION        "16.9"                ///< 
+#else
+#define NV_VERSION        "16.9"                 ///< Current software version
 #endif
 // ====================================================================================================================
@@ -266,4 +266,9 @@
 static const Int CONTEXT_STATE_BITS =                              6 ;
 static const Int LAST_SIGNIFICANT_GROUPS =                        10 ;
+
+#if W0038_DB_OPT
+static const Int MAX_ENCODER_DEBLOCKING_QUALITY_LAYERS =           8 ;
+#endif
+
 
 #if NH_MV
Index: trunk/source/Lib/TLibCommon/ContextModel.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/ContextModel.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/ContextModel.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/ContextModel.h
===================================================================
--- trunk/source/Lib/TLibCommon/ContextModel.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/ContextModel.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/ContextModel3DBuffer.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/ContextModel3DBuffer.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/ContextModel3DBuffer.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/ContextModel3DBuffer.h
===================================================================
--- trunk/source/Lib/TLibCommon/ContextModel3DBuffer.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/ContextModel3DBuffer.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/ContextTables.h
===================================================================
--- trunk/source/Lib/TLibCommon/ContextTables.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/ContextTables.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/Debug.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/Debug.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/Debug.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/Debug.h
===================================================================
--- trunk/source/Lib/TLibCommon/Debug.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/Debug.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/NAL.h
===================================================================
--- trunk/source/Lib/TLibCommon/NAL.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/NAL.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/SEI.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/SEI.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/SEI.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -153,4 +153,7 @@
     case SEI::CHROMA_RESAMPLING_FILTER_HINT:        return "Chroma sampling filter hint";
     case SEI::COLOUR_REMAPPING_INFO:                return "Colour remapping info";
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+    case SEI::ALTERNATIVE_TRANSFER_CHARACTERISTICS: return "Alternative transfer characteristics";
+#endif
 
 #if NH_MV
Index: trunk/source/Lib/TLibCommon/SEI.h
===================================================================
--- trunk/source/Lib/TLibCommon/SEI.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/SEI.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -97,4 +97,7 @@
     KNEE_FUNCTION_INFO                   = 141,
     COLOUR_REMAPPING_INFO                = 142,
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+    ALTERNATIVE_TRANSFER_CHARACTERISTICS = 182,
+#endif
     DEINTERLACED_FIELD_IDENTIFICATION         = 143,
     LAYERS_NOT_PRESENT                        = 160,
@@ -655,4 +658,21 @@
 
 };
+
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+class SEIAlternativeTransferCharacteristics : public SEI
+{
+public:
+  PayloadType payloadType() const { return ALTERNATIVE_TRANSFER_CHARACTERISTICS; }
+
+  SEIAlternativeTransferCharacteristics() : m_preferredTransferCharacteristics(18)
+  { }
+
+  virtual ~SEIAlternativeTransferCharacteristics() {}
+
+  UInt m_preferredTransferCharacteristics;
+};
+#endif
+
+
 #if NH_MV
 class SEILayersNotPresent : public SEI
Index: trunk/source/Lib/TLibCommon/TComBitCounter.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComBitCounter.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComBitCounter.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComBitStream.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComBitStream.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComBitStream.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComBitStream.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComBitStream.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComBitStream.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComCABACTables.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComCABACTables.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComCABACTables.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComCABACTables.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComCABACTables.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComCABACTables.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComChromaFormat.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComChromaFormat.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComChromaFormat.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComChromaFormat.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComChromaFormat.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComChromaFormat.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComCodingStatistics.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComCodingStatistics.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComCodingStatistics.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComDataCU.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComDataCU.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComInterpolationFilter.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComInterpolationFilter.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComInterpolationFilter.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComInterpolationFilter.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComInterpolationFilter.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComInterpolationFilter.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComList.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComList.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComList.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComLoopFilter.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComLoopFilter.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComLoopFilter.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComLoopFilter.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComLoopFilter.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComLoopFilter.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComMotionInfo.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComMotionInfo.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComMotionInfo.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComMotionInfo.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComMotionInfo.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComMotionInfo.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2015, ITU/ISO/IEC
+* Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComMv.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComMv.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComMv.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComPattern.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComPattern.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComPattern.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComPattern.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComPattern.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComPattern.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComPic.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComPic.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComPic.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -97,8 +97,11 @@
 TComPic::~TComPic()
 {
+  destroy();
 }
 
 Void TComPic::create( const TComSPS &sps, const TComPPS &pps, const Bool bIsVirtual)
 {
+  destroy();
+
   const ChromaFormat chromaFormatIDC = sps.getChromaFormatIdc();
   const Int          iWidth          = sps.getPicWidthInLumaSamples();
Index: trunk/source/Lib/TLibCommon/TComPic.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComPic.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComPic.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -191,4 +191,5 @@
   const TComPicSym* getPicSym() const { return  &m_picSym;    }
   TComSlice*    getSlice(Int i)       { return  m_picSym.getSlice(i);  }
+  const TComSlice* getSlice(Int i) const           { return  m_picSym.getSlice(i);  }
   Int           getPOC() const        { return  m_picSym.getSlice(m_uiCurrSliceIdx)->getPOC();  }
   TComDataCU*   getCtu( UInt ctuRsAddr )           { return  m_picSym.getCtu( ctuRsAddr ); }
Index: trunk/source/Lib/TLibCommon/TComPicSym.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComPicSym.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComPicSym.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -71,7 +71,12 @@
 
 
+TComPicSym::~TComPicSym()
+{
+  destroy();
+}
+
+
 Void TComPicSym::create  ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth )
 {
-  UInt i;
   m_sps = sps;
   m_pps = pps;
@@ -108,5 +113,5 @@
 #endif
 
-  for ( i=0; i<m_numCtusInFrame ; i++ )
+  for (UInt i=0; i<m_numCtusInFrame ; i++ )
   {
     m_pictureCtuArray[i] = new TComDataCU;
@@ -122,5 +127,5 @@
   m_ctuRsToTsAddrMap = new UInt[m_numCtusInFrame+1];
 
-  for( i=0; i<m_numCtusInFrame; i++ )
+  for(UInt i=0; i<m_numCtusInFrame; i++ )
   {
     m_ctuTsToRsAddrMap[i] = i;
Index: trunk/source/Lib/TLibCommon/TComPicSym.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComPicSym.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComPicSym.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -125,4 +125,6 @@
 
   TComPicSym  ();
+  ~TComPicSym();
+
   TComSlice*         getSlice(UInt i)                                      { return m_apSlices[i];             }
   const TComSlice*   getSlice(UInt i) const                                { return m_apSlices[i];             }
Index: trunk/source/Lib/TLibCommon/TComPicYuv.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComPicYuv.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComPicYuv.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -74,4 +74,5 @@
 TComPicYuv::~TComPicYuv()
 {
+  destroy();
 }
 
@@ -87,4 +88,6 @@
 
 {
+  destroy();
+
   m_picWidth          = picWidth;
   m_picHeight         = picHeight;
Index: trunk/source/Lib/TLibCommon/TComPicYuv.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComPicYuv.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComPicYuv.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComPicYuvMD5.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComPicYuvMD5.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComPicYuvMD5.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComPrediction.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComPrediction.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComPrediction.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComPrediction.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComPrediction.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComRdCost.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComRdCost.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComRdCost.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComRdCost.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComRdCost.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComRdCost.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComRectangle.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComRectangle.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComRectangle.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComRom.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComRom.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComRom.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComRom.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComRom.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComRom.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComSlice.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComSlice.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
 
Index: trunk/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComSlice.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComSlice.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComTU.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComTU.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComTU.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComTU.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComTU.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComTU.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComTrQuant.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComTrQuant.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComTrQuant.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComTrQuant.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComTrQuant.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComTrQuant.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComWedgelet.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComWedgelet.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComWedgelet.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComWedgelet.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComWedgelet.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComWedgelet.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComWeightPrediction.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComWeightPrediction.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComWeightPrediction.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComWeightPrediction.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComWeightPrediction.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComWeightPrediction.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TComYuv.cpp
===================================================================
--- trunk/source/Lib/TLibCommon/TComYuv.cpp	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComYuv.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -59,8 +59,10 @@
 TComYuv::~TComYuv()
 {
+  destroy();
 }
 
 Void TComYuv::create( UInt iWidth, UInt iHeight, ChromaFormat chromaFormatIDC )
 {
+  destroy();
   // set width and height
   m_iWidth   = iWidth;
Index: trunk/source/Lib/TLibCommon/TComYuv.h
===================================================================
--- trunk/source/Lib/TLibCommon/TComYuv.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TComYuv.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- trunk/source/Lib/TLibCommon/TypeDef.h	(revision 1397)
+++ trunk/source/Lib/TLibCommon/TypeDef.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -373,4 +373,8 @@
 #define T0196_SELECTIVE_RDOQ                              1 ///< selective RDOQ
 #define U0040_MODIFIED_WEIGHTEDPREDICTION_WITH_BIPRED_AND_CLIPPING 1
+#define U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI    1 ///< Alternative transfer characteristics SEI message (JCTVC-U0033, with syntax naming from V1005)
+#define W0062_RECALCULATE_QP_TO_ALIGN_WITH_LAMBDA         0 ///< This recalculates QP to align with the derived lambda (same relation as for all intra coding is used). Currently disabled by default.
+#define OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP            1 ///< Adds command line option to reset SAO parameters after each IRAP.
+
 // ====================================================================================================================
 // Tool Switches
@@ -396,4 +400,10 @@
 #endif
 #define U0132_TARGET_BITS_SATURATION                      1 ///< Rate control with target bits saturation method
+#ifdef  U0132_TARGET_BITS_SATURATION
+#define V0078_ADAPTIVE_LOWER_BOUND                        1 ///< Target bits saturation with adaptive lower bound
+#endif
+#define W0038_DB_OPT                                      1 ///< adaptive DB parameter selection, LoopFilterOffsetInPPS and LoopFilterDisable are set to 0 and DeblockingFilterMetric=2;
+#define W0038_CQP_ADJ                                     1 ///< chroma QP adjustment based on TL, CQPTLAdjustEnabled is set to 1;
+
 // ====================================================================================================================
 // Derived macros
Index: trunk/source/Lib/TLibDecoder/AnnexBread.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/AnnexBread.cpp	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/AnnexBread.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/AnnexBread.h
===================================================================
--- trunk/source/Lib/TLibDecoder/AnnexBread.h	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/AnnexBread.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/NALread.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/NALread.cpp	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/NALread.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/NALread.h
===================================================================
--- trunk/source/Lib/TLibDecoder/NALread.h	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/NALread.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/SEIread.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/SEIread.cpp	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/SEIread.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -311,4 +311,10 @@
       xParseSEIMasteringDisplayColourVolume((SEIMasteringDisplayColourVolume&) *sei, payloadSize, pDecodedMessageOutputStream);
       break;
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+    case SEI::ALTERNATIVE_TRANSFER_CHARACTERISTICS:
+      sei = new SEIAlternativeTransferCharacteristics;
+      xParseSEIAlternativeTransferCharacteristics((SEIAlternativeTransferCharacteristics&) *sei, payloadSize, pDecodedMessageOutputStream);
+      break;
+#endif
 #if NH_MV
     case SEI::LAYERS_NOT_PRESENT:
@@ -636,11 +642,11 @@
         sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_cpb_removal_delay":"nal_initial_cpb_removal_delay" );
         sei.m_initialCpbRemovalDelay[i][nalOrVcl] = code;
-        sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_cpb_removal_offset":"vcl_initial_cpb_removal_offset" );
+        sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_cpb_removal_offset":"nal_initial_cpb_removal_offset" );
         sei.m_initialCpbRemovalDelayOffset[i][nalOrVcl] = code;
         if( pHRD->getSubPicCpbParamsPresentFlag() || sei.m_rapCpbParamsPresentFlag )
         {
-          sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_alt_cpb_removal_delay":"vcl_initial_alt_cpb_removal_delay" );
+          sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_alt_cpb_removal_delay":"nal_initial_alt_cpb_removal_delay" );
           sei.m_initialAltCpbRemovalDelay[i][nalOrVcl] = code;
-          sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_alt_cpb_removal_offset":"vcl_initial_alt_cpb_removal_offset" );
+          sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_alt_cpb_removal_offset":"nal_initial_alt_cpb_removal_offset" );
           sei.m_initialAltCpbRemovalDelayOffset[i][nalOrVcl] = code;
         }
@@ -1272,4 +1278,15 @@
   sei_read_code( pDecodedMessageOutputStream, 32, code, "min_display_mastering_luminance" ); sei.values.minLuminance = code;
 }
+
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+Void SEIReader::xParseSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics& sei, UInt payloadSize, ostream* pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei_read_code(pDecodedMessageOutputStream, 8, code, "preferred_transfer_characteristics"); sei.m_preferredTransferCharacteristics = code;
+}
+#endif
+
 #if NH_MV
 Void SEIReader::xParseSEILayersNotPresent(SEILayersNotPresent &sei, UInt payloadSize, const TComVPS *vps, std::ostream *pDecodedMessageOutputStream)
Index: trunk/source/Lib/TLibDecoder/SEIread.h
===================================================================
--- trunk/source/Lib/TLibDecoder/SEIread.h	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/SEIread.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -95,4 +95,7 @@
   Void xParseSEIMasteringDisplayColourVolume  (SEIMasteringDisplayColourVolume& sei,  UInt payloadSize,                     std::ostream *pDecodedMessageOutputStream);
   Void xParseSEIColourRemappingInfo           (SEIColourRemappingInfo& sei,           UInt payloadSize,                     std::ostream *pDecodedMessageOutputStream);
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+  Void xParseSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics& sei,              UInt payLoadSize,                     std::ostream *pDecodedMessageOutputStream);
+#endif
 #if NH_MV
   Void xParseSEILayersNotPresent              (SEILayersNotPresent &sei, UInt payloadSize, const TComVPS *vps ,std::ostream *pDecodedMessageOutputStream);
Index: trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp	(revision 1405)
@@ -4,5 +4,5 @@
 * granted under this license.
 *
-* Copyright (c) 2010-2015, ITU/ISO/IEC
+* Copyright (c) 2010-2016, ITU/ISO/IEC
 * All rights reserved.
 *
Index: trunk/source/Lib/TLibDecoder/SyntaxElementParser.h
===================================================================
--- trunk/source/Lib/TLibDecoder/SyntaxElementParser.h	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/SyntaxElementParser.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecBinCoder.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecBinCoder.h	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecBinCoder.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1405)
@@ -4,5 +4,5 @@
 * granted under this license.
 *
-* Copyright (c) 2010-2015, ITU/ISO/IEC
+* Copyright (c) 2010-2016, ITU/ISO/IEC
 * All rights reserved.
 *
Index: trunk/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecCu.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCu.h	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecCu.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecEntropy.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecEntropy.h	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecEntropy.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecGop.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecGop.cpp	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecGop.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecGop.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecGop.h	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecGop.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecSbac.h	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecSbac.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecSlice.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecSlice.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecSlice.h	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecSlice.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecTop.h	(revision 1397)
+++ trunk/source/Lib/TLibDecoder/TDecTop.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/AnnexBwrite.h
===================================================================
--- trunk/source/Lib/TLibEncoder/AnnexBwrite.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/AnnexBwrite.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/NALwrite.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/NALwrite.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/NALwrite.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/NALwrite.h
===================================================================
--- trunk/source/Lib/TLibEncoder/NALwrite.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/NALwrite.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/SEIEncoder.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/SEIEncoder.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/SEIEncoder.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -651,4 +651,13 @@
   }
 }
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+Void SEIEncoder::initSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics *seiAltTransCharacteristics)
+{
+  assert (m_isInitialized);
+  assert (seiAltTransCharacteristics!=NULL);
+  //  Set SEI message parameters read from command line options
+  seiAltTransCharacteristics->m_preferredTransferCharacteristics = m_pcCfg->getSEIPreferredTransferCharacteristics();
+}
+#endif
 
 #if NH_MV
Index: trunk/source/Lib/TLibEncoder/SEIEncoder.h
===================================================================
--- trunk/source/Lib/TLibEncoder/SEIEncoder.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/SEIEncoder.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -82,4 +82,7 @@
   Void initSEITimeCode(SEITimeCode *sei);
   Bool initSEIColourRemappingInfo(SEIColourRemappingInfo *sei, Int currPOC); // returns true on success, false on failure.
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+  Void initSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics *sei);
+#endif
 
   // trailing SEIs
Index: trunk/source/Lib/TLibEncoder/SEIwrite.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/SEIwrite.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/SEIwrite.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -124,4 +124,10 @@
     xWriteSEIMasteringDisplayColourVolume(*static_cast<const SEIMasteringDisplayColourVolume*>(&sei));
     break;
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+  case SEI::ALTERNATIVE_TRANSFER_CHARACTERISTICS:
+    xWriteSEIAlternativeTransferCharacteristics(*static_cast<const SEIAlternativeTransferCharacteristics*>(&sei));
+    break;
+#endif
+
 #if NH_MV
    case SEI::LAYERS_NOT_PRESENT:
@@ -871,4 +877,11 @@
 }
 
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+Void SEIWriter::xWriteSEIAlternativeTransferCharacteristics(const SEIAlternativeTransferCharacteristics& sei)
+{
+  WRITE_CODE(sei.m_preferredTransferCharacteristics, 8, "preferred_transfer_characteristics");
+}
+#endif
+
 #if NH_MV
 Void SEIWriter::xWriteSEILayersNotPresent(const SEILayersNotPresent& sei)
Index: trunk/source/Lib/TLibEncoder/SEIwrite.h
===================================================================
--- trunk/source/Lib/TLibEncoder/SEIwrite.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/SEIwrite.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -75,4 +75,7 @@
   Void xWriteSEIColourRemappingInfo(const SEIColourRemappingInfo& sei);
   Void xWriteSEIMasteringDisplayColourVolume( const SEIMasteringDisplayColourVolume& sei);
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+  Void xWriteSEIAlternativeTransferCharacteristics(const SEIAlternativeTransferCharacteristics& sei);
+#endif
 
 #if NH_MV
Index: trunk/source/Lib/TLibEncoder/SyntaxElementWriter.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/SyntaxElementWriter.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/SyntaxElementWriter.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/SyntaxElementWriter.h
===================================================================
--- trunk/source/Lib/TLibEncoder/SyntaxElementWriter.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/SyntaxElementWriter.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncAnalyze.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncAnalyze.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncAnalyze.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncBinCoder.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncBinCoder.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncBinCoder.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncBinCoderCABAC.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncBinCoderCABAC.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncBinCoderCABAC.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncBinCoderCABACCounter.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncBinCoderCABACCounter.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncBinCoderCABACCounter.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncBinCoderCABACCounter.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncBinCoderCABACCounter.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncBinCoderCABACCounter.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncCavlc.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncCavlc.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncCavlc.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncCfg.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncCfg.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -62,4 +62,8 @@
   Int m_POC;
   Int m_QPOffset;
+#if W0038_CQP_ADJ
+  Int m_CbQPoffset;
+  Int m_CrQPoffset;
+#endif
   Double m_QPFactor;
   Int m_tcOffsetDiv2;
@@ -89,4 +93,8 @@
   : m_POC(-1)
   , m_QPOffset(0)
+#if W0038_CQP_ADJ
+  , m_CbQPoffset(0)
+  , m_CrQPoffset(0)
+#endif
   , m_QPFactor(0)
   , m_tcOffsetDiv2(0)
@@ -135,4 +143,5 @@
   Int       m_iFrameRate;
   Int       m_FrameSkip;
+  UInt      m_temporalSubsampleRatio;
   Int       m_iSourceWidth;
   Int       m_iSourceHeight;
@@ -163,5 +172,5 @@
 
   //====== Coding Structure ========
-  UInt      m_uiIntraPeriod;
+  UInt      m_uiIntraPeriod;                    // TODO: make this an Int - it can be -1!
   UInt      m_uiDecodingRefreshType;            ///< the type of decoding refresh employed for the random access.
   Int       m_iGOPSize;
@@ -202,5 +211,9 @@
   Int       m_loopFilterBetaOffsetDiv2;
   Int       m_loopFilterTcOffsetDiv2;
+#if W0038_DB_OPT
+  Int       m_deblockingFilterMetric;
+#else
   Bool      m_DeblockingFilterMetric;
+#endif
   Bool      m_bUseSAO;
   Bool      m_bTestSAODisableAtPictureLevel;
@@ -209,4 +222,7 @@
   Int       m_maxNumOffsetsPerPic;
   Bool      m_saoCtuBoundary;
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+  Bool      m_saoResetEncoderStateAfterIRAP;
+#endif
 
   //====== Motion search ========
@@ -231,4 +247,9 @@
   Int       m_chromaCbQpOffset;                 //  Chroma Cb QP Offset (0:default)
   Int       m_chromaCrQpOffset;                 //  Chroma Cr Qp Offset (0:default)
+#if W0038_CQP_ADJ
+  UInt      m_sliceChromaQpOffsetPeriodicity;                 ///< Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
+  Int       m_sliceChromaQpOffsetIntraOrPeriodic[2/*Cb,Cr*/]; ///< Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
+#endif
+
   ChromaFormat m_chromaFormatIDC;
 
@@ -363,4 +384,9 @@
   std::string m_colourRemapSEIFileRoot;          ///< SEI Colour Remapping File (initialized from external file)
   TComSEIMasteringDisplay m_masteringDisplay;
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+  Bool      m_alternativeTransferCharacteristicsSEIEnabled;
+  UChar     m_preferredTransferCharacteristics;
+#endif
+
 #if NH_MV
   SEIMessages* m_seiMessages; 
@@ -534,4 +560,5 @@
   Void      setFrameRate                    ( Int   i )      { m_iFrameRate = i; }
   Void      setFrameSkip                    ( UInt i ) { m_FrameSkip = i; }
+  Void      setTemporalSubsampleRatio       ( UInt  i )      { m_temporalSubsampleRatio = i; }
   Void      setSourceWidth                  ( Int   i )      { m_iSourceWidth = i; }
   Void      setSourceHeight                 ( Int   i )      { m_iSourceHeight = i; }
@@ -619,6 +646,9 @@
   Void      setLoopFilterBetaOffset         ( Int   i )      { m_loopFilterBetaOffsetDiv2  = i; }
   Void      setLoopFilterTcOffset           ( Int   i )      { m_loopFilterTcOffsetDiv2    = i; }
+#if W0038_DB_OPT
+  Void      setDeblockingFilterMetric       ( Int   i )      { m_deblockingFilterMetric = i; }
+#else
   Void      setDeblockingFilterMetric       ( Bool  b )      { m_DeblockingFilterMetric = b; }
-
+#endif
   //====== Motion search ========
   Void      setDisableIntraPUsInInterSlices ( Bool  b )      { m_bDisableIntraPUsInInterSlices = b; }
@@ -645,4 +675,9 @@
   Void      setChromaCbQpOffset             ( Int   i )      { m_chromaCbQpOffset = i; }
   Void      setChromaCrQpOffset             ( Int   i )      { m_chromaCrQpOffset = i; }
+#if W0038_CQP_ADJ
+  Void      setSliceChromaOffsetQpIntraOrPeriodic( UInt periodicity, Int sliceChromaQpOffsetIntraOrPeriodic[2]) { m_sliceChromaQpOffsetPeriodicity = periodicity; memcpy(m_sliceChromaQpOffsetIntraOrPeriodic, sliceChromaQpOffsetIntraOrPeriodic, sizeof(m_sliceChromaQpOffsetIntraOrPeriodic)); }
+  Int       getSliceChromaOffsetQpIntraOrPeriodic( Bool bIsCr) const                                            { return m_sliceChromaQpOffsetIntraOrPeriodic[bIsCr?1:0]; }
+  UInt      getSliceChromaOffsetQpPeriodicity() const                                                           { return m_sliceChromaQpOffsetPeriodicity; }
+#endif
 
   Void      setChromaFormatIdc              ( ChromaFormat cf ) { m_chromaFormatIDC = cf; }
@@ -666,4 +701,5 @@
   Int       getFrameRate                    ()      { return  m_iFrameRate; }
   UInt      getFrameSkip                    ()      { return  m_FrameSkip; }
+  UInt      getTemporalSubsampleRatio       ()      { return  m_temporalSubsampleRatio; }
   Int       getSourceWidth                  ()      { return  m_iSourceWidth; }
   Int       getSourceHeight                 ()      { return  m_iSourceHeight; }
@@ -702,5 +738,9 @@
   Int       getLoopFilterBetaOffset         ()      { return m_loopFilterBetaOffsetDiv2; }
   Int       getLoopFilterTcOffset           ()      { return m_loopFilterTcOffsetDiv2; }
+#if W0038_DB_OPT
+  Int       getDeblockingFilterMetric       ()      { return m_deblockingFilterMetric; }
+#else
   Bool      getDeblockingFilterMetric       ()      { return m_DeblockingFilterMetric; }
+#endif
 
   //==== Motion search ========
@@ -831,4 +871,8 @@
   Void  setSaoCtuBoundary              (Bool val)                    { m_saoCtuBoundary = val; }
   Bool  getSaoCtuBoundary              ()                            { return m_saoCtuBoundary; }
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+  Void  setSaoResetEncoderStateAfterIRAP(Bool b)                     { m_saoResetEncoderStateAfterIRAP = b; }
+  Bool  getSaoResetEncoderStateAfterIRAP() const                     { return m_saoResetEncoderStateAfterIRAP; }
+#endif
   Void  setLFCrossTileBoundaryFlag               ( Bool   val  )     { m_loopFilterAcrossTilesEnabledFlag = val; }
   Bool  getLFCrossTileBoundaryFlag               ()                  { return m_loopFilterAcrossTilesEnabledFlag;   }
@@ -975,4 +1019,10 @@
 
   Void  setMasteringDisplaySEI(const TComSEIMasteringDisplay &src)   { m_masteringDisplay = src; }
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+  Void  setSEIAlternativeTransferCharacteristicsSEIEnable( Bool b)   { m_alternativeTransferCharacteristicsSEIEnabled = b;    }
+  Bool  getSEIAlternativeTransferCharacteristicsSEIEnable( ) const   { return m_alternativeTransferCharacteristicsSEIEnabled; }
+  Void  setSEIPreferredTransferCharacteristics(UChar v)              { m_preferredTransferCharacteristics = v;    }
+  UChar getSEIPreferredTransferCharacteristics() const               { return m_preferredTransferCharacteristics; }
+#endif
   const TComSEIMasteringDisplay &getMasteringDisplaySEI() const      { return m_masteringDisplay; }
 #if NH_MV
Index: trunk/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncCu.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncCu.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -1096,5 +1096,4 @@
         // do normal intra modes
         // speedup for inter frames
-        Double intraCost = 0.0;
 
         if((rpcBestCU->getSlice()->getSliceType() == I_SLICE)                                     ||
@@ -1122,7 +1121,7 @@
             if( bUseIVP )
             {
-              xCheckRDCostIntra( rpcBestCU, rpcTempCU, intraCost, SIZE_2Nx2N DEBUG_STRING_PASS_INTO(sDebug), bOnlyIVP );
-#else
-          xCheckRDCostIntra( rpcBestCU, rpcTempCU, intraCost, SIZE_2Nx2N DEBUG_STRING_PASS_INTO(sDebug) );
+              xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_2Nx2N DEBUG_STRING_PASS_INTO(sDebug), bOnlyIVP );
+#else
+          xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_2Nx2N DEBUG_STRING_PASS_INTO(sDebug) );
 #endif
 #if KWU_RC_MADPRED_E0227
@@ -1143,12 +1142,9 @@
             if( rpcTempCU->getWidth(0) > ( 1 << sps.getQuadtreeTULog2MinSize() ) )
             {
-              Double tmpIntraCost;
 #if NH_3D_ENC_DEPTH
-              xCheckRDCostIntra( rpcBestCU, rpcTempCU, tmpIntraCost, SIZE_NxN DEBUG_STRING_PASS_INTO(sDebug), bOnlyIVP );
-#else
-              xCheckRDCostIntra( rpcBestCU, rpcTempCU, tmpIntraCost, SIZE_NxN DEBUG_STRING_PASS_INTO(sDebug)   );
-#endif
-
-              intraCost = std::min(intraCost, tmpIntraCost);
+              xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN DEBUG_STRING_PASS_INTO(sDebug), bOnlyIVP );
+#else
+              xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN DEBUG_STRING_PASS_INTO(sDebug)   );
+#endif        
               rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
             }
@@ -2784,5 +2780,4 @@
 Void TEncCu::xCheckRDCostIntra( TComDataCU *&rpcBestCU,
                                 TComDataCU *&rpcTempCU,
-                                Double      &cost,
                                 PartSize     eSize
                                 DEBUG_STRING_FN_DECLARE(sDebug)
@@ -2895,6 +2890,4 @@
 
   xCheckDQP( rpcTempCU );
-
-  cost = rpcTempCU->getTotalCost();
 
   xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth DEBUG_STRING_PASS_INTO(sDebug) DEBUG_STRING_PASS_INTO(sTest));
Index: trunk/source/Lib/TLibEncoder/TEncCu.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncCu.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncCu.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -167,5 +167,4 @@
   Void  xCheckRDCostIntra   ( TComDataCU *&rpcBestCU,
                               TComDataCU *&rpcTempCU,
-                              Double      &cost,
                               PartSize     ePartSize
                               DEBUG_STRING_FN_DECLARE(sDebug)
Index: trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncEntropy.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncEntropy.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncEntropy.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -108,4 +108,7 @@
   m_associatedIRAPType = NAL_UNIT_CODED_SLICE_IDR_N_LP;
   m_associatedIRAPPOC  = 0;
+#if W0038_DB_OPT
+  m_pcDeblockingTempPicYuv = NULL;
+#endif
   return;
 }
@@ -125,4 +128,12 @@
 Void  TEncGOP::destroy()
 {
+#if W0038_DB_OPT
+  if (m_pcDeblockingTempPicYuv)
+  {
+    m_pcDeblockingTempPicYuv->destroy();
+    delete m_pcDeblockingTempPicYuv;
+    m_pcDeblockingTempPicYuv = NULL;
+  }
+#endif
 }
 
@@ -502,4 +513,12 @@
     seiMessages.push_back(seiChromaResamplingFilterHint);
   }
+#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
+  if(m_pcCfg->getSEIAlternativeTransferCharacteristicsSEIEnable())
+  {
+    SEIAlternativeTransferCharacteristics *seiAlternativeTransferCharacteristics = new SEIAlternativeTransferCharacteristics;
+    m_seiEncoder.initSEIAlternativeTransferCharacteristics(seiAlternativeTransferCharacteristics);
+    seiMessages.push_back(seiAlternativeTransferCharacteristics);
+  }
+#endif
 }
 
@@ -1727,8 +1746,15 @@
         estimatedCpbFullness -= m_pcRateCtrl->getBufferingRate();
         // prevent underflow
+#if V0078_ADAPTIVE_LOWER_BOUND
+        if (estimatedCpbFullness - estimatedBits < m_pcRateCtrl->getRCPic()->getLowerBound())
+        {
+          estimatedBits = max(200, estimatedCpbFullness - m_pcRateCtrl->getRCPic()->getLowerBound());
+        }
+#else
         if (estimatedCpbFullness - estimatedBits < (Int)(m_pcRateCtrl->getCpbSize()*0.1f))
         {
           estimatedBits = max(200, estimatedCpbFullness - (Int)(m_pcRateCtrl->getCpbSize()*0.1f));
         }
+#endif
 
         m_pcRateCtrl->getRCPic()->setTargetBits(estimatedBits);
@@ -1769,8 +1795,15 @@
             estimatedCpbFullness -= m_pcRateCtrl->getBufferingRate();
             // prevent underflow
+#if V0078_ADAPTIVE_LOWER_BOUND
+            if (estimatedCpbFullness - bits < m_pcRateCtrl->getRCPic()->getLowerBound())
+            {
+              bits = estimatedCpbFullness - m_pcRateCtrl->getRCPic()->getLowerBound();
+            }
+#else
             if (estimatedCpbFullness - bits < (Int)(m_pcRateCtrl->getCpbSize()*0.1f))
             {
               bits = estimatedCpbFullness - (Int)(m_pcRateCtrl->getCpbSize()*0.1f);
             }
+#endif
           }
 #endif
@@ -1902,5 +1935,16 @@
     if ( m_pcCfg->getDeblockingFilterMetric() )
     {
+#if W0038_DB_OPT
+      if ( m_pcCfg->getDeblockingFilterMetric()==2 )
+      {
+        applyDeblockingFilterParameterSelection(pcPic, uiNumSliceSegments, iGOPid);
+      }
+      else
+      {
+#endif
       applyDeblockingFilterMetric(pcPic, uiNumSliceSegments);
+#if W0038_DB_OPT
+      }
+#endif
     }
     m_pcLoopFilter->loopFilterPic( pcPic );
@@ -1954,5 +1998,14 @@
       m_pcEncTop->getRDGoOnSbacCoder()->setBitstream(&tempBitCounter);
       m_pcSAO->initRDOCabacCoder(m_pcEncTop->getRDGoOnSbacCoder(), pcSlice);
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+      m_pcSAO->SAOProcess(pcPic, sliceEnabled, pcPic->getSlice(0)->getLambdas(),
+                          m_pcCfg->getTestSAODisableAtPictureLevel(),
+                          m_pcCfg->getSaoEncodingRate(),
+                          m_pcCfg->getSaoEncodingRateChroma(),
+                          m_pcCfg->getSaoCtuBoundary(),
+                          m_pcCfg->getSaoResetEncoderStateAfterIRAP());
+#else
       m_pcSAO->SAOProcess(pcPic, sliceEnabled, pcPic->getSlice(0)->getLambdas(), m_pcCfg->getTestSAODisableAtPictureLevel(), m_pcCfg->getSaoEncodingRate(), m_pcCfg->getSaoEncodingRateChroma(), m_pcCfg->getSaoCtuBoundary());
+#endif
       m_pcSAO->PCMLFDisableProcess(pcPic);
       m_pcEncTop->getRDGoOnSbacCoder()->setBitstream(NULL);
@@ -2186,8 +2239,8 @@
   //--CFG_KDY
   const Int rateMultiplier=(isField?2:1);
-  m_gcAnalyzeAll.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier );
-  m_gcAnalyzeI.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier );
-  m_gcAnalyzeP.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier );
-  m_gcAnalyzeB.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier );
+  m_gcAnalyzeAll.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier / (Double)m_pcCfg->getTemporalSubsampleRatio());
+  m_gcAnalyzeI.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier / (Double)m_pcCfg->getTemporalSubsampleRatio());
+  m_gcAnalyzeP.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier / (Double)m_pcCfg->getTemporalSubsampleRatio());
+  m_gcAnalyzeB.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier / (Double)m_pcCfg->getTemporalSubsampleRatio());
   const ChromaFormat chFmt = m_pcCfg->getChromaFormatIdc();
 
@@ -2224,5 +2277,9 @@
   {
     //-- interlaced summary
+#if TEMPORAL_SUBSAMPLE
+    m_gcAnalyzeAll_in.setFrmRate( m_pcCfg->getFrameRate() / (Double)m_pcCfg->getTemporalSubsampleRatio());
+#else
     m_gcAnalyzeAll_in.setFrmRate( m_pcCfg->getFrameRate());
+#endif
     m_gcAnalyzeAll_in.setBits(m_gcAnalyzeAll.getBits());
     // prior to the above statement, the interlace analyser does not contain the correct total number of bits.
@@ -2959,6 +3016,6 @@
   assert(noCol > 1);
   assert(noRows > 1);
-  UInt64 *colSAD = (UInt64*)malloc(noCol*sizeof(UInt64));
-  UInt64 *rowSAD = (UInt64*)malloc(noRows*sizeof(UInt64));
+  std::vector<UInt64> colSAD(noCol,  UInt64(0));
+  std::vector<UInt64> rowSAD(noRows, UInt64(0));
   UInt colIdx = 0;
   UInt rowIdx = 0;
@@ -2972,7 +3029,4 @@
   const Int thr1 = 2*bitdepthScale;
   UInt a = 0;
-
-  memset(colSAD, 0, noCol*sizeof(UInt64));
-  memset(rowSAD, 0, noRows*sizeof(UInt64));
 
   if (maxTBsize > minBlockArtSize)
@@ -3064,8 +3118,126 @@
     }
   }
-
-  free(colSAD);
-  free(rowSAD);
-}
+}
+
+#if W0038_DB_OPT
+Void TEncGOP::applyDeblockingFilterParameterSelection( TComPic* pcPic, const UInt numSlices, const Int gopID )
+{
+  enum DBFltParam
+  {
+    DBFLT_PARAM_AVAILABLE = 0,
+    DBFLT_DISABLE_FLAG,
+    DBFLT_BETA_OFFSETD2,
+    DBFLT_TC_OFFSETD2,
+    //NUM_DBFLT_PARAMS
+  };
+  const Int MAX_BETA_OFFSET = 3;
+  const Int MIN_BETA_OFFSET = -3;
+  const Int MAX_TC_OFFSET = 3;
+  const Int MIN_TC_OFFSET = -3;
+
+  TComPicYuv* pcPicYuvRec = pcPic->getPicYuvRec();
+  TComPicYuv* pcPicYuvOrg = pcPic ->getPicYuvOrg();
+
+  const Int currQualityLayer = (pcPic->getSlice(0)->getSliceType() != I_SLICE) ? m_pcCfg->getGOPEntry(gopID).m_temporalId+1 : 0;
+  assert(currQualityLayer <MAX_ENCODER_DEBLOCKING_QUALITY_LAYERS);
+
+  if(!m_pcDeblockingTempPicYuv)
+  {
+    m_pcDeblockingTempPicYuv         = new TComPicYuv;
+    m_pcDeblockingTempPicYuv->create( m_pcEncTop->getSourceWidth(), m_pcEncTop->getSourceHeight(), m_pcEncTop->getChromaFormatIdc(),  pcPic->getSlice(0)->getSPS()->getMaxCUWidth(), pcPic->getSlice(0)->getSPS()->getMaxCUHeight(), pcPic->getSlice(0)->getSPS()->getMaxTotalCUDepth(),true );
+    memset(m_DBParam, 0, sizeof(m_DBParam));
+  }
+
+  //preserve current reconstruction
+  pcPicYuvRec->copyToPic(m_pcDeblockingTempPicYuv);
+
+  const Bool bNoFiltering      = m_DBParam[currQualityLayer][DBFLT_PARAM_AVAILABLE] && m_DBParam[currQualityLayer][DBFLT_DISABLE_FLAG]==false /*&& pcPic->getTLayer()==0*/;
+  const Int  maxBetaOffsetDiv2 = bNoFiltering? Clip3(MIN_BETA_OFFSET, MAX_BETA_OFFSET, m_DBParam[currQualityLayer][DBFLT_BETA_OFFSETD2]+1) : MAX_BETA_OFFSET;
+  const Int  minBetaOffsetDiv2 = bNoFiltering? Clip3(MIN_BETA_OFFSET, MAX_BETA_OFFSET, m_DBParam[currQualityLayer][DBFLT_BETA_OFFSETD2]-1) : MIN_BETA_OFFSET;
+  const Int  maxTcOffsetDiv2   = bNoFiltering? Clip3(MIN_TC_OFFSET, MAX_TC_OFFSET, m_DBParam[currQualityLayer][DBFLT_TC_OFFSETD2]+2)       : MAX_TC_OFFSET;
+  const Int  minTcOffsetDiv2   = bNoFiltering? Clip3(MIN_TC_OFFSET, MAX_TC_OFFSET, m_DBParam[currQualityLayer][DBFLT_TC_OFFSETD2]-2)       : MIN_TC_OFFSET;
+
+  UInt64 distBetaPrevious      = std::numeric_limits<UInt64>::max();
+  UInt64 distMin               = std::numeric_limits<UInt64>::max();
+  Bool   bDBFilterDisabledBest = true;
+  Int    betaOffsetDiv2Best    = 0;
+  Int    tcOffsetDiv2Best      = 0;
+
+  for(Int betaOffsetDiv2=maxBetaOffsetDiv2; betaOffsetDiv2>=minBetaOffsetDiv2; betaOffsetDiv2--)
+  {
+    UInt64 distTcMin = std::numeric_limits<UInt64>::max();
+    for(Int tcOffsetDiv2=maxTcOffsetDiv2; tcOffsetDiv2 >= minTcOffsetDiv2; tcOffsetDiv2--)
+    {
+      for (Int i=0; i<numSlices; i++)
+      {
+        pcPic->getSlice(i)->setDeblockingFilterOverrideFlag(true);
+        pcPic->getSlice(i)->setDeblockingFilterDisable(false);
+        pcPic->getSlice(i)->setDeblockingFilterBetaOffsetDiv2( betaOffsetDiv2 );
+        pcPic->getSlice(i)->setDeblockingFilterTcOffsetDiv2( tcOffsetDiv2 );
+      }
+      m_pcDeblockingTempPicYuv->copyToPic(pcPicYuvRec); // restore reconstruction
+      m_pcLoopFilter->loopFilterPic( pcPic );
+      const UInt64 dist = xFindDistortionFrame(pcPicYuvOrg, pcPicYuvRec, pcPic->getPicSym()->getSPS().getBitDepths());
+      if(dist < distMin)
+      {
+        distMin = dist;
+        bDBFilterDisabledBest = false;
+        betaOffsetDiv2Best  = betaOffsetDiv2;
+        tcOffsetDiv2Best = tcOffsetDiv2;
+      }
+      if(dist < distTcMin)
+      {
+        distTcMin = dist;
+      }
+      else if(tcOffsetDiv2 <-2)
+      {
+        break;
+      }
+    }
+    if(betaOffsetDiv2<-1 && distTcMin >= distBetaPrevious)
+    {
+      break;
+    }
+    distBetaPrevious = distTcMin;
+  }
+
+  //update:
+  m_DBParam[currQualityLayer][DBFLT_PARAM_AVAILABLE] = 1;
+  m_DBParam[currQualityLayer][DBFLT_DISABLE_FLAG]    = bDBFilterDisabledBest;
+  m_DBParam[currQualityLayer][DBFLT_BETA_OFFSETD2]   = betaOffsetDiv2Best;
+  m_DBParam[currQualityLayer][DBFLT_TC_OFFSETD2]     = tcOffsetDiv2Best;
+
+  m_pcDeblockingTempPicYuv->copyToPic(pcPicYuvRec); //restore reconstruction
+
+  if(bDBFilterDisabledBest)
+  {
+    for (Int i=0; i<numSlices; i++)
+    {
+      pcPic->getSlice(i)->setDeblockingFilterOverrideFlag(true);
+      pcPic->getSlice(i)->setDeblockingFilterDisable(true);
+    }
+  }
+  else if(betaOffsetDiv2Best ==pcPic->getSlice(0)->getPPS()->getDeblockingFilterBetaOffsetDiv2() &&  tcOffsetDiv2Best==pcPic->getSlice(0)->getPPS()->getDeblockingFilterTcOffsetDiv2())
+  {
+    for (Int i=0; i<numSlices; i++)
+    {
+      pcPic->getSlice(i)->setDeblockingFilterOverrideFlag(false);
+      pcPic->getSlice(i)->setDeblockingFilterDisable(        pcPic->getSlice(i)->getPPS()->getPicDisableDeblockingFilterFlag() );
+      pcPic->getSlice(i)->setDeblockingFilterBetaOffsetDiv2( pcPic->getSlice(i)->getPPS()->getDeblockingFilterBetaOffsetDiv2() );
+      pcPic->getSlice(i)->setDeblockingFilterTcOffsetDiv2(   pcPic->getSlice(i)->getPPS()->getDeblockingFilterTcOffsetDiv2()   );
+    }
+  }
+  else
+  {
+    for (Int i=0; i<numSlices; i++)
+    {
+      pcPic->getSlice(i)->setDeblockingFilterOverrideFlag(true);
+      pcPic->getSlice(i)->setDeblockingFilterDisable( false );
+      pcPic->getSlice(i)->setDeblockingFilterBetaOffsetDiv2(betaOffsetDiv2Best);
+      pcPic->getSlice(i)->setDeblockingFilterTcOffsetDiv2(tcOffsetDiv2Best);
+    }
+  }
+}
+#endif
 
 #if NH_MV
Index: trunk/source/Lib/TLibEncoder/TEncGOP.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncGOP.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncGOP.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -153,4 +153,8 @@
   Bool                    m_bufferingPeriodSEIPresentInAU;
   SEIEncoder              m_seiEncoder;
+#if W0038_DB_OPT
+  TComPicYuv*             m_pcDeblockingTempPicYuv;
+  Int                     m_DBParam[MAX_ENCODER_DEBLOCKING_QUALITY_LAYERS][4];   //[layer_id][0: available; 1: bDBDisabled; 2: Beta Offset Div2; 3: Tc Offset Div2;]
+#endif
 
 public:
@@ -249,4 +253,7 @@
 
   Void applyDeblockingFilterMetric( TComPic* pcPic, UInt uiNumSlices );
+#if W0038_DB_OPT
+  Void applyDeblockingFilterParameterSelection( TComPic* pcPic, const UInt numSlices, const Int gopID );
+#endif
 };// END CLASS DEFINITION TEncGOP
 
Index: trunk/source/Lib/TLibEncoder/TEncPic.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncPic.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncPic.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncPic.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncPic.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncPic.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncPreanalyzer.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncPreanalyzer.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncPreanalyzer.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncPreanalyzer.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncPreanalyzer.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncPreanalyzer.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2015, ITU/ISO/IEC
+* Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncRateCtrl.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncRateCtrl.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncRateCtrl.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -554,4 +554,45 @@
 }
 
+#if V0078_ADAPTIVE_LOWER_BOUND
+Int TEncRCPic::xEstPicLowerBound(TEncRCSeq* encRCSeq, TEncRCGOP* encRCGOP)
+{
+  Int lowerBound = 0;
+  Int GOPbitsLeft = encRCGOP->getBitsLeft();
+
+  const Int nextPicPosition = (encRCGOP->getNumPic() - encRCGOP->getPicLeft() + 1) % encRCGOP->getNumPic();
+  const Int nextPicRatio = encRCSeq->getBitRatio(nextPicPosition);
+
+  Int totalPicRatio = 0;
+  for (Int i = nextPicPosition; i < encRCGOP->getNumPic(); i++)
+  {
+    totalPicRatio += encRCSeq->getBitRatio(i);
+  }
+
+  if (nextPicPosition == 0)
+  {
+    GOPbitsLeft = encRCGOP->getTargetBits();
+  }
+  else
+  {
+    GOPbitsLeft -= m_targetBits;
+  }
+
+  lowerBound = Int(((Double)GOPbitsLeft) * nextPicRatio / totalPicRatio);
+
+  if (lowerBound < 100)
+  {
+    lowerBound = 100;   // at least allocate 100 bits for one picture
+  }
+
+  if (m_encRCSeq->getFramesLeft() > 16)
+  {
+    lowerBound = Int(g_RCWeightPicRargetBitInBuffer * lowerBound + g_RCWeightPicTargetBitInGOP * m_encRCGOP->getTargetBitInGOP(nextPicPosition));
+  }
+
+  return lowerBound;
+}
+#endif
+
+
 Void TEncRCPic::addToPictureLsit( list<TEncRCPic*>& listPreviousPictures )
 {
@@ -611,4 +652,7 @@
   Int picWidthInLCU  = ( picWidth  % LCUWidth  ) == 0 ? picWidth  / LCUWidth  : picWidth  / LCUWidth  + 1;
   Int picHeightInLCU = ( picHeight % LCUHeight ) == 0 ? picHeight / LCUHeight : picHeight / LCUHeight + 1;
+#if V0078_ADAPTIVE_LOWER_BOUND
+  m_lowerBound       = xEstPicLowerBound( encRCSeq, encRCGOP );
+#endif
 
   m_LCULeft         = m_numberOfLCU;
Index: trunk/source/Lib/TLibEncoder/TEncRateCtrl.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncRateCtrl.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncRateCtrl.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -267,4 +267,7 @@
   Int xEstPicTargetBits( TEncRCSeq* encRCSeq, TEncRCGOP* encRCGOP );
   Int xEstPicHeaderBits( list<TEncRCPic*>& listPreviousPictures, Int frameLevel );
+#if V0078_ADAPTIVE_LOWER_BOUND
+  Int xEstPicLowerBound( TEncRCSeq* encRCSeq, TEncRCGOP* encRCGOP );
+#endif
 
 public:
@@ -282,4 +285,7 @@
   Int  getBitsCoded()                                     { return m_targetBits - m_estHeaderBits - m_bitsLeft; }
   Int  getLCUCoded()                                      { return m_numberOfLCU - m_LCULeft; }
+#if V0078_ADAPTIVE_LOWER_BOUND
+  Int  getLowerBound()                                    { return m_lowerBound; }
+#endif
   TRCLCU* getLCU()                                        { return m_LCUs; }
   TRCLCU& getLCU( Int LCUIdx )                            { return m_LCUs[LCUIdx]; }
@@ -321,4 +327,7 @@
   Int m_estHeaderBits;
   Int m_estPicQP;
+#if V0078_ADAPTIVE_LOWER_BOUND
+  Int m_lowerBound;
+#endif
   Double m_estPicLambda;
 
Index: trunk/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -120,4 +120,7 @@
 
   ::memset(m_saoDisabledRate, 0, sizeof(m_saoDisabledRate));
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+  m_lastIRAPPoc = MAX_INT;
+#endif
 
   for(Int typeIdc=0; typeIdc < NUM_SAO_NEW_TYPES; typeIdc++)
@@ -239,5 +242,9 @@
 
 
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+Void TEncSampleAdaptiveOffset::SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma, const Bool isPreDBFSamplesUsed, const Bool bResetStateAfterIRAP )
+#else
 Void TEncSampleAdaptiveOffset::SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma, Bool isPreDBFSamplesUsed )
+#endif
 {
   TComPicYuv* orgYuv= pPic->getPicYuvOrg();
@@ -256,5 +263,9 @@
   }
   //slice on/off
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+  decidePicParams(sliceEnabled, pPic, saoEncodingRate, saoEncodingRateChroma, bResetStateAfterIRAP);
+#else
   decidePicParams(sliceEnabled, pPic->getSlice(0)->getDepth(), saoEncodingRate, saoEncodingRateChroma);
+#endif
 
   //block on/off
@@ -330,6 +341,29 @@
 }
 
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+Void TEncSampleAdaptiveOffset::decidePicParams(Bool* sliceEnabled, const TComPic* pic, const Double saoEncodingRate, const Double saoEncodingRateChroma, const Bool bResetStateAfterIRAP)
+#else
 Void TEncSampleAdaptiveOffset::decidePicParams(Bool* sliceEnabled, Int picTempLayer, const Double saoEncodingRate, const Double saoEncodingRateChroma)
-{
+#endif
+{
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+  if (pic->getSlice(0)->isIRAP())
+  {
+    m_lastIRAPPoc = pic->getSlice(0)->getPOC();
+  }
+  if (bResetStateAfterIRAP && pic->getSlice(0)->getPOC() > m_lastIRAPPoc)
+  { // reset
+    for (Int compIdx = 0; compIdx < MAX_NUM_COMPONENT; compIdx++)
+{
+      for (Int tempLayer = 1; tempLayer < MAX_TLAYER; tempLayer++)
+      {
+        m_saoDisabledRate[compIdx][tempLayer] = 0.0;
+      }
+    }
+    m_lastIRAPPoc = MAX_INT;
+  }
+  const Int picTempLayer = pic->getSlice(0)->getDepth();
+#endif
+
   //decide sliceEnabled[compIdx]
   const Int numberOfComponents = getNumberValidComponents(m_chromaFormatIDC);
Index: trunk/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -103,10 +103,18 @@
   Void destroyEncData();
   Void initRDOCabacCoder(TEncSbac* pcRDGoOnSbacCoder, TComSlice* pcSlice) ;
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+  Void SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma, const Bool isPreDBFSamplesUsed, const Bool bResetStateAfterIRAP);
+#else
   Void SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma, Bool isPreDBFSamplesUsed);
+#endif
 public: //methods
   Void getPreDBFStatistics(TComPic* pPic);
 private: //methods
   Void getStatistics(SAOStatData*** blkStats, TComPicYuv* orgYuv, TComPicYuv* srcYuv,TComPic* pPic, Bool isCalculatePreDeblockSamples = false);
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+  Void decidePicParams(Bool* sliceEnabled, const TComPic* pic, const Double saoEncodingRate, const Double saoEncodingRateChroma, const Bool bResetStateAfterIRAP);
+#else
   Void decidePicParams(Bool* sliceEnabled, Int picTempLayer, const Double saoEncodingRate, const Double saoEncodingRateChroma);
+#endif
   Void decideBlkParams(TComPic* pic, Bool* sliceEnabled, SAOStatData*** blkStats, TComPicYuv* srcYuv, TComPicYuv* resYuv, SAOBlkParam* reconParams, SAOBlkParam* codedParams, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma);
   Void getBlkStats(const ComponentID compIdx, const Int channelBitDepth, SAOStatData* statsDataTypes, Pel* srcBlk, Pel* orgBlk, Int srcStride, Int orgStride, Int width, Int height, Bool isLeftAvail,  Bool isRightAvail, Bool isAboveAvail, Bool isBelowAvail, Bool isAboveLeftAvail, Bool isAboveRightAvail, Bool isCalculatePreDeblockSamples);
@@ -133,4 +141,7 @@
   SAOStatData***         m_preDBFstatData;
   Double                 m_saoDisabledRate[MAX_NUM_COMPONENT][MAX_TLAYER];
+#if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP
+  Int                    m_lastIRAPPoc;
+#endif
   Int                    m_skipLinesR[MAX_NUM_COMPONENT][NUM_SAO_NEW_TYPES];
   Int                    m_skipLinesB[MAX_NUM_COMPONENT][NUM_SAO_NEW_TYPES];
Index: trunk/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncSbac.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncSbac.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncSbac.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncSearch.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncSearch.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -49,14 +49,9 @@
  : m_encCABACTableIdx(I_SLICE)
 {
-  m_apcPicYuvPred = NULL;
-  m_apcPicYuvResi = NULL;
-
-  m_pdRdPicLambda = NULL;
-  m_pdRdPicQp     = NULL;
-  m_piRdPicQp     = NULL;
 }
 
 TEncSlice::~TEncSlice()
 {
+  destroy();
 }
 
@@ -64,52 +59,19 @@
 {
   // create prediction picture
-  if ( m_apcPicYuvPred == NULL )
-  {
-    m_apcPicYuvPred  = new TComPicYuv;
-    m_apcPicYuvPred->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth, true );
-  }
+  m_picYuvPred.create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth, true );
 
   // create residual picture
-  if( m_apcPicYuvResi == NULL )
-  {
-    m_apcPicYuvResi  = new TComPicYuv;
-    m_apcPicYuvResi->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth, true );
-  }
+  m_picYuvResi.create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth, true );
 }
 
 Void TEncSlice::destroy()
 {
-  // destroy prediction picture
-  if ( m_apcPicYuvPred )
-  {
-    m_apcPicYuvPred->destroy();
-    delete m_apcPicYuvPred;
-    m_apcPicYuvPred  = NULL;
-  }
-
-  // destroy residual picture
-  if ( m_apcPicYuvResi )
-  {
-    m_apcPicYuvResi->destroy();
-    delete m_apcPicYuvResi;
-    m_apcPicYuvResi  = NULL;
-  }
+  m_picYuvPred.destroy();
+  m_picYuvResi.destroy();
 
   // free lambda and QP arrays
-  if ( m_pdRdPicLambda )
-  {
-    xFree( m_pdRdPicLambda );
-    m_pdRdPicLambda = NULL;
-  }
-  if ( m_pdRdPicQp )
-  {
-    xFree( m_pdRdPicQp );
-    m_pdRdPicQp = NULL;
-  }
-  if ( m_piRdPicQp )
-  {
-    xFree( m_piRdPicQp );
-    m_piRdPicQp = NULL;
-  }
+  m_vdRdPicLambda.clear();
+  m_vdRdPicQp.clear();
+  m_viRdPicQp.clear();
 }
 
@@ -133,7 +95,7 @@
 
   // create lambda and QP arrays
-  m_pdRdPicLambda     = (Double*)xMalloc( Double, m_pcCfg->getDeltaQpRD() * 2 + 1 );
-  m_pdRdPicQp         = (Double*)xMalloc( Double, m_pcCfg->getDeltaQpRD() * 2 + 1 );
-  m_piRdPicQp         = (Int*   )xMalloc( Int,    m_pcCfg->getDeltaQpRD() * 2 + 1 );
+  m_vdRdPicLambda.resize(m_pcCfg->getDeltaQpRD() * 2 + 1 );
+  m_vdRdPicQp.resize(    m_pcCfg->getDeltaQpRD() * 2 + 1 );
+  m_viRdPicQp.resize(    m_pcCfg->getDeltaQpRD() * 2 + 1 );
 #if KWU_RC_MADPRED_E0227
   if(m_pcCfg->getUseRateCtrl())
@@ -427,15 +389,22 @@
     }
 
+#if W0062_RECALCULATE_QP_TO_ALIGN_WITH_LAMBDA
+    Double lambdaRef = 0.57*pow(2.0, qp_temp/3.0);
+    // QP correction due to modified lambda
+    Double qpOffset = floor((3.0*log(dLambda/lambdaRef)/log(2.0)) +0.5);
+    dQP += qpOffset;
+#endif
+
     iQP = max( -rpcSlice->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), min( MAX_QP, (Int) floor( dQP + 0.5 ) ) );
 
-    m_pdRdPicLambda[iDQpIdx] = dLambda;
-    m_pdRdPicQp    [iDQpIdx] = dQP;
-    m_piRdPicQp    [iDQpIdx] = iQP;
+    m_vdRdPicLambda[iDQpIdx] = dLambda;
+    m_vdRdPicQp    [iDQpIdx] = dQP;
+    m_viRdPicQp    [iDQpIdx] = iQP;
   }
 
   // obtain dQP = 0 case
-  dLambda = m_pdRdPicLambda[0];
-  dQP     = m_pdRdPicQp    [0];
-  iQP     = m_piRdPicQp    [0];
+  dLambda = m_vdRdPicLambda[0];
+  dQP     = m_vdRdPicQp    [0];
+  iQP     = m_viRdPicQp    [0];
 
 
@@ -446,4 +415,25 @@
 #endif
   const std::vector<Double> &intraLambdaModifiers=m_pcCfg->getIntraLambdaModifier();
+
+#if W0038_CQP_ADJ
+  if(rpcSlice->getPPS()->getSliceChromaQpFlag())
+  {
+    const Bool bUseIntraOrPeriodicOffset = rpcSlice->getSliceType()==I_SLICE || (m_pcCfg->getSliceChromaOffsetQpPeriodicity()!=0 && (rpcSlice->getPOC()%m_pcCfg->getSliceChromaOffsetQpPeriodicity())==0);
+    Int cbQP = bUseIntraOrPeriodicOffset? m_pcCfg->getSliceChromaOffsetQpIntraOrPeriodic(false) : m_pcCfg->getGOPEntry(iGOPid).m_CbQPoffset;
+    Int crQP = bUseIntraOrPeriodicOffset? m_pcCfg->getSliceChromaOffsetQpIntraOrPeriodic(true)  : m_pcCfg->getGOPEntry(iGOPid).m_CrQPoffset;
+
+    cbQP = Clip3( -12, 12, cbQP + rpcSlice->getPPS()->getQpOffset(COMPONENT_Cb) ) - rpcSlice->getPPS()->getQpOffset(COMPONENT_Cb); 
+    crQP = Clip3( -12, 12, crQP + rpcSlice->getPPS()->getQpOffset(COMPONENT_Cr) ) - rpcSlice->getPPS()->getQpOffset(COMPONENT_Cr); 
+    rpcSlice->setSliceChromaQpDelta(COMPONENT_Cb, Clip3( -12, 12, cbQP));
+    assert(rpcSlice->getSliceChromaQpDelta(COMPONENT_Cb)+rpcSlice->getPPS()->getQpOffset(COMPONENT_Cb)<=12 && rpcSlice->getSliceChromaQpDelta(COMPONENT_Cb)+rpcSlice->getPPS()->getQpOffset(COMPONENT_Cb)>=-12);
+    rpcSlice->setSliceChromaQpDelta(COMPONENT_Cr, Clip3( -12, 12, crQP));
+    assert(rpcSlice->getSliceChromaQpDelta(COMPONENT_Cr)+rpcSlice->getPPS()->getQpOffset(COMPONENT_Cr)<=12 && rpcSlice->getSliceChromaQpDelta(COMPONENT_Cr)+rpcSlice->getPPS()->getQpOffset(COMPONENT_Cr)>=-12);
+  }
+  else
+  {
+    rpcSlice->setSliceChromaQpDelta( COMPONENT_Cb, 0 );
+    rpcSlice->setSliceChromaQpDelta( COMPONENT_Cr, 0 );
+  }
+#endif
 
   Double lambdaModifier;
@@ -517,6 +507,8 @@
 #endif
   rpcSlice->setSliceQpDelta      ( 0 );
+#if !W0038_CQP_ADJ
   rpcSlice->setSliceChromaQpDelta( COMPONENT_Cb, 0 );
   rpcSlice->setSliceChromaQpDelta( COMPONENT_Cr, 0 );
+#endif
   rpcSlice->setUseChromaQpAdj( rpcSlice->getPPS()->getPpsRangeExtension().getChromaQpOffsetListEnabledFlag() );
 #if NH_MV
@@ -575,9 +567,6 @@
   rpcSlice->setTLayer( pcPic->getTLayer() );
 
-  assert( m_apcPicYuvPred );
-  assert( m_apcPicYuvResi );
-
-  pcPic->setPicYuvPred( m_apcPicYuvPred );
-  pcPic->setPicYuvResi( m_apcPicYuvResi );
+  pcPic->setPicYuvPred( &m_picYuvPred );
+  pcPic->setPicYuvResi( &m_picYuvResi );
   rpcSlice->setSliceMode            ( m_pcCfg->getSliceMode()            );
   rpcSlice->setSliceArgument        ( m_pcCfg->getSliceArgument()        );
@@ -679,9 +668,9 @@
   if (m_pcCfg->getGOPSize() > 1)
   {
-    dFrameLambda = 0.68 * pow (2, (m_piRdPicQp[0]  - SHIFT_QP) / 3.0) * (pcSlice->isInterB()? 2 : 1);
+    dFrameLambda = 0.68 * pow (2, (m_viRdPicQp[0]  - SHIFT_QP) / 3.0) * (pcSlice->isInterB()? 2 : 1);
   }
   else
   {
-    dFrameLambda = 0.68 * pow (2, (m_piRdPicQp[0] - SHIFT_QP) / 3.0);
+    dFrameLambda = 0.68 * pow (2, (m_viRdPicQp[0] - SHIFT_QP) / 3.0);
   }
   m_pcRdCost      ->setFrameLambda(dFrameLambda);
@@ -690,9 +679,9 @@
   for ( UInt uiQpIdx = 0; uiQpIdx < 2 * m_pcCfg->getDeltaQpRD() + 1; uiQpIdx++ )
   {
-    pcSlice       ->setSliceQp             ( m_piRdPicQp    [uiQpIdx] );
+    pcSlice       ->setSliceQp             ( m_viRdPicQp    [uiQpIdx] );
 #if ADAPTIVE_QP_SELECTION
-    pcSlice       ->setSliceQpBase         ( m_piRdPicQp    [uiQpIdx] );
-#endif
-    setUpLambda(pcSlice, m_pdRdPicLambda[uiQpIdx], m_piRdPicQp    [uiQpIdx]);
+    pcSlice       ->setSliceQpBase         ( m_viRdPicQp    [uiQpIdx] );
+#endif
+    setUpLambda(pcSlice, m_vdRdPicLambda[uiQpIdx], m_viRdPicQp    [uiQpIdx]);
 
     // try compress
@@ -730,9 +719,9 @@
 
   // set best values
-  pcSlice       ->setSliceQp             ( m_piRdPicQp    [uiQpIdxBest] );
+  pcSlice       ->setSliceQp             ( m_viRdPicQp    [uiQpIdxBest] );
 #if ADAPTIVE_QP_SELECTION
-  pcSlice       ->setSliceQpBase         ( m_piRdPicQp    [uiQpIdxBest] );
-#endif
-  setUpLambda(pcSlice, m_pdRdPicLambda[uiQpIdxBest], m_piRdPicQp    [uiQpIdxBest]);
+  pcSlice       ->setSliceQpBase         ( m_viRdPicQp    [uiQpIdxBest] );
+#endif
+  setUpLambda(pcSlice, m_vdRdPicLambda[uiQpIdxBest], m_viRdPicQp    [uiQpIdxBest]);
 }
 
Index: trunk/source/Lib/TLibEncoder/TEncSlice.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncSlice.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncSlice.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -68,6 +68,6 @@
   // pictures
   TComList<TComPic*>*     m_pcListPic;                          ///< list of pictures
-  TComPicYuv*             m_apcPicYuvPred;                      ///< prediction picture buffer
-  TComPicYuv*             m_apcPicYuvResi;                      ///< residual picture buffer
+  TComPicYuv              m_picYuvPred;                         ///< prediction picture buffer
+  TComPicYuv              m_picYuvResi;                         ///< residual picture buffer
 
   // processing units
@@ -95,7 +95,7 @@
 #endif
   Double                  m_dPicRdCost;                         ///< picture-level RD cost
-  Double*                 m_pdRdPicLambda;                      ///< array of lambda candidates
-  Double*                 m_pdRdPicQp;                          ///< array of picture QP candidates (double-type for lambda)
-  Int*                    m_piRdPicQp;                          ///< array of picture QP candidates (Int-type)
+  std::vector<Double>     m_vdRdPicLambda;                      ///< array of lambda candidates
+  std::vector<Double>     m_vdRdPicQp;                          ///< array of picture QP candidates (double-type for lambda)
+  std::vector<Int>        m_viRdPicQp;                          ///< array of picture QP candidates (Int-type)
   TEncRateCtrl*           m_pcRateCtrl;                         ///< Rate control manager
   UInt                    m_uiSliceIdx;
Index: trunk/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
@@ -144,6 +144,6 @@
       g_uiMaxCUWidth, g_uiMaxCUHeight, m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList, getLayerId() );
 #else
-    m_cRateCtrl.init( m_framesToBeEncoded, m_RCTargetBitrate, m_iFrameRate, m_iGOPSize, m_iSourceWidth, m_iSourceHeight,
-        m_maxCUWidth, m_maxCUHeight, m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList );
+    m_cRateCtrl.init( m_framesToBeEncoded, m_RCTargetBitrate, (Int)( (Double)m_iFrameRate/m_temporalSubsampleRatio + 0.5), m_iGOPSize, m_iSourceWidth, m_iSourceHeight,
+                      m_maxCUWidth, m_maxCUHeight,m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList );
 #endif
   }
@@ -951,4 +951,17 @@
   }
 
+  if (getTemporalSubsampleRatio()>1)
+  {
+    UInt temporalSubsampleRatio = getTemporalSubsampleRatio();
+    if ( Double(timingInfo->getNumUnitsInTick()) * temporalSubsampleRatio > std::numeric_limits<UInt>::max() )
+    {
+      timingInfo->setTimeScale( timingInfo->getTimeScale() / temporalSubsampleRatio );
+    }
+    else
+    {
+      timingInfo->setNumUnitsInTick( timingInfo->getNumUnitsInTick() * temporalSubsampleRatio );
+    }
+  }
+
   Bool rateCnt = ( bitRate > 0 );
   hrd->setNalHrdParametersPresentFlag( rateCnt );
@@ -1135,4 +1148,22 @@
   m_cPPS.setQpOffset(COMPONENT_Cb, m_chromaCbQpOffset );
   m_cPPS.setQpOffset(COMPONENT_Cr, m_chromaCrQpOffset );
+#if W0038_CQP_ADJ
+  Bool bChromaDeltaQPEnabled = false;
+  {
+    bChromaDeltaQPEnabled = ( m_sliceChromaQpOffsetIntraOrPeriodic[0] || m_sliceChromaQpOffsetIntraOrPeriodic[1] );
+    if( !bChromaDeltaQPEnabled )
+    {
+      for( Int i=0; i<m_iGOPSize; i++ )
+      {
+        if( m_GOPList[i].m_CbQPoffset || m_GOPList[i].m_CrQPoffset )
+        {
+          bChromaDeltaQPEnabled = true;
+          break;
+        }
+      }
+    }
+  }
+  m_cPPS.setSliceChromaQpFlag(bChromaDeltaQPEnabled);
+#endif
 
   m_cPPS.setEntropyCodingSyncEnabledFlag( m_entropyCodingSyncEnabledFlag );
Index: trunk/source/Lib/TLibEncoder/TEncTop.h
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncTop.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/TEncTop.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/WeightPredAnalysis.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/WeightPredAnalysis.cpp	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/WeightPredAnalysis.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibEncoder/WeightPredAnalysis.h
===================================================================
--- trunk/source/Lib/TLibEncoder/WeightPredAnalysis.h	(revision 1397)
+++ trunk/source/Lib/TLibEncoder/WeightPredAnalysis.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibExtractor/TExtrTop.cpp
===================================================================
--- trunk/source/Lib/TLibExtractor/TExtrTop.cpp	(revision 1397)
+++ trunk/source/Lib/TLibExtractor/TExtrTop.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibExtractor/TExtrTop.h
===================================================================
--- trunk/source/Lib/TLibExtractor/TExtrTop.h	(revision 1397)
+++ trunk/source/Lib/TLibExtractor/TExtrTop.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenFilter.cpp
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenFilter.cpp	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenFilter.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenFilter.h
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenFilter.h	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenFilter.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenImage.cpp
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenImage.cpp	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenImage.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenImage.h
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenImage.h	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenImage.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenImagePlane.cpp
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenImagePlane.cpp	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenImagePlane.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenImagePlane.h
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenImagePlane.h	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenImagePlane.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenInterpFilter.cpp
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenInterpFilter.cpp	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenInterpFilter.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenInterpFilter.h
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenInterpFilter.h	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenInterpFilter.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.cpp
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.cpp	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.h
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.h	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenModel.cpp
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenModel.cpp	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenModel.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenModel.h
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenModel.h	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenModel.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenSingleModel.h
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenSingleModel.h	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenSingleModel.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenTop.cpp
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenTop.cpp	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenTop.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibRenderer/TRenTop.h
===================================================================
--- trunk/source/Lib/TLibRenderer/TRenTop.h	(revision 1397)
+++ trunk/source/Lib/TLibRenderer/TRenTop.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibVideoIO/TVideoIOYuv.cpp
===================================================================
--- trunk/source/Lib/TLibVideoIO/TVideoIOYuv.cpp	(revision 1397)
+++ trunk/source/Lib/TLibVideoIO/TVideoIOYuv.cpp	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/TLibVideoIO/TVideoIOYuv.h
===================================================================
--- trunk/source/Lib/TLibVideoIO/TVideoIOYuv.h	(revision 1397)
+++ trunk/source/Lib/TLibVideoIO/TVideoIOYuv.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/libmd5/MD5.h
===================================================================
--- trunk/source/Lib/libmd5/MD5.h	(revision 1397)
+++ trunk/source/Lib/libmd5/MD5.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.
  *
- * Copyright (c) 2010-2015, ITU/ISO/IEC
+ * Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
Index: trunk/source/Lib/libmd5/libmd5.h
===================================================================
--- trunk/source/Lib/libmd5/libmd5.h	(revision 1397)
+++ trunk/source/Lib/libmd5/libmd5.h	(revision 1405)
@@ -4,5 +4,5 @@
  * granted under this license.  
  *
-* Copyright (c) 2010-2015, ITU/ISO/IEC
+* Copyright (c) 2010-2016, ITU/ISO/IEC
  * All rights reserved.
  *
