Index: /branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_2view+depth.cfg
===================================================================
--- /branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_2view+depth.cfg	(revision 1169)
+++ /branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_2view+depth.cfg	(revision 1170)
@@ -81,43 +81,43 @@
 
 #                           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  
+#         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
 
 #=========== Motion Search =============
Index: /branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_2view.cfg
===================================================================
--- /branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_2view.cfg	(revision 1169)
+++ /branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_2view.cfg	(revision 1170)
@@ -70,23 +70,23 @@
 
 #                           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
+#         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
 
 #=========== Motion Search =============
Index: /branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_3view+depth.cfg
===================================================================
--- /branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_3view+depth.cfg	(revision 1169)
+++ /branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_3view+depth.cfg	(revision 1170)
@@ -95,63 +95,63 @@
 
 #                           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    
+#         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
 
 #=========== Motion Search =============
Index: /branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_3view.cfg
===================================================================
--- /branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_3view.cfg	(revision 1169)
+++ /branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_3view.cfg	(revision 1170)
@@ -80,34 +80,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                                  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
+#         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:  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
 
 #=========== Motion Search =============
Index: /branches/HTM-13.1-dev0/cfg/3D-HEVC/deltaCfg_3view.cfg
===================================================================
--- /branches/HTM-13.1-dev0/cfg/3D-HEVC/deltaCfg_3view.cfg	(revision 1169)
+++ /branches/HTM-13.1-dev0/cfg/3D-HEVC/deltaCfg_3view.cfg	(revision 1170)
@@ -45,13 +45,13 @@
 
     
-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_l1:  P    0     3     0.442    0        0        0        1      0                        0                                  1          0         0          -1        1
+Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                  1          0         1          -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        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        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        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        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        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        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        1
 
 FrameI_l3:  
Index: /branches/HTM-13.1-dev0/cfg/3D-HEVC/fullCfg.cfg
===================================================================
--- /branches/HTM-13.1-dev0/cfg/3D-HEVC/fullCfg.cfg	(revision 1169)
+++ /branches/HTM-13.1-dev0/cfg/3D-HEVC/fullCfg.cfg	(revision 1170)
@@ -159,63 +159,63 @@
 
 #                           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    
+#         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
 
 #=========== Motion Search =============
Index: /branches/HTM-13.1-dev0/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1170)
@@ -248,4 +248,5 @@
             {
               m_tDecTop[decIdx]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx ); 
+              m_tDecTop[decIdx]->setProfileIdc( ); 
             }
 
@@ -1050,4 +1051,5 @@
     m_tDecTop[ decIdx ]->setLayerInitilizedFlags( m_layerInitilizedFlags );
     m_tDecTop[ decIdx ]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx );    
+    m_tDecTop[ decIdx ]->setProfileIdc           ( );    
 
 #if H_3D
Index: /branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1170)
@@ -224,4 +224,9 @@
     in>>entry.m_interViewRefPosL[1][i];
   }
+#endif
+#if HHI_INTER_COMP_PRED_K0052
+#if H_3D
+  in>>entry.m_interCompPredFlag;
+#endif
 #endif
   return in;
Index: /branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1170)
@@ -204,5 +204,4 @@
   }
 #endif
-
   for(Int layerIdInVps = 0; layerIdInVps < m_numberOfLayers; layerIdInVps++)
   {
@@ -644,4 +643,46 @@
   }
 #endif
+#if H_3D_ANNEX_SELECTION_FIX
+#if H_3D
+ /// SET Profiles
+  for(Int layerIdInVps = 0; layerIdInVps < m_numberOfLayers; layerIdInVps++)
+  {
+    Int profileIdc = -1; 
+    for (Int olsIdx = 0; olsIdx < vps.getNumOutputLayerSets(); olsIdx++ )
+    {   
+      Int lsIdx = vps.olsIdxToLsIdx( olsIdx );
+      for(Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++ )
+      {
+        if( vps.getLayerIdInNuh( layerIdInVps) == vps.getLayerSetLayerIdList(lsIdx, i) )
+        {
+          Int ptlIdx = vps.getProfileTierLevelIdx( olsIdx, i );
+          if ( ptlIdx != -1 )
+          {
+            Int curProfileIdc = vps.getPTL(ptlIdx)->getGeneralPTL()->getProfileIdc(); 
+            if (profileIdc == -1)   
+            {
+              profileIdc = curProfileIdc; 
+            }
+            else
+            {   
+              if ( profileIdc != curProfileIdc )
+              {              
+                fprintf(stderr, "Error: ProfileIdc for layer with index %d in VPS not equal in all OLSs. \n", layerIdInVps );
+                exit(EXIT_FAILURE);
+              }
+            }
+          }
+        }
+      }
+    }
+    if (profileIdc == -1 )
+    {
+      fprintf(stderr, "Error: No profile given for layer with index %d in VPS not equal in all OLS. \n", layerIdInVps );
+      exit(EXIT_FAILURE);
+    }
+    m_acTEncTopList[ layerIdInVps ]->setProfileIdc( profileIdc ); 
+  }
+#endif
+#endif
 #if H_3D_VSO
   if ( m_bUseVSO )
@@ -1337,4 +1378,11 @@
 
   assert( m_iNumberOfViews == vps.getNumViews() ); 
