Ignore:
Timestamp:
6 Nov 2015, 16:18:36 (8 years ago)
Author:
tech
Message:

Macro fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-15.2-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1362 r1373  
    177177    }
    178178  }
    179 #endif
    180 
    181 #if NH_3D
     179
     180  if ( m_pchBaseViewCameraNumbers != NULL )
     181  {
     182    free ( m_pchBaseViewCameraNumbers );
     183  }
     184#endif
    182185#if NH_3D_VSO
    183186  if (  m_pchVSOConfig != NULL)
     
    185188    free (  m_pchVSOConfig );
    186189  }
    187 #endif
     190 
    188191  if ( m_pchCameraParameterFile != NULL )
    189192  {
    190193    free ( m_pchCameraParameterFile );
    191   }
    192 
    193   if ( m_pchBaseViewCameraNumbers != NULL )
    194   {
    195     free ( m_pchBaseViewCameraNumbers );
    196194  }
    197195#endif
     
    818816  ("ViewId",                         m_viewId                      , IntAry1d(1,0),                                 "View Id per View Order Index")
    819817  ("AuxId",                          m_auxId                       , IntAry1d(1,0),                                 "AuxId per layer")
    820 #if NH_3D
     818#if NH_3D_VSO
    821819  ("DepthFlag",                      m_depthFlag                   , IntAry1d(1,0),                                 "Depth Flag")
    822820#endif
     
    11071105// A lot of this stuff could should actually be derived by the encoder.
    11081106  // VPS VUI
    1109   ("VpsVuiPresentFlag"           , m_vpsVuiPresentFlag           , false                                           , "VpsVuiPresentFlag           ")
    1110   ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false                                           , "CrossLayerPicTypeAlignedFlag")  // Could actually be derived by the encoder
    1111   ("CrossLayerIrapAlignedFlag"   , m_crossLayerIrapAlignedFlag   , false                                           , "CrossLayerIrapAlignedFlag   ")  // Could actually be derived by the encoder
    1112   ("AllLayersIdrAlignedFlag"     , m_allLayersIdrAlignedFlag     , false                                           , "CrossLayerIrapAlignedFlag   ")  // Could actually be derived by the encoder
    1113   ("BitRatePresentVpsFlag"       , m_bitRatePresentVpsFlag       , false                                           , "BitRatePresentVpsFlag       ")
    1114   ("PicRatePresentVpsFlag"       , m_picRatePresentVpsFlag       , false                                           , "PicRatePresentVpsFlag       ")
    1115   ("BitRatePresentFlag"          , m_bitRatePresentFlag          , BoolAry1d(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "BitRatePresentFlag per sub layer for the N-th layer set")
    1116   ("PicRatePresentFlag"          , m_picRatePresentFlag          , BoolAry1d(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "PicRatePresentFlag per sub layer for the N-th layer set")
    1117   ("AvgBitRate"                  , m_avgBitRate                   , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgBitRate         per sub layer for the N-th layer set")
    1118   ("MaxBitRate"                  , m_maxBitRate                   , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "MaxBitRate         per sub layer for the N-th layer set")
    1119   ("ConstantPicRateIdc"          , m_constantPicRateIdc           , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "ConstantPicRateIdc per sub layer for the N-th layer set")
    1120   ("AvgPicRate"                  , m_avgPicRate                   , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgPicRate         per sub layer for the N-th layer set")
    1121   ("TilesNotInUseFlag"            , m_tilesNotInUseFlag            , true                                          , "TilesNotInUseFlag            ")
     1107  ("VpsVuiPresentFlag"            , m_vpsVuiPresentFlag            , false                                , "VpsVuiPresentFlag           ")
     1108  ("CrossLayerPicTypeAlignedFlag" , m_crossLayerPicTypeAlignedFlag , false                                , "CrossLayerPicTypeAlignedFlag")  // Could actually be derived by the encoder
     1109  ("CrossLayerIrapAlignedFlag"    , m_crossLayerIrapAlignedFlag    , false                                , "CrossLayerIrapAlignedFlag   ")  // Could actually be derived by the encoder
     1110  ("AllLayersIdrAlignedFlag"      , m_allLayersIdrAlignedFlag      , false                                , "CrossLayerIrapAlignedFlag   ")  // Could actually be derived by the encoder
     1111  ("BitRatePresentVpsFlag"        , m_bitRatePresentVpsFlag        , false                                , "BitRatePresentVpsFlag       ")
     1112  ("PicRatePresentVpsFlag"        , m_picRatePresentVpsFlag        , false                                , "PicRatePresentVpsFlag       ")
     1113  ("BitRatePresentFlag"           , m_bitRatePresentFlag           , BoolAry1d(1,0), MAX_VPS_OP_SETS_PLUS1, "BitRatePresentFlag per sub layer for the N-th layer set")
     1114  ("PicRatePresentFlag"           , m_picRatePresentFlag           , BoolAry1d(1,0), MAX_VPS_OP_SETS_PLUS1, "PicRatePresentFlag per sub layer for the N-th layer set")
     1115  ("AvgBitRate"                   , m_avgBitRate                   , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgBitRate         per sub layer for the N-th layer set")
     1116  ("MaxBitRate"                   , m_maxBitRate                   , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "MaxBitRate         per sub layer for the N-th layer set")
     1117  ("ConstantPicRateIdc"           , m_constantPicRateIdc           , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "ConstantPicRateIdc per sub layer for the N-th layer set")
     1118  ("AvgPicRate"                   , m_avgPicRate                   , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgPicRate         per sub layer for the N-th layer set")
     1119  ("TilesNotInUseFlag"            , m_tilesNotInUseFlag            , true                                 , "TilesNotInUseFlag            ")
    11221120  ("TilesInUseFlag"               , m_tilesInUseFlag               , BoolAry1d(1,false)                   , "TilesInUseFlag               ")
    1123   ("LoopFilterNotAcrossTilesFlag" , m_loopFilterNotAcrossTilesFlag , BoolAry1d(1,false)                  , "LoopFilterNotAcrossTilesFlag ")
    1124   ("WppNotInUseFlag"              , m_wppNotInUseFlag              , true                                          , "WppNotInUseFlag              ")
    1125   ("WppInUseFlag"                 , m_wppInUseFlag                 , BoolAry1d(1,0)                      , "WppInUseFlag                 ")
    1126   ("TileBoundariesAlignedFlag"   , m_tileBoundariesAlignedFlag   , BoolAry1d(1,0)  ,MAX_NUM_LAYERS       , "TileBoundariesAlignedFlag    per direct reference for the N-th layer")
    1127   ("IlpRestrictedRefLayersFlag"  , m_ilpRestrictedRefLayersFlag  , false                                           , "IlpRestrictedRefLayersFlag")
    1128   ("MinSpatialSegmentOffsetPlus1", m_minSpatialSegmentOffsetPlus1 , IntAry1d (1,0), MAX_NUM_LAYERS       , "MinSpatialSegmentOffsetPlus1 per direct reference for the N-th layer")
    1129   ("CtuBasedOffsetEnabledFlag"   , m_ctuBasedOffsetEnabledFlag   , BoolAry1d(1,0)  ,MAX_NUM_LAYERS       , "CtuBasedOffsetEnabledFlag    per direct reference for the N-th layer")
    1130   ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1  , IntAry1d (1,0), MAX_NUM_LAYERS       , "MinHorizontalCtuOffsetPlus1  per direct reference for the N-th layer")
    1131   ("SingleLayerForNonIrapFlag", m_singleLayerForNonIrapFlag, false                                          , "SingleLayerForNonIrapFlag")
    1132   ("HigherLayerIrapSkipFlag"  , m_higherLayerIrapSkipFlag  , false                                          , "HigherLayerIrapSkipFlag  ")
     1121  ("LoopFilterNotAcrossTilesFlag" , m_loopFilterNotAcrossTilesFlag , BoolAry1d(1,false)                   , "LoopFilterNotAcrossTilesFlag ")
     1122  ("WppNotInUseFlag"              , m_wppNotInUseFlag              , true                                 , "WppNotInUseFlag              ")
     1123  ("WppInUseFlag"                 , m_wppInUseFlag                 , BoolAry1d(1,0)                       , "WppInUseFlag                 ")
     1124  ("TileBoundariesAlignedFlag"    , m_tileBoundariesAlignedFlag    , BoolAry1d(1,0)  ,MAX_NUM_LAYERS      , "TileBoundariesAlignedFlag    per direct reference for the N-th layer")
     1125  ("IlpRestrictedRefLayersFlag"   , m_ilpRestrictedRefLayersFlag   , false                                , "IlpRestrictedRefLayersFlag")
     1126  ("MinSpatialSegmentOffsetPlus1" , m_minSpatialSegmentOffsetPlus1 , IntAry1d (1,0), MAX_NUM_LAYERS       , "MinSpatialSegmentOffsetPlus1 per direct reference for the N-th layer")
     1127  ("CtuBasedOffsetEnabledFlag"    , m_ctuBasedOffsetEnabledFlag    , BoolAry1d(1,0)  ,MAX_NUM_LAYERS      , "CtuBasedOffsetEnabledFlag    per direct reference for the N-th layer")
     1128  ("MinHorizontalCtuOffsetPlus1"  , m_minHorizontalCtuOffsetPlus1  , IntAry1d (1,0), MAX_NUM_LAYERS       , "MinHorizontalCtuOffsetPlus1  per direct reference for the N-th layer")
     1129  ("SingleLayerForNonIrapFlag"    , m_singleLayerForNonIrapFlag    , false                                , "SingleLayerForNonIrapFlag")
     1130  ("HigherLayerIrapSkipFlag"      , m_higherLayerIrapSkipFlag      , false                                , "HigherLayerIrapSkipFlag  ")
    11331131#endif
    11341132
     
    12901288#endif
    12911289  ("OutputVpsInfo",                                   m_outputVpsInfo,                false                     ,"Output information about the layer dependencies and layer sets")
     1290
     1291/* Camera parameters */   
     1292  ("BaseViewCameraNumbers",                           m_pchBaseViewCameraNumbers,   (TChar *) 0                 , "Numbers of base views")
    12921293#endif
    12931294#if NH_3D
    1294 /* Camera parameters */ 
    12951295  ("Depth420OutputFlag",                              m_depth420OutputFlag,           true                     , "Output depth layers in 4:2:0 ")
     1296#endif
     1297#if NH_3D_VSO 
    12961298  ("CameraParameterFile,cpf",                         m_pchCameraParameterFile,    (TChar *) 0                 , "Camera Parameter File Name")
    1297   ("BaseViewCameraNumbers",                           m_pchBaseViewCameraNumbers,  (TChar *) 0                 , "Numbers of base views")
    12981299  ("CodedCamParsPrecision",                           m_iCodedCamParPrecision,      STD_CAM_PARAMETERS_PRECISION, "precision for coding of camera parameters (in units of 2^(-x) luma samples)" )
    12991300
    1300 #if NH_3D_VSO
    13011301  /* View Synthesis Optimization */
    13021302  ("VSOConfig",                                       m_pchVSOConfig            , (TChar *) 0                   ,"VSO configuration")
     
    13171317#endif //HHI_VSO
    13181318/* 3D- HEVC Tools */                                                           
     1319#if NH_3D_QTL
    13191320  ("QTL"                   ,                          m_bUseQTL                 , true                          , "Use depth quad tree limitation (encoder only)" )
     1321#endif
     1322#if NH_3D
     1323
    13201324  ("IvMvPredFlag"          ,                          m_ivMvPredFlag            , BoolAry1d(2,true)             , "Inter-view motion prediction"              )
    13211325  ("IvMvScalingFlag"       ,                          m_ivMvScalingFlag         , BoolAry1d(2,true)             , "Inter-view motion vector scaling"          )
     
    18131817  xResizeVector( m_auxId );
    18141818
    1815 #if NH_3D
     1819#if NH_3D_VSO
    18161820  xResizeVector( m_depthFlag );
    18171821#endif
     
    20222026  }
    20232027
    2024 #if NH_3D
     2028
    20252029#if NH_3D_VSO
    20262030  // Table base optimization
     
    20392043    for (Int layer = 0; layer < m_numberOfLayers; layer++ )
    20402044    {
    2041       if ( m_depthFlag[ layer ])
     2045      if ( m_depthFlag[ layer ]  || m_auxId[ layer ] == 2 )
    20422046      {
    20432047        firstDepthLayer = layer;
     
    20762080      LOG2_DISP_PREC_LUT );
    20772081  }
     2082#if NH_3D
    20782083  else
    20792084  {
     
    20892094      LOG2_DISP_PREC_LUT );
    20902095  }
    2091 #else
    2092   m_cCameraData     .init     ( ((UInt) m_iNumberOfViews ),
    2093     m_internalBitDepth[ CHANNEL_TYPE_LUMA],
    2094     (UInt) m_iCodedCamParPrecision,
    2095     m_FrameSkip,
    2096     (UInt) m_framesToBeEncoded,
    2097     m_pchCameraParameterFile,
    2098     m_pchBaseViewCameraNumbers,
    2099     NULL,
    2100     NULL,
    2101     LOG2_DISP_PREC_LUT );
    2102 #endif
    21032096  m_cCameraData.check( false, true );
     2097#endif
    21042098#endif
    21052099
     
    22862280#endif
    22872281
    2288 #if NH_3D
     2282#if NH_3D_VSO
    22892283  if ( m_scalabilityMask & ( 1 << DEPTH_ID ) )
    22902284  {
     
    26452639  }
    26462640
    2647 #if NH_3D
     2641#if NH_3D_VSO
    26482642  xConfirmPara( m_pchCameraParameterFile    == 0                ,   "CameraParameterFile must be given");
    26492643  xConfirmPara( m_pchBaseViewCameraNumbers  == 0                ,   "BaseViewCameraNumbers must be given" );
    26502644  xConfirmPara( m_iNumberOfViews != m_cCameraData.getBaseViewNumbers().size() ,   "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" );
    26512645  xConfirmPara    ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5,       "CodedCamParsPrecision must be in range of 0..5" );
    2652 #if NH_3D_VSO
    26532646    if( m_bUseVSO )
    26542647    {
     
    26562649      xConfirmPara( m_uiVSOMode > 4 ,                                                "VSO Mode must be less than 5");
    26572650    }
    2658 #endif
    26592651#endif
    26602652  // max CU width and height should be power of 2
     
    34303422  xPrintParaVector( "AuxId", m_auxId );
    34313423#endif
    3432 #if NH_3D
     3424#if NH_3D_VSO
    34333425  xPrintParaVector( "DepthLayerFlag", m_depthFlag );
    34343426  printf("Coded Camera Param. Precision     : %d\n", m_iCodedCamParPrecision); 
     
    36323624
    36333625  printf("Max Num Merge Candidates          : %d\n", m_maxNumMergeCand);
    3634 #if NH_3D
     3626#if NH_3D_VSO
    36353627  printf("BaseViewCameraNumbers             : %s\n", m_pchBaseViewCameraNumbers );
    36363628  printf("Coded Camera Param. Precision     : %d\n", m_iCodedCamParPrecision);
    3637 #if NH_3D_VSO
    36383629  printf("Force use of Lambda Scale         : %d\n", m_bForceLambdaScaleVSO );
    36393630
     
    36533644  }
    36543645#endif //HHI_VSO
    3655 #endif //NH_3D
    36563646  printf("\n");
    36573647#if NH_MV
     
    37203710  printf("WVSO:%d ", m_bUseWVSO ); 
    37213711#endif
     3712#if NH_3D_QTL
     3713  printf( "QTL:%d "                  , m_bUseQTL);
     3714#endif
    37223715#if NH_3D
    3723   printf( "QTL:%d "                  , m_bUseQTL);
    37243716  printf( "IlluCompEnable:%d "       , m_abUseIC);
    37253717  printf( "IlluCompLowLatencyEnc:%d ",  m_bUseLowLatencyICEnc);
Note: See TracChangeset for help on using the changeset viewer.