Index: branches/SHM-upgrade/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/SHM-upgrade/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 928)
+++ branches/SHM-upgrade/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 929)
@@ -765,4 +765,10 @@
   Int*    cfg_FrameRate     [MAX_LAYERS];
   Int*    cfg_IntraPeriod   [MAX_LAYERS];
+  Int*    cfg_confWinLeft   [MAX_LAYERS];
+  Int*    cfg_confWinRight  [MAX_LAYERS];
+  Int*    cfg_confWinTop    [MAX_LAYERS];
+  Int*    cfg_confWinBottom [MAX_LAYERS];
+  Int*    cfg_aiPadX        [MAX_LAYERS];
+  Int*    cfg_aiPadY        [MAX_LAYERS];
   Int*    cfg_conformanceMode  [MAX_LAYERS];
   Bool*   cfg_useExtendedPrecision [MAX_LAYERS];
@@ -881,9 +887,15 @@
     cfg_repFormatIdx[layer] = &m_acLayerCfg[layer].m_repFormatIdx;
 #endif
-    cfg_SourceWidth[layer]  = &m_acLayerCfg[layer].m_iSourceWidth;
-    cfg_SourceHeight[layer] = &m_acLayerCfg[layer].m_iSourceHeight;
-    cfg_FrameRate[layer]    = &m_acLayerCfg[layer].m_iFrameRate; 
-    cfg_IntraPeriod[layer]  = &m_acLayerCfg[layer].m_iIntraPeriod; 
-    cfg_conformanceMode[layer] = &m_acLayerCfg[layer].m_conformanceMode;
+    cfg_SourceWidth[layer]          = &m_acLayerCfg[layer].m_iSourceWidth;
+    cfg_SourceHeight[layer]         = &m_acLayerCfg[layer].m_iSourceHeight;
+    cfg_FrameRate[layer]            = &m_acLayerCfg[layer].m_iFrameRate; 
+    cfg_IntraPeriod[layer]          = &m_acLayerCfg[layer].m_iIntraPeriod; 
+    cfg_conformanceMode[layer]      = &m_acLayerCfg[layer].m_conformanceMode;
+    cfg_confWinLeft[layer]          = &m_acLayerCfg[layer].m_confWinLeft;
+    cfg_confWinRight[layer]         = &m_acLayerCfg[layer].m_confWinRight;
+    cfg_confWinTop[layer]           = &m_acLayerCfg[layer].m_confWinTop;
+    cfg_confWinBottom[layer]        = &m_acLayerCfg[layer].m_confWinBottom;
+    cfg_aiPadX[layer]               = &m_acLayerCfg[layer].m_aiPad[0];
+    cfg_aiPadY[layer]               = &m_acLayerCfg[layer].m_aiPad[1];
     cfg_useExtendedPrecision[layer] = &m_acLayerCfg[layer].m_useExtendedPrecision;
 #if LAYER_CTB
@@ -1107,4 +1119,14 @@
   ("ExtendedPrecision%d",                           cfg_useExtendedPrecision,                false, MAX_LAYERS, "Increased internal accuracies to support high bit depths (not valid in V1 profiles)")
   ("ConformanceMode%d",                             cfg_conformanceMode,                         0, MAX_LAYERS, "Window conformance mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping")
+  ("ConfLeft%d",                                    cfg_confWinLeft,                             0, MAX_LAYERS, "Deprecated alias of ConfWinLeft")
+  ("ConfRight%d",                                   cfg_confWinRight,                            0, MAX_LAYERS, "Deprecated alias of ConfWinRight")
+  ("ConfTop%d",                                     cfg_confWinTop,                              0, MAX_LAYERS, "Deprecated alias of ConfWinTop")
+  ("ConfBottom%d",                                  cfg_confWinBottom,                           0, MAX_LAYERS, "Deprecated alias of ConfWinBottom")
+  ("ConfWinLeft%d",                                 cfg_confWinLeft,                             0, MAX_LAYERS, "Left offset for window conformance mode 3")
+  ("ConfWinRight%d",                                cfg_confWinRight,                            0, MAX_LAYERS, "Right offset for window conformance mode 3")
+  ("ConfWinTop%d",                                  cfg_confWinTop,                              0, MAX_LAYERS, "Top offset for window conformance mode 3")
+  ("ConfWinBottom%d",                               cfg_confWinBottom,                           0, MAX_LAYERS, "Bottom offset for window conformance mode 3")
+  ("HorizontalPadding%d,-pdx%d",                    cfg_aiPadX,                                  0, MAX_LAYERS, "Horizontal source padding for conformance window mode 2")
+  ("VerticalPadding%d,-pdy%d",                      cfg_aiPadY,                                  0, MAX_LAYERS, "Vertical source padding for conformance window mode 2")
   ("ScalabilityMask1",                              m_scalabilityMask[VIEW_ORDER_INDEX],                     0, "scalability_mask[1] (multiview)")
   ("ScalabilityMask2",                              m_scalabilityMask[SCALABILITY_ID],                       1, "scalability_mask[2] (scalable)" )
Index: branches/SHM-upgrade/source/App/TAppEncoder/TAppEncLayerCfg.cpp
===================================================================
--- branches/SHM-upgrade/source/App/TAppEncoder/TAppEncLayerCfg.cpp	(revision 928)
+++ branches/SHM-upgrade/source/App/TAppEncoder/TAppEncLayerCfg.cpp	(revision 929)
@@ -392,4 +392,14 @@
   case 1:
     {
+      // conformance
+      if ((m_confWinLeft != 0) || (m_confWinRight != 0) || (m_confWinTop != 0) || (m_confWinBottom != 0))
+      {
+        fprintf(stderr, "Warning: Automatic padding enabled, but cropping parameters are set. Undesired size possible.\n");
+      }
+      if ((m_aiPad[1] != 0) || (m_aiPad[0] != 0))
+      {
+        fprintf(stderr, "Warning: Automatic padding enabled, but padding parameters are also set\n");
+      }
+
       // automatic padding to minimum CU size
 #if LAYER_CTB
@@ -423,4 +433,10 @@
   case 2:
     {
+      // conformance
+      if ((m_confWinLeft != 0) || (m_confWinRight != 0) || (m_confWinTop != 0) || (m_confWinBottom != 0))
+      {
+        fprintf(stderr, "Warning: Automatic padding enabled, but cropping parameters are set. Undesired size possible.\n");
+      }
+
       //padding
       m_iSourceWidth  += m_aiPad[0];