+
+
+#if HHI_INTER_COMP_PRED_K0052
+#if H_3D
+  vps.initViewCompLayer( ); 
+#endif
+#endif
 }
 
@@ -1426,7 +1474,15 @@
 #endif
               {
+#if !HHI_INTER_COMP_PRED_K0052                
                 Bool refAlwaysIntra = ( i == getGOPSize() ) && ( m_iIntraPeriod[ curLayerIdInVps ] % m_iIntraPeriod[ refLayerIdInVps ] == 0 );
+#endif
                 Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
+#if HHI_INTER_COMP_PRED_K0052
+                // refAlwaysIntra actually not needed, since TemporalIds need to be aligned within an AU. 
+                // Thus, reference pictures of IRAP pictures have TemporalId equal to 0.
+                maxTid = std::max( maxTid, refLayerZero ? 0 : geRef.m_temporalId ); 
+#else
                 maxTid = std::max( maxTid, ( refAlwaysIntra || refLayerZero ) ? 0 : geRef.m_temporalId ); 
+#endif
               }
             }
@@ -1436,4 +1492,44 @@
         else
         {        
+#if HHI_INTER_COMP_PRED_K0052
+          if( m_depthFlag[ curLayerIdInVps ] && ( m_mpiFlag|| m_qtPredFlag || m_intraContourFlag ) ) 
+          {          
+            Int nuhLayerIdTex = vps.getLayerIdInNuh( vps.getViewIndex( curLayerIdInNuh ), false ); 
+            if ( nuhLayerIdTex == refLayerIdInNuh )
+            {
+              for( Int i = 0; i < ( getGOPSize() + 1); i++ ) 
+              {        
+                GOPEntry geCur =  m_GOPListMvc[curLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
+                GOPEntry geRef =  m_GOPListMvc[refLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
+                if ( geCur.m_interCompPredFlag )
+                {
+                  Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
+                  maxTid = std::max( maxTid, refLayerZero ? 0 : geRef.m_temporalId ); 
+                }
+              }
+            }
+          }
+          if( !m_depthFlag[ curLayerIdInVps ] && vps.getNumRefListLayers( curLayerIdInNuh) > 0  && ( m_depthRefinementFlag || m_viewSynthesisPredFlag || m_depthBasedBlkPartFlag ) ) 
+          {             
+            for( Int i = 0; i < ( getGOPSize() + 1); i++ ) 
+            {        
+              GOPEntry geCur =  m_GOPListMvc[curLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
+              GOPEntry geRef =  m_GOPListMvc[refLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
+
+              if ( geCur.m_interCompPredFlag )
+              {
+                for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++ )
+                {
+                  Int nuhLayerIdDep = vps.getLayerIdInNuh( vps.getViewIndex( vps.getIdRefListLayer( curLayerIdInNuh, geCur.m_interLayerPredLayerIdc[j] ) ), true ); 
+                  if ( nuhLayerIdDep == refLayerIdInNuh )
+                  {
+                    Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
+                    maxTid = std::max( maxTid, refLayerZero ? 0 : geRef.m_temporalId ); 
+                  }
+                }
+              }
+            }
+          }        
+#else
           if( m_depthFlag[ curLayerIdInVps ] && ( m_mpiFlag|| m_qtPredFlag || m_intraContourFlag ) ) 
           {          
@@ -1466,10 +1562,11 @@
             }
           }        
+#endif
         }
-      }
+      } // if ( vps.getDirectDependencyFlag( curLayerIdInVps, refLayerIdInVps ) ) 
       vps.setMaxTidIlRefPicsPlus1( refLayerIdInVps, curLayerIdInVps, maxTid + 1 );
 #endif
-    }    
-  }
+    }  // Loop curLayerIdInVps
+  } // Loop refLayerIdInVps
 
   // Max temporal id for inter layer reference pictures presence flag
Index: /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 1170)
@@ -137,4 +137,7 @@
 #endif
 #if H_3D
+#if HHI_INTER_COMP_PRED_K0052
+, m_inCmpPredFlag                 ( false )
+#endif
 , m_depthToDisparityB             ( NULL )
 , m_depthToDisparityF             ( NULL )
@@ -185,4 +188,20 @@
   m_iDefaultRefViewIdx = -1;
   m_bDefaultRefViewIdxAvailableFlag = false;
+#if HHI_INTER_COMP_PRED_K0052
+  m_ivMvPredFlag           = false;
+  m_ivMvScalingFlag        = false;
+  m_ivResPredFlag          = false;  
+  m_depthRefinementFlag    = false;
+  m_viewSynthesisPredFlag  = false;
+  m_depthBasedBlkPartFlag  = false;
+  m_mpiFlag                = false;
+  m_intraContourFlag       = false;
+  m_intraSdcWedgeFlag      = false;
+  m_qtPredFlag             = false;
+  m_interSdcFlag           = false;
+  m_depthIntraSkipFlag     = false;
+  m_subPbSize              =  1 << 6;
+  m_mpiSubPbSize           =  1 << 6;
+#endif
 }
 
