Changeset 1200 in SHVCSoftware for branches/SHM-dev/source


Ignore:
Timestamp:
8 Jul 2015, 20:22:40 (9 years ago)
Author:
seregin
Message:

macro cleanup: O0194_DIFFERENT_BITDEPTH_EL_BL

Location:
branches/SHM-dev/source
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r1177 r1200  
    289289#endif
    290290    {
    291 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    292       //Bug fix: The bit depth was not set correctly for each layer when doing DBF
     291      // Set bitdepth for each layer when doing DBF
    293292      g_bitDepth[CHANNEL_TYPE_LUMA]   = g_bitDepthLayer[CHANNEL_TYPE_LUMA][curLayerId];
    294293      g_bitDepth[CHANNEL_TYPE_CHROMA] = g_bitDepthLayer[CHANNEL_TYPE_CHROMA][curLayerId];
    295 #endif
     294
    296295      if (!loopFiltered[curLayerId] || bitstreamFile)
    297296      {
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1182 r1200  
    822822  Bool*   cfg_RCForceIntraQP       [MAX_LAYERS];
    823823#endif
    824 #if O0194_DIFFERENT_BITDEPTH_EL_BL
     824
    825825  Int*    cfg_InputBitDepth    [MAX_NUM_CHANNEL_TYPE][MAX_LAYERS];
    826826  Int*    cfg_InternalBitDepth [MAX_NUM_CHANNEL_TYPE][MAX_LAYERS];
    827827  Int*    cfg_OutputBitDepth   [MAX_NUM_CHANNEL_TYPE][MAX_LAYERS];
    828 #endif
     828
    829829  Int*    cfg_maxTidIlRefPicsPlus1[MAX_LAYERS];
    830830#if Q0074_COLOUR_REMAPPING_SEI
     
    915915    cfg_RCForceIntraQP[layer]        = &m_acLayerCfg[layer].m_RCForceIntraQP;
    916916#endif
    917 #if O0194_DIFFERENT_BITDEPTH_EL_BL
     917
    918918    cfg_InputBitDepth   [CHANNEL_TYPE_LUMA][layer] = &m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_LUMA];
    919919    cfg_InternalBitDepth[CHANNEL_TYPE_LUMA][layer] = &m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA];
     
    922922    cfg_InputBitDepth   [CHANNEL_TYPE_CHROMA][layer] = &m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_CHROMA];
    923923    cfg_OutputBitDepth  [CHANNEL_TYPE_CHROMA][layer] = &m_acLayerCfg[layer].m_outputBitDepth[CHANNEL_TYPE_CHROMA];
    924 #endif
     924
    925925    cfg_maxTidIlRefPicsPlus1[layer] = &m_acLayerCfg[layer].m_maxTidIlRefPicsPlus1;
    926926#if AUXILIARY_PICTURES
     
    10881088#endif
    10891089  ("BitstreamFile,b",                               cfg_BitstreamFile, string(""), "Bitstream output file name")
    1090 #if !O0194_DIFFERENT_BITDEPTH_EL_BL
    1091   ("InputBitDepth",                                 m_inputBitDepthY,                                        8, "Bit-depth of input file")
    1092   ("OutputBitDepth",                                m_outputBitDepthY,                                       0, "Bit-depth of output file (default:InternalBitDepth)")
    1093   ("InternalBitDepth",                              m_internalBitDepthY,                                     0, "Bit-depth the codec operates at. (default:InputBitDepth)"
    1094                                                                                                                 "If different to InputBitDepth, source data will be converted")
    1095   ("InputBitDepthC",                                m_inputBitDepthC,                                        0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)")
    1096   ("OutputBitDepthC",                               m_outputBitDepthC,                                       0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")
    1097   ("InternalBitDepthC",                             m_internalBitDepthC,                                     0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")
    1098 #endif
    10991090  ("NumRefLocationOffsets%d",                       cfg_numRefLayerLocationOffsets,              0, MAX_LAYERS,  "Number of reference layer offset sets ")
    11001091  ("RefLocationOffsetLayerId%d",                    cfg_refLocationOffsetLayerIdPtr,    string(""), MAX_LAYERS, "Layer ID of reference location offset")
     
    11251116  ("SEIColourRemappingInfoFileRoot%d",              cfg_colourRemapSEIFileRoot,           string(""), MAX_LAYERS, "Colour Remapping Information SEI parameters file name for layer %d")
    11261117#endif
    1127 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    11281118  ("InputBitDepth%d",                                cfg_InputBitDepth[CHANNEL_TYPE_LUMA],      8, MAX_LAYERS, "Bit-depth of input file for layer %d")
    11291119  ("InternalBitDepth%d",                             cfg_InternalBitDepth[CHANNEL_TYPE_LUMA],   0, MAX_LAYERS, "Bit-depth the codec operates at. (default:InputBitDepth) for layer %d "
     
    11331123  ("InternalBitDepthC%d",                            cfg_InternalBitDepth[CHANNEL_TYPE_CHROMA], 0, MAX_LAYERS, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth) for layer %d")
    11341124  ("OutputBitDepthC%d",                              cfg_OutputBitDepth[CHANNEL_TYPE_CHROMA],   0, MAX_LAYERS, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")
    1135 #endif
     1125
    11361126  ("MaxTidRefPresentFlag",                           m_maxTidRefPresentFlag,                            false, "max_tid_ref_present_flag (0: not present, 1: present) " )
    11371127  ("MaxTidIlRefPicsPlus1%d",                         cfg_maxTidIlRefPicsPlus1,                  7, MAX_LAYERS, "allowed maximum temporal_id for inter-layer prediction")
     
    18321822 
    18331823  /* rules for input, output and internal bitdepths as per help text */
    1834 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    1835   for(Int layer = 0; layer < MAX_LAYERS; layer++)
     1824#if SVC_EXTENSION
     1825  for( Int layer = 0; layer < MAX_LAYERS; layer++ )
    18361826  {
    18371827    if( m_acLayerCfg[layer].m_layerId < 0 )
     
    18541844    m_acLayerCfg[layer].m_useHighPrecisionPredictionWeighting = false;
    18551845    m_acLayerCfg[layer].m_useExtendedPrecision = false;
    1856   }
    1857 #else
    1858   /* rules for input, output and internal bitdepths as per help text */
    1859   if (m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ] == 0) { m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ] = m_inputBitDepth      [CHANNEL_TYPE_LUMA  ]; }
    1860   if (m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] == 0) { m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] = m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ]; }
    1861   if (m_internalBitDepth   [CHANNEL_TYPE_LUMA  ] == 0) { m_internalBitDepth   [CHANNEL_TYPE_LUMA  ] = m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ]; }
    1862   if (m_internalBitDepth   [CHANNEL_TYPE_CHROMA] == 0) { m_internalBitDepth   [CHANNEL_TYPE_CHROMA] = m_internalBitDepth   [CHANNEL_TYPE_LUMA  ]; }
    1863   if (m_inputBitDepth      [CHANNEL_TYPE_CHROMA] == 0) { m_inputBitDepth      [CHANNEL_TYPE_CHROMA] = m_inputBitDepth      [CHANNEL_TYPE_LUMA  ]; }
    1864   if (m_outputBitDepth     [CHANNEL_TYPE_LUMA  ] == 0) { m_outputBitDepth     [CHANNEL_TYPE_LUMA  ] = m_internalBitDepth   [CHANNEL_TYPE_LUMA  ]; }
    1865   if (m_outputBitDepth     [CHANNEL_TYPE_CHROMA] == 0) { m_outputBitDepth     [CHANNEL_TYPE_CHROMA] = m_internalBitDepth   [CHANNEL_TYPE_CHROMA]; }
    1866 
    1867   m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat);
    1868   m_chromaFormatIDC      = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat)));
    1869 #endif
    1870 
    1871 #if SVC_EXTENSION
    1872   for( Int layer = 0; layer < MAX_LAYERS; layer++)
    1873   {
     1846
    18741847    if( m_acLayerCfg[layer].m_layerSwitchOffBegin < m_acLayerCfg[layer].m_layerSwitchOffEnd )
    18751848    {
     
    19721945  }
    19731946#else
     1947 /* rules for input, output and internal bitdepths as per help text */
     1948  if (m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ] == 0) { m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ] = m_inputBitDepth      [CHANNEL_TYPE_LUMA  ]; }
     1949  if (m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] == 0) { m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] = m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ]; }
     1950  if (m_internalBitDepth   [CHANNEL_TYPE_LUMA  ] == 0) { m_internalBitDepth   [CHANNEL_TYPE_LUMA  ] = m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ]; }
     1951  if (m_internalBitDepth   [CHANNEL_TYPE_CHROMA] == 0) { m_internalBitDepth   [CHANNEL_TYPE_CHROMA] = m_internalBitDepth   [CHANNEL_TYPE_LUMA  ]; }
     1952  if (m_inputBitDepth      [CHANNEL_TYPE_CHROMA] == 0) { m_inputBitDepth      [CHANNEL_TYPE_CHROMA] = m_inputBitDepth      [CHANNEL_TYPE_LUMA  ]; }
     1953  if (m_outputBitDepth     [CHANNEL_TYPE_LUMA  ] == 0) { m_outputBitDepth     [CHANNEL_TYPE_LUMA  ] = m_internalBitDepth   [CHANNEL_TYPE_LUMA  ]; }
     1954  if (m_outputBitDepth     [CHANNEL_TYPE_CHROMA] == 0) { m_outputBitDepth     [CHANNEL_TYPE_CHROMA] = m_internalBitDepth   [CHANNEL_TYPE_CHROMA]; }
     1955
     1956  m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat);
     1957  m_chromaFormatIDC      = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat)));
     1958
    19741959  if (extendedProfile >= 1000 && extendedProfile <= 2316)
    19751960  {
     
    42754260  g_auiLayerMaxCUDepth[layerId] = m_acLayerCfg[layerId].m_uiMaxCUDepth;
    42764261 
    4277 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    42784262  // set internal bit-depth to constant value to make sure to be updated later
    42794263  g_bitDepthY = -1;
     
    42824266  g_uiPCMBitDepthLuma = -1;
    42834267  g_uiPCMBitDepthChroma = -1;
    4284 #else
    4285   // set internal bit-depth and constants
    4286   g_bitDepthY = m_internalBitDepthY;
    4287   g_bitDepthC = m_internalBitDepthC;
    4288  
    4289   g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_inputBitDepthY : m_internalBitDepthY;
    4290   g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_inputBitDepthC : m_internalBitDepthC;
    4291 #endif
    42924268}
    42934269#else
     
    44434419  printf("QP adaptation                     : %d (range=%d)\n", m_bUseAdaptiveQP, (m_bUseAdaptiveQP ? m_iQPAdaptationRange : 0) );
    44444420  printf("GOP size                          : %d\n", m_iGOPSize );
    4445 #if !O0194_DIFFERENT_BITDEPTH_EL_BL
     4421#if !SVC_EXTENSION
    44464422  printf("Input bit depth                   : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] );
    44474423  printf("MSB-extended bit depth            : (Y:%d, C:%d)\n", m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] );
     
    44564432  printf("Single significance map context   : %s\n", (m_useSingleSignificanceMapContext        ? "Enabled" : "Disabled") );
    44574433  printf("Cross-component prediction        : %s\n", (m_useCrossComponentPrediction            ? (m_reconBasedCrossCPredictionEstimate ? "Enabled (reconstructed-residual-based estimate)" : "Enabled (encoder-side-residual-based estimate)") : "Disabled") );
    4458 #if !O0194_DIFFERENT_BITDEPTH_EL_BL
     4434#if !SVC_EXTENSION
    44594435  printf("High-precision prediction weight  : %s\n", (m_useHighPrecisionPredictionWeighting    ? "Enabled" : "Disabled") );
    44604436#endif
     
    44944470
    44954471  printf("TOOL CFG: ");
    4496 #if !O0194_DIFFERENT_BITDEPTH_EL_BL
     4472#if !SVC_EXTENSION
    44974473  printf("IBD:%d ", ((g_bitDepth[CHANNEL_TYPE_LUMA] > m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA]) || (g_bitDepth[CHANNEL_TYPE_CHROMA] > m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA])));
    44984474#endif
     
    45604536  printf("ENCODER_FAST_MODE: %d ", ENCODER_FAST_MODE);
    45614537  printf("REF_IDX_MFM: %d ", REF_IDX_MFM);
    4562   printf("O0194_DIFFERENT_BITDEPTH_EL_BL: %d ", O0194_DIFFERENT_BITDEPTH_EL_BL);
    45634538  printf("O0194_JOINT_US_BITSHIFT: %d ", O0194_JOINT_US_BITSHIFT);
    45644539#else
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1182 r1200  
    229229 
    230230  // coding tools (bit-depth)
    231 #if !O0194_DIFFERENT_BITDEPTH_EL_BL
     231#if !SVC_EXTENSION
    232232  Int       m_inputBitDepth   [MAX_NUM_CHANNEL_TYPE];         ///< bit-depth of input file
    233233  Int       m_outputBitDepth  [MAX_NUM_CHANNEL_TYPE];         ///< bit-depth of output file
     
    236236  Bool      m_useExtendedPrecision;
    237237  Bool      m_useHighPrecisionPredictionWeighting;
    238 #endif
     238
    239239  //coding tools (chroma format)
    240 #if !SVC_EXTENSION
    241240  ChromaFormat m_chromaFormatIDC;
    242241#endif
     
    540539  Int  getNumLayer()               {return m_numLayers;         }
    541540  Int  getGOPSize()                {return m_iGOPSize;          }
    542 #if O0194_DIFFERENT_BITDEPTH_EL_BL
     541
    543542  UInt getInternalBitDepth(Int iLayer, ChannelType type)      {return m_acLayerCfg[iLayer].m_internalBitDepth[type]; }
    544   Bool getPCMInputBitDepthFlag()             {return m_bPCMInputBitDepthFlag;                  }
    545 #else
    546   UInt getInternalBitDepth( ChannelType type )      {return m_internalBitDepth[type]; } 
    547 #endif
     543  Bool getPCMInputBitDepthFlag()                              {return m_bPCMInputBitDepthFlag;                       }
     544
    548545#if !LAYER_CTB
    549546  UInt getMaxCUWidth()             {return m_uiMaxCUWidth;      }
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp

    r1182 r1200  
    221221  printf("Internal Format                   : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate );
    222222  printf("PTL index                         : %d\n", m_layerPTLIdx );
    223 #if O0194_DIFFERENT_BITDEPTH_EL_BL
     223#if SVC_EXTENSION
    224224  printf("Input bit depth                   : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] );
    225225  printf("Internal bit depth                : (Y:%d, C:%d)\n", m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA] );
     
    411411  }
    412412
    413 #if O0194_DIFFERENT_BITDEPTH_EL_BL
     413#if SVC_EXTENSION
    414414  xConfirmPara( m_iQP <  -6 * (m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8) || m_iQP > 51,                "QP exceeds supported range (-QpBDOffsety to 51)" );
    415415#else
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1199 r1200  
    108108          && m_acLayerCfg[layer].getChromaFormatIDC() == m_acLayerCfg[idx].getChromaFormatIDC()
    109109#endif
    110 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    111110          && m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA] == m_acLayerCfg[idx].m_internalBitDepth[CHANNEL_TYPE_LUMA] && m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA] == m_acLayerCfg[idx].m_internalBitDepth[CHANNEL_TYPE_CHROMA]
    112 #endif
    113111          )
    114112        {
     
    174172#endif
    175173    repFormat->setSeparateColourPlaneVpsFlag                              ( 0 );  // Need modification to change for each layer
    176 #if O0194_DIFFERENT_BITDEPTH_EL_BL
     174
    177175    repFormat->setBitDepthVpsLuma                                         ( getInternalBitDepth(mapIdxToLayer[idx], CHANNEL_TYPE_LUMA)      );  // Need modification to change for each layer
    178176    repFormat->setBitDepthVpsChroma                                       ( getInternalBitDepth(mapIdxToLayer[idx], CHANNEL_TYPE_CHROMA)    );  // Need modification to change for each layer
    179 #else
    180     repFormat->setBitDepthVpsLuma                                         ( getInternalBitDepth(CHANNEL_TYPE_LUMA)                        );  // Need modification to change for each layer
    181     repFormat->setBitDepthVpsChroma                                       ( getInternalBitDepth(CHANNEL_TYPE_CHROMA)                      );  // Need modification to change for each layer
    182 #endif
    183177
    184178    repFormat->getConformanceWindowVps().setWindow                        ( m_acLayerCfg[mapIdxToLayer[idx]].m_confWinLeft,                                                                             
     
    223217  for(UInt layer=0; layer<m_numLayers; layer++)
    224218  {
    225 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    226219    //1
    227220    g_bitDepth[CHANNEL_TYPE_LUMA]   = m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA];
     
    237230#if O0194_WEIGHTED_PREDICTION_CGS
    238231    m_acTEncTop[layer].setInterLayerWeightedPredFlag                      ( m_useInterLayerWeightedPred );
    239 #endif
    240232#endif
    241233   
     
    11031095  for(UInt layer=0; layer<m_numLayers; layer++)
    11041096  {
    1105 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    11061097    //2
    11071098    for( UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++)
     
    11101101      g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex];
    11111102    }
    1112 #endif
     1103
    11131104#if LAYER_CTB
    11141105    g_uiMaxCUWidth  = g_auiLayerMaxCUWidth[layer];
     
    11181109#endif
    11191110    // Video I/O
    1120 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    11211111    m_acTVideoIOYuvInputFile[layer].open( (Char *)m_acLayerCfg[layer].getInputFile().c_str(),  false, m_acLayerCfg[layer].m_inputBitDepth, m_acLayerCfg[layer].m_MSBExtendedBitDepth, m_acLayerCfg[layer].m_internalBitDepth );  // read  mode
    1122 #else
    1123     m_acTVideoIOYuvInputFile[layer].open( (Char *)m_acLayerCfg[layer].getInputFile().c_str(),  false, m_inputBitDepth, m_MSBExtendedBitDepth, m_internalBitDepth );  // read  mode
    1124 #endif
    11251112    m_acTVideoIOYuvInputFile[layer].skipFrames(m_FrameSkip, m_acLayerCfg[layer].getSourceWidth() - m_acLayerCfg[layer].getPad()[0], m_acLayerCfg[layer].getSourceHeight() - m_acLayerCfg[layer].getPad()[1], m_acLayerCfg[layer].m_InputChromaFormatIDC);
    11261113
    1127     if (!m_acLayerCfg[layer].getReconFile().empty())
    1128     {
    1129 #if O0194_DIFFERENT_BITDEPTH_EL_BL
     1114    if( !m_acLayerCfg[layer].getReconFile().empty() )
     1115    {
    11301116      m_acTVideoIOYuvReconFile[layer].open((Char *)m_acLayerCfg[layer].getReconFile().c_str(), true, m_acLayerCfg[layer].m_outputBitDepth, m_acLayerCfg[layer].m_MSBExtendedBitDepth, m_acLayerCfg[layer].m_internalBitDepth );  // write mode
    1131 #else
    1132       m_acTVideoIOYuvReconFile[layer].open((Char *)m_acLayerCfg[layer].getReconFile().c_str(), true, m_outputBitDepth, m_MSBExtendedBitDepth, m_internalBitDepth );  // write mode
    1133 #endif
    11341117    }
    11351118
     
    12121195  for(UInt layer=0; layer<m_numLayers; layer++)
    12131196  {
    1214 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    12151197    //3
    12161198    for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++)
     
    12191201      g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex];
    12201202    }
    1221 #endif
    12221203#if LAYER_CTB
    12231204    g_uiMaxCUWidth  = g_auiLayerMaxCUWidth[layer];
     
    12551236        Int layerId = m_layerSetLayerIdList[setId][i];
    12561237        Int layerIdx = vps->getLayerIdxInVps(m_layerSetLayerIdList[setId][i]);
    1257 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    12581238        //4
    12591239        g_bitDepth[CHANNEL_TYPE_LUMA]   = m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_LUMA];
     
    12621242        g_PCMBitDepth[CHANNEL_TYPE_LUMA]   = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_LUMA]   : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_LUMA];
    12631243        g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_CHROMA];
    1264 #endif
    12651244
    12661245        vps->setLayerIdIncludedFlag(true, setId, layerId);
     
    12761255      for (Int layerIdx = 0; layerIdx <= vps->getMaxLayers(); layerIdx++)
    12771256      {
    1278 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    12791257        //4
    12801258        UInt layerId = vps->getLayerIdInNuh(layerIdx);
     
    12841262        g_PCMBitDepth[CHANNEL_TYPE_LUMA]   = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_LUMA]   : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_LUMA];
    12851263        g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerIdx].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layerIdx].m_internalBitDepth[CHANNEL_TYPE_CHROMA];
    1286 #endif
     1264
    12871265        if (layerId <= setId)
    12881266        {
     
    17261704  for(UInt layer=0; layer<m_numLayers; layer++)
    17271705  {
    1728 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    17291706    //5
    17301707    g_bitDepth[CHANNEL_TYPE_LUMA]   = m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA];
     
    17331710    g_PCMBitDepth[CHANNEL_TYPE_LUMA]   = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA];
    17341711    g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA];
    1735 #endif
     1712
    17361713    // allocate original YUV buffer
    17371714    pcPicYuvOrg[layer] = new TComPicYuv;
     
    17671744      for(UInt layer=0; layer<m_numLayers; layer++)
    17681745      {
    1769 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    17701746        //6
    17711747        for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++)
     
    17741750          g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex];
    17751751        }
    1776 #endif
    17771752#if LAYER_CTB
    17781753        g_uiMaxCUWidth  = g_auiLayerMaxCUWidth[layer];
     
    18541829
    18551830    // loop through frames in one GOP
    1856     for ( UInt iPicIdInGOP=0; iPicIdInGOP < (bFirstFrame? 1:m_iGOPSize); iPicIdInGOP++ )
     1831    for( UInt iPicIdInGOP=0; iPicIdInGOP < (bFirstFrame? 1:m_iGOPSize); iPicIdInGOP++ )
    18571832    {
    18581833      // layer by layer for each frame
    1859       for(UInt layer=0; layer<m_numLayers; layer++)
    1860       {
    1861 #if O0194_DIFFERENT_BITDEPTH_EL_BL
     1834      for( UInt layer=0; layer<m_numLayers; layer++ )
     1835      {
    18621836        //7
    1863         for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++)
     1837        for( UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++ )
    18641838        {
    18651839          g_bitDepth[channelTypeIndex]    = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex];
    18661840          g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex];
    18671841        }
    1868 #endif
    18691842#if LAYER_CTB
    18701843        g_uiMaxCUWidth  = g_auiLayerMaxCUWidth[layer];
     
    19261899
    19271900    iTotalNumEncoded = 0;
    1928     for(UInt layer=0; layer<m_numLayers; layer++)
    1929     {
    1930 #if O0194_DIFFERENT_BITDEPTH_EL_BL
     1901    for( UInt layer=0; layer<m_numLayers; layer++ )
     1902    {
    19311903      //8
    1932       for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++)
     1904      for( UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++ )
    19331905      {
    19341906        g_bitDepth[channelTypeIndex]    = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex];
    19351907        g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex];
    19361908      }
    1937 #endif
     1909
    19381910      // write bistream to file if necessary
    19391911      iNumEncoded = m_acTEncTop[layer].getNumPicRcvd();
  • branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h

    r1177 r1200  
    140140extern Int g_bitDepth[MAX_NUM_CHANNEL_TYPE];
    141141
    142 #if O0194_DIFFERENT_BITDEPTH_EL_BL
     142#if SVC_EXTENSION
    143143extern Int  g_bitDepthLayer[MAX_NUM_CHANNEL_TYPE][MAX_LAYERS];
    144144#endif
  • branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp

    r1029 r1200  
    678678UInt g_predefSetIntraModes[NUM_INTRA_MODE-1] = {26,10,18,34,2,22,14,30,6,24,12,28,8,20,16,32,4,17,19,15,21,13,23,11,25,9,27,7,29,5,31,3,33,0,2};
    679679#endif
    680 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    681680Int  g_bitDepthLayer[MAX_NUM_CHANNEL_TYPE][MAX_LAYERS];
    682 #endif
    683681#if O0194_WEIGHTED_PREDICTION_CGS
    684682void * g_refWeightACDCParam; // type=wpACDCParam
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r1199 r1200  
    515515                            );
    516516
    517 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    518517        Bool sameBitDepths = ( g_bitDepthLayer[CHANNEL_TYPE_LUMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId] ) && ( g_bitDepthLayer[CHANNEL_TYPE_CHROMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_CHROMA][refLayerId] );
    519518
     
    525524#endif
    526525          ) // ratio 1x
    527 #else
    528         if(!( g_posScalingFactor[refLayerIdc][0] == 65536 && g_posScalingFactor[refLayerIdc][1] == 65536 ) || (!scalingOffset)) // ratio 1x
    529 #endif
    530526        {
    531527          UInt predType = m_pcVPS->getDirectDependencyType( m_layerId, refLayerId ) + 1;
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1199 r1200  
    5858#define O0164_MULTI_LAYER_HRD            1      ///< JCTVC-O0164: Multi-layer HRD operation
    5959
    60 #define O0194_DIFFERENT_BITDEPTH_EL_BL   1      ///< JCTVC-O0194: Support for different bitdepth values for BL and EL, add required configuration parameters (and Some bugfixes when REPN_FORMAT_IN_VPS (JCTVC-N0092) is enabled)
    61 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    6260#define O0194_JOINT_US_BITSHIFT          1      ///< JCTVC-O0194: Joint Upsampling and bit-shift
    63 #endif
    6461#define Q0048_CGS_3D_ASYMLUT             1      ///< JCTVC-Q0048: Colour gamut scalability with look-up table
    6562#if Q0048_CGS_3D_ASYMLUT
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1199 r1200  
    17901790
    17911791#if REPN_FORMAT_IN_VPS
    1792 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    17931792    g_bitDepthLayer[CHANNEL_TYPE_LUMA][pcSlice->getLayerId()] = pcSlice->getBitDepthY();
    17941793    g_bitDepthLayer[CHANNEL_TYPE_CHROMA][pcSlice->getLayerId()] = pcSlice->getBitDepthC();
    1795 #endif
     1794
    17961795    assert( pcSlice->getSliceQp() >= -pcSlice->getQpBDOffsetY() );
    17971796#else   
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1199 r1200  
    567567      pBLPic->getSlice(0)->setVPS( activeVPS );
    568568
    569 #if O0194_DIFFERENT_BITDEPTH_EL_BL
    570569      g_bitDepthLayer[CHANNEL_TYPE_LUMA][0] = repFormat->getBitDepthVpsLuma();
    571570      g_bitDepthLayer[CHANNEL_TYPE_CHROMA][0] = repFormat->getBitDepthVpsChroma();
    572 #endif
    573571    }
    574572  }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r1199 r1200  
    611611
    612612#if SVC_EXTENSION //Temporal solution, should be modified
    613       if(m_layerId > 0)
    614       {
    615         for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ )
     613      if( m_layerId > 0 )
     614      {
     615        for( UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ )
    616616        {
    617617          const Window scalEL = getPPS()->getScaledRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i));
     
    621621
    622622          TEncTop *pcEncTopBase = (TEncTop *)getRefLayerEnc( i );
    623 #if O0194_DIFFERENT_BITDEPTH_EL_BL
     623
    624624          UInt refLayerId = m_cVPS.getRefLayerId(m_layerId, i);
    625625          Bool sameBitDepths = ( g_bitDepthLayer[CHANNEL_TYPE_LUMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId] ) && ( g_bitDepthLayer[CHANNEL_TYPE_CHROMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_CHROMA][refLayerId] );
     
    644644#endif
    645645            )
    646 #else
    647           if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight()
    648             || !equalOffsets
    649             || !zeroPhase
    650           )
    651 #endif
    652646          {
    653647            pcEPic->setSpatialEnhLayerFlag( i, true );
     
    658652        }
    659653      }
    660 #endif
    661 
    662 #if SVC_EXTENSION
     654
    663655      pcEPic->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1 ,
    664656                      m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics, &m_cSPS);
     
    673665
    674666#if SVC_EXTENSION //Temporal solution, should be modified
    675       if(m_layerId > 0)
    676       {
    677         for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ )
     667      if( m_layerId > 0 )
     668      {
     669        for( UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ )
    678670        {
    679671          const Window scalEL = getPPS()->getScaledRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i));
     
    683675
    684676          TEncTop *pcEncTopBase = (TEncTop *)getRefLayerEnc( i );
    685 #if O0194_DIFFERENT_BITDEPTH_EL_BL
     677
    686678          UInt refLayerId = m_cVPS.getRefLayerId(m_layerId, i);
    687679          Bool sameBitDepths = ( g_bitDepthLayer[CHANNEL_TYPE_LUMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId] ) && ( g_bitDepthLayer[CHANNEL_TYPE_CHROMA][m_layerId] == g_bitDepthLayer[CHANNEL_TYPE_CHROMA][refLayerId] );
     
    696688            || pcEncTopBase->getSPS()->getMaxCUWidth() != m_cSPS.getMaxCUWidth() || pcEncTopBase->getSPS()->getMaxCUHeight() != m_cSPS.getMaxCUHeight() || pcEncTopBase->getSPS()->getMaxCUDepth() != m_cSPS.getMaxCUDepth()
    697689#endif
    698 )
    699 #else
    700           if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight()
    701             || !equalOffsets
    702             || !zeroPhase
    703           )
    704 #endif
     690            )
    705691          {
    706692            rpcPic->setSpatialEnhLayerFlag( i, true );
     
    711697        }
    712698      }
    713 #endif
    714 
    715 #if SVC_EXTENSION
     699
    716700      rpcPic->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics, &m_cSPS);
    717701#else  //SVC_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.