Index: branches/HTM-5.1-dev3-CleanUp/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-5.1-dev3-CleanUp/source/Lib/TLibCommon/TypeDef.h	(revision 275)
+++ branches/HTM-5.1-dev3-CleanUp/source/Lib/TLibCommon/TypeDef.h	(revision 276)
@@ -52,6 +52,108 @@
 #if !QC_MVHEVC_B0046
 
-///// ***** VSP MODES *********
-#define MERL_VSP_C0152                       1 // JCT3V-C0152: 1: enable VSP-related tools; 0: disable VSP-related tools
+
+// C TRACK 3
+#define MERL_VSP_C0152                                1 // JCT3V-C0152: 1: enable VSP-related tools; 0: disable VSP-related tools
+#define MTK_SAIT_TEMPORAL_FIRST_ORDER_C0141_C0097     1   // JCT3V-C0141/C0097
+#define MTK_SIMPLIFY_DVTC_C0135                       1   // JCT3V-C0135
+#define MTK_RELEASE_DV_CONSTRAINT_C0129               1   // JCT3V-C0129
+#define QC_NBDV_LDB_FIX_C0055                         1   // JCT3V-C0055
+
+///// ***** FIXES *********
+// A
+#define FIX_POZNAN_CABAC_INIT_FLAG        1
+#define FIX_LG_RESTRICTEDRESPRED_M24766   1
+
+// B
+#define FIX_LGE_IVMP_PARALLEL_MERGE_B0136 1
+#define FIX_RDO_NEGDIST                   1
+#define FIX_DMM_NEG_DIST                  1
+#define FIX_LGE_DVMCP_B0133               1
+
+
+// FCO 
+#define FLEX_CODING_ORDER_M23723          1
+#if FLEX_CODING_ORDER_M23723
+  #define DISABLE_FCO_FOR_VSO             0 // Optional compile settings to disable VSO with FCO.
+#endif
+
+///// ***** PATCHES *********
+#define TMVP_DEPTH_SWITCH                 1   // JCT3V-B0092 additional encoder option only 
+
+///// ***** DEPTH MODELING MODES *********
+#define HHI_DMM_WEDGE_INTRA               1   // depth model modes independent on texture (explicit and intra-predicted Wedgelet prediction)
+#define HHI_DMM_PRED_TEX                  1   // depth model modes dependent on texture (inter-component Wedgelet and Contour prediction )
+#define LGE_EDGE_INTRA_A0070              1   // JCT3V-A0070
+#define RWTH_SDC_DLT_B0036                1   // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table
+#define HHIQC_DMMFASTSEARCH_B0039         1   // JCT3V-B0039: fast Wedgelet search for DMM modes 1 and 3
+
+///// ***** INTERVIEW MOTION VECTOR PREDICTION *********
+#define HHI_INTER_VIEW_MOTION_PRED        1   // inter-view motion parameter prediction
+#define SHARP_INTERVIEW_DECOUPLE_B0111    1   // JCT3V-B0111 decoupling inter-view candidate
+#define QC_MRG_CANS_B0048                 1   // JCT3V-B0048, B0086, B0069
+#if     QC_MRG_CANS_B0048
+#define OL_DISMV_POS_B0069                1   // different pos for disparity MV candidate, B0069
+#endif
+#define MTK_INTERVIEW_MERGE_A0049         1   // JCT3V-A0049 second part
+#if HHI_INTER_VIEW_MOTION_PRED         
+#define SAIT_IMPROV_MOTION_PRED_M24829    1   // improved inter-view motion vector prediction
+#else                                  
+#define SAIT_IMPROV_MOTION_PRED_M24829    0   
+#endif                                 
+
+///// ***** INTERVIEW RESIDUAL PREDICTION *********
+#define HHI_INTER_VIEW_RESIDUAL_PRED      1   // inter-view residual prediction
+#if HHI_INTER_VIEW_RESIDUAL_PRED       
+#define LG_RESTRICTEDRESPRED_M24766       1   // restricted inter-view residual prediction
+#define QC_SIMPLIFIEDIVRP_M24938          1
+#else                                  
+#define LG_RESTRICTEDRESPRED_M24766       0
+#define QC_SIMPLIFIEDIVRP_M24938          0
+#endif
+
+///// ***** DISPARITY VECTOR DERIVATION *********
+#define QC_MULTI_DIS_CAN_A0097            1   // JCT3V-A0097
+#define LGE_DVMCP_A0126                   1   // JCT3V-A0126     
+#define LGE_DVMCP_MEM_REDUCTION_B0135     1   // JCT3V-B0135     
+#define DV_DERIVATION_PARALLEL_B0096      1   // JCT3V-B0096, enable parallel derivation of disparity vector
+#define QC_SIMPLE_NBDV_B0047              1   // JCT3V-B0047
+///// ***** MOTION PARAMETER INHERITANCE  *********
+#define HHI_MPI                           1   // motion parameter inheritance from texture picture for depth map coding
+#if HHI_MPI
+#define FIX_MPI_B0065                     1   // JCT3V-B0065, fix the MPI bug when RQT is off
+#endif
+#define MTK_UNCONSTRAINED_MVI_B0083       1    //JCT3V-B0083
+
+///// ***** VIEW SYNTHESIS OPTIMIZAION *********
+#define HHI_VSO                           1
+#define HHI_VSO_LS_TABLE_M23714           1   // m23714, enable table base Lagrange multiplier optimization 
+#define HHI_VSO_DIST_INT                  1   // Allow negative synthesized view distortion change
+#define HHI_VSO_COLOR_PLANES              1   // Compute VSO distortion on color planes 
+#define HHI_VSO_RM_ASSERTIONS             0   // Output VSO assertions
+#define HHI_VSO_SYNTH_DIST_OUT            0   // Output of synthesized view distortion instead of depth distortion in encoder output
+#define SAIT_VSO_EST_A0033                1   // JCT3V-A0033 modification 3
+#define LGE_VSO_EARLY_SKIP_A0093          1   // JCT3V-A0093 modification 4
+#define LGE_WVSO_A0119                    1   // JCT3V-A0119 & JCT3V-B0131 Depth Metric with a weighted depth fidelity term
+
+
+///// ***** ILLUMINATION COMPENSATON *********
+#define LGE_ILLUCOMP_B0045                1   // JCT2-B0045 Illumination compensation for Luma and Chroma
+#if LGE_ILLUCOMP_B0045
+#define LGE_ILLUCOMP_B0045_ENCSIMP        1
+#endif
+
+///// ***** INTERVIEW SKIP *********
+#define HHI_INTERVIEW_SKIP                1
+
+///// ***** QUADTREE LIMITATION *********
+#define OL_QTLIMIT_PREDCODING_B0068       1    //JCT3V-B0068
+
+///// ***** OTHERS *********
+#define LG_ZEROINTRADEPTHRESI_A0087       1   // JCT2-A0087
+#define SONY_COLPIC_AVAILABILITY          1
+#define HHI_FULL_PEL_DEPTH_MAP_MV_ACC     1   // full-pel mv accuracy for depth maps
+#define VIDYO_VPS_INTEGRATION             1
+
+///// ***** VSP *********
 
 #if MERL_VSP_C0152
