Changeset 1169 in 3DVCSoftware for branches/HTM-13.1-dev0/source/Lib/TLibDecoder


Ignore:
Timestamp:
5 Apr 2015, 22:37:43 (10 years ago)
Author:
tech
Message:

Disabled chroma for depth.

Location:
branches/HTM-13.1-dev0/source/Lib/TLibDecoder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/SyntaxElementParser.cpp

    r872 r1169  
    5454    return;
    5555  }
    56 #endif
    57   fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     56  if ( !g_disableNumbering )
     57  {
     58#endif
     59  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     60#if H_MV_ENC_DEC_TRAC
     61  }
     62#endif
     63
    5864  if (length < 10)
    5965  {
     
    7581    return;
    7682  }
    77 #endif
    78   fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     83  if ( !g_disableNumbering )
     84  {
     85#endif
     86  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     87#if H_MV_ENC_DEC_TRAC
     88  }
     89#endif
    7990  fprintf( g_hTrace, "%-50s ue(v) : %u\n", pSymbolName, rValue );
    8091  fflush ( g_hTrace );
     
    89100    return;
    90101  }
    91 #endif
    92   fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     102  if ( !g_disableNumbering )
     103  {
     104#endif
     105  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     106#if H_MV_ENC_DEC_TRAC
     107  }
     108#endif
     109
    93110  fprintf( g_hTrace, "%-50s se(v) : %d\n", pSymbolName, rValue );
    94111  fflush ( g_hTrace );
     
    103120    return;
    104121  }
    105 #endif
    106   fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     122  if ( !g_disableNumbering )
     123  {
     124#endif
     125  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     126#if H_MV_ENC_DEC_TRAC
     127  }
     128#endif
    107129  fprintf( g_hTrace, "%-50s u(1)  : %d\n", pSymbolName, rValue );
    108130  fflush ( g_hTrace );
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1167 r1169  
    777777    assert(uiCode <= 3);
    778778    // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream
     779#if !H_3D_DISABLE_CHROMA
    779780    assert (uiCode == 1);
     781#endif
    780782    if( uiCode == 3 )
    781783    {
     
    14771479    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    14781480    {
    1479         READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
     1481      READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
    14801482    }
    14811483  }
     
    21192121    }
    21202122    // in the first version chroma_format_idc is equal to one, thus colour_plane_id will not be present
     2123
     2124#if H_3D_DISABLE_CHROMA
     2125    assert (sps->getChromaFormatIdc() == 1 || rpcSlice->getIsDepth() );
     2126    assert (sps->getChromaFormatIdc() == 0 || !rpcSlice->getIsDepth() );
     2127#else
    21212128    assert (sps->getChromaFormatIdc() == 1 );
     2129#endif
    21222130    // if( separate_colour_plane_flag  ==  1 )
    21232131    //   colour_plane_id                                      u(2)
     
    24202428    {
    24212429      READ_FLAG(uiCode, "slice_sao_luma_flag");  rpcSlice->setSaoEnabledFlag((Bool)uiCode);
     2430#if H_3D_DISABLE_CHROMA
     2431      if( !rpcSlice->getIsDepth() )
     2432      {
    24222433      READ_FLAG(uiCode, "slice_sao_chroma_flag");  rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode);
     2434    }
     2435      else
     2436      {
     2437        rpcSlice->setSaoEnabledFlagChroma( false );
     2438      }
     2439     
     2440#else
     2441      READ_FLAG(uiCode, "slice_sao_chroma_flag");  rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode);
     2442#endif
    24232443    }
    24242444
     
    31653185{
    31663186  wpScalingParam  *wp;
     3187#if H_3D_DISABLE_CHROMA
     3188  Bool            bChroma     = !pcSlice->getIsDepth();
     3189#else
    31673190  Bool            bChroma     = true; // color always present in HEVC ?
     3191#endif
    31683192  SliceType       eSliceType  = pcSlice->getSliceType();
    31693193  Int             iNbRef       = (eSliceType == B_SLICE ) ? (2) : (1);
    31703194  UInt            uiLog2WeightDenomLuma, uiLog2WeightDenomChroma;
    31713195  UInt            uiTotalSignalledWeightFlags = 0;
    3172  
     3196
    31733197  Int iDeltaDenom;
    31743198  // decode delta_luma_log2_weight_denom :
     
    31823206    uiLog2WeightDenomChroma = (UInt)(iDeltaDenom + uiLog2WeightDenomLuma);
    31833207  }
     3208  else
     3209#if H_3D_DISABLE_CHROMA
     3210  {
     3211    uiLog2WeightDenomChroma = 0;
     3212  }
     3213#endif
     3214
    31843215
    31853216  for ( Int iNumRef=0 ; iNumRef<iNbRef ; iNumRef++ )
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1163 r1169  
    176176    decodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx, uiDepth );
    177177#if H_3D_DIM_SDC
     178#if H_3D_DISABLE_CHROMA
     179    if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() )
     180#else
    178181    if(!pcCU->getSDCFlag(uiAbsPartIdx))
     182#endif
    179183#endif
    180184    decodeIntraDirModeChroma( pcCU, uiAbsPartIdx, uiDepth );
     
    541545Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU)
    542546{
     547
     548#if H_MV_ENC_DEC_TRAC
     549  UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
     550  UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
     551 
     552  DTRACE_TU_S("=========== transform_tree ===========\n")
     553  DTRACE_TU("x0", uiLPelX)
     554  DTRACE_TU("x1", uiTPelY)
     555  DTRACE_TU("log2TrafoSize", g_uiMaxCUWidth>>uiDepth)
     556  DTRACE_TU("trafoDepth"  , uiDepth)
     557#endif
     558
    543559  UInt uiSubdiv;
    544560  const UInt uiLog2TrafoSize = g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()]+2 - uiDepth;
     
    593609    if( bFirstCbfOfCU || uiLog2TrafoSize > 2 )
    594610    {
     611#if H_3D_DISABLE_CHROMA
     612      if (!pcCU->getSlice()->getIsDepth() )     
     613      {
    595614      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
    596615      {
     
    601620        m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );
    602621      }
     622    }
     623    else
     624    {
     625        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
     626        {
     627          pcCU->setCbfSubParts( 0, TEXT_CHROMA_U, uiAbsPartIdx, uiTrDepth - 1 );
     628        }
     629        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )
     630        {
     631          pcCU->setCbfSubParts( 0, TEXT_CHROMA_V, uiAbsPartIdx, uiTrDepth - 1 );
     632        }
     633      }
     634#else
     635      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
     636      {
     637        m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth );
     638      }
     639      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )
     640      {
     641        m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );
     642      }
     643#endif
    603644    }
    604645    else
     
    762803    assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
    763804    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
     805#if H_3D_DISABLE_CHROMA
     806    if (!pcCU->getSlice()->getIsDepth() )
     807    {
     808      assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     809      assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
     810    }
     811#else
    764812    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
    765813    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
     814#endif
    766815  }
    767816
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp

    r1163 r1169  
    501501    }
    502502
     503
     504#if H_3D_DISABLE_CHROMA
     505    if( !pcCU->getSlice()->getIsDepth() )
     506    {   
     507#endif
    503508    piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;
    504509    uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
     
    532537      piPCMSample += uiWidth;
    533538    }
     539#if H_3D_DISABLE_CHROMA
     540    }
     541#endif
     542
    534543
    535544    m_pcTDecBinIf->start();
     
    13661375  DTRACE_CABAC_V( uiLog2TransformBlockSize )
    13671376  DTRACE_CABAC_T( "\n" )
     1377#else
     1378  DTRACE_TU("split_transform_flag", ruiSubdivFlag )
    13681379#endif
    13691380}
     
    14441455  DTRACE_CABAC_V( uiAbsPartIdx )
    14451456  DTRACE_CABAC_T( "\n" )
     1457#else
     1458  if ( eType == TEXT_CHROMA_U )
     1459  {
     1460    DTRACE_TU("cbf_cb", uiSymbol )
     1461  }
     1462  else if ( eType == TEXT_CHROMA_V )
     1463  {
     1464    DTRACE_TU("cbf_cr", uiSymbol )
     1465  }
     1466  else
     1467  {
     1468    DTRACE_TU("cbf_luma", uiSymbol )
     1469  }
    14461470#endif
    14471471 
Note: See TracChangeset for help on using the changeset viewer.