@@ -2155,7 +2174,8 @@
 {
   m_numViews = 1; 
-#if HHI_VIEW_ID_LIST_I5_J0107
+#if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K0052
 #if H_3D
   AOF( m_viewOIdxList.size() == 0 ); 
+  
   m_viewOIdxList.push_back( 0 );        
 #endif
@@ -2178,5 +2198,5 @@
       {
         m_numViews++;
-#if HHI_VIEW_ID_LIST_I5_J0107
+#if HHI_VIEW_ID_LIST_I5_J0107  || HHI_INTER_COMP_PRED_K0052
 #if H_3D
         m_viewOIdxList.push_back( getViewOrderIdx( lId ) );        
@@ -4031,12 +4051,16 @@
 
 #if H_3D
-
 Void TComSlice::init3dToolParameters()
 {
   Bool depthFlag = getIsDepth();
 
+#if !HHI_INTER_COMP_PRED_K0052
   Bool depthOfRefViewsAvailFlag = false; 
   Bool textOfCurViewAvailFlag = false; 
-
+#endif
+
+  
+
+#if !HHI_INTER_COMP_PRED_K0052
   TComVPS* vps = getVPS(); 
 
@@ -4080,4 +4104,5 @@
     }
   }
+
 
   Bool lidG0  = ( getLayerId() > 0 );
@@ -4105,4 +4130,26 @@
   m_subPbSize              = lidG0 ? ( 1 << ( sps3dExt->getLog2SubPbSizeMinus3   ( depthFlag ) + 3 ) ) : getSPS()->getMaxCUWidth();  
   m_mpiSubPbSize           = 1 << ( sps3dExt->getLog2MpiSubPbSizeMinus3( depthFlag ) + 3 );
+#else
+  Bool nRLLG0 =  ( getVPS()->getNumRefListLayers( getLayerId() ) > 0 );     
+
+  TComSps3dExtension* sps3dExt = getSPS()->getSps3dExtension();
+
+  m_ivMvPredFlag           = sps3dExt->getIvMvPredFlag         ( depthFlag ) && nRLLG0                       ;                             
+  m_ivMvScalingFlag        = sps3dExt->getIvMvScalingFlag      ( depthFlag )                                 ;                             
+  m_ivResPredFlag          = sps3dExt->getIvResPredFlag        ( depthFlag ) && nRLLG0                       ;                               
+  m_depthRefinementFlag    = sps3dExt->getDepthRefinementFlag  ( depthFlag )           && getInCompPredFlag();                            
+  m_viewSynthesisPredFlag  = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag();                          
+  m_depthBasedBlkPartFlag  = sps3dExt->getDepthBasedBlkPartFlag( depthFlag )           && getInCompPredFlag();                          
+  m_mpiFlag                = sps3dExt->getMpiFlag              ( depthFlag )           && getInCompPredFlag();
+  m_intraContourFlag       = sps3dExt->getIntraContourFlag     ( depthFlag )           && getInCompPredFlag();
+  m_intraSdcWedgeFlag      = sps3dExt->getIntraSdcWedgeFlag    ( depthFlag )                                 ;                          
+  m_qtPredFlag             = sps3dExt->getQtPredFlag           ( depthFlag )           && getInCompPredFlag();
+  m_interSdcFlag           = sps3dExt->getInterSdcFlag         ( depthFlag )                                 ;  
+  m_depthIntraSkipFlag     = sps3dExt->getDepthIntraSkipFlag   ( depthFlag )                                 ;                          
+
+  m_subPbSize              =  1 << ( sps3dExt->getLog2SubPbSizeMinus3   ( depthFlag ) + 3 );  
+  m_mpiSubPbSize           =  1 << ( sps3dExt->getLog2MpiSubPbSizeMinus3( depthFlag ) + 3 );
+
+#endif
 
 #if H_3D_OUTPUT_ACTIVE_TOOLS
@@ -4110,6 +4157,12 @@
   std::cout << "DepthFlag:              :" << getIsDepth()             << std::endl;
   std::cout << "ViewOrderIdx:           :" << getViewIndex()           << std::endl;
+#if HHI_INTER_COMP_PRED_K0052
+  std::cout << "InterCmpPredAvailableFlag:" << getInCmpPredAvailFlag() << std::endl;
+  std::cout << "InterCompPredFlag       :"  << getInCompPredFlag()     << std::endl;
+  //std::cout << "TextOfCurViewAvailFlag  :" << textOfCurViewAvailFlag   << std::endl;
+#else
   std::cout << "DepthOfRefViewsAvailFlag:" << depthOfRefViewsAvailFlag << std::endl;
   std::cout << "TextOfCurViewAvailFlag  :" << textOfCurViewAvailFlag   << std::endl;
+#endif
   
   std::cout << "ivMvPredFlag            :" << m_ivMvPredFlag           << std::endl;
Index: /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 1170)
@@ -920,8 +920,11 @@
   Int         ***m_aaaiCodedOffset;
 
-#if HHI_VIEW_ID_LIST_I5_J0107
+#if HHI_VIEW_ID_LIST_I5_J0107 ||  HHI_INTER_COMP_PRED_K0052
   std::vector<Int>  m_viewOIdxList;
 #endif
-
+#if HHI_INTER_COMP_PRED_K0052
+  std::vector< std::vector<Bool> > m_viewCompLayerPresentFlag;
+  std::vector< std::vector<Int>  > m_viewCompLayerId;
+#endif
 #endif
 
