Ignore:
Timestamp:
15 Apr 2015, 11:36:33 (10 years ago)
Author:
tech
Message:

Removed 3D-HEVC.

Location:
branches/HTM-14.0-MV-draft-3/source/App/TAppEncoder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.0-MV-draft-3/source/App/TAppEncoder/TAppEncCfg.cpp

    r1179 r1191  
    148148  }
    149149#endif
    150 #if H_3D
    151 #if H_3D_VSO
    152   if (  m_pchVSOConfig != NULL)
    153     free (  m_pchVSOConfig );
    154 #endif
    155   if ( m_pchCameraParameterFile != NULL )
    156     free ( m_pchCameraParameterFile );
    157 
    158   if ( m_pchBaseViewCameraNumbers != NULL )
    159     free ( m_pchBaseViewCameraNumbers );
    160 #endif
    161150}
    162151
     
    225214  }
    226215#endif
    227 #if HHI_INTER_COMP_PRED_K0052
    228 #if H_3D
    229   in>>entry.m_interCompPredFlag;
    230 #endif
    231 #endif
    232216  return in;
    233217}
     
    243227#if H_MV
    244228  {"multiview-main", Profile::MULTIVIEWMAIN},
    245 #if H_3D
    246   {"3d-main"       , Profile::MAIN3D},
    247 #endif
    248229
    249230#endif
     
    337318  string        cfg_levels;
    338319  string        cfg_tiers;
    339 #if H_3D
    340   cfg_dimensionLength.push_back( 2  );  // depth
    341   cfg_dimensionLength.push_back( 32 );  // texture
    342 #else
    343320  cfg_dimensionLength.push_back( 64 );
    344 #endif
    345321#endif
    346322  string cfg_dQPFile;
     
    370346#if H_MV
    371347  ("NumberOfLayers",        m_numberOfLayers     , 1,                     "Number of layers")
    372 #if !H_3D
    373348  ("ScalabilityMask",       m_scalabilityMask    , 2                    , "Scalability Mask: 2: Multiview, 8: Auxiliary, 10: Multiview + Auxiliary")   
    374 #else
    375   ("ScalabilityMask",       m_scalabilityMask    , 3                    , "Scalability Mask, 1: Texture 3: Texture + Depth ")   
    376 #endif 
    377349  ("DimensionIdLen",        m_dimensionIdLen     , cfg_dimensionLength  , "Number of bits used to store dimensions Id")
    378350  ("ViewOrderIndex",        m_viewOrderIndex     , std::vector<Int>(1,0), "View Order Index per layer")
    379351  ("ViewId",                m_viewId             , std::vector<Int>(1,0), "View Id per View Order Index")
    380352  ("AuxId",                 m_auxId              , std::vector<Int>(1,0), "AuxId per layer")
    381 #if H_3D
    382   ("DepthFlag",             m_depthFlag          , std::vector<Int>(1,0), "Depth Flag")
    383 #if H_3D_DIM
    384   ("DLT",                   m_useDLT,           true,  "Depth lookup table")
    385 #endif
    386 #if H_3D
    387 #endif
    388 #endif
    389353  ("TargetEncLayerIdList",  m_targetEncLayerIdList, std::vector<Int>(0,0), "LayerIds in Nuh to be encoded") 
    390354  ("LayerIdInNuh",          m_layerIdInNuh       , std::vector<Int>(1,0), "LayerId in Nuh") 
     
    535499  ("DeblockingFilterMetric",         m_DeblockingFilterMetric,         false )
    536500
    537 #if H_3D_IC
    538   ("IlluCompEnable",           m_abUseIC, true, "Enable illumination compensation")
    539   ("IlluCompLowLatencyEnc",    m_bUseLowLatencyICEnc, false, "Enable low-latency illumination compensation encoding")
    540 #endif
    541501  // Coding tools
    542502  ("AMP",                      m_enableAMP,                 true,  "Enable asymmetric motion partitions")
     
    754714  ("OutputVpsInfo",                           m_outputVpsInfo,                false                     ,"Output information about the layer dependencies and layer sets")
    755715#endif
    756 #if H_3D
    757   ("CameraParameterFile,cpf", m_pchCameraParameterFile,    (Char *) 0, "Camera Parameter File Name")
    758   ("BaseViewCameraNumbers" ,  m_pchBaseViewCameraNumbers,  (Char *) 0, "Numbers of base views")
    759   ("CodedCamParsPrecision",   m_iCodedCamParPrecision,  STD_CAM_PARAMETERS_PRECISION, "precision for coding of camera parameters (in units of 2^(-x) luma samples)" )
    760 /* View Synthesis Optimization */
    761 
    762 #if H_3D_VSO
    763   ("VSOConfig",                       m_pchVSOConfig            , (Char *) 0    , "VSO configuration")
    764   ("VSO",                             m_bUseVSO                 , false         , "Use VSO" )   
    765   ("VSOMode",                         m_uiVSOMode               , (UInt)   4    , "VSO Mode")
    766   ("LambdaScaleVSO",                  m_dLambdaScaleVSO         , (Double) 1    , "Lambda Scaling for VSO")
    767   ("VSOLSTable",                      m_bVSOLSTable             , true          , "Depth QP dependent video/depth rate allocation by Lagrange multiplier" )     
    768   ("ForceLambdaScaleVSO",             m_bForceLambdaScaleVSO    , false         , "Force using Lambda Scale VSO also in non-VSO-Mode")
    769   ("AllowNegDist",                    m_bAllowNegDist           , true          , "Allow negative Distortion in VSO")
    770  
    771   ("UseEstimatedVSD",                 m_bUseEstimatedVSD        , true          , "Model based VSD estimation instead of rendering based for some encoder decisions" )     
    772   ("VSOEarlySkip",                    m_bVSOEarlySkip           , true          , "Early skip of VSO computation if synthesis error assumed to be zero" )     
    773  
    774   ("WVSO",                            m_bUseWVSO                , true          , "Use depth fidelity term for VSO" )
    775   ("VSOWeight",                       m_iVSOWeight              , 10            , "Synthesized View Distortion Change weight" )
    776   ("VSDWeight",                       m_iVSDWeight              , 1             , "View Synthesis Distortion estimate weight" )
    777   ("DWeight",                         m_iDWeight                , 1             , "Depth Distortion weight" )
    778 
    779 #endif //HHI_VSO
    780   ("QTL",                             m_bUseQTL                 , true          , "Use depth quad tree limitation (encoder only)" )
    781 
    782   ("IvMvPredFlag"          , m_ivMvPredFlag          , std::vector< Bool >(2,true)                    , "Inter-view motion prediction"              )
    783   ("IvMvScalingFlag"       , m_ivMvScalingFlag       , std::vector< Bool >(2,true)                    , "Inter-view motion vector scaling"          )
    784   ("Log2SubPbSizeMinus3"   , m_log2SubPbSizeMinus3   , 0                                              , "Log2 minus 3 of sub Pb size"               )
    785   ("IvResPredFlag"         , m_ivResPredFlag         , true                                           , "Inter-view residual prediction"            )
    786   ("DepthRefinementFlag"   , m_depthRefinementFlag   , true                                           , "Depth to refine disparity"                 )
    787   ("ViewSynthesisPredFlag" , m_viewSynthesisPredFlag , true                                           , "View synthesis prediction"                 )
    788   ("DepthBasedBlkPartFlag" , m_depthBasedBlkPartFlag , true                                           , "Depth base block partitioning"             )
    789   ("MpiFlag"               , m_mpiFlag               , true                                           , "Motion inheritance from texture to depth"  )
    790   ("Log2MpiSubPbSizeMinus3", m_log2MpiSubPbSizeMinus3, 0                                              , "Log2 minus 3 of sub Pb size for MPI"       )
    791   ("IntraContourFlag"      , m_intraContourFlag      , true                                           , "Intra contour mode"                        )
    792   ("IntraWedgeFlag"        , m_intraWedgeFlag        , true                                           , "Intra wedge mode and segmental depth DCs"  )
    793   ("IntraSdcFlag"          , m_intraSdcFlag          , true                                           , "Intra depth DCs"                           )
    794   ("QtPredFlag"            , m_qtPredFlag            , true                                           , "Quad tree prediction from texture to depth")
    795   ("InterSdcFlag"          , m_interSdcFlag          , true                                           , "Inter depth DCs"                           )
    796 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
    797   ("DepthIntraSkip"        , m_depthIntraSkipFlag    , true                                           , "Depth intra skip mode"                     )
    798 #else
    799   ("IntraSingleFlag"       , m_intraSingleFlag       , true                                           , "Intra single mode"                         )
    800 #endif
    801 #endif //H_3D
    802716  ;
    803717
     
    1047961  xResizeVector( m_auxId );
    1048962
    1049 #if H_3D
    1050   xResizeVector( m_depthFlag );
    1051 #endif
    1052963  xResizeVector( m_fQP );
    1053964
     
    11951106  if( cfg_profiles.empty() )
    11961107  {
    1197 #if H_3D
    1198     cfg_profiles = string("main main 3d-main");
    1199 #else
    12001108    cfg_profiles = string("main main multiview-main");   
    1201 #endif
    12021109    fprintf(stderr, "\nWarning: No profiles given, using defaults: %s", cfg_profiles.c_str() );
    12031110    anyEmpty = true;
     
    12381145  xReadStrToEnum( cfg_tiers ,   m_levelTier );
    12391146#endif
    1240 #if H_3D
     1147  // check validity of input parameters
     1148  xCheckParameter();
     1149
    12411150  // set global varibles
    12421151  xSetGlobal();
    1243 #if H_3D_VSO
    1244 // Table base optimization
    1245   // Q&D
    1246   Double adLambdaScaleTable[] =
    1247   {  0.031250, 0.031639, 0.032029, 0.032418, 0.032808, 0.033197, 0.033586, 0.033976, 0.034365, 0.034755,
    1248      0.035144, 0.035533, 0.035923, 0.036312, 0.036702, 0.037091, 0.037480, 0.037870, 0.038259, 0.038648,
    1249      0.039038, 0.039427, 0.039817, 0.040206, 0.040595, 0.040985, 0.041374, 0.041764, 0.042153, 0.042542,
    1250      0.042932, 0.043321, 0.043711, 0.044100, 0.044194, 0.053033, 0.061872, 0.070711, 0.079550, 0.088388,
    1251      0.117851, 0.147314, 0.176777, 0.235702, 0.294628, 0.353553, 0.471405, 0.589256, 0.707107, 0.707100,
    1252      0.753550, 0.800000 
    1253   };
    1254   if ( m_bUseVSO && m_bVSOLSTable )
    1255   {
    1256     Int firstDepthLayer = -1;
    1257     for (Int layer = 0; layer < m_numberOfLayers; layer++ )
    1258     {
    1259       if ( m_depthFlag[ layer ])
    1260       {
    1261         firstDepthLayer = layer;
    1262         break;
    1263       }
    1264     }
    1265     AOT( firstDepthLayer == -1 );
    1266     AOT( (m_iQP[firstDepthLayer] < 0) || (m_iQP[firstDepthLayer] > 51));
    1267     m_dLambdaScaleVSO *= adLambdaScaleTable[m_iQP[firstDepthLayer]];
    1268   }
    1269 #endif
    1270 #if H_3D_VSO
    1271 if ( m_bUseVSO && m_uiVSOMode == 4)
    1272 {
    1273   m_cRenModStrParser.setString( m_iNumberOfViews, m_pchVSOConfig );
    1274   m_cCameraData     .init     ( ((UInt) m_iNumberOfViews ),
    1275                                       g_bitDepthY,
    1276                                 (UInt)m_iCodedCamParPrecision,
    1277                                       m_FrameSkip,
    1278                                 (UInt)m_framesToBeEncoded,
    1279                                       m_pchCameraParameterFile,
    1280                                       m_pchBaseViewCameraNumbers,
    1281                                       NULL,
    1282                                       m_cRenModStrParser.getSynthViews(),
    1283                                       LOG2_DISP_PREC_LUT );
    1284 }
    1285 else if ( m_bUseVSO && m_uiVSOMode != 4 )
    1286 {
    1287   m_cCameraData     .init     ( ((UInt) m_iNumberOfViews ),
    1288                                       g_bitDepthY,
    1289                                 (UInt)m_iCodedCamParPrecision,
    1290                                       m_FrameSkip,
    1291                                 (UInt)m_framesToBeEncoded,
    1292                                       m_pchCameraParameterFile,
    1293                                       m_pchBaseViewCameraNumbers,
    1294                                       m_pchVSOConfig,
    1295                                       NULL,
    1296                                       LOG2_DISP_PREC_LUT );
    1297 }
    1298 else
    1299 {
    1300   m_cCameraData     .init     ( ((UInt) m_iNumberOfViews ),
    1301     g_bitDepthY,
    1302     (UInt) m_iCodedCamParPrecision,
    1303     m_FrameSkip,
    1304     (UInt) m_framesToBeEncoded,
    1305     m_pchCameraParameterFile,
    1306     m_pchBaseViewCameraNumbers,
    1307     NULL,
    1308     NULL,
    1309     LOG2_DISP_PREC_LUT );
    1310 }
    1311 #else
    1312   m_cCameraData     .init     ( ((UInt) m_iNumberOfViews ),
    1313     g_bitDepthY,
    1314     (UInt) m_iCodedCamParPrecision,
    1315     m_FrameSkip,
    1316     (UInt) m_framesToBeEncoded,
    1317     m_pchCameraParameterFile,
    1318     m_pchBaseViewCameraNumbers,
    1319     NULL,
    1320     NULL,
    1321     LOG2_DISP_PREC_LUT );
    1322 #endif
    1323   m_cCameraData.check( false, true );
    1324 #endif
    1325   // check validity of input parameters
    1326   xCheckParameter();
    1327 
    1328 #if !H_3D
    1329   // set global varibles
    1330   xSetGlobal();
    1331 #endif
    13321152 
    13331153  // print-out parameters
     
    13831203  xConfirmPara( (m_layerIdInNuh.size()!=1) && (m_layerIdInNuh.size() < m_numberOfLayers) , "LayerIdInNuh must be given for all layers. ");
    13841204 
    1385 #if H_3D
    1386   xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 3, "Scalability Mask must be equal to 2 or 3. ");
    1387 #else
    13881205  xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 8 && m_scalabilityMask != 10, "Scalability Mask must be equal to 2, 8 or 10");
    1389 #endif
    1390 
    1391 #if H_3D
    1392   if ( m_scalabilityMask & ( 1 << DEPTH_ID ) )
    1393   {
    1394     m_dimIds.push_back( m_depthFlag );
    1395   }
    1396 #endif
     1206
    13971207
    13981208  m_dimIds.push_back( m_viewOrderIndex );   
     
    14611271     xConfirmPara( allEqual , "Each layer shall have a different position in scalability space." );
    14621272
    1463 #if !H_3D_FCO
    14641273     if ( numDiff  == 1 )
    14651274     {
     
    14721281       xConfirmPara( shallBeButIsNotIncreasing,  "DimensionIds shall be increasing within one dimension. " );
    14731282     }
    1474 #endif
    14751283   }
    14761284 }
     
    15591367    {
    15601368      xConfirmPara( m_directRefLayers[i][j] < 0 || m_directRefLayers[i][j] >= i , "Reference layer id shall be greater than or equal to 0 and less than dependent layer id");
    1561 #if H_3D_DIRECT_DEP_TYPE
    1562       xConfirmPara( m_dependencyTypes[i][j] < 0 || m_dependencyTypes[i][j] >  6 , "Dependency type shall be greater than or equal to 0 and less than 7");
    1563 #else
    15641369      xConfirmPara( m_dependencyTypes[i][j] < 0 || m_dependencyTypes[i][j] >  2 , "Dependency type shall be greater than or equal to 0 and less than 3");
    1565 #endif
    15661370    }       
    15671371  } 
     
    16461450  xConfirmPara(  m_maxNumMergeCand > 5,  "MaxNumMergeCand must be 5 or smaller.");
    16471451
    1648 #if H_3D_ARP
    1649 #endif
    1650 #if H_3D_SPIVMP
    1651   xConfirmPara( m_log2SubPbSizeMinus3 < 0,                                        "Log2SubPbSizeMinus3 must be equal to 0 or greater.");
    1652   xConfirmPara( m_log2SubPbSizeMinus3 > 3,                                        "Log2SubPbSizeMinus3 must be equal to 3 or smaller.");
    1653   xConfirmPara( (1<< ( m_log2SubPbSizeMinus3 + 3) ) > m_uiMaxCUWidth,              "Log2SubPbSizeMinus3 must be  equal to log2(maxCUSize)-3 or smaller.");
    1654  
    1655   xConfirmPara( m_log2MpiSubPbSizeMinus3 < 0,                                        "Log2MpiSubPbSizeMinus3 must be equal to 0 or greater.");
    1656   xConfirmPara( m_log2MpiSubPbSizeMinus3 > 3,                                        "Log2MpiSubPbSizeMinus3 must be equal to 3 or smaller.");
    1657   xConfirmPara( (1<< (m_log2MpiSubPbSizeMinus3 + 3)) > m_uiMaxCUWidth,               "Log2MpiSubPbSizeMinus3 must be equal to log2(maxCUSize)-3 or smaller.");
    1658 #endif
    16591452#if ADAPTIVE_QP_SELECTION
    16601453#if H_MV
     
    17131506  }
    17141507
    1715 #if H_3D
    1716   xConfirmPara( m_pchCameraParameterFile    == 0                ,   "CameraParameterFile must be given");
    1717   xConfirmPara( m_pchBaseViewCameraNumbers  == 0                ,   "BaseViewCameraNumbers must be given" );
    1718 #if BUG_FIX_TK65
    1719 #if HHI_CAM_PARA_K0052
    1720   xConfirmPara( m_iNumberOfViews != m_cCameraData.getBaseViewNumbers().size() ,   "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" );
    1721 #else
    1722   xConfirmPara( ( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size() ) && ( m_numberOfLayers != m_cCameraData.getBaseViewNumbers().size() ),   "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" );
    1723 #endif
    1724 #else
    1725   xConfirmPara( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size(),   "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" );
    1726 #endif
    1727   xConfirmPara    ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5,       "CodedCamParsPrecision must be in range of 0..5" );
    1728 #if H_3D_VSO
    1729     if( m_bUseVSO )
    1730     {
    1731       xConfirmPara(   m_pchVSOConfig            == 0                             ,   "VSO Setup string must be given");
    1732       xConfirmPara( m_uiVSOMode > 4 ,                                                "VSO Mode must be less than 5");
    1733     }
    1734 #endif
    1735 #endif
    17361508  // max CU width and height should be power of 2
    17371509  UInt ui = m_uiMaxCUWidth;
     
    24422214  xPrintParaVector( "AuxId", m_auxId );
    24432215#endif
    2444 #if H_3D
    2445   xPrintParaVector( "DepthFlag", m_depthFlag );
    2446   printf("Coded Camera Param. Precision: %d\n", m_iCodedCamParPrecision);
    2447 #endif
    24482216#if H_MV 
    24492217  xPrintParaVector( "QP"               , m_fQP                );
     
    25292297  }
    25302298  printf("Max Num Merge Candidates     : %d\n", m_maxNumMergeCand);
    2531 #if H_3D
    2532   printf("BaseViewCameraNumbers        : %s\n", m_pchBaseViewCameraNumbers );
    2533   printf("Coded Camera Param. Precision: %d\n", m_iCodedCamParPrecision);
    2534 #if H_3D_VSO
    2535   printf("Force use of Lambda Scale    : %d\n", m_bForceLambdaScaleVSO );
    2536 
    2537   if ( m_bUseVSO )
    2538   {   
    2539     printf("VSO Lambda Scale             : %5.2f\n", m_dLambdaScaleVSO );
    2540     printf("VSO Mode                     : %d\n",    m_uiVSOMode       );
    2541     printf("VSO Config                   : %s\n",    m_pchVSOConfig    );
    2542     printf("VSO Negative Distortion      : %d\n",    m_bAllowNegDist ? 1 : 0);
    2543     printf("VSO LS Table                 : %d\n",    m_bVSOLSTable ? 1 : 0);
    2544     printf("VSO Estimated VSD            : %d\n",    m_bUseEstimatedVSD ? 1 : 0);
    2545     printf("VSO Early Skip               : %d\n",    m_bVSOEarlySkip ? 1 : 0);   
    2546     if ( m_bUseWVSO )
    2547     printf("Dist. Weights (VSO/VSD/SAD)  : %d/%d/%d\n ", m_iVSOWeight, m_iVSDWeight, m_iDWeight );
    2548   }
    2549 #endif //HHI_VSO
    2550 #endif //H_3D
    25512299  printf("\n");
    25522300#if H_MV
     
    26062354  printf(" SignBitHidingFlag:%d ", m_signHideFlag);
    26072355  printf("RecalQP:%d ", m_recalculateQPAccordingToLambda ? 1 : 0 );
    2608 #if H_3D_VSO
    2609   printf("VSO:%d ", m_bUseVSO   );
    2610   printf("WVSO:%d ", m_bUseWVSO ); 
    2611 #endif
    2612 #if H_3D
    2613   printf( "QTL:%d "                  , m_bUseQTL);
    2614   printf( "IlluCompEnable:%d "       , m_abUseIC);
    2615   printf( "IlluCompLowLatencyEnc:%d ",  m_bUseLowLatencyICEnc);
    2616   printf( "DLT:%d ", m_useDLT );
    2617 
    2618 
    2619   printf( "IvMvPred:%d %d "            , m_ivMvPredFlag[0] ? 1 : 0, m_ivMvPredFlag[1]  ? 1 : 0);
    2620   printf( "IvMvScaling:%d %d "         , m_ivMvScalingFlag[0] ? 1 : 0 , m_ivMvScalingFlag[1]  ? 1 : 0);
    2621 
    2622   printf( "Log2SubPbSizeMinus3:%d "    , m_log2SubPbSizeMinus3            );
    2623   printf( "IvResPred:%d "              , m_ivResPredFlag          ? 1 : 0 );
    2624   printf( "DepthRefinement:%d "        , m_depthRefinementFlag    ? 1 : 0 );
    2625   printf( "ViewSynthesisPred:%d "      , m_viewSynthesisPredFlag  ? 1 : 0 );
    2626   printf( "DepthBasedBlkPart:%d "      , m_depthBasedBlkPartFlag  ? 1 : 0 );
    2627   printf( "Mpi:%d "                    , m_mpiFlag                ? 1 : 0 );
    2628   printf( "Log2MpiSubPbSizeMinus3:%d " , m_log2MpiSubPbSizeMinus3         );
    2629   printf( "IntraContour:%d "           , m_intraContourFlag       ? 1 : 0 );
    2630   printf( "IntraWedge:%d "             , m_intraWedgeFlag         ? 1 : 0 );
    2631   printf( "IntraSdc:%d "               , m_intraSdcFlag           ? 1 : 0 );
    2632   printf( "QtPred:%d "                 , m_qtPredFlag             ? 1 : 0 );
    2633   printf( "InterSdc:%d "               , m_interSdcFlag           ? 1 : 0 );
    2634 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
    2635   printf( "DepthIntraSkip:%d "         , m_depthIntraSkipFlag     ? 1 : 0 );
    2636 #else
    2637   printf( "IntraSingle:%d "            , m_intraSingleFlag        ? 1 : 0 );
    2638 #endif
    2639 #endif
    26402356
    26412357  printf("\n\n"); 
  • branches/HTM-14.0-MV-draft-3/source/App/TAppEncoder/TAppEncCfg.h

    r1179 r1191  
    4444#include <sstream>
    4545#include <vector>
    46 #if H_3D
    47 #include "TAppCommon/TAppComCamPara.h"
    48 #include "TLibRenderer/TRenModel.h"
    49 #include "TLibRenderer/TRenModSetupStrParser.h"
    50 #endif
    5146//! \ingroup TAppEncoder
    5247//! \{
     
    8075  std::vector<Int>       m_viewOrderIndex;                    ///< view order index 
    8176  std::vector<Int>       m_auxId;                             ///< auxiliary id
    82 #if H_3D
    83   std::vector<Int>       m_depthFlag;                         ///< depth flag
    84 #endif
    8577  std::vector<Int>       m_targetEncLayerIdList;              ///< layer Ids in Nuh to be encoded
    8678  std::vector<Int>       m_layerIdInNuh;                      ///< layer Id in Nuh for each layer
     
    133125
    134126
    135 #if H_3D_IC
    136   Bool   m_abUseIC;
    137   Bool   m_bUseLowLatencyICEnc;
    138 #endif
    139127
    140128#endif
     
    437425  Bool              m_outputVpsInfo;
    438426#endif
    439 #if H_3D
    440   // Camera parameters
    441   Char*     m_pchCameraParameterFile;                         ///< camera parameter file
    442   Char*     m_pchBaseViewCameraNumbers;
    443   TAppComCamPara m_cCameraData;
    444   Int       m_iCodedCamParPrecision;                          ///< precision for coding of camera parameters
    445 #if H_3D_VSO
    446   Char*     m_pchVSOConfig;
    447   Bool      m_bUseVSO;                                    ///< flag for using View Synthesis Optimization
    448   Bool      m_bVSOLSTable;                                ///< Depth QP dependent Lagrange parameter optimization (m23714)
    449   Bool      m_bVSOEarlySkip;                              ///< Early skip of VSO computation (JCT3V-A0093 modification 4)
    450 
    451   //// Used for development by GT, might be removed later
    452   Double    m_dLambdaScaleVSO;                            ///< Scaling factor for Lambda in VSO mode
    453   Bool      m_bForceLambdaScaleVSO;                       ///< Use Lambda Scale for depth even if VSO is turned off
    454   Bool      m_bAllowNegDist;                              ///< Allow negative distortion in VSO
    455   UInt      m_uiVSOMode;                                  ///< Number of VSO Mode, 1 = , 2 = simple, org vs. ren, 3 = simple, ren vs. ren, 4 = full 
    456 
    457   // SAIT_VSO_EST_A0033
    458   Bool      m_bUseEstimatedVSD;                           ///< Flag for using model based VSD estimation instead of VSO for some encoder decisions (JCT3V-A0033 modification 3) 
    459 
    460   // LGE_WVSO_A0119
    461   Bool      m_bUseWVSO;                                    ///< flag for using View Synthesis Optimization 
    462   Int       m_iVSOWeight;
    463   Int       m_iVSDWeight;
    464   Int       m_iDWeight;
    465 
    466   // Ren Model String
    467   TRenModSetupStrParser       m_cRenModStrParser;
    468 #endif
    469 #if H_3D_DIM
    470   Bool      m_useDLT;                                        ///< flag for using DLT
    471 #endif
    472 #if H_3D_QTLPC
    473   Bool      m_bUseQTL;                                        ///< flag for using depth QuadTree Limitation
    474 #endif
    475 
    476   std::vector< Bool >    m_ivMvPredFlag;
    477   std::vector< Bool >    m_ivMvScalingFlag;
    478   Int                    m_log2SubPbSizeMinus3;
    479   Bool                   m_ivResPredFlag;
    480   Bool                   m_depthRefinementFlag;
    481   Bool                   m_viewSynthesisPredFlag;
    482   Bool                   m_depthBasedBlkPartFlag;
    483   Bool                   m_mpiFlag;
    484   Int                    m_log2MpiSubPbSizeMinus3;
    485   Bool                   m_intraContourFlag;
    486   Bool                   m_intraWedgeFlag;
    487   Bool                   m_intraSdcFlag;
    488   Bool                   m_qtPredFlag;
    489   Bool                   m_interSdcFlag;
    490 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
    491   Bool                   m_depthIntraSkipFlag;
    492 #else
    493   Bool                   m_intraSingleFlag;
    494 #endif
    495 #endif
    496427  // internal member functions
    497428  Void  xSetGlobal      ();                                   ///< set global variables
  • branches/HTM-14.0-MV-draft-3/source/App/TAppEncoder/TAppEncTop.cpp

    r1179 r1191  
    8686#endif
    8787 
    88 #if H_3D
    89   vps.createCamPars(m_iNumberOfViews);
    90   TComDLT& dlt = m_dlt;
    91 #endif
    9288
    9389#if H_MV
     
    139135  xSetDpbSize              ( vps );
    140136  xSetVPSVUI               ( vps );
    141 #if H_3D
    142 #if HHI_CAM_PARA_K0052
    143   xSetCamPara              ( vps );
    144 #endif
    145 #endif
    146 #if H_3D
    147   m_ivPicLists.setVPS      ( &vps );
    148   xDeriveDltArray          ( vps, dlt );
    149 #endif
    150137  if ( m_targetEncLayerIdList.size() == 0 )
    151138  {
     
    178165  }
    179166
    180 #if H_3D
    181   // Set 3d tool parameters
    182 
    183   for (Int d = 0; d < 2; d++)
    184   { 
    185     m_sps3dExtension.setIvMvPredFlag          ( d, m_ivMvPredFlag[d]       );
    186     m_sps3dExtension.setIvMvScalingFlag       ( d, m_ivMvScalingFlag[d]    );
    187     if (d == 0 )
    188     {   
    189       m_sps3dExtension.setLog2SubPbSizeMinus3   ( d, m_log2SubPbSizeMinus3   );
    190       m_sps3dExtension.setIvResPredFlag         ( d, m_ivResPredFlag         );
    191       m_sps3dExtension.setDepthRefinementFlag   ( d, m_depthRefinementFlag   );
    192       m_sps3dExtension.setViewSynthesisPredFlag ( d, m_viewSynthesisPredFlag );
    193       m_sps3dExtension.setDepthBasedBlkPartFlag ( d, m_depthBasedBlkPartFlag );
    194     }
    195     else
    196     {   
    197       m_sps3dExtension.setMpiFlag               ( d, m_mpiFlag               );
    198       m_sps3dExtension.setLog2MpiSubPbSizeMinus3( d, m_log2MpiSubPbSizeMinus3);
    199       m_sps3dExtension.setIntraContourFlag      ( d, m_intraContourFlag      );
    200       m_sps3dExtension.setIntraSdcWedgeFlag     ( d, m_intraSdcFlag || m_intraWedgeFlag     );
    201       m_sps3dExtension.setQtPredFlag            ( d, m_qtPredFlag            );
    202       m_sps3dExtension.setInterSdcFlag          ( d, m_interSdcFlag          );
    203 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
    204       m_sps3dExtension.setDepthIntraSkipFlag    ( d, m_depthIntraSkipFlag    ); 
    205 #else
    206       m_sps3dExtension.setIntraSingleFlag       ( d, m_intraSingleFlag       ); 
    207 #endif
    208     }
    209   }
    210 #endif
    211167  for(Int layerIdInVps = 0; layerIdInVps < m_numberOfLayers; layerIdInVps++)
    212168  {
     
    224180    m_cTEncTop.setViewId                       ( vps.getViewId      (  layerId ) );
    225181    m_cTEncTop.setViewIndex                    ( vps.getViewIndex   (  layerId ) );
    226 #if H_3D
    227     Bool isDepth = ( vps.getDepthId     ( layerId ) != 0 ) ;
    228     m_cTEncTop.setIsDepth                      ( isDepth );
    229     //====== Camera Parameters =========
    230     m_cTEncTop.setCameraParameters             ( &m_cCameraData );     
    231 #if !HHI_CAM_PARA_K0052
    232     m_cTEncTop.setCamParPrecision              ( m_cCameraData.getCamParsCodedPrecision  () );
    233     m_cTEncTop.setCamParInSliceHeader          ( m_cCameraData.getVaryingCameraParameters() );
    234 
    235     m_cTEncTop.setCodedScale                   ( m_cCameraData.getCodedScale             () );
    236     m_cTEncTop.setCodedOffset                  ( m_cCameraData.getCodedOffset            () );
    237 #endif
    238 #if H_3D_VSO
    239     //====== VSO =========
    240     m_cTEncTop.setRenderModelParameters        ( &m_cRenModStrParser );
    241     m_cTEncTop.setForceLambdaScaleVSO          ( isDepth ? m_bForceLambdaScaleVSO : false );
    242     m_cTEncTop.setLambdaScaleVSO               ( isDepth ? m_dLambdaScaleVSO      : 1     );
    243     m_cTEncTop.setVSOMode                      ( isDepth ? m_uiVSOMode            : 0     );
    244 
    245     m_cTEncTop.setAllowNegDist                 ( isDepth ? m_bAllowNegDist        : false );
    246 
    247     // SAIT_VSO_EST_A0033
    248     m_cTEncTop.setUseEstimatedVSD              ( isDepth ? m_bUseEstimatedVSD     : false );
    249 
    250     // LGE_WVSO_A0119
    251     m_cTEncTop.setUseWVSO                      ( isDepth ? m_bUseWVSO             : false );   
    252     m_cTEncTop.setVSOWeight                    ( isDepth ? m_iVSOWeight           : 0     );
    253     m_cTEncTop.setVSDWeight                    ( isDepth ? m_iVSDWeight           : 0     );
    254     m_cTEncTop.setDWeight                      ( isDepth ? m_iDWeight             : 0     );
    255 #endif // H_3D_VSO
    256 #if H_3D_IC
    257     m_cTEncTop.setUseIC                        ( vps.getViewIndex( layerId ) == 0 || isDepth ? false : m_abUseIC );
    258     m_cTEncTop.setUseICLowLatencyEnc           ( m_bUseLowLatencyICEnc );
    259 #endif
    260 
    261    
    262     m_cTEncTop.setUseDMM                       ( isDepth ? m_intraWedgeFlag   : false );
    263     m_cTEncTop.setUseSDC                       ( isDepth ? m_intraSdcFlag     : false );
    264     m_cTEncTop.setUseDLT                       ( isDepth ? m_useDLT   : false );
    265     m_cTEncTop.setUseQTL                       ( isDepth ? m_bUseQTL  : false );
    266 
    267 
    268   m_cTEncTop.setSps3dExtension                 ( m_sps3dExtension );
    269 #endif // H_3D
    270182
    271183    m_cTEncTop.setIvPicLists                   ( &m_ivPicLists );
     
    273185  m_cTEncTop.setVPS(&vps);
    274186
    275 #if H_3D
    276   m_cTEncTop.setDLT(&dlt);
    277 #endif
    278187
    279188#if H_MV
     
    651560  }
    652561#endif
    653 #if H_3D_ANNEX_SELECTION_FIX
    654 #if H_3D
    655  /// SET Profiles
    656   for(Int layerIdInVps = 0; layerIdInVps < m_numberOfLayers; layerIdInVps++)
    657   {
    658     Int profileIdc = -1;
    659     for (Int olsIdx = 0; olsIdx < vps.getNumOutputLayerSets(); olsIdx++ )
    660     {   
    661       Int lsIdx = vps.olsIdxToLsIdx( olsIdx );
    662       for(Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++ )
    663       {
    664         if( vps.getLayerIdInNuh( layerIdInVps) == vps.getLayerSetLayerIdList(lsIdx, i) )
    665         {
    666           Int ptlIdx = vps.getProfileTierLevelIdx( olsIdx, i );
    667           if ( ptlIdx != -1 )
    668           {
    669             Int curProfileIdc = vps.getPTL(ptlIdx)->getGeneralPTL()->getProfileIdc();
    670             if (profileIdc == -1)   
    671             {
    672               profileIdc = curProfileIdc;
    673             }
    674             else
    675             {   
    676               if ( profileIdc != curProfileIdc )
    677               {             
    678                 fprintf(stderr, "Error: ProfileIdc for layer with index %d in VPS not equal in all OLSs. \n", layerIdInVps );
    679                 exit(EXIT_FAILURE);
    680               }
    681             }
    682           }
    683         }
    684       }
    685     }
    686     if (profileIdc == -1 )
    687     {
    688       fprintf(stderr, "Error: No profile given for layer with index %d in VPS not equal in all OLS. \n", layerIdInVps );
    689       exit(EXIT_FAILURE);
    690     }
    691     m_acTEncTopList[ layerIdInVps ]->setProfileIdc( profileIdc );
    692   }
    693 #endif
    694 #endif
    695 #if H_3D_VSO
    696   if ( m_bUseVSO )
    697   {
    698     if ( m_uiVSOMode == 4 )
    699     {
    700 #if H_3D_VSO_EARLY_SKIP
    701       m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, g_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0, m_bVSOEarlySkip );
    702 #else
    703       m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, g_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0 );
    704 #endif
    705       for ( Int layer = 0; layer < m_numberOfLayers ; layer++ )
    706       {
    707         TEncTop* pcEncTop =  m_acTEncTopList[ layer ];
    708         Int iViewNum      = pcEncTop->getViewIndex();
    709         Int iContent      = pcEncTop->getIsDepth() ? 1 : 0;
    710         Int iNumOfModels  = m_cRenModStrParser.getNumOfModelsForView(iViewNum, iContent);
    711 
    712         Bool bUseVSO      = (iNumOfModels != 0);
    713 
    714         pcEncTop->setUseVSO( bUseVSO );
    715         pcEncTop->getRdCost()->setRenModel( bUseVSO ? &m_cRendererModel : NULL );
    716 
    717         for (Int iCurModel = 0; iCurModel < iNumOfModels; iCurModel++ )
    718         {
    719           Int iModelNum; Int iLeftViewNum; Int iRightViewNum; Int iDump; Int iOrgRefNum; Int iBlendMode;
    720 
    721           m_cRenModStrParser.getSingleModelData  ( iViewNum, iContent, iCurModel, iModelNum, iBlendMode, iLeftViewNum, iRightViewNum, iOrgRefNum, iDump ) ;
    722           m_cRendererModel  .createSingleModel   ( iViewNum, iContent, iModelNum, iLeftViewNum, iRightViewNum, (iOrgRefNum != -1), iBlendMode );
    723         }           
    724       }
    725     }
    726     else
    727     {
    728       AOT(true);
    729     }
    730   }
    731 #endif
    732562}
    733563
     
    737567  // initialize global variables
    738568  initROM();
    739 #if H_3D_DIM_DMM
    740   initWedgeLists( true );
    741 #endif
    742569
    743570  for( Int layer=0; layer < m_numberOfLayers; layer++)
     
    798625Void TAppEncTop::xInitLib(Bool isFieldCoding)
    799626{
    800 #if H_3D
    801 #if !HHI_CAM_PARA_K0052
    802   for ( Int viewIndex = 0; viewIndex < m_vps->getNumViews(); viewIndex++ )
    803   {
    804     m_vps->initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(),
    805       m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );
    806   }
    807 #endif
    808 #endif
    809627
    810628#if H_MV
     
    923741    for ( Int gopId=0; gopId < gopSize; gopId++ )
    924742    {
    925 #if H_3D
    926       UInt iNextPoc = m_acTEncTopList[0] -> getFrameId( gopId );
    927       if ( iNextPoc < m_framesToBeEncoded )
    928       {
    929         m_cCameraData.update( iNextPoc );
    930       }
    931 #endif
    932743      for(Int layer=0; layer < m_numberOfLayers; layer++ )
    933744      {
     
    937748        }
    938749
    939 #if H_3D_VSO       
    940           if( m_bUseVSO && m_bUseEstimatedVSD && iNextPoc < m_framesToBeEncoded )
    941           {
    942             m_cCameraData.setDispCoeff( iNextPoc, m_acTEncTopList[layer]->getViewIndex() );
    943             m_acTEncTopList[layer]  ->setDispCoeff( m_cCameraData.getDispCoeff() );
    944           }
    945 #endif
    946750
    947751        Int   iNumEncoded = 0;
     
    1025829  printRateSummary();
    1026830
    1027 #if H_3D_REN_MAX_DEV_OUT
    1028   Double dMaxDispDiff = m_cCameraData.getMaxShiftDeviation();
    1029 
    1030   if ( !(dMaxDispDiff < 0) )
    1031   { 
    1032     printf("\n Max. possible shift error: %12.3f samples.\n", dMaxDispDiff );
    1033   }
    1034 #endif
    1035831
    1036832  return;
     
    12861082}
    12871083
    1288 #if H_3D_DIM_DLT
    1289 Void TAppEncTop::xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps, TComDLT* dlt)
    1290 {
    1291   TComPicYuv*       pcDepthPicYuvOrg = new TComPicYuv;
    1292   // allocate original YUV buffer
    1293   pcDepthPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );
    1294  
    1295   TVideoIOYuv* depthVideoFile = new TVideoIOYuv;
    1296  
    1297   UInt uiMaxDepthValue = ((1 << g_bitDepthY)-1);
    1298  
    1299   Bool abValidDepths[256];
    1300  
    1301   depthVideoFile->open( m_pchInputFileList[layer], false, m_inputBitDepthY, m_inputBitDepthC, m_internalBitDepthY, m_internalBitDepthC );  // read  mode
    1302  
    1303   // initialize boolean array
    1304   for(Int p=0; p<=uiMaxDepthValue; p++)
    1305     abValidDepths[p] = false;
    1306  
    1307   Int iHeight   = pcDepthPicYuvOrg->getHeight();
    1308   Int iWidth    = pcDepthPicYuvOrg->getWidth();
    1309   Int iStride   = pcDepthPicYuvOrg->getStride();
    1310  
    1311   Pel* pInDM    = pcDepthPicYuvOrg->getLumaAddr();
    1312  
    1313   for(Int uiFrame=0; uiFrame < uiNumFrames; uiFrame++ )
    1314   {
    1315     depthVideoFile->read( pcDepthPicYuvOrg, m_aiPad );
    1316    
    1317     // check all pixel values
    1318     for (Int i=0; i<iHeight; i++)
    1319     {
    1320       Int rowOffset = i*iStride;
    1321      
    1322       for (Int j=0; j<iWidth; j++)
    1323       {
    1324         Pel depthValue = pInDM[rowOffset+j];
    1325         abValidDepths[depthValue] = true;
    1326       }
    1327     }
    1328   }
    1329  
    1330   depthVideoFile->close();
    1331   delete depthVideoFile;
    1332  
    1333   pcDepthPicYuvOrg->destroy();
    1334   delete pcDepthPicYuvOrg;
    1335  
    1336   // convert boolean array to idx2Depth LUT
    1337   Int* aiIdx2DepthValue = (Int*) calloc(uiMaxDepthValue, sizeof(Int));
    1338   Int iNumDepthValues = 0;
    1339   for(Int p=0; p<=uiMaxDepthValue; p++)
    1340   {
    1341     if( abValidDepths[p] == true)
    1342     {
    1343       aiIdx2DepthValue[iNumDepthValues++] = p;
    1344     }
    1345   }
    1346  
    1347   if( uiNumFrames == 0 || numBitsForValue(iNumDepthValues) == g_bitDepthY )
    1348   {
    1349     dlt->setUseDLTFlag(layer, false);
    1350   }
    1351  
    1352   // assign LUT
    1353   if( dlt->getUseDLTFlag(layer) )
    1354   {
    1355     dlt->setDepthLUTs(layer, aiIdx2DepthValue, iNumDepthValues);
    1356   }
    1357  
    1358   // free temporary memory
    1359   free(aiIdx2DepthValue);
    1360 }
    1361 #endif
    13621084
    13631085#if H_MV
     
    13901112
    13911113
    1392 #if HHI_INTER_COMP_PRED_K0052
    1393 #if H_3D
    1394   vps.initViewCompLayer( );
    1395 #endif
    1396 #endif
    13971114}
    13981115
     
    14121129  Bool defaultDirectDependencyFlag = false;
    14131130
    1414 #if H_3D_DIRECT_DEP_TYPE
    1415   Int directDepTypeLenMinus2 = 0; 
    1416 #endif
    14171131  for( Int depLayer = 1; depLayer < m_numberOfLayers; depLayer++ )
    14181132  {
     
    14241138      vps.setDirectDependencyFlag( depLayer, refLayer, true);
    14251139      Int curDirectDependencyType = m_dependencyTypes[depLayer][i];
    1426 #if H_3D_DIRECT_DEP_TYPE       
    1427       directDepTypeLenMinus2 = std::max( directDepTypeLenMinus2, gCeilLog2( curDirectDependencyType + 1  ) - 2 ); 
    1428 #endif
    14291140      if ( defaultDirectDependencyType != -1 )   
    14301141      {
     
    14441155  vps.setDefaultDirectDependencyType( defaultDirectDependencyFlag ? defaultDirectDependencyType : -1 );       
    14451156
    1446 #if H_3D_DIRECT_DEP_TYPE       
    1447   assert( directDepTypeLenMinus2 <= 1 );
    1448   vps.setDirectDepTypeLenMinus2( directDepTypeLenMinus2 );
    1449 #endif
    14501157
    14511158
     
    14771184      Int curLayerIdInNuh = vps.getLayerIdInNuh( curLayerIdInVps );     
    14781185      Int maxTid = -1;
    1479 #if H_3D
    1480       if ( vps.getDirectDependencyFlag( curLayerIdInVps, refLayerIdInVps ) )
    1481       {
    1482         if ( m_depthFlag[ curLayerIdInVps] == m_depthFlag[ refLayerIdInVps ] )
    1483         {
    1484 #endif
    14851186          for( Int i = 0; i < ( getGOPSize() + 1); i++ )
    14861187          {       
     
    14891190            for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++)
    14901191            {
    1491 #if H_3D
    1492               if ( vps.getIdRefListLayer( curLayerIdInNuh, geCur.m_interLayerPredLayerIdc[ j ] ) == refLayerIdInNuh )
    1493 #else
    14941192              if ( vps.getIdDirectRefLayer( curLayerIdInNuh, geCur.m_interLayerPredLayerIdc[ j ] ) == refLayerIdInNuh )
    1495 #endif
    14961193              {
    1497 #if !HHI_INTER_COMP_PRED_K0052               
    14981194                Bool refAlwaysIntra = ( i == getGOPSize() ) && ( m_iIntraPeriod[ curLayerIdInVps ] % m_iIntraPeriod[ refLayerIdInVps ] == 0 );
    1499 #endif
    15001195                Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
    1501 #if HHI_INTER_COMP_PRED_K0052
    1502                 // refAlwaysIntra actually not needed, since TemporalIds need to be aligned within an AU.
    1503                 // Thus, reference pictures of IRAP pictures have TemporalId equal to 0.
    1504                 maxTid = std::max( maxTid, refLayerZero ? 0 : geRef.m_temporalId );
    1505 #else
    15061196                maxTid = std::max( maxTid, ( refAlwaysIntra || refLayerZero ) ? 0 : geRef.m_temporalId );
    1507 #endif
    15081197              }
    15091198            }
    15101199          }             
    1511 #if H_3D
    1512         }
    1513         else
    1514         {       
    1515 #if HHI_INTER_COMP_PRED_K0052
    1516           if( m_depthFlag[ curLayerIdInVps ] && ( m_mpiFlag|| m_qtPredFlag || m_intraContourFlag ) )
    1517           {         
    1518             Int nuhLayerIdTex = vps.getLayerIdInNuh( vps.getViewIndex( curLayerIdInNuh ), false );
    1519             if ( nuhLayerIdTex == refLayerIdInNuh )
    1520             {
    1521               for( Int i = 0; i < ( getGOPSize() + 1); i++ )
    1522               {       
    1523                 GOPEntry geCur =  m_GOPListMvc[curLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
    1524                 GOPEntry geRef =  m_GOPListMvc[refLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
    1525                 if ( geCur.m_interCompPredFlag )
    1526                 {
    1527                   Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
    1528                   maxTid = std::max( maxTid, refLayerZero ? 0 : geRef.m_temporalId );
    1529                 }
    1530               }
    1531             }
    1532           }
    1533           if( !m_depthFlag[ curLayerIdInVps ] && vps.getNumRefListLayers( curLayerIdInNuh) > 0  && ( m_depthRefinementFlag || m_viewSynthesisPredFlag || m_depthBasedBlkPartFlag ) )
    1534           {             
    1535             for( Int i = 0; i < ( getGOPSize() + 1); i++ )
    1536             {       
    1537               GOPEntry geCur =  m_GOPListMvc[curLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
    1538               GOPEntry geRef =  m_GOPListMvc[refLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
    1539 
    1540               if ( geCur.m_interCompPredFlag )
    1541               {
    1542                 for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++ )
    1543                 {
    1544                   Int nuhLayerIdDep = vps.getLayerIdInNuh( vps.getViewIndex( vps.getIdRefListLayer( curLayerIdInNuh, geCur.m_interLayerPredLayerIdc[j] ) ), true );
    1545                   if ( nuhLayerIdDep == refLayerIdInNuh )
    1546                   {
    1547                     Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
    1548                     maxTid = std::max( maxTid, refLayerZero ? 0 : geRef.m_temporalId );
    1549                   }
    1550                 }
    1551               }
    1552             }
    1553           }       
    1554 #else
    1555           if( m_depthFlag[ curLayerIdInVps ] && ( m_mpiFlag|| m_qtPredFlag || m_intraContourFlag ) )
    1556           {         
    1557             Int nuhLayerIdTex = vps.getLayerIdInNuh( vps.getViewIndex( curLayerIdInNuh ), false );
    1558             if ( nuhLayerIdTex == refLayerIdInNuh )
    1559             {
    1560               maxTid = std::max( maxTid, vps.getSubLayersVpsMaxMinus1( refLayerIdInVps) + 1 );
    1561             }
    1562           }
    1563           if( !m_depthFlag[ curLayerIdInVps ] && vps.getNumRefListLayers( curLayerIdInNuh) > 0  && ( m_depthRefinementFlag || m_viewSynthesisPredFlag || m_depthBasedBlkPartFlag ) )
    1564           { 
    1565             Int maxPresentTid =-1;
    1566             Bool allPresent = true;
    1567             for (Int i = 0; i < vps.getNumRefListLayers( curLayerIdInNuh); i++ )
    1568             {
    1569               Int nuhLayerIdDep = vps.getLayerIdInNuh( vps.getViewIndex( vps.getIdRefListLayer(curLayerIdInNuh, i ) ), true );
    1570               if ( nuhLayerIdDep== refLayerIdInNuh )
    1571               {
    1572                 maxPresentTid= std::max( maxTid, vps.getSubLayersVpsMaxMinus1( refLayerIdInVps) + 1 );             
    1573               }
    1574               else
    1575               {
    1576                 allPresent = false;
    1577               }
    1578             }
    1579 
    1580             if ( allPresent )
    1581             {
    1582               maxTid= std::max( maxTid, maxPresentTid );             
    1583             }
    1584           }       
    1585 #endif
    1586         }
    1587       } // if ( vps.getDirectDependencyFlag( curLayerIdInVps, refLayerIdInVps ) )
    1588       vps.setMaxTidIlRefPicsPlus1( refLayerIdInVps, curLayerIdInVps, maxTid + 1 );
    1589 #endif
    15901200    }  // Loop curLayerIdInVps
    15911201  } // Loop refLayerIdInVps
     
    16361246     
    16371247      // check if all reference layers when allRefLayerActiveFlag is equal to 1 are reference layer pictures specified in the gop entry
    1638 #if H_3D
    1639       for (Int k = 0; k < vps.getNumRefListLayers( layerIdInNuh ) && allRefLayersActiveFlag; k++ )
    1640       {
    1641         Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdRefListLayer( layerIdInNuh , k ) );
    1642 #else
    16431248      for (Int k = 0; k < vps.getNumDirectRefLayers( layerIdInNuh ) && allRefLayersActiveFlag; k++ )
    16441249      {
    16451250        Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdDirectRefLayer( layerIdInNuh , k ) );
    1646 #endif
    16471251        if ( vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId  && ( tId == 0 || vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId )  )
    16481252        {
     
    16621266      {   
    16631267        Bool referenceLayerFoundFlag = false;
    1664 #if H_3D
    1665         for (Int k = 0; k < vps.getNumRefListLayers( layerIdInNuh ); k++ )
    1666         {
    1667           Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdRefListLayer( layerIdInNuh, k) );
    1668 #else
    16691268        for (Int k = 0; k < vps.getNumDirectRefLayers( layerIdInNuh ); k++ )
    16701269        {
    16711270          Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdDirectRefLayer( layerIdInNuh, k) );
    1672 #endif
    16731271          if ( vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId  && ( tId == 0 || vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId )  )
    16741272          {         
     
    17771375    break;
    17781376  case Profile::MULTIVIEWMAIN:
    1779 #if H_3D
    1780   case Profile::MAIN3D:
    1781 #endif
    17821377    ptl->setMax12bitConstraintFlag      ( true  );
    17831378    ptl->setMax12bitConstraintFlag      ( true  );
     
    18001395{
    18011396
    1802 #if H_3D_DISABLE_CHROMA
    1803   Bool anyDepth = false;
    1804   for ( Int i = 0; i < m_numberOfLayers; i++ )
    1805   {
    1806     vps.setVpsRepFormatIdx( i, m_depthFlag[ i ] ? 1 : 0 );
    1807     anyDepth = anyDepth || m_depthFlag[ i ];
    1808   } 
    1809 
    1810   vps.setRepFormatIdxPresentFlag( anyDepth );
    1811   vps.setVpsNumRepFormatsMinus1 ( anyDepth ? 1 : 0  );
    1812 
    1813   for ( Int j = 0; j <= vps.getVpsNumRepFormatsMinus1(); j++ )
    1814   {
    1815     TComRepFormat* repFormat = new TComRepFormat;
    1816 
    1817     repFormat->setBitDepthVpsChromaMinus8   ( g_bitDepthC - 8 );
    1818     repFormat->setBitDepthVpsLumaMinus8     ( g_bitDepthY - 8 );
    1819     repFormat->setChromaFormatVpsIdc        ( j == 1 ? CHROMA_400 : CHROMA_420 );
    1820     repFormat->setPicHeightVpsInLumaSamples ( m_iSourceHeight );
    1821     repFormat->setPicWidthVpsInLumaSamples  ( m_iSourceWidth  );   
    1822     repFormat->setChromaAndBitDepthVpsPresentFlag( true );   
    1823     // ToDo not supported yet.
    1824     //repFormat->setSeparateColourPlaneVpsFlag( );
    1825 #if H_MV_FIX_CONF_WINDOW
    1826     Bool conformanceWindowVpsFlag = ( m_confWinBottom != 0 ) || ( m_confWinRight != 0 ) || ( m_confWinTop != 0 ) || ( m_confWinBottom != 0 );
    1827     repFormat->setConformanceWindowVpsFlag( conformanceWindowVpsFlag );
    1828     if ( conformanceWindowVpsFlag )
    1829     {   
    1830       repFormat->setConfWinVpsLeftOffset    ( m_confWinLeft   / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) );
    1831       repFormat->setConfWinVpsRightOffset   ( m_confWinRight  / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() )  );
    1832       repFormat->setConfWinVpsTopOffset     ( m_confWinTop    / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() )  );
    1833       repFormat->setConfWinVpsBottomOffset  ( m_confWinBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) );
    1834     }
    1835 #else
    1836     repFormat->setConformanceWindowVpsFlag( true );
    1837     repFormat->setConfWinVpsLeftOffset    ( m_confWinLeft   / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) );
    1838     repFormat->setConfWinVpsRightOffset   ( m_confWinRight  / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() )  );
    1839     repFormat->setConfWinVpsTopOffset     ( m_confWinTop    / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() )  );
    1840     repFormat->setConfWinVpsBottomOffset  ( m_confWinBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) );
    1841 #endif
    1842     assert( vps.getRepFormat( j ) == NULL );
    1843     vps.setRepFormat( j , repFormat );
    1844   };
    1845 
    1846 
    1847 #else
    18481397  vps.setRepFormatIdxPresentFlag( false );
    18491398  vps.setVpsNumRepFormatsMinus1 ( 0    );
     
    18741423  assert( vps.getRepFormat( 0 ) == NULL );
    18751424  vps.setRepFormat( 0 , repFormat );
    1876 #endif
    18771425}
    18781426
     
    22501798}
    22511799
    2252 #if HHI_CAM_PARA_K0052
    2253 #if H_3D
    2254 Void TAppEncTop::xSetCamPara                ( TComVPS& vps )
    2255 {
    2256   vps.setCpPrecision( m_cCameraData.getCamParsCodedPrecision());
    2257 
    2258   for ( Int n = 1; n < vps.getNumViews(); n++ )
    2259   { 
    2260     Int i      = vps.getViewOIdxList( n );
    2261     Int iInVps = vps.getVoiInVps    ( i );
    2262     vps.setNumCp( iInVps,  n);   
    2263 
    2264     if ( vps.getNumCp( iInVps ) > 0 )
    2265     {
    2266       vps.setCpInSliceSegmentHeaderFlag( iInVps, m_cCameraData.getVaryingCameraParameters() );
    2267 
    2268       for( Int m = 0; m < vps.getNumCp( iInVps ); m++ )
    2269       {
    2270         vps.setCpRefVoi( iInVps, m, vps.getViewOIdxList( m ) );
    2271         if( !vps.getCpInSliceSegmentHeaderFlag( iInVps ) )
    2272         {
    2273           Int j = vps.getCpRefVoi( iInVps, m );
    2274           Int jInVps = vps.getVoiInVps( j );         
    2275 
    2276           vps.setVpsCpScale   ( iInVps, jInVps, m_cCameraData.getCodedScale() [ jInVps ][ iInVps ] ) ;
    2277           vps.setVpsCpInvScale( iInVps, jInVps, m_cCameraData.getCodedScale() [ iInVps ][ jInVps ] ) ;
    2278           vps.setVpsCpOff     ( iInVps, jInVps, m_cCameraData.getCodedOffset()[ jInVps ][ iInVps ] ) ;
    2279           vps.setVpsCpInvOff  ( iInVps, jInVps, m_cCameraData.getCodedOffset()[ iInVps ][ jInVps ] ) ;
    2280         }
    2281       }
    2282     }
    2283   }
    2284   vps.deriveCpPresentFlag();
    2285 }
    2286 #endif
    2287 #endif
    22881800
    22891801
     
    22971809
    22981810
    2299 #if H_3D
    2300 
    2301 Void TAppEncTop::xDeriveDltArray( TComVPS& vps, TComDLT& dlt )
    2302 {
    2303   Int  iNumDepthViews  = 0;
    2304   Bool bDltPresentFlag = false;
    2305 
    2306   for ( Int layer = 0; layer <= vps.getMaxLayersMinus1(); layer++ )
    2307   {
    2308     Bool isDepth = ( vps.getDepthId( layer ) == 1 );
    2309 
    2310     if ( isDepth )
    2311     {
    2312       iNumDepthViews++;
    2313     }
    2314 
    2315     dlt.setUseDLTFlag( layer , isDepth && m_useDLT );
    2316     if( dlt.getUseDLTFlag( layer ) )
    2317     {
    2318       xAnalyzeInputBaseDepth(layer, max(m_iIntraPeriod[layer], 24), &vps, &dlt);
    2319       bDltPresentFlag = bDltPresentFlag || dlt.getUseDLTFlag(layer);
    2320       dlt.setInterViewDltPredEnableFlag(layer, (dlt.getUseDLTFlag(layer) && (layer>1)));
    2321     }
    2322   }
    2323 
    2324   dlt.setDltPresentFlag( bDltPresentFlag );
    2325   dlt.setNumDepthViews ( iNumDepthViews  );
    2326 }
    2327 #endif
    23281811//! \}
  • branches/HTM-14.0-MV-draft-3/source/App/TAppEncoder/TAppEncTop.h

    r1179 r1191  
    4646#include "TLibCommon/AccessUnit.h"
    4747#include "TAppEncCfg.h"
    48 #if H_3D
    49 #include "../../Lib/TLibRenderer/TRenTop.h"
    50 #endif
    5148
    5249#if KWU_RC_MADPRED_E0227
     
    9087#endif
    9188
    92 #if H_3D
    93   TComDLT                    m_dlt;                         ///< dlt
    94   TComSps3dExtension         m_sps3dExtension;              ///< Currently all layers share the same sps 3D Extension 
    95 #endif
    9689
    9790  UInt m_essentialBytes;
    9891  UInt m_totalBytes;
    99 #if H_3D_VSO
    100   TRenTop                     m_cRendererTop;
    101   TRenModel                   m_cRendererModel;   
    102 #endif
    10392protected:
    10493  // initialization
     
    142131  Void xSetDpbSize                ( TComVPS& vps );
    143132  Void xSetVPSVUI                 ( TComVPS& vps );
    144 #if HHI_CAM_PARA_K0052
    145 #if H_3D
    146   Void xSetCamPara                ( TComVPS& vps );
    147 #endif
    148 #endif
    149133  GOPEntry* xGetGopEntry( Int layerIdInVps, Int poc );
    150134  Int  xGetMax( std::vector<Int>& vec);
    151135  Bool xLayerIdInTargetEncLayerIdList( Int nuhLayerId );
    152 #endif
    153 #if H_3D
    154   Void xDeriveDltArray( TComVPS& vps, TComDLT& dlt );
    155 #endif
    156 #if H_3D_DIM_DLT
    157   Void  xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps, TComDLT* dlt);
    158136#endif
    159137public:
Note: See TracChangeset for help on using the changeset viewer.