Changeset 504 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder
- Timestamp:
- 28 Jun 2013, 03:51:50 (12 years ago)
- Location:
- branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCAVLC.cpp
r486 r504 957 957 for( Int layer = 0; layer <= pcVPS->getMaxLayers() - 1; layer++ ) 958 958 { 959 #if H_3D_ARP 960 pcVPS->setUseAdvRP ( layer, 0 ); 961 pcVPS->setARPStepNum( layer, 1 ); 962 #endif 959 963 if (layer != 0) 960 964 { … … 963 967 #if H_3D_IV_MERGE 964 968 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( layer, uiCode == 1 ? true : false ); 969 #endif 970 #if H_3D_ARP 971 READ_FLAG( uiCode, "advanced_residual_pred_flag" ); pcVPS->setUseAdvRP ( layer, uiCode ); pcVPS->setARPStepNum( layer, uiCode ? H_3D_ARP_WFNR : 1 ); 972 965 973 #endif 966 974 #if H_3D_NBDV_REF … … 1434 1442 rpcSlice->initWpScaling(); 1435 1443 } 1444 #if H_3D_IC 1445 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) ) 1446 { 1447 UInt uiCodeTmp = 0; 1448 1449 READ_FLAG ( uiCodeTmp, "slice_ic_enable_flag" ); 1450 rpcSlice->setApplyIC( uiCodeTmp ); 1451 1452 if ( uiCodeTmp ) 1453 { 1454 READ_FLAG ( uiCodeTmp, "ic_skip_mergeidx0" ); 1455 rpcSlice->setIcSkipParseFlag( uiCodeTmp ); 1456 } 1457 } 1458 #endif 1436 1459 if (!rpcSlice->isIntra()) 1437 1460 { … … 1888 1911 } 1889 1912 1913 #if H_3D_ARP 1914 Void TDecCavlc::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1915 { 1916 assert(0); 1917 } 1918 #endif 1919 1920 #if H_3D_IC 1921 Void TDecCavlc::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1922 { 1923 assert(0); 1924 } 1925 #endif 1926 1890 1927 // ==================================================================================================================== 1891 1928 // Protected member functions -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCAVLC.h
r446 r504 99 99 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 100 100 Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex ); 101 #if H_3D_ARP 102 Void parseARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 103 #endif 104 #if H_3D_IC 105 Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 106 #endif 101 107 Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 102 108 Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCu.cpp
r486 r504 281 281 if(!pcCU->getSlice()->isIntra()) 282 282 { 283 if(pcCU->getSlice()->getViewIndex() && !pcCU->getSlice()->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. 283 #if H_3D_ARP && H_3D_IV_MERGE 284 if( pcCU->getSlice()->getVPS()->getUseAdvRP( pcCU->getSlice()->getLayerId() ) || pcCU->getSlice()->getVPS()->getIvMvPredFlag( pcCU->getSlice()->getLayerId() )) 285 #else 286 #if H_3D_ARP 287 if( pcCU->getSlice()->getVPS()->getUseAdvRP(pcCU->getSlice()->getLayerId()) ) 288 #else 289 #if H_3D_IV_MERGE 290 if( pcCU->getSlice()->getVPS()->getIvMvPredFlag(pcCU->getSlice()->getLayerId()) ) 291 #else 292 if (0) 293 #endif 294 #endif 295 #endif 284 296 { 285 297 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true ); … … 349 361 } 350 362 } 363 #if H_3D_IC 364 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 365 #endif 366 #if H_3D_ARP 367 m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth ); 368 #endif 351 369 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 352 370 return; … … 372 390 // prediction mode ( Intra : direction mode, Inter : Mv, reference idx ) 373 391 m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]); 374 392 #if H_3D_IC 393 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 394 #endif 395 #if H_3D_ARP 396 m_pcEntropyDecoder->decodeARPW ( pcCU , uiAbsPartIdx , uiDepth ); 397 #endif 375 398 // Coefficient decoding 376 399 Bool bCodeDQP = getdQPFlag(); -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecEntropy.cpp
r476 r504 87 87 } 88 88 89 #if H_3D_ARP 90 Void TDecEntropy::decodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 91 { 92 if( !pcCU->getSlice()->getARPStepNum() || pcCU->isIntra( uiAbsPartIdx ) ) 93 { 94 return; 95 } 96 97 if( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) 98 { 99 pcCU->setARPWSubParts( 0 , uiAbsPartIdx, uiDepth ); 100 } 101 else 102 { 103 m_pcEntropyDecoderIf->parseARPW( pcCU , uiAbsPartIdx , uiDepth ); 104 } 105 } 106 #endif 107 108 #if H_3D_IC 109 Void TDecEntropy::decodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 110 { 111 pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 112 113 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) ) 114 { 115 return; 116 } 117 118 if( !pcCU->getSlice()->getApplyIC() ) 119 return; 120 121 if( pcCU->isICFlagRequired( uiAbsPartIdx ) ) 122 m_pcEntropyDecoderIf->parseICFlag( pcCU, uiAbsPartIdx, uiDepth ); 123 } 124 #endif 125 89 126 Void TDecEntropy::decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 90 127 { -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecEntropy.h
r446 r504 85 85 virtual Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ) = 0; 86 86 virtual Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex ) = 0; 87 #if H_3D_ARP 88 virtual Void parseARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 89 #endif 90 #if H_3D_IC 91 virtual Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 92 #endif 87 93 virtual Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 88 94 virtual Void parsePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 154 160 Void decodePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 155 161 162 #if H_3D_ARP 163 Void decodeARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 164 #endif 165 #if H_3D_IC 166 Void decodeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 167 #endif 168 156 169 Void decodeIPCMInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 157 170 -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecSbac.cpp
r324 r504 54 54 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 55 55 , m_cCUMergeIdxExtSCModel ( 1, 1, NUM_MERGE_IDX_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 56 #if H_3D_ARP 57 , m_cCUPUARPWSCModel ( 1, 1, NUM_ARPW_CTX , m_contextModels + m_numContextModels, m_numContextModels) 58 #endif 59 #if H_3D_IC 60 , m_cCUICFlagSCModel ( 1, 1, NUM_IC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 61 #endif 56 62 , m_cCUPartSizeSCModel ( 1, 1, NUM_PART_SIZE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 57 63 , m_cCUPredModeSCModel ( 1, 1, NUM_PRED_MODE_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 113 119 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); 114 120 m_cCUMergeIdxExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT ); 121 #if H_3D_ARP 122 m_cCUPUARPWSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ARPW ); 123 #endif 124 #if H_3D_IC 125 m_cCUICFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_IC_FLAG ); 126 #endif 115 127 m_cCUPartSizeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_PART_SIZE ); 116 128 m_cCUAMPSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_CU_AMP_POS ); … … 158 170 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT ); 159 171 m_cCUMergeIdxExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT ); 172 #if H_3D_ARP 173 m_cCUPUARPWSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ARPW ); 174 #endif 175 #if H_3D_IC 176 m_cCUICFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_IC_FLAG ); 177 #endif 160 178 m_cCUPartSizeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_PART_SIZE ); 161 179 m_cCUAMPSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_CU_AMP_POS ); … … 1551 1569 xCopyContextsFrom(pScr); 1552 1570 } 1571 1572 #if H_3D_ARP 1573 Void TDecSbac::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1574 { 1575 UInt uiMaxW = pcCU->getSlice()->getARPStepNum() - 1; 1576 UInt uiW = 0; 1577 UInt uiOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx); 1578 UInt uiCode = 0; 1579 1580 assert ( uiMaxW > 0 ); 1581 1582 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 0 + uiOffset ) ); 1583 1584 uiW = uiCode; 1585 if( 1 == uiW ) 1586 { 1587 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 3 ) ); 1588 uiW += ( 1 == uiCode ? 1 : 0 ); 1589 } 1590 pcCU->setARPWSubParts( ( UChar )( uiW ) , uiAbsPartIdx, uiDepth ); 1591 } 1592 #endif 1593 1594 #if H_3D_IC 1595 /** parse illumination compensation flag 1596 * \param pcCU 1597 * \param uiAbsPartIdx 1598 * \param uiDepth 1599 * \returns Void 1600 */ 1601 Void TDecSbac::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1602 { 1603 UInt uiSymbol = 0; 1604 UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx ); 1605 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) ); 1606 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 1607 DTRACE_CABAC_T( "\tICFlag" ); 1608 DTRACE_CABAC_T( "\tuiCtxIC: "); 1609 DTRACE_CABAC_V( uiCtxIC ); 1610 DTRACE_CABAC_T( "\tuiSymbol: "); 1611 DTRACE_CABAC_V( uiSymbol ); 1612 DTRACE_CABAC_T( "\n"); 1613 1614 pcCU->setICFlagSubParts( uiSymbol ? true : false , uiAbsPartIdx, 0, uiDepth ); 1615 } 1616 #endif 1617 1553 1618 //! \} -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecSbac.h
r446 r504 108 108 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 109 109 Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex ); 110 #if H_3D_ARP 111 Void parseARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 112 #endif 113 #if H_3D_IC 114 Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 115 #endif 110 116 Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 111 117 Void parsePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 145 151 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; 146 152 ContextModel3DBuffer m_cCUMergeIdxExtSCModel; 153 #if H_3D_ARP 154 ContextModel3DBuffer m_cCUPUARPWSCModel; 155 #endif 156 #if H_3D_IC 157 ContextModel3DBuffer m_cCUICFlagSCModel; 158 #endif 147 159 ContextModel3DBuffer m_cCUPartSizeSCModel; 148 160 ContextModel3DBuffer m_cCUPredModeSCModel; -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.cpp
r499 r504 886 886 #if H_MV 887 887 pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer, true ); 888 #if H_3D_ARP 889 pcSlice->setARPStepNum(); 890 if( pcSlice->getARPStepNum() > 1 ) 891 { 892 for(Int iLayerId = 0; iLayerId < nalu.m_layerId; iLayerId ++ ) 893 { 894 Int iViewIdx = pcSlice->getVPS()->getViewIndex(iLayerId); 895 Bool bIsDepth = ( pcSlice->getVPS()->getDepthId ( iLayerId ) == 1 ); 896 if( iViewIdx<getViewIndex() && !bIsDepth ) 897 { 898 pcSlice->setBaseViewRefPicList( m_ivPicLists->getPicList( iLayerId ), iViewIdx ); 899 } 900 } 901 } 902 #endif 888 903 #else 889 904 #if FIX1071
Note: See TracChangeset for help on using the changeset viewer.