@@ -1152,8 +1155,54 @@
   Int     getNumViews()                                                    { return m_numViews; }
   Void    initNumViews();
-#if HHI_VIEW_ID_LIST_I5_J0107
+#if HHI_INTER_COMP_PRED_K0052
+#if H_3D
+  Void   initViewCompLayer( )
+  { 
+    assert( m_viewCompLayerId.size() == 0 && m_viewCompLayerPresentFlag.size() == 0  );
+    for( Int i = 0; i < getNumViews(); i++ )
+    {
+      m_viewCompLayerId         .push_back( std::vector<Int>(0)  );
+      m_viewCompLayerPresentFlag.push_back( std::vector<Bool>(0) );      
+
+      for( Int depFlag = 0; depFlag  <=  1; depFlag++ )
+      {
+        Int iViewOIdx = getViewOIdxList( i );
+        Int layerId = -1;
+        for( Int j = 0; j  <=  getMaxLayersMinus1(); j++ ) 
+        {
+          Int jNuhLId = getLayerIdInNuh( j );
+          if( getVpsDepthFlag( jNuhLId ) == ( (Bool) depFlag )  &&  getViewOrderIdx( jNuhLId )  ==  iViewOIdx  
+            &&  getDependencyId( jNuhLId )  ==  0  &&  getAuxId( jNuhLId )  ==  0 )
+          {
+            layerId = jNuhLId;
+          }
+        }
+        m_viewCompLayerPresentFlag[ i ].push_back( layerId  !=  -1 );
+        m_viewCompLayerId         [ i ].push_back( layerId );        
+      }
+    }
+  };
+#endif
+#endif
+
+#if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K0052
   Int     getViewOIdxList( Int i )                                         { return m_viewOIdxList[i]; }
 #endif
-
+#if HHI_INTER_COMP_PRED_K0052
+  Int     getInvViewOIdxList( Int viewOIdx )                                      
+  {    
+    for ( Int i = 0; i < m_viewOIdxList.size(); i++ )
+    {
+      if  ( m_viewOIdxList[ i ] == viewOIdx )
+      {
+        return i; 
+      }
+    }
+    assert( 0 );   
+    return -1; 
+  }; 
+  Bool    getViewCompLayerPresentFlag (Int i, Bool d ) { return  m_viewCompLayerPresentFlag[ getInvViewOIdxList(i) ][d]; }
+  Bool    getViewCompLayerId          (Int i, Bool d ) { return  m_viewCompLayerId         [ getInvViewOIdxList(i) ][d]; }
+#endif
   Bool    getDependencyFlag( Int i, Int j )                                { return m_dependencyFlag[i][j]; }
   Int     getNumDirectRefLayers( Int layerIdInNuh )                        { return m_numDirectRefLayers[ layerIdInNuh ];  };                               
@@ -2390,4 +2439,9 @@
 #endif
 #if H_3D
+#if HHI_INTER_COMP_PRED_K0052
+  std::vector<Int> m_inCmpRefViewIdcs;
+  Bool       m_inCmpPredAvailFlag; 
+  Bool       m_inCmpPredFlag; 
+#endif
   TComPic*   m_ivPicsCurrPoc [2][MAX_NUM_LAYERS];  
   Int**      m_depthToDisparityB; 
@@ -2492,4 +2546,11 @@
   Int       getRefPOC           ( RefPicList e, Int iRefIdx)    { return  m_aiRefPOCList[e][iRefIdx];   }
 #if H_3D
+#if HHI_INTER_COMP_PRED_K0052
+  Bool      getInCmpPredAvailFlag( )                             { return m_inCmpPredAvailFlag;    } 
+  Bool      getInCompPredFlag( )                                 { return m_inCmpPredFlag;         }    
+  Void      setInCompPredFlag( Bool b )                          { m_inCmpPredFlag = b;            }    
+  Int       getInCmpRefViewIdcs( Int i )                         { return m_inCmpRefViewIdcs  [i]; }
+  Int       getNumCurCmpLIds( )                                  { return (Int) m_inCmpRefViewIdcs.size(); } 
+#endif
   TComPic*  getIvPic            ( Bool depthFlag, Int viewIndex){ return  m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ]; }
 #endif
@@ -2593,4 +2654,7 @@
   UInt getTLayer             ()                            { return m_uiTLayer;                      }
   Void setTLayer             ( UInt uiTLayer )             { m_uiTLayer = uiTLayer;                  }
+#if H_MV
+  Int getTemporalId          ( )                           { return (Int) m_uiTLayer;                }
+#endif
 
   Void setTLayerInfo( UInt uiTLayer );
@@ -2835,5 +2899,90 @@
 #if H_3D
   // 3D-HEVC tool parameters
