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


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

Disabled chroma for depth.

Location:
branches/HTM-13.1-dev0
Files:
1 added
19 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp

    r1164 r1169  
    16811681Void TAppEncTop::xSetRepFormat( TComVPS& vps )
    16821682{
     1683
     1684#if H_3D_DISABLE_CHROMA
     1685  Bool anyDepth = false;
     1686  for ( Int i = 0; i < m_numberOfLayers; i++ )
     1687  {
     1688    vps.setVpsRepFormatIdx( i, m_depthFlag[ i ] ? 1 : 0 );
     1689    anyDepth = anyDepth || m_depthFlag[ i ];
     1690  } 
     1691
     1692  vps.setRepFormatIdxPresentFlag( anyDepth );
     1693  vps.setVpsNumRepFormatsMinus1 ( anyDepth ? 1 : 0  );
     1694
     1695  for ( Int j = 0; j <= vps.getVpsNumRepFormatsMinus1(); j++ )
     1696  {
     1697    TComRepFormat* repFormat = new TComRepFormat;
     1698
     1699    repFormat->setBitDepthVpsChromaMinus8   ( g_bitDepthC - 8 );
     1700    repFormat->setBitDepthVpsLumaMinus8     ( g_bitDepthY - 8 );
     1701    repFormat->setChromaFormatVpsIdc        ( j == 1 ? CHROMA_400 : CHROMA_420 );
     1702    repFormat->setPicHeightVpsInLumaSamples ( m_iSourceHeight );
     1703    repFormat->setPicWidthVpsInLumaSamples  ( m_iSourceWidth  );   
     1704    repFormat->setChromaAndBitDepthVpsPresentFlag( true );   
     1705    // ToDo not supported yet.
     1706    //repFormat->setSeparateColourPlaneVpsFlag( );
     1707#if H_MV_FIX_CONF_WINDOW
     1708    Bool conformanceWindowVpsFlag = ( m_confWinBottom != 0 ) || ( m_confWinRight != 0 ) || ( m_confWinTop != 0 ) || ( m_confWinBottom != 0 );
     1709    repFormat->setConformanceWindowVpsFlag( conformanceWindowVpsFlag );
     1710    if ( conformanceWindowVpsFlag )
     1711    {   
     1712      repFormat->setConfWinVpsLeftOffset    ( m_confWinLeft   / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) );
     1713      repFormat->setConfWinVpsRightOffset   ( m_confWinRight  / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() )  );
     1714      repFormat->setConfWinVpsTopOffset     ( m_confWinTop    / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() )  );
     1715      repFormat->setConfWinVpsBottomOffset  ( m_confWinBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) );
     1716    }
     1717#else
     1718    repFormat->setConformanceWindowVpsFlag( true );
     1719    repFormat->setConfWinVpsLeftOffset    ( m_confWinLeft   / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) );
     1720    repFormat->setConfWinVpsRightOffset   ( m_confWinRight  / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() )  );
     1721    repFormat->setConfWinVpsTopOffset     ( m_confWinTop    / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() )  );
     1722    repFormat->setConfWinVpsBottomOffset  ( m_confWinBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) );
     1723#endif
     1724    assert( vps.getRepFormat( j ) == NULL );
     1725    vps.setRepFormat( j , repFormat );
     1726  };
     1727
     1728
     1729#else
    16831730  vps.setRepFormatIdxPresentFlag( false );
    16841731  vps.setVpsNumRepFormatsMinus1 ( 0    );
     
    17091756  assert( vps.getRepFormat( 0 ) == NULL );
    17101757  vps.setRepFormat( 0 , repFormat );
     1758#endif
    17111759}
    17121760
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp

    r1164 r1169  
    24462446Void TComDataCU::setCbfSubParts( UInt uiCbfY, UInt uiCbfU, UInt uiCbfV, UInt uiAbsPartIdx, UInt uiDepth )
    24472447{
     2448#if H_3D_DISABLE_CHROMA
     2449  if( this->getSlice()->getIsDepth() )
     2450  {
     2451    uiCbfU = 0;
     2452    uiCbfV = 0;
     2453  }
     2454#endif
    24482455  UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
    24492456  memset( m_puhCbf[0] + uiAbsPartIdx, uiCbfY, sizeof( UChar ) * uiCurrPartNumb );
     
    24542461Void TComDataCU::setCbfSubParts( UInt uiCbf, TextType eTType, UInt uiAbsPartIdx, UInt uiDepth )
    24552462{
     2463#if H_3D_DISABLE_CHROMA
     2464  assert( getSlice() != NULL );
     2465  if( this->getSlice()->getIsDepth() && g_aucConvertTxtTypeToIdx[eTType] > 0  )
     2466  {
     2467    uiCbf = 0;   
     2468  }
     2469#endif
     2470
    24562471  UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
    24572472  memset( m_puhCbf[g_aucConvertTxtTypeToIdx[eTType]] + uiAbsPartIdx, uiCbf, sizeof( UChar ) * uiCurrPartNumb );
     
    24682483Void TComDataCU::setCbfSubParts ( UInt uiCbf, TextType eTType, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    24692484{
     2485#if H_3D_DISABLE_CHROMA
     2486  assert( getSlice() != NULL );
     2487  if( this->getSlice()->getIsDepth() && g_aucConvertTxtTypeToIdx[eTType] > 0  )
     2488  {
     2489    uiCbf = 0;   
     2490  }
     2491#endif
    24702492  setSubPart<UChar>( uiCbf, m_puhCbf[g_aucConvertTxtTypeToIdx[eTType]], uiAbsPartIdx, uiDepth, uiPartIdx );
    24712493}
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComDataCU.h

    r1164 r1169  
    313313  TComPic*      getPic                ()                        { return m_pcPic;           }
    314314  TComSlice*    getSlice              ()                        { return m_pcSlice;         }
     315#if H_3D_DISABLE_CHROMA
     316  Void         setSlice              ( TComSlice* pcSlice)     { m_pcSlice = pcSlice;       }
     317#endif
    315318  UInt&         getAddr               ()                        { return m_uiCUAddr;        }
    316319  UInt&         getZorderIdxInCU      ()                        { return m_uiAbsIdxInLCU; }
     
    433436  Pel*&         getPCMSampleCr        ()                        { return m_pcIPCMSampleCr;    }
    434437
     438#if H_3D_DISABLE_CHROMA
     439  UChar         getCbf    ( UInt uiIdx, TextType eType )                  { assert( getSlice() != NULL ); assert(  g_aucConvertTxtTypeToIdx[eType] == 0 || !getSlice()->getIsDepth() || m_puhCbf[g_aucConvertTxtTypeToIdx[eType]][uiIdx] == 0 );  return m_puhCbf[g_aucConvertTxtTypeToIdx[eType]][uiIdx];  }
     440  UChar*        getCbf    ( TextType eType )                              { assert( getSlice() != NULL ); assert(  g_aucConvertTxtTypeToIdx[eType] == 0 || !getSlice()->getIsDepth() || m_puhCbf[g_aucConvertTxtTypeToIdx[eType]] );              return m_puhCbf[g_aucConvertTxtTypeToIdx[eType]];         } 
     441#else
    435442  UChar         getCbf    ( UInt uiIdx, TextType eType )                  { return m_puhCbf[g_aucConvertTxtTypeToIdx[eType]][uiIdx];  }
    436443  UChar*        getCbf    ( TextType eType )                              { return m_puhCbf[g_aucConvertTxtTypeToIdx[eType]];         }
     444#endif
    437445  UChar         getCbf    ( UInt uiIdx, TextType eType, UInt uiTrDepth )  { return ( ( getCbf( uiIdx, eType ) >> uiTrDepth ) & 0x1 ); }
     446#if H_3D_DISABLE_CHROMA
     447  Void          setCbf    ( UInt uiIdx, TextType eType, UChar uh )        { assert( getSlice() != NULL ); m_puhCbf[g_aucConvertTxtTypeToIdx[eType]][uiIdx] = ( g_aucConvertTxtTypeToIdx[eType] > 0 && getSlice()->getIsDepth() ) ? 0 : uh ;    }
     448#else
    438449  Void          setCbf    ( UInt uiIdx, TextType eType, UChar uh )        { m_puhCbf[g_aucConvertTxtTypeToIdx[eType]][uiIdx] = uh;    }
     450#endif
    439451  Void          clearCbf  ( UInt uiIdx, TextType eType, UInt uiNumParts );
    440452  UChar         getQtRootCbf          ( UInt uiIdx )                      { return getCbf( uiIdx, TEXT_LUMA, 0 ) || getCbf( uiIdx, TEXT_CHROMA_U, 0 ) || getCbf( uiIdx, TEXT_CHROMA_V, 0 ); }
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComRom.cpp

    r1164 r1169  
    391391Bool g_tracePU = false;
    392392Bool g_traceTU = false;
     393Bool g_disableNumbering = true;
    393394Bool g_disableHLSTrace = false;
    394395UInt64 g_stopAtCounter       = 0;
     
    633634      std::cout << "Break point here." << std::endl;
    634635    }
    635     fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     636    if ( !g_disableNumbering )
     637    { 
     638      fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     639    }
    636640    fprintf( g_hTrace, "%-50s       : %d\n", symbolName, val );     
    637641    fflush ( g_hTrace );
     
    770774
    771775#if SHARP_DMM_CLEAN_K0042
    772     posEnd = racWedgeList.size();
     776    posEnd = (Int) racWedgeList.size();
    773777    if (uiOri == 0 || uiOri == 4)
    774778    {
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComRom.h

    r1084 r1169  
    257257 extern Bool   g_traceTU;
    258258 extern Bool   g_disableHLSTrace;       // USE g_HLSTraceEnable to toggle HLS trace. Not this one!
     259 extern Bool   g_disableNumbering;      // Don't print numbers to trace file
    259260 extern UInt64 g_stopAtCounter;         // Counter to set breakpoint.
    260261 extern Bool   g_traceCopyBack;         // Output samples on copy back 
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.h

    r1163 r1169  
    17721772  Void setChromaFormatIdc (Int i)    { m_chromaFormatIdc = i;          }
    17731773
     1774#if H_3D_DISABLE_CHROMA
     1775  static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc];      }
     1776  static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc];      }
     1777#else
    17741778  static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc];      }
    17751779  static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc];      }
     1780#endif
    17761781 
    17771782  // structure
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TypeDef.h

    r1167 r1169  
    6767#if H_MV
    6868#define SONY_MV_V_CONST_C0078            1   // Control disparity vector search range via configuration file
     69#define H_MV_FIX_CONF_WINDOW             1   
    6970#endif
    7071
     
    8081
    8182#if H_MV
    82 #define H_MV_ENC_DEC_TRAC                 1  //< CU/PU level tracking
     83#define H_MV_ENC_DEC_TRAC                 0  //< CU/PU level tracking
    8384#endif
    8485
     
    326327
    327328#define FIX_TICKET_95                          1   // pps_scaling_list_ref_layer_id parsing
     329#define H_3D_DISABLE_CHROMA                    1
    328330
    329331#if H_3D
  • 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 
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/SyntaxElementWriter.cpp

    r872 r1169  
    4949  if( g_HLSTraceEnable )
    5050  {
     51#if H_MV_ENC_DEC_TRAC
     52    if ( !g_disableNumbering )
     53    {
     54#endif
    5155    fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     56#if H_MV_ENC_DEC_TRAC
     57    }
     58#endif
     59
    5260    if( length<10 )
    5361    {
     
    6674  if( g_HLSTraceEnable )
    6775  {
     76#if H_MV_ENC_DEC_TRAC
     77    if ( !g_disableNumbering )
     78    {
     79#endif
    6880    fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     81#if H_MV_ENC_DEC_TRAC
     82    }
     83#endif
     84
    6985    fprintf( g_hTrace, "%-50s ue(v) : %d\n", pSymbolName, value );
    7086  }
     
    7692  if( g_HLSTraceEnable )
    7793  {
     94#if H_MV_ENC_DEC_TRAC
     95    if ( !g_disableNumbering )
     96    {
     97#endif
    7898    fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     99#if H_MV_ENC_DEC_TRAC
     100    }
     101#endif
     102
    79103    fprintf( g_hTrace, "%-50s se(v) : %d\n", pSymbolName, value );
    80104  }
     
    86110  if( g_HLSTraceEnable )
    87111  {
     112#if H_MV_ENC_DEC_TRAC
     113    if ( !g_disableNumbering )
     114    {
     115#endif
    88116    fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     117#if H_MV_ENC_DEC_TRAC
     118    }
     119#endif
    89120    fprintf( g_hTrace, "%-50s u(1)  : %d\n", pSymbolName, value );
    90121  }
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1167 r1169  
    678678#endif
    679679  WRITE_UVLC( pcSPS->getChromaFormatIdc (),         "chroma_format_idc" );
     680#if !H_3D_DISABLE_CHROMA
    680681  assert(pcSPS->getChromaFormatIdc () == 1);
     682#endif
    681683  // in the first version chroma_format_idc can only be equal to 1 (4:2:0)
    682684  if( pcSPS->getChromaFormatIdc () == 3 )
     
    13761378  if ( pcRepFormat->getChromaAndBitDepthVpsPresentFlag() )
    13771379  { 
    1378   WRITE_CODE( pcRepFormat->getChromaFormatVpsIdc( ), 2, "chroma_format_vps_idc" );
    1379 
    1380   if ( pcRepFormat->getChromaFormatVpsIdc() == 3 )
    1381   {
    1382     WRITE_FLAG( pcRepFormat->getSeparateColourPlaneVpsFlag( ) ? 1 : 0 , "separate_colour_plane_vps_flag" );
    1383   }
    1384   WRITE_CODE( pcRepFormat->getBitDepthVpsLumaMinus8( ),      4, "bit_depth_vps_luma_minus8" );
    1385   WRITE_CODE( pcRepFormat->getBitDepthVpsChromaMinus8( ),    4, "bit_depth_vps_chroma_minus8" );
     1380    WRITE_CODE( pcRepFormat->getChromaFormatVpsIdc( ), 2, "chroma_format_vps_idc" ); 
     1381
     1382    if ( pcRepFormat->getChromaFormatVpsIdc() == 3 )
     1383    {
     1384      WRITE_FLAG( pcRepFormat->getSeparateColourPlaneVpsFlag( ) ? 1 : 0 , "separate_colour_plane_vps_flag" );
     1385    }
     1386    WRITE_CODE( pcRepFormat->getBitDepthVpsLumaMinus8( ),      4, "bit_depth_vps_luma_minus8" );
     1387    WRITE_CODE( pcRepFormat->getBitDepthVpsChromaMinus8( ),    4, "bit_depth_vps_chroma_minus8" );
    13861388  }
    13871389  else
     
    17321734
    17331735    // in the first version chroma_format_idc is equal to one, thus colour_plane_id will not be present
     1736#if H_3D_DISABLE_CHROMA
     1737    assert (pcSlice->getSPS()->getChromaFormatIdc() == 1 || pcSlice->getIsDepth() );
     1738    assert (pcSlice->getSPS()->getChromaFormatIdc() == 0 || !pcSlice->getIsDepth() );
     1739#else
    17341740    assert (pcSlice->getSPS()->getChromaFormatIdc() == 1 );
     1741#endif
    17351742    // if( separate_colour_plane_flag  ==  1 )
    17361743    //   colour_plane_id                                      u(2)
     
    19111918      {
    19121919         WRITE_FLAG( pcSlice->getSaoEnabledFlag(), "slice_sao_luma_flag" );
     1920#if H_3D_DISABLE_CHROMA
     1921         if ( !pcSlice->getIsDepth() )
     1922         {
    19131923         WRITE_FLAG( pcSlice->getSaoEnabledFlagChroma(), "slice_sao_chroma_flag" );
     1924      }
     1925#else
     1926         WRITE_FLAG( pcSlice->getSaoEnabledFlagChroma(), "slice_sao_chroma_flag" );
     1927#endif
    19141928      }
    19151929    }
     
    25642578{
    25652579  wpScalingParam  *wp;
     2580#if  H_3D_DISABLE_CHROMA
     2581  Bool            bChroma     = !pcSlice->getIsDepth(); // color always present in HEVC ?
     2582#else
    25662583  Bool            bChroma     = true; // color always present in HEVC ?
     2584#endif
    25672585  Int             iNbRef       = (pcSlice->getSliceType() == B_SLICE ) ? (2) : (1);
    25682586  Bool            bDenomCoded  = false;
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp

    r1164 r1169  
    275275  m_ppcTempCU[0]->initCU( rpcCU->getPic(), rpcCU->getAddr() );
    276276
     277#if H_3D_DISABLE_CHROMA
     278  m_ppcWeightedTempCU[0]->initCU( rpcCU->getPic(), rpcCU->getAddr() );
     279#endif
     280
    277281#if KWU_RC_MADPRED_E0227
    278282  m_LCUPredictionSAD = 0;
     
    12491253      TComDataCU* pcSubTempPartCU     = m_ppcTempCU[uhNextDepth];
    12501254
     1255#if H_3D_DISABLE_CHROMA
     1256      m_ppcWeightedTempCU[uhNextDepth]->setSlice( m_ppcWeightedTempCU[ uiDepth]->getSlice());
     1257#endif
    12511258      for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++ )
    12521259      {
     
    27922799 
    27932800#if H_3D_DIM_SDC
     2801#if 0 // H_3D_DISABLE_CHROMA
     2802  if( !rpcTempCU->getSDCFlag( 0 ) && !rpcTempCU->getSlice()->getIsDepth() )
     2803#else
    27942804  if( !rpcTempCU->getSDCFlag( 0 ) )
     2805#endif
    27952806#endif
    27962807  m_pcPredSearch  ->estIntraPredChromaQT( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC );
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp

    r1163 r1169  
    304304Void TEncEntropy::xEncodeTransform( TComDataCU* pcCU,UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP )
    305305{
     306
     307#if H_MV_ENC_DEC_TRAC
     308  UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
     309  UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
     310
     311  DTRACE_TU_S("=========== transform_tree ===========\n")
     312  DTRACE_TU("x0", uiLPelX)
     313  DTRACE_TU("x1", uiTPelY)
     314  DTRACE_TU("log2TrafoSize", g_uiMaxCUWidth>>uiDepth)
     315  DTRACE_TU("trafoDepth"  , uiDepth)
     316#endif
     317
    306318  const UInt uiSubdiv = pcCU->getTransformIdx( uiAbsPartIdx ) + pcCU->getDepth( uiAbsPartIdx ) > uiDepth;
    307319  const UInt uiLog2TrafoSize = g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()]+2 - uiDepth;
     
    366378  if( bFirstCbfOfCU || uiLog2TrafoSize > 2 )
    367379  {
     380#if H_3D_DISABLE_CHROMA
     381    if (!pcCU->getSlice()->getIsDepth() )
     382    {
     383      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr - 1 ) )
     384      {
     385        m_pcEntropyCoderIf->codeQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr );
     386      }
     387      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr - 1 ) )
     388      {
     389        m_pcEntropyCoderIf->codeQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr );
     390      }
     391    }
     392    else
     393    {
     394      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr - 1 ) )
     395      {
     396        assert( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr ) == 0 );
     397      }
     398      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr - 1 ) )
     399      {
     400        assert( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr ) == 0  );
     401      }
     402    }
     403#else
    368404    if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr - 1 ) )
    369405    {
     
    374410      m_pcEntropyCoderIf->codeQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr );
    375411    }
     412#endif
    376413  }
    377414  else if( uiLog2TrafoSize == 2 )
     
    506543    encodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx,true );
    507544#if H_3D_DIM_SDC
     545#if H_3D_DISABLE_CHROMA
     546    if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() )
     547#else
    508548    if(!pcCU->getSDCFlag(uiAbsPartIdx))
     549#endif
    509550#endif
    510551    encodeIntraDirModeChroma( pcCU, uiAbsPartIdx, bRD );
     
    685726    assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
    686727    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
     728#if H_3D_DISABLE_CHROMA
     729    if (!pcCU->getSlice()->getIsDepth() )
     730    {
     731      assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     732      assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
     733    }
     734#else
    687735    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
    688736    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
    689   }
     737#endif
     738  }
     739
    690740
    691741  if( pcCU->getSDCFlag( uiAbsPartIdx ) && !pcCU->isIntra( uiAbsPartIdx ) )
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp

    r1133 r1169  
    19501950              m_pcSAO->PCMLFDisableProcess(pcPic);
    19511951
     1952#if H_3D_DISABLE_CHROMA
     1953            if (pcSlice->getIsDepth())
     1954            {
     1955              sliceEnabled[SAO_Cb] = false;
     1956              sliceEnabled[SAO_Cr] = false;
     1957            }
     1958#endif
    19521959            //assign SAO slice header
    19531960            for(Int s=0; s< uiNumSlices; s++)
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp

    r1163 r1169  
    10951095  DTRACE_CABAC_V( uiCtx )
    10961096  DTRACE_CABAC_T( "\n" )
    1097 #endif
     1097#else
     1098  DTRACE_TU("split_transform_flag", uiSymbol )
     1099#endif
     1100
    10981101}
    10991102
     
    14261429  DTRACE_CABAC_V( uiAbsPartIdx )
    14271430  DTRACE_CABAC_T( "\n" )
     1431#else
     1432  if ( eType == TEXT_CHROMA_U )
     1433  {
     1434    DTRACE_TU("cbf_cb", uiCbf )
     1435  }
     1436  else if ( eType == TEXT_CHROMA_V )
     1437  {
     1438    DTRACE_TU("cbf_cr", uiCbf )
     1439  }
     1440  else
     1441  {
     1442    DTRACE_TU("cbf_luma", uiCbf )
     1443  }
    14281444#endif
    14291445}
     
    15011517    }
    15021518
     1519#if H_3D_DISABLE_CHROMA
     1520    if( !pcCU->getSlice()->getIsDepth() )
     1521    {   
     1522#endif
    15031523    piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;
    15041524    uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
     
    15321552      piPCMSample += uiWidth;
    15331553    }
     1554#if H_3D_DISABLE_CHROMA
     1555    }
     1556#endif
    15341557    m_pcBinIf->resetBac();
    15351558  }
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp

    r1166 r1169  
    73357335    const UInt uiQTTempAccessLayer = pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() - uiLog2TrSize;
    73367336
     7337#if 0 //H_3D_DISABLE_CHROMA
     7338    Bool  bCodeChroma   = !pcCU->getSlice()->getIsDepth();
     7339#else
    73377340    Bool  bCodeChroma   = true;
     7341#endif
    73387342    UInt  uiTrModeC     = uiTrMode;
    73397343    UInt  uiLog2TrSizeC = uiLog2TrSize-1;
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp

    r1164 r1169  
    766766    }
    767767#endif
    768   }
     768  } 
    769769  m_cSPS.setSpsExtensionPresentFlag       ( true );
    770770  m_cSPS.setSpsMultilayerExtensionFlag    ( true );
     
    779779  m_cSPS.setMaxCUHeight   ( g_uiMaxCUHeight     );
    780780  m_cSPS.setMaxCUDepth    ( g_uiMaxCUDepth      );
     781#if H_3D_DISABLE_CHROMA
     782  m_cSPS.setChromaFormatIdc( getIsDepth() ? CHROMA_400 : CHROMA_420 );
     783#endif
    781784
    782785  Int minCUSize = m_cSPS.getMaxCUWidth() >> ( m_cSPS.getMaxCUDepth()-g_uiAddCUDepth );
Note: See TracChangeset for help on using the changeset viewer.