@@ -87,104 +189,4 @@
 #endif
 
-///// ***** FIXES *********
-// A
-#define FIX_POZNAN_CABAC_INIT_FLAG        1
-#define FIX_LG_RESTRICTEDRESPRED_M24766   1
-
-// B
-#define FIX_LGE_IVMP_PARALLEL_MERGE_B0136 1
-#define FIX_RDO_NEGDIST                   1
-#define FIX_DMM_NEG_DIST                  1
-#define FIX_LGE_DVMCP_B0133               1
-
-
-// FCO 
-#define FLEX_CODING_ORDER_M23723          1
-#if FLEX_CODING_ORDER_M23723
-  #define DISABLE_FCO_FOR_VSO             0 // Optional compile settings to disable VSO with FCO.
-#endif
-
-///// ***** PATCHES *********
-#define TMVP_DEPTH_SWITCH                 1   // JCT3V-B0092 additional encoder option only 
-
-///// ***** DEPTH MODELING MODES *********
-#define HHI_DMM_WEDGE_INTRA               1   // depth model modes independent on texture (explicit and intra-predicted Wedgelet prediction)
-#define HHI_DMM_PRED_TEX                  1   // depth model modes dependent on texture (inter-component Wedgelet and Contour prediction )
-#define LGE_EDGE_INTRA_A0070              1   // JCT3V-A0070
-#define RWTH_SDC_DLT_B0036                1   // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table
-#define HHIQC_DMMFASTSEARCH_B0039         1   // JCT3V-B0039: fast Wedgelet search for DMM modes 1 and 3
-
-///// ***** INTERVIEW MOTION VECTOR PREDICTION *********
-#define HHI_INTER_VIEW_MOTION_PRED        1   // inter-view motion parameter prediction
-#define SHARP_INTERVIEW_DECOUPLE_B0111    1   // JCT3V-B0111 decoupling inter-view candidate
-#define QC_MRG_CANS_B0048                 1   // JCT3V-B0048, B0086, B0069
-#if     QC_MRG_CANS_B0048
-#define OL_DISMV_POS_B0069                1   // different pos for disparity MV candidate, B0069
-#endif
-#define MTK_INTERVIEW_MERGE_A0049         1   // JCT3V-A0049 second part
-#if HHI_INTER_VIEW_MOTION_PRED         
-#define SAIT_IMPROV_MOTION_PRED_M24829    1   // improved inter-view motion vector prediction
-#else                                  
-#define SAIT_IMPROV_MOTION_PRED_M24829    0   
-#endif                                 
-
-///// ***** INTERVIEW RESIDUAL PREDICTION *********
-#define HHI_INTER_VIEW_RESIDUAL_PRED      1   // inter-view residual prediction
-#if HHI_INTER_VIEW_RESIDUAL_PRED       
-#define LG_RESTRICTEDRESPRED_M24766       1   // restricted inter-view residual prediction
-#define QC_SIMPLIFIEDIVRP_M24938          1
-#else                                  
-#define LG_RESTRICTEDRESPRED_M24766       0
-#define QC_SIMPLIFIEDIVRP_M24938          0
-#endif
-
-///// ***** DISPARITY VECTOR DERIVATION *********
-#define QC_MULTI_DIS_CAN_A0097            1   // JCT3V-A0097
-#define LGE_DVMCP_A0126                   1   // JCT3V-A0126     
-#define LGE_DVMCP_MEM_REDUCTION_B0135     1   // JCT3V-B0135     
-#define DV_DERIVATION_PARALLEL_B0096      1   // JCT3V-B0096, enable parallel derivation of disparity vector
-#define QC_SIMPLE_NBDV_B0047              1   // JCT3V-B0047
-#define MTK_SAIT_TEMPORAL_FIRST_ORDER_C0141_C0097     1   // JCT3V-C0141/C0097
-#define MTK_SIMPLIFY_DVTC_C0135                       1   // JCT3V-C0135
-#define MTK_RELEASE_DV_CONSTRAINT_C0129               1   // JCT3V-C0129
-#define QC_NBDV_LDB_FIX_C0055                         1   // JCT3V-C0055
-///// ***** MOTION PARAMETER INHERITANCE  *********
-#define HHI_MPI                           1   // motion parameter inheritance from texture picture for depth map coding
-#if HHI_MPI
-#define FIX_MPI_B0065                     1   // JCT3V-B0065, fix the MPI bug when RQT is off
-#endif
-#define MTK_UNCONSTRAINED_MVI_B0083       1    //JCT3V-B0083
-
-///// ***** VIEW SYNTHESIS OPTIMIZAION *********
-#define HHI_VSO                           1
-#define HHI_VSO_LS_TABLE_M23714           1   // m23714, enable table base Lagrange multiplier optimization 
-#define HHI_VSO_DIST_INT                  1   // Allow negative synthesized view distortion change
-#define HHI_VSO_COLOR_PLANES              1   // Compute VSO distortion on color planes 
-#define HHI_VSO_RM_ASSERTIONS             0   // Output VSO assertions
-#define HHI_VSO_SYNTH_DIST_OUT            0   // Output of synthesized view distortion instead of depth distortion in encoder output
-#define SAIT_VSO_EST_A0033                1   // JCT3V-A0033 modification 3
-#define LGE_VSO_EARLY_SKIP_A0093          1   // JCT3V-A0093 modification 4
-#define LGE_WVSO_A0119                    1   // JCT3V-A0119 & JCT3V-B0131 Depth Metric with a weighted depth fidelity term
-
-
-///// ***** ILLUMINATION COMPENSATON *********
-#define LGE_ILLUCOMP_B0045                1   // JCT2-B0045 Illumination compensation for Luma and Chroma
-#if LGE_ILLUCOMP_B0045
-#define LGE_ILLUCOMP_B0045_ENCSIMP        1
-#endif
-
-///// ***** INTERVIEW SKIP *********
-#define HHI_INTERVIEW_SKIP                1
-
-///// ***** QUADTREE LIMITATION *********
-#define OL_QTLIMIT_PREDCODING_B0068       1    //JCT3V-B0068
-
-///// ***** OTHERS *********
-#define LG_ZEROINTRADEPTHRESI_A0087       1   // JCT2-A0087
-#define SONY_COLPIC_AVAILABILITY          1
-#define HHI_FULL_PEL_DEPTH_MAP_MV_ACC     1   // full-pel mv accuracy for depth maps
-#define VIDYO_VPS_INTEGRATION             1
-
-
 
 ///// ***** DEFINED PARAMETERS *********