+#if HHI_INTER_COMP_PRED_K0052
+  Void deriveInCmpPredAndCpAvailFlag()
+  { 
+    Int numCurCmpLIds = getIsDepth() ? 1 : getNumActiveRefLayerPics(); 
+    std::vector<Int> curCmpLIds;
+    if ( getIsDepth() )
+    {
+      curCmpLIds.push_back( getLayerId() );
+    }
+    else
+    {
+      for (Int i = 0; i < numCurCmpLIds; i++)
+      {
+        curCmpLIds.push_back( getRefPicLayerId( i ) );
+      }
+    }
+
+    // m_cpAvailableFlag = true;
+    Bool allRefCmpLayersAvailFlag = true;
+
+    for( Int i = 0; i <= numCurCmpLIds - 1; i++ )
+    {
+      m_inCmpRefViewIdcs.push_back( getVPS()->getViewOrderIdx( curCmpLIds[ i ] ));
+      //if( !getVPS()->getCpPresentFlag( getViewIdx(),  inCmpRefViewIdcs( i ) ) )
+      //{
+      //  m_cpAvailableFlag = false;
+      //}
+      Bool refCmpCurLIdAvailFlag = false;
+      if( getVPS()->getViewCompLayerPresentFlag( m_inCmpRefViewIdcs[ i ], !getIsDepth() ) )
+      {
+        Int j = getVPS()->getLayerIdInVps( getVPS()->getViewCompLayerId( m_inCmpRefViewIdcs[ i ],  !getIsDepth() ) );
+        if  ( getVPS()->getDirectDependencyFlag( getVPS()->getLayerIdInVps( getLayerId() ) ,  j ) &&
+          getVPS()->getSubLayersVpsMaxMinus1( j ) >= getTemporalId()   &&
+          ( getTemporalId() == 0 || getVPS()->getMaxTidIlRefPicsPlus1( j , getVPS()->getLayerIdInVps( getLayerId() ) ) > getTemporalId() )        
+          )
+        {
+          refCmpCurLIdAvailFlag = true;
+        }
+      }
+      if( !refCmpCurLIdAvailFlag )
+      {
+        allRefCmpLayersAvailFlag = false;
+      }
+    }
+
+    if( !allRefCmpLayersAvailFlag )
+    {
+      m_inCmpPredAvailFlag = false;
+    }  
+    else 
+    {
+      TComSps3dExtension* sps3dExt = getSPS()->getSps3dExtension();
+      if( !getIsDepth() )
+      {
+        m_inCmpPredAvailFlag = sps3dExt->getViewSynthesisPredFlag( getIsDepth() ) || 
+          sps3dExt->getDepthBasedBlkPartFlag( getIsDepth() ) || 
+          sps3dExt->getDepthRefinementFlag  ( getIsDepth() );                            
+      }
+      else
+      {
+        m_inCmpPredAvailFlag = sps3dExt->getIntraContourFlag( getIsDepth() ) || 
+          sps3dExt->getQtPredFlag( getIsDepth() ) || 
+          sps3dExt->getMpiFlag( getIsDepth() );                                  
+      }
+    }  
+  };
+
+#endif
+
   Void init3dToolParameters();   
+#if HHI_INTER_COMP_PRED_K0052
+  Void checkInCompPredRefLayers()
+  {
+    if ( getInCompPredFlag() )
+    {
+      for (Int i = 0; i < getNumCurCmpLIds(); i++ )
+      {
+        assert( getIvPic(!getIsDepth(), getInCmpRefViewIdcs( i ) ) != NULL );       
+        // It is a requirement of bitstream conformance that there 
+        // is a picture in the DPB with PicOrderCntVal equal to the PicOrderCntVal of the current picture, 
+        // and a nuh_layer_id value equal to ViewCompLayerId[ inCmpRefViewIdcs[ i ] ][ !DepthFlag ].
+      }
+    }
+  };
+
+#endif
   Bool getIvMvPredFlag           ( ) { return m_ivMvPredFlag           ; };
   Bool getIvMvScalingFlag        ( ) { return m_ivMvScalingFlag        ; };
Index: /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 1170)
@@ -81,9 +81,10 @@
 
 #if H_MV
-#define H_MV_ENC_DEC_TRAC                 0  //< CU/PU level tracking
+#define H_MV_ENC_DEC_TRAC                 1  //< CU/PU level tracking
 #endif
 
 #if H_3D
 #define SEC_DEPTH_INTRA_SKIP_MODE_K0033   1   // Depth intra skip mode
+
 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
 #define NEIGHBORING_PIX_AVAILABILITY_FIX  1
@@ -331,4 +332,7 @@
 #if H_3D
 #define HHI_VIEW_ID_LIST_I5_J0107              0
+#define HHI_INTER_COMP_PRED_K0052              1
+#define H_3D_ANNEX_SELECTION_FIX               1
+
 #endif
 #define H_MV_FIX_REF_LAYER_PIC_FLAG            1
Index: /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1170)
@@ -39,5 +39,7 @@
 #include "SEIread.h"
 #include "TDecSlice.h"
-
+#if H_3D_ANNEX_SELECTION_FIX
+#include "TDecTop.h"
+#endif
 //! \ingroup TLibDecoder
 //! \{
@@ -1330,4 +1332,9 @@
   }
 
+#if HHI_INTER_COMP_PRED_K0052
+#if H_3D
+  pcVPS->initViewCompLayer( ); 
+#endif
+#endif
 
   for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
@@ -2028,6 +2035,8 @@
 #endif
   rpcSlice->setSPS(sps);
+#if !HHI_INTER_COMP_PRED_K0052
 #if H_3D
   rpcSlice->init3dToolParameters();
+#endif
 #endif
   rpcSlice->setPPS(pps);
