Changeset 560 in SHVCSoftware for branches/SHM-5.0-dev/source


Ignore:
Timestamp:
27 Jan 2014, 17:25:26 (11 years ago)
Author:
seregin
Message:

remove M0457_PREDICTION_INDICATIONS macro

Location:
branches/SHM-5.0-dev/source
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r559 r560  
    143143{
    144144#if VPS_EXTN_DIRECT_REF_LAYERS
    145 #if M0457_PREDICTION_INDICATIONS
    146145  for(Int layer = 0; layer < MAX_LAYERS; layer++)
    147146  {
     
    149148    {
    150149      delete [] m_acLayerCfg[layer].m_samplePredRefLayerIds;
    151     }
    152   }
    153   for(Int layer = 0; layer < MAX_LAYERS; layer++)
    154   {
     150      m_acLayerCfg[layer].m_samplePredRefLayerIds = NULL;
     151    }
    155152    if( m_acLayerCfg[layer].m_numMotionPredRefLayers > 0 )
    156153    {
    157154      delete [] m_acLayerCfg[layer].m_motionPredRefLayerIds;
    158     }
    159   }
    160 #else
    161   for(Int layer = 0; layer < MAX_LAYERS; layer++)
    162   {
    163     if( m_acLayerCfg[layer].m_numDirectRefLayers > 0 )
    164     {
    165       delete [] m_acLayerCfg[layer].m_refLayerIds;
    166     }
    167   }
    168 #endif
    169   for(Int layer = 0; layer < MAX_LAYERS; layer++)
    170   {
     155      m_acLayerCfg[layer].m_motionPredRefLayerIds = NULL;
     156    }
    171157    if( m_acLayerCfg[layer].m_numActiveRefLayers > 0 )
    172158    {
    173159      delete [] m_acLayerCfg[layer].m_predLayerIds;
     160      m_acLayerCfg[layer].m_predLayerIds = NULL;
    174161    }
    175162  }
     
    380367#endif
    381368#if VPS_EXTN_DIRECT_REF_LAYERS
    382 #if M0457_PREDICTION_INDICATIONS
    383369  Int*    cfg_numSamplePredRefLayers  [MAX_LAYERS];
    384370  string  cfg_samplePredRefLayerIds   [MAX_LAYERS];
     
    387373  string  cfg_motionPredRefLayerIds   [MAX_LAYERS];
    388374  string* cfg_motionPredRefLayerIdsPtr[MAX_LAYERS];
    389 #else
    390   Int*    cfg_numDirectRefLayers [MAX_LAYERS];
    391   string  cfg_refLayerIds        [MAX_LAYERS];
    392   string* cfg_refLayerIdsPtr     [MAX_LAYERS];
    393 #endif
    394375  Int*    cfg_numActiveRefLayers [MAX_LAYERS];
    395376  string  cfg_predLayerIds       [MAX_LAYERS];
     
    459440#endif
    460441#if VPS_EXTN_DIRECT_REF_LAYERS
    461 #if M0457_PREDICTION_INDICATIONS
    462442    cfg_numSamplePredRefLayers  [layer] = &m_acLayerCfg[layer].m_numSamplePredRefLayers;
    463443    cfg_samplePredRefLayerIdsPtr[layer] = &cfg_samplePredRefLayerIds[layer];
    464444    cfg_numMotionPredRefLayers  [layer] = &m_acLayerCfg[layer].m_numMotionPredRefLayers;
    465445    cfg_motionPredRefLayerIdsPtr[layer] = &cfg_motionPredRefLayerIds[layer];
    466 #else
    467     cfg_numDirectRefLayers  [layer] = &m_acLayerCfg[layer].m_numDirectRefLayers;
    468     cfg_refLayerIdsPtr      [layer]  = &cfg_refLayerIds[layer];
    469 #endif
    470446    cfg_numActiveRefLayers  [layer] = &m_acLayerCfg[layer].m_numActiveRefLayers;
    471447    cfg_predLayerIdsPtr     [layer]  = &cfg_predLayerIds[layer];
     
    548524#endif
    549525#if VPS_EXTN_DIRECT_REF_LAYERS
    550 #if M0457_PREDICTION_INDICATIONS
    551526  ("NumSamplePredRefLayers%d",cfg_numSamplePredRefLayers, -1, MAX_LAYERS, "Number of sample prediction reference layers")
    552527  ("SamplePredRefLayerIds%d", cfg_samplePredRefLayerIdsPtr, string(""), MAX_LAYERS, "sample pred reference layer IDs")
    553528  ("NumMotionPredRefLayers%d",cfg_numMotionPredRefLayers, -1, MAX_LAYERS, "Number of motion prediction reference layers")
    554529  ("MotionPredRefLayerIds%d", cfg_motionPredRefLayerIdsPtr, string(""), MAX_LAYERS, "motion pred reference layer IDs")
    555 #else
    556   ("NumDirectRefLayers%d",    cfg_numDirectRefLayers, -1, MAX_LAYERS, "Number of direct reference layers")
    557   ("RefLayerIds%d",           cfg_refLayerIdsPtr, string(""), MAX_LAYERS, "direct reference layer IDs")
    558 #endif
    559530  ("NumActiveRefLayers%d",    cfg_numActiveRefLayers, -1, MAX_LAYERS, "Number of active reference layers")
    560531  ("PredLayerIds%d",          cfg_predLayerIdsPtr, string(""), MAX_LAYERS, "inter-layer prediction layer IDs")
     
    11841155  }
    11851156#if VPS_EXTN_DIRECT_REF_LAYERS
    1186 #if M0457_PREDICTION_INDICATIONS
    11871157  for(Int layer = 0; layer < MAX_LAYERS; layer++)
    11881158  {
     
    12471217    }
    12481218  }
    1249 #else
    1250   for(Int layer = 0; layer < MAX_LAYERS; layer++)
    1251   {
    1252     Char* pRefLayerIds = cfg_refLayerIds[layer].empty() ? NULL: strdup(cfg_refLayerIds[layer].c_str());
    1253     if( m_acLayerCfg[layer].m_numDirectRefLayers > 0 )
    1254     {
    1255       char *refLayerId;
    1256       int  i=0;
    1257       m_acLayerCfg[layer].m_refLayerIds = new Int[m_acLayerCfg[layer].m_numDirectRefLayers];
    1258       refLayerId = strtok(pRefLayerIds, " ,-");
    1259       while(refLayerId != NULL)
    1260       {
    1261         if( i >= m_acLayerCfg[layer].m_numDirectRefLayers )
    1262         {
    1263           printf( "NumDirectRefLayers: The number of columns whose width are defined is larger than the allowed number of columns.\n" );
    1264           exit( EXIT_FAILURE );
    1265         }
    1266         *( m_acLayerCfg[layer].m_refLayerIds + i ) = atoi( refLayerId );
    1267         refLayerId = strtok(NULL, " ,-");
    1268         i++;
    1269       }
    1270       if( i < m_acLayerCfg[layer].m_numDirectRefLayers )
    1271       {
    1272         printf( "NumDirectRefLayers: The width of some columns is not defined.\n" );
    1273         exit( EXIT_FAILURE );
    1274       }
    1275     }
    1276     else
    1277     {
    1278       m_acLayerCfg[layer].m_refLayerIds = NULL;
    1279     }
    1280   }
    1281 #endif
     1219
    12821220#if AUXILIARY_PICTURES
    12831221  for(UInt layer = 0; layer < MAX_LAYERS; layer++)
     
    22252163  }
    22262164#if VPS_EXTN_DIRECT_REF_LAYERS
    2227 #if M0457_PREDICTION_INDICATIONS
    22282165  xConfirmPara( (m_acLayerCfg[0].m_numSamplePredRefLayers != 0) && (m_acLayerCfg[0].m_numSamplePredRefLayers != -1), "Layer 0 cannot have any reference layers" );
    22292166  // NOTE: m_numSamplePredRefLayers  (for any layer) could be -1 (not signalled in cfg), in which case only the "previous layer" would be taken for reference
     
    22482185    }
    22492186  }
    2250 #else
    2251   xConfirmPara( (m_acLayerCfg[0].m_numDirectRefLayers != 0) && (m_acLayerCfg[0].m_numDirectRefLayers != -1), "Layer 0 cannot have any reference layers" );
    2252   // NOTE: m_numDirectRefLayers  (for any layer) could be -1 (not signalled in cfg), in which case only the "previous layer" would be taken for reference
    2253   for(Int layer = 1; layer < MAX_LAYERS; layer++)
    2254   {
    2255     xConfirmPara(m_acLayerCfg[layer].m_numDirectRefLayers > layer, "Cannot reference more layers than before current layer");
    2256     for(Int i = 0; i < m_acLayerCfg[layer].m_numDirectRefLayers; i++)
    2257     {
    2258       xConfirmPara(m_acLayerCfg[layer].m_refLayerIds[i] > layer, "Cannot reference higher layers");
    2259       xConfirmPara(m_acLayerCfg[layer].m_refLayerIds[i] == layer, "Cannot reference the current layer itself");
    2260     }
    2261   }
    2262 #endif
     2187
    22632188  xConfirmPara( (m_acLayerCfg[0].m_numActiveRefLayers != 0) && (m_acLayerCfg[0].m_numActiveRefLayers != -1), "Layer 0 cannot have any active reference layers" );
    22642189  // NOTE: m_numActiveRefLayers  (for any layer) could be -1 (not signalled in cfg), in which case only the "previous layer" would be taken for reference
    22652190  for(Int layer = 1; layer < MAX_LAYERS; layer++)
    22662191  {
    2267 #if M0457_PREDICTION_INDICATIONS
    22682192    Bool predEnabledFlag[MAX_LAYERS];
    22692193    for (Int refLayer = 0; refLayer < layer; refLayer++)
     
    22892213      xConfirmPara(m_acLayerCfg[layer].m_predLayerIds[i] >= numDirectRefLayers, "Cannot reference higher layers");
    22902214    }
    2291 #else
    2292     xConfirmPara(m_acLayerCfg[layer].m_numActiveRefLayers > m_acLayerCfg[layer].m_numDirectRefLayers, "Cannot reference more layers than NumDirectRefLayers");
    2293     for(Int i = 0; i < m_acLayerCfg[layer].m_numActiveRefLayers; i++)
    2294     {
    2295       xConfirmPara(m_acLayerCfg[layer].m_predLayerIds[i] >= m_acLayerCfg[layer].m_numDirectRefLayers, "Cannot reference higher layers");
    2296     }
    2297 #endif
    2298   }
    2299 #endif
     2215  }
     2216#endif //VPS_EXTN_DIRECT_REF_LAYERS
    23002217#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    23012218  if (m_adaptiveResolutionChange > 0)
  • branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncLayerCfg.h

    r540 r560  
    4848#endif
    4949#if VPS_EXTN_DIRECT_REF_LAYERS
    50 #if M0457_PREDICTION_INDICATIONS
    5150  Int       *m_samplePredRefLayerIds;
    5251  Int       m_numSamplePredRefLayers;
    5352  Int       *m_motionPredRefLayerIds;
    5453  Int       m_numMotionPredRefLayers;
    55 #else
    56   Int       *m_refLayerIds;
    57   Int       m_numDirectRefLayers;
    58 #endif
    5954  Int       *m_predLayerIds;
    6055  Int       m_numActiveRefLayers;
     
    153148  Int*    getdQPs()                   {return m_aidQP;            }
    154149#if VPS_EXTN_DIRECT_REF_LAYERS
    155 #if M0457_PREDICTION_INDICATIONS
    156150  Int     getNumSamplePredRefLayers()    {return m_numSamplePredRefLayers;   }
    157151  Int*    getSamplePredRefLayerIds()     {return m_samplePredRefLayerIds;    }
     
    160154  Int*    getMotionPredRefLayerIds()     {return m_motionPredRefLayerIds;    }
    161155  Int     getMotionPredRefLayerId(Int i) {return m_motionPredRefLayerIds[i]; }
    162 #else
    163   Int     getNumDirectRefLayers()     {return m_numDirectRefLayers;}
    164   Int*    getRefLayerIds()            {return m_refLayerIds;      }
    165   Int     getRefLayerId(Int i)        {return m_refLayerIds[i];   }
    166 #endif
    167156
    168157  Int     getNumActiveRefLayers()     {return m_numActiveRefLayers;}
  • branches/SHM-5.0-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r559 r560  
    209209#if REF_IDX_MFM
    210210#if AVC_BASE
    211 #if M0457_PREDICTION_INDICATIONS
    212211    m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_avcBaseLayerFlag ? AVC_SYNTAX : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers());
    213212#else
    214     m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_avcBaseLayerFlag ? AVC_SYNTAX : true ));
    215 #endif
    216 #else
    217 #if M0457_PREDICTION_INDICATIONS
    218213    m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_acLayerCfg[layer].getNumMotionPredRefLayers() > 0 ) );
    219 #else
    220     m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : true);
    221 #endif
    222214#endif
    223215#endif
     
    258250    if(layer)
    259251    {
    260 #if M0457_PREDICTION_INDICATIONS
    261252      for(Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++)
    262253      {
     
    306297      }
    307298      m_acTEncTop[layer].setNumDirectRefLayers(numDirectRefLayers);
    308 #else
    309       if(m_acLayerCfg[layer].getNumDirectRefLayers() == -1)
    310       {
    311         // Not included in the configuration file; assume that each layer depends on previous layer
    312         m_acTEncTop[layer].setNumDirectRefLayers       (1);      // One ref. layer
    313         m_acTEncTop[layer].setRefLayerId               (0, layer - 1);   // Previous layer
    314       }
    315       else
    316       {
    317         m_acTEncTop[layer].setNumDirectRefLayers       ( m_acLayerCfg[layer].getNumDirectRefLayers() );
    318         for(Int i = 0; i < m_acTEncTop[layer].getNumDirectRefLayers(); i++)
    319         {
    320           m_acTEncTop[layer].setRefLayerId             ( i, m_acLayerCfg[layer].getRefLayerId(i));
    321         }
    322       }
    323 #endif
     299
    324300      if(m_acLayerCfg[layer].getNumActiveRefLayers() == -1)
    325301      {
    326 #if M0457_PREDICTION_INDICATIONS
    327302        m_acTEncTop[layer].setNumActiveRefLayers( m_acTEncTop[layer].getNumDirectRefLayers() );
    328 #else
    329         m_acTEncTop[layer].setNumActiveRefLayers( m_acLayerCfg[layer].getNumDirectRefLayers() );
    330 #endif
    331303        for( Int i = 0; i < m_acTEncTop[layer].getNumActiveRefLayers(); i++ )
    332304        {
     
    343315      }
    344316    }
    345 #endif
     317#endif //VPS_EXTN_DIRECT_REF_LAYERS
    346318    //===== Slice ========
    347319
     
    12711243      vps->setDirectDependencyFlag( layerCtr, vps->getLayerIdInVps(m_acTEncTop[layerCtr].getRefLayerId(i)), true);
    12721244    }
    1273 #if M0457_PREDICTION_INDICATIONS
     1245#if SVC_EXTENSION
     1246    // prediction indications
    12741247    vps->setDirectDepTypeLen(2); // sample and motion types are encoded
    12751248    for(Int refLayerCtr = 0; refLayerCtr < layerCtr; refLayerCtr++)
  • branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.cpp

    r559 r560  
    20762076  ::memset(m_numDirectRefLayers,   0, sizeof(m_numDirectRefLayers  ));
    20772077  ::memset(m_refLayerId,           0, sizeof(m_refLayerId          ));
    2078 #if M0457_PREDICTION_INDICATIONS
    20792078  m_directDepTypeLen = 2;
    20802079  ::memset(m_directDependencyType, 0, sizeof(m_directDependencyType));
    2081 #endif
    20822080#endif
    20832081#if DERIVE_LAYER_ID_LIST_VARIABLES
  • branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h

    r559 r560  
    530530  UInt       m_numDirectRefLayers[MAX_VPS_LAYER_ID_PLUS1];
    531531  UInt       m_refLayerId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
    532 #if M0457_PREDICTION_INDICATIONS
    533532  UInt       m_directDepTypeLen;
    534533#if O0096_DEFAULT_DEPENDENCY_TYPE
     
    537536#endif
    538537  UInt       m_directDependencyType[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
    539 #endif
    540538#endif
    541539  UInt       m_numProfileTierLevel;
     
    814812  Void   setRefLayerId(Int layerId, Int refLayerIdx, UInt refLayerId)           { m_refLayerId[layerId][refLayerIdx] = refLayerId;        }
    815813
    816 #if M0457_PREDICTION_INDICATIONS
    817814  UInt   getDirectDepTypeLen()                                                  { return m_directDepTypeLen;                              }
    818815  Void   setDirectDepTypeLen(UInt x)                                            { m_directDepTypeLen = x;                                 }
     
    825822  UInt   getDirectDependencyType(Int currLayerId, Int refLayerId)               { return m_directDependencyType[currLayerId][refLayerId]; }
    826823  Void   setDirectDependencyType(Int currLayerId, Int refLayerId, UInt x)       { m_directDependencyType[currLayerId][refLayerId] = x;    }
    827 #endif
    828824#endif
    829825  UInt   getNumProfileTierLevel()                                { return m_numProfileTierLevel; }
  • branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h

    r559 r560  
    112112#define VPS_EXTN_PROFILE_INFO            1      ///< Include profile information for layer sets in VPS extension
    113113#define VPS_EXTN_DIRECT_REF_LAYERS       1      ///< Include indication of direct dependency of layers in VPS extension
    114 #define M0457_PREDICTION_INDICATIONS     1
    115114#define M0040_ADAPTIVE_RESOLUTION_CHANGE 1
    116115#define VPS_VUI                          1      ///< Include function structure for VPS VUI
  • branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r559 r560  
    14281428  }
    14291429#endif
    1430 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS
     1430#if VPS_EXTN_DIRECT_REF_LAYERS
    14311431  READ_UVLC( uiCode,           "direct_dep_type_len_minus2"); vps->setDirectDepTypeLen(uiCode+2);
    14321432#if O0096_DEFAULT_DEPENDENCY_TYPE
  • branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r559 r560  
    845845#if SVC_EXTENSION
    846846  m_apcSlicePilot->setSliceIdx( m_uiSliceIdx ); // it should be removed if HM will reflect it in above
    847 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS
     847#if VPS_EXTN_DIRECT_REF_LAYERS
    848848  setRefLayerParams(m_apcSlicePilot->getVPS());
    849849#endif
     
    19631963#endif
    19641964
    1965 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS
     1965#if VPS_EXTN_DIRECT_REF_LAYERS
    19661966
    19671967Void TDecTop::setRefLayerParams( TComVPS* vps )
  • branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecTop.h

    r540 r560  
    117117  Int                     m_iBLSourceHeight; 
    118118#endif
    119 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS
     119#if VPS_EXTN_DIRECT_REF_LAYERS
    120120  Int                     m_numDirectRefLayers;
    121121  Int                     m_refLayerId[MAX_VPS_LAYER_ID_PLUS1];
     
    177177#if VPS_EXTN_DIRECT_REF_LAYERS
    178178  TDecTop*  getRefLayerDec(UInt refLayerIdc);
    179 #if M0457_PREDICTION_INDICATIONS
    180179  Int       getNumDirectRefLayers           ()                              { return m_numDirectRefLayers;      }
    181180  Void      setNumDirectRefLayers           (Int num)                       { m_numDirectRefLayers = num;       }
     
    206205
    207206  Void      setRefLayerParams( TComVPS* vps );
    208 #endif
    209207#endif
    210208#if AVC_BASE
  • branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r559 r560  
    10891089  }
    10901090#endif
    1091 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS
     1091#if VPS_EXTN_DIRECT_REF_LAYERS
    10921092  WRITE_UVLC( vps->getDirectDepTypeLen()-2,                           "direct_dep_type_len_minus2");
    10931093#if O0096_DEFAULT_DEPENDENCY_TYPE
  • branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCfg.h

    r540 r560  
    168168  Int       m_numActiveRefLayers;
    169169  Int       m_predLayerId[MAX_VPS_LAYER_ID_PLUS1];
    170 #if M0457_PREDICTION_INDICATIONS
    171170  Int       m_numSamplePredRefLayers;
    172171  Int       m_samplePredRefLayerId[MAX_VPS_LAYER_ID_PLUS1];
     
    175174  Bool      m_samplePredEnabledFlag[MAX_VPS_LAYER_ID_PLUS1];
    176175  Bool      m_motionPredEnabledFlag[MAX_VPS_LAYER_ID_PLUS1];
    177 #endif
    178176#endif
    179177#if N0120_MAX_TID_REF_CFG
     
    452450  Void      setPredLayerId                  (Int i, Int refLayerId)         { m_predLayerId[i] = refLayerId;    }
    453451
    454 #if M0457_PREDICTION_INDICATIONS
    455452  Int       getNumSamplePredRefLayers       ()                              { return m_numSamplePredRefLayers;  }
    456453  Void      setNumSamplePredRefLayers       (Int num)                       { m_numSamplePredRefLayers = num;   }
     
    470467  Bool      getMotionPredEnabledFlag        (Int i)                         { return m_motionPredEnabledFlag[i];  }
    471468  Void      setMotionPredEnabledFlag        (Int i,Bool flag)               { m_motionPredEnabledFlag[i] = flag;  }
    472 #endif
    473469#endif
    474470#if N0120_MAX_TID_REF_CFG
Note: See TracChangeset for help on using the changeset viewer.