Changeset 1179 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecSbac.cpp


Ignore:
Timestamp:
7 Apr 2015, 17:05:30 (9 years ago)
Author:
tech
Message:

Merged branch 13.1-dev0@1178.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    5252, m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels )
    5353, m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     54#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     55, m_cCUDISFlagSCModel         ( 1,             1,               NUM_DIS_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     56, m_cCUDISTypeSCModel         ( 1,             1,               NUM_DIS_TYPE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     57#else
    5458#if H_3D_SINGLE_DEPTH
    5559, m_cCUSingleDepthFlagSCModel        ( 1,             1,               NUM_SINGLEDEPTH_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    5660, m_cSingleDepthValueSCModel         ( 1,             1,               NUM_SINGLE_DEPTH_VALUE_DATA_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
     61#endif
    5762#endif
    5863, m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        , m_contextModels + m_numContextModels, m_numContextModels)
     
    136141  m_cCUSplitFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    137142  m_cCUSkipFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SKIP_FLAG );
     143#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     144  m_cCUDISFlagSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_DIS_FLAG );
     145  m_cCUDISTypeSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_DIS_TYPE );
     146#else
    138147#if H_3D_SINGLE_DEPTH
    139148  m_cCUSingleDepthFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    140149  m_cSingleDepthValueSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     150#endif
    141151#endif
    142152  m_cCUMergeFlagExtSCModel.initBuffer    ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT );
     
    207217  m_cCUSplitFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG );
    208218  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
     219#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     220  m_cCUDISFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG );
     221  m_cCUDISTypeSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );
     222#else
    209223#if H_3D_SINGLE_DEPTH
    210224  m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    211225  m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     226#endif
    212227#endif
    213228  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT );
     
    486501    }
    487502
     503
     504#if H_3D_DISABLE_CHROMA
     505    if( pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 )
     506    {   
     507#endif
    488508    piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;
    489509    uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
     
    517537      piPCMSample += uiWidth;
    518538    }
     539#if H_3D_DISABLE_CHROMA
     540    }
     541#endif
     542
    519543
    520544    m_pcTDecBinIf->start();
     
    570594#endif
    571595}
     596
     597#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     598Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     599{
     600  pcCU->setDISFlagSubParts( false,        uiAbsPartIdx, uiDepth );
     601  UInt uiSymbol = 0;
     602  m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) );
     603  if( uiSymbol )
     604  {
     605    pcCU->setDISFlagSubParts( true,        uiAbsPartIdx, uiDepth );
     606    pcCU->setSkipFlagSubParts( false,        uiAbsPartIdx, uiDepth );
     607    pcCU->setSDCFlagSubParts( false,        uiAbsPartIdx, uiDepth );
     608    pcCU->setPredModeSubParts( MODE_INTRA,  uiAbsPartIdx, uiDepth );
     609    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
     610    pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth );
     611    pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
     612    pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
     613    pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth);
     614    pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth);
     615
     616    UInt uiUnaryIdx = 0;
     617    UInt uiNumCand  = 4;
     618
     619    if ( uiNumCand > 1 )
     620    {
     621      for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx )
     622      {
     623        UInt uiSymbol2 = 0;
     624        if ( uiUnaryIdx==0 )
     625        {
     626          m_pcTDecBinIf->decodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) );
     627        }
     628        else
     629        {
     630          m_pcTDecBinIf->decodeBinEP( uiSymbol2);
     631        }
     632        if( uiSymbol2 == 0 )
     633        {
     634          break;
     635        }
     636      }
     637    }
     638    pcCU->setDISTypeSubParts(uiUnaryIdx, uiAbsPartIdx, 0, uiDepth);
     639  }
     640}
     641#else
    572642#if H_3D_SINGLE_DEPTH
    573643Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    616686  }
    617687}
    618 
    619 #endif
     688#endif
     689#endif
     690
    620691/** parse merge flag
    621692 * \param pcCU
     
    13041375  DTRACE_CABAC_V( uiLog2TransformBlockSize )
    13051376  DTRACE_CABAC_T( "\n" )
     1377#else
     1378  DTRACE_TU("split_transform_flag", ruiSubdivFlag )
    13061379#endif
    13071380}
     
    13821455  DTRACE_CABAC_V( uiAbsPartIdx )
    13831456  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  }
    13841470#endif
    13851471 
     
    21052191
    21062192  m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) );
    2107 
     2193  DTRACE_CU("dc_only_flag", uiSymbol)
    21082194  if( uiSymbol )
    21092195  {
     
    21292215 
    21302216  m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) );
    2131  
     2217  DTRACE_CU("dbbp_flag", uiSymbol)
    21322218  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
    21332219  AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
Note: See TracChangeset for help on using the changeset viewer.