@@ -2424,4 +2433,17 @@
       }
     }
+#if HHI_INTER_COMP_PRED_K0052
+#if H_3D
+    if ( getDecTop()->decProcAnnexI() )
+    {    
+      rpcSlice->deriveInCmpPredAndCpAvailFlag();
+      if ( rpcSlice->getInCmpPredAvailFlag() )
+      {
+        READ_FLAG(uiCode, "in_comp_pred_flag");  rpcSlice->setInCompPredFlag((Bool)uiCode);      
+      }
+      rpcSlice->init3dToolParameters(); 
+    }
+#endif
+#endif
 #endif
     if(sps->getUseSAO())
@@ -2605,5 +2627,12 @@
     }
 #if H_3D_IC
+#if H_3D_ANNEX_SELECTION_FIX
+    else if(    rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) 
+             && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 
+             && getDecTop()->decProcAnnexI()
+           )
+#else
     else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )
+#endif
     {
       UInt uiCodeTmp = 0;
Index: /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1170)
@@ -52,4 +52,7 @@
 // Class definition
 // ====================================================================================================================
+#if H_3D_ANNEX_SELECTION_FIX
+class TDecTop;
+#endif
 
 /// CAVLC decoder class
@@ -67,4 +70,8 @@
   Int**    m_aaiTempOffset;
 #endif
+#if H_3D_ANNEX_SELECTION_FIX
+  TDecTop*  m_decTop;
+#endif
+
 
 public:
@@ -108,5 +115,7 @@
   Void  parsePPS            ( TComPPS* pcPPS);
 #endif
-
+#if H_3D_ANNEX_SELECTION_FIX
+  Void  setDecTop           ( TDecTop* decTop ) { m_decTop = decTop; }; 
+#endif
   Void  parseVUI            ( TComVUI* pcVUI, TComSPS* pcSPS );
   Void  parseSEI            ( SEIMessages& );
@@ -170,4 +179,9 @@
   Void  parseScalingList               ( TComScalingList* scalingList );
   Void xDecodeScalingList    ( TComScalingList *scalingList, UInt sizeId, UInt listId);
+
+#if H_3D_ANNEX_SELECTION_FIX
+  TDecTop*  getDecTop()      { return m_decTop; };
+#endif
+
 protected:
   Bool  xMoreRbspData();
Index: /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1170)
@@ -547,4 +547,5 @@
 
 #if H_MV_ENC_DEC_TRAC
+#if ENC_DEC_TRACE
   UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
   UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
@@ -555,4 +556,5 @@
   DTRACE_TU("log2TrafoSize", g_uiMaxCUWidth>>uiDepth)
   DTRACE_TU("trafoDepth"  , uiDepth)
+#endif
 #endif
 
Index: /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecGop.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecGop.cpp	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecGop.cpp	(revision 1170)
@@ -92,5 +92,5 @@
   m_pcSliceDecoder        = pcSliceDecoder;
   m_pcLoopFilter          = pcLoopFilter;
-  m_pcSAO  = pcSAO;
+  m_pcSAO  = pcSAO;  
 }
 
Index: /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecGop.h
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecGop.h	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecGop.h	(revision 1170)
@@ -56,4 +56,5 @@
 #include "TDecBinCoderCABAC.h"
 
+
 //! \ingroup TLibDecoder
 //! \{
@@ -62,4 +63,8 @@
 // Class definition
 // ====================================================================================================================
+#if H_3D_ANNEX_SELECTION_FIX
+class TDecTop; 
+#endif
+
 
 /// GOP decoder class
@@ -78,4 +83,7 @@
   TDecSlice*            m_pcSliceDecoder;
   TComLoopFilter*       m_pcLoopFilter;
+#if H_3D_ANNEX_SELECTION_FIX
+  TDecTop*              m_decTop; 
+#endif
   
   TComSampleAdaptiveOffset*     m_pcSAO;
Index: /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1170)
@@ -418,4 +418,7 @@
   initROM();
 #endif
+#if H_3D_ANNEX_SELECTION_FIX
+  m_cCavlcDecoder.setDecTop( this ); 
+#endif
   m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO );
   m_cSliceDecoder.init( &m_cEntropyDecoder, &m_cCuDecoder );
@@ -727,5 +730,7 @@
 #endif
 #if H_3D
+#if !HHI_INTER_COMP_PRED_K0052
   m_apcSlicePilot->init3dToolParameters();
+#endif
 #endif
   pps->setSPS(sps);
@@ -1125,4 +1130,7 @@
 #if H_3D
     pcSlice->setIvPicLists( m_ivPicLists );         
+
+#if HHI_INTER_COMP_PRED_K0052
+    pcSlice->checkInCompPredRefLayers(); 
 #if H_3D_IV_MERGE
 #if H_3D_FCO
@@ -1132,4 +1140,13 @@
 #endif
 #endif    
+#else
+#if H_3D_IV_MERGE
+#if H_3D_FCO
+    //assert( !getIsDepth() );
+#else
+    assert( !getIsDepth() || ( pcSlice->getTexturePic() != 0 ) );
+#endif
+#endif    
+#endif
 #endif
 #if H_MV
Index: /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecTop.h	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecTop.h	(revision 1170)
@@ -243,4 +243,7 @@
   CamParsCollector*       m_pcCamParsCollector;
 #endif
+#if H_3D_ANNEX_SELECTION_FIX
+  Int                     m_profileIdc;
+#endif
 #endif
 
@@ -301,4 +304,30 @@
   Void                    setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
 #endif
+#if H_3D_ANNEX_SELECTION_FIX
+  Void                    setProfileIdc()
+  {        
+    if (m_targetOptLayerSetIdx != -1 )
+    {    
+      TComVPS* vps = getPrefetchedVPS(); 
+      Int lsIdx = vps->olsIdxToLsIdx( m_targetOptLayerSetIdx );
+      Int lIdx = -1; 
+      for (Int j = 0; j < vps->getNumLayersInIdList( lsIdx ); j++ )
+      {
+        if ( vps->getLayerSetLayerIdList( lsIdx, j ) == getLayerId() )
+        {
+          lIdx = j; 
+          break; 
+        }        
+      }
+      assert( lIdx != -1 ); 
+
+      Int profileIdc = vps->getPTL( vps->getProfileTierLevelIdx( m_targetOptLayerSetIdx, lIdx ) )->getGeneralPTL()->getProfileIdc();
+      assert( profileIdc == 1 || profileIdc == 6 || profileIdc == 8 ); 
+      m_profileIdc = profileIdc;   
+    };
+  }
+  Bool                    decProcAnnexI()           { assert( m_profileIdc != -1 ); return ( m_profileIdc == 8); }    
+#endif
+
 #endif
 protected:
Index: /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1170)
@@ -40,7 +40,10 @@
 #include "SEIwrite.h"
 #include "../TLibCommon/TypeDef.h"
-
+#if H_3D_ANNEX_SELECTION_FIX
+#include "TEncTop.h"
+#endif
 //! \ingroup TLibEncoder
 //! \{
+
 
 #if ENC_DEC_TRACE
@@ -899,5 +902,5 @@
       WRITE_FLAG( sps3dExt->getInterSdcFlag( d ) ? 1 : 0 , "inter_sdc_flag" );
 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
-      WRITE_FLAG( sps3dExt->getDepthIntraSkipFlag( d ) ? 1 : 0 , "depth_intra_skip_flag" );
+      WRITE_FLAG( sps3dExt->getDepthIntraSkipFlag( d ) ? 1 : 0 , "intra_skip_flag" );
 #else
       WRITE_FLAG( sps3dExt->getIntraSingleFlag( d ) ? 1 : 0 , "intra_single_flag" );
@@ -1913,4 +1916,16 @@
     }
 #endif
+
+#if HHI_INTER_COMP_PRED_K0052
+#if H_3D      
+  if( getEncTop()->decProcAnnexI() )
+  {
+      if ( pcSlice->getInCmpPredAvailFlag() )
+      {
+        WRITE_FLAG( pcSlice->getInCompPredFlag(), "in_comp_pred_flag" );
+      }
+  }
+#endif
+#endif
     if(pcSlice->getSPS()->getUseSAO())
     {
@@ -2043,5 +2058,12 @@
     }
 #if H_3D_IC
+#if H_3D_ANNEX_SELECTION_FIX
+    else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE )
+      && !pcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 
+      && getEncTop()->decProcAnnexI()       
+      )
+#else
     else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )
+#endif
     {
       WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "slice_ic_enable_flag" );
Index: /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCavlc.h
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCavlc.h	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCavlc.h	(revision 1170)
@@ -68,5 +68,7 @@
   TComSlice*    m_pcSlice;
   UInt          m_uiCoeffCost;
-
+#if H_3D_ANNEX_SELECTION_FIX
+  TEncTop*      m_encTop; 
+#endif
   Void codeShortTermRefPicSet              ( TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Bool calledFromSliceHeader, Int idx );
   Bool findMatchingLTRP ( TComSlice* pcSlice, UInt *ltrpsIndex, Int ltrpPOC, Bool usedFlag );
@@ -185,5 +187,8 @@
   Void codeDFFlag       ( UInt uiCode, const Char *pSymbolName );
   Void codeDFSvlc       ( Int   iCode, const Char *pSymbolName );
-
+#if H_3D_ANNEX_SELECTION_FIX
+  TEncTop* getEncTop()               { return m_encTop; };
+  Void     setEncTop( TEncTop* et )  {  m_encTop = et; };
+#endif
 };
 
Index: /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 1170)
@@ -78,4 +78,7 @@
   Int m_interViewRefPosL[2][MAX_NUM_REF_PICS];  
 #endif
+#if HHI_INTER_COMP_PRED_K0052
+  Bool m_interCompPredFlag;
+#endif
   GOPEntry()
   : m_POC(-1)
@@ -94,4 +97,9 @@
 #if H_MV
   , m_numActiveRefLayerPics(0)
+#endif
+#if HHI_INTER_COMP_PRED_K0052
+#if H_3D
+  , m_interCompPredFlag(false)
+#endif
 #endif
   {
@@ -408,4 +416,8 @@
   Bool      m_bUseQTL;
 #endif
+#if H_3D_ANNEX_SELECTION_FIX
+  Int m_profileIdc;
+#endif
+
 #endif
 public:
@@ -421,4 +433,7 @@
   , m_isDepth(false)
   , m_bUseVSO(false)
+#if H_3D_ANNEX_SELECTION_FIX
+  , m_profileIdc( -1 )
+#endif
 #endif
 #endif
@@ -957,4 +972,9 @@
   Bool      getUseQTL                       ()         { return m_bUseQTL; }
 #endif
+#if H_3D_ANNEX_SELECTION_FIX
+  Void                    setProfileIdc( Int a )    { assert( a == 1 || a == 6 || a == 8 ); m_profileIdc = a;  }
+  Bool                    decProcAnnexI()           { assert( m_profileIdc != -1 ); return ( m_profileIdc == 8); }    
+#endif
+
 #endif // H_3D
 };
Index: /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 1170)
@@ -306,4 +306,5 @@
 
 #if H_MV_ENC_DEC_TRAC
+#if ENC_DEC_TRACE
   UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
   UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
@@ -314,4 +315,5 @@
   DTRACE_TU("log2TrafoSize", g_uiMaxCUWidth>>uiDepth)
   DTRACE_TU("trafoDepth"  , uiDepth)
+#endif
 #endif
 
Index: /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1170)
@@ -885,5 +885,12 @@
     Int numDirectRefLayers = vps    ->getNumDirectRefLayers( getLayerId() ); 
 #endif
+#if HHI_INTER_COMP_PRED_K0052
+    pcSlice->setIvPicLists( m_ivPicLists );         
+
+    Int gopNum = (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid;
+    GOPEntry gopEntry      = m_pcCfg->getGOPEntry( gopNum );     
+#else
     GOPEntry gopEntry      = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid );     
+#endif
     
     Bool interLayerPredLayerIdcPresentFlag = false; 
@@ -922,4 +929,39 @@
     assert( pcSlice->getNumActiveRefLayerPics() == gopEntry.m_numActiveRefLayerPics ); 
     
+#if HHI_INTER_COMP_PRED_K0052
+#if H_3D
+    if ( m_pcEncTop->decProcAnnexI() )
+    {    
+      pcSlice->deriveInCmpPredAndCpAvailFlag(); 
+      if ( pcSlice->getInCmpPredAvailFlag() )
+      {      
+        pcSlice->setInCompPredFlag( gopEntry.m_interCompPredFlag ); 
+      }
+      else
+      {
+        if (gopEntry.m_interCompPredFlag )
+        {
+          if ( gopNum == MAX_GOP)
+          {
+            printf( "\nError: FrameI_l%d cannot enable inter-component prediction.\n", pcSlice->getVPS()->getLayerIdInVps( getLayerId() ) );
+          }
+          else
+          {
+            printf( "\nError: Frame%d_l%d cannot enable inter-component prediction.\n", gopNum, pcSlice->getVPS()->getLayerIdInVps( getLayerId() ) );
+          }
+          
+          exit(EXIT_FAILURE);
+        }
+      }
+      pcSlice->init3dToolParameters(); 
+      pcSlice->checkInCompPredRefLayers(); 
+    }
+    
+
+    // This needs to be done after initilizaiton of 3D tool parameters.
+    pcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) || pcSlice->getViewSynthesisPredFlag( )   ) ? 1 : 0 ));
+#endif
+#endif
+
     pcSlice->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 
     pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer0.size() + (Int) m_refPicSetInterLayer1.size()) ) );
@@ -968,4 +1010,5 @@
     }
 #endif
+#if !HHI_INTER_COMP_PRED_K0052
 #if H_3D
     pcSlice->setIvPicLists( m_ivPicLists );         
@@ -973,4 +1016,5 @@
     assert( !m_pcEncTop->getIsDepth() || ( pcSlice->getTexturePic() != 0 ) );
 #endif    
+#endif
 #endif
 #if H_3D_IC
Index: /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 1170)
@@ -215,6 +215,8 @@
   rpcSlice->setPicOutputFlag( true );
   rpcSlice->setPOC( pocCurr );
+#if !HHI_INTER_COMP_PRED_K0052
 #if H_3D
-  rpcSlice->init3dToolParameters(); 
+    rpcSlice->init3dToolParameters(); 
+#endif
 #endif
 #if H_3D_IC
@@ -610,8 +612,14 @@
   rpcSlice->setSliceSegmentMode     ( m_pcCfg->getSliceSegmentMode()     );
   rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() );
+#if !HHI_INTER_COMP_PRED_K0052
 #if H_3D_IV_MERGE
   rpcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( ( rpcSlice->getMpiFlag( ) || rpcSlice->getIvMvPredFlag( ) || rpcSlice->getViewSynthesisPredFlag( )   ) ? 1 : 0 ));
 #else
   rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
+#endif
+#else
+#if !H_3D
+  rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
+#endif
 #endif
   xStoreWPparam( pPPS->getUseWP(), pPPS->getWPBiPred() );
Index: /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1169)
+++ /branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp	(revision 1170)
@@ -91,4 +91,7 @@
   m_aICEnableNum = NULL;
 #endif
+#if H_3D_ANNEX_SELECTION_FIX
+  m_cCavlcCoder.setEncTop(this); 
+#endif
 }
 
@@ -364,4 +367,5 @@
   }
 #endif
+
   // initialize processing unit classes
   m_cGOPEncoder.  init( this );
