Changeset 189 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 18 Nov 2012, 22:11:37 (12 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r100 r189 1674 1674 } 1675 1675 #endif 1676 1677 READ_FLAG( uiCode, "base_view_flag" ); 1676 #if OL_QTLIMIT_PREDCODING_B0068 1677 if( bIsDepth ) 1678 { 1679 READ_FLAG( uiCode, "use_qtlpc_flag" ); 1680 pcSPS->setUseQTLPC( uiCode ); 1681 } 1682 #endif 1683 1684 #if RWTH_SDC_DLT_B0036 1685 if( bIsDepth ) 1686 { 1687 READ_FLAG( uiCode, "use_dlt_flag" ); 1688 pcSPS->setUseDLT( uiCode ); 1689 if( pcSPS->getUseDLT() ) 1690 { 1691 // decode mapping 1692 UInt uiNumDepthValues; 1693 // parse number of values in DLT 1694 xReadUvlc( uiNumDepthValues ); 1695 1696 // parse actual DLT values 1697 UInt* auiIdx2DepthValue = (UInt*) calloc(uiNumDepthValues, sizeof(UInt)); 1698 for(UInt d=0; d<uiNumDepthValues; d++) 1699 { 1700 xReadUvlc( uiCode ); 1701 auiIdx2DepthValue[d] = uiCode; 1702 } 1703 1704 pcSPS->setDepthLUTs(auiIdx2DepthValue, uiNumDepthValues); 1705 1706 // clean memory 1707 free(auiIdx2DepthValue); 1708 } 1709 else 1710 pcSPS->setDepthLUTs(); 1711 } 1712 #endif 1713 1714 READ_FLAG( uiCode, "base_view_flag" ); 1678 1715 if( uiCode ) 1679 1716 { // baseview SPS -> set standard values … … 1803 1840 UInt address; 1804 1841 UInt innerAddress = 0; 1842 1843 #if LGE_ILLUCOMP_B0045 1844 // IC flag is on only first_slice_in_pic 1845 if (uiCode) 1846 { 1847 UInt uiCodeTmp = 0; 1848 if ( rpcSlice->getSPS()->getViewId() && !rpcSlice->getSPS()->isDepth() ) 1849 { 1850 READ_FLAG (uiCodeTmp, "applying IC flag"); 1851 } 1852 rpcSlice->setApplyIC(uiCodeTmp); 1853 } 1854 #endif 1855 1805 1856 if(!uiCode) 1806 1857 { … … 2601 2652 } 2602 2653 2654 #if LGE_ILLUCOMP_B0045 2655 Void TDecCavlc::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2656 { 2657 assert(0); 2658 } 2659 #endif 2660 2603 2661 #if HHI_INTER_VIEW_MOTION_PRED 2604 2662 Void TDecCavlc::parseMVPIdx( Int& riMVPIdx, Int iAMVPCands ) … … 2801 2859 Void 2802 2860 TDecCavlc::parseResPredFlag( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth ) 2861 { 2862 assert(0); 2863 } 2864 #endif 2865 2866 #if RWTH_SDC_DLT_B0036 2867 Void TDecCavlc::parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2868 { 2869 assert(0); 2870 } 2871 Void TDecCavlc::parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2872 { 2873 assert(0); 2874 } 2875 Void TDecCavlc::parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) 2803 2876 { 2804 2877 assert(0); -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r77 r189 142 142 143 143 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 144 #if LGE_ILLUCOMP_B0045 145 Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 146 #endif 144 147 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 145 148 Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ); … … 175 178 Void parseDFFlag ( UInt& ruiVal, const Char *pSymbolName ); 176 179 Void parseDFSvlc ( Int& riVal, const Char *pSymbolName ); 180 #if RWTH_SDC_DLT_B0036 181 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 182 Void parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 183 Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 184 #endif 177 185 protected: 178 186 #if DBL_CONTROL -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r100 r189 38 38 #include "TDecCu.h" 39 39 40 #if RWTH_SDC_DLT_B0036 41 #define GetDepthValue2Idx(val) (pcCU->getSlice()->getSPS()->depthValue2idx(val)) 42 #define GetIdx2DepthValue(val) (pcCU->getSlice()->getSPS()->idx2DepthValue(val)) 43 #endif 44 40 45 //! \ingroup TLibDecoder 41 46 //! \{ … … 389 394 } 390 395 } 396 #if LGE_ILLUCOMP_B0045 397 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 398 #endif 391 399 #if HHI_MPI 392 400 } … … 440 448 m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]); 441 449 450 #if LGE_ILLUCOMP_B0045 451 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 452 #endif 453 442 454 #if HHI_INTER_VIEW_RESIDUAL_PRED 443 455 if( !pcCU->isIntra( uiAbsPartIdx ) ) … … 601 613 break; 602 614 case MODE_INTRA: 615 #if RWTH_SDC_DLT_B0036 616 if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 617 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 618 else 619 #endif 603 620 xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); 604 621 break; … … 620 637 { 621 638 #if HHI_MPI 639 #if FIX_MPI_B0065 640 if( pcCU->getTextureModeDepth( 0 ) != -1 ) 641 { 642 TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ); 643 if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx)) 644 { 645 PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx); 646 pcCU->setPartSizeSubParts( partSize, 0, uiDepth ); 647 } 648 else 649 { 650 pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth ); 651 } 652 } 653 #else 622 654 if( pcCU->getTextureModeDepth( 0 ) != -1 ) 623 655 pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth ); 656 #endif 624 657 #endif 625 658 … … 705 738 m_pcPrediction->getPredicBufHeight (), 706 739 bAboveAvail, bLeftAvail ); 707 #if LGE_EDGE_INTRA 740 #if LGE_EDGE_INTRA_A0070 708 741 if( uiLumaPredMode >= EDGE_INTRA_IDX ) 709 742 { … … 944 977 945 978 } 979 980 #if RWTH_SDC_DLT_B0036 981 Void TDecCu::xReconIntraSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 982 { 983 UInt uiWidth = pcCU->getWidth ( 0 ); 984 UInt uiHeight = pcCU->getHeight ( 0 ); 985 986 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 987 TComYuv* pcPredYuv = m_ppcYuvReco[uiDepth]; 988 TComYuv* pcResiYuv = m_ppcYuvResi[uiDepth]; 989 990 UInt uiStride = pcRecoYuv->getStride (); 991 Pel* piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 992 Pel* piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 993 Pel* piResi = pcResiYuv->getLumaAddr( uiAbsPartIdx ); 994 995 UInt uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 996 Pel* piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 997 UInt uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 998 999 UInt uiLumaPredMode = pcCU->getLumaIntraDir ( uiAbsPartIdx ); 1000 1001 AOF( uiWidth == uiHeight ); 1002 AOF( uiAbsPartIdx == 0 ); 1003 AOF( pcCU->getSDCAvailable(uiAbsPartIdx) ); 1004 AOF( pcCU->getSDCFlag(uiAbsPartIdx) ); 1005 1006 //===== init availability pattern ===== 1007 Bool bAboveAvail = false; 1008 Bool bLeftAvail = false; 1009 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 1010 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail ); 1011 1012 //===== get prediction signal ===== 1013 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1014 if( uiLumaPredMode >= NUM_INTRA_MODE ) 1015 { 1016 m_pcPrediction->predIntraLumaDMM( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail, false ); 1017 } 1018 else 1019 { 1020 #endif 1021 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail ); 1022 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1023 } 1024 #endif 1025 1026 // number of segments depends on prediction mode 1027 UInt uiNumSegments = 1; 1028 Bool* pbMask = NULL; 1029 UInt uiMaskStride = 0; 1030 1031 if( uiLumaPredMode == DMM_WEDGE_FULL_IDX || uiLumaPredMode == DMM_WEDGE_PREDDIR_IDX ) 1032 { 1033 Int uiTabIdx = (uiLumaPredMode == DMM_WEDGE_FULL_IDX)?pcCU->getWedgeFullTabIdx(uiAbsPartIdx):pcCU->getWedgePredDirTabIdx(uiAbsPartIdx); 1034 1035 WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])]; 1036 TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx )); 1037 1038 uiNumSegments = 2; 1039 pbMask = pcWedgelet->getPattern(); 1040 uiMaskStride = pcWedgelet->getStride(); 1041 } 1042 1043 // get DC prediction for each segment 1044 Pel apDCPredValues[2]; 1045 xAnalyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride); 1046 1047 // reconstruct residual based on mask + DC residuals 1048 Pel apDCResiValues[2]; 1049 Pel apDCRecoValues[2]; 1050 for( UInt ui = 0; ui < uiNumSegments; ui++ ) 1051 { 1052 Pel pPredIdx = GetDepthValue2Idx( apDCPredValues[ui] ); 1053 Pel pResiIdx = pcCU->getSDCSegmentDCOffset(ui, uiAbsPartIdx); 1054 Pel pRecoValue = GetIdx2DepthValue( pPredIdx + pResiIdx ); 1055 1056 apDCRecoValues[ui] = pRecoValue; 1057 apDCResiValues[ui] = pRecoValue - apDCPredValues[ui]; 1058 } 1059 1060 //===== reconstruction ===== 1061 Bool*pMask = pbMask; 1062 Pel* pPred = piPred; 1063 Pel* pResi = piResi; 1064 Pel* pReco = piReco; 1065 Pel* pRecIPred = piRecIPred; 1066 1067 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 1068 { 1069 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 1070 { 1071 UChar ucSegment = pMask?(UChar)pMask[uiX]:0; 1072 assert( ucSegment < uiNumSegments ); 1073 1074 Pel pPredVal= apDCPredValues[ucSegment]; 1075 Pel pResiDC = apDCResiValues[ucSegment]; 1076 1077 pReco [ uiX ] = Clip( pPredVal + pResiDC ); 1078 pRecIPred[ uiX ] = pReco[ uiX ]; 1079 } 1080 pPred += uiStride; 1081 pResi += uiStride; 1082 pReco += uiStride; 1083 pRecIPred += uiRecIPredStride; 1084 pMask += uiMaskStride; 1085 } 1086 1087 // clear UV 1088 UInt uiStrideC = pcPredYuv->getCStride(); 1089 Pel *pRecCb = pcPredYuv->getCbAddr(); 1090 Pel *pRecCr = pcPredYuv->getCrAddr(); 1091 1092 for (Int y=0; y<uiHeight/2; y++) 1093 { 1094 for (Int x=0; x<uiWidth/2; x++) 1095 { 1096 pRecCb[x] = (Pel)(128<<g_uiBitIncrement); 1097 pRecCr[x] = (Pel)(128<<g_uiBitIncrement); 1098 } 1099 1100 pRecCb += uiStrideC; 1101 pRecCr += uiStrideC; 1102 } 1103 } 1104 #endif 946 1105 947 1106 /** Function for deriving recontructed PU/CU Luma sample with QTree structure … … 1209 1368 #endif 1210 1369 1370 #if RWTH_SDC_DLT_B0036 1371 Void TDecCu::xAnalyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride ) 1372 { 1373 Int iSumDepth[2]; 1374 memset(iSumDepth, 0, sizeof(Int)*2); 1375 Int iSumPix[2]; 1376 memset(iSumPix, 0, sizeof(Int)*2); 1377 1378 for (Int y=0; y<uiSize; y++) 1379 { 1380 for (Int x=0; x<uiSize; x++) 1381 { 1382 UChar ucSegment = pMask?(UChar)pMask[x]:0; 1383 assert( ucSegment < uiNumSegments ); 1384 1385 iSumDepth[ucSegment] += pOrig[x]; 1386 iSumPix[ucSegment] += 1; 1387 } 1388 1389 pOrig += uiStride; 1390 pMask += uiMaskStride; 1391 } 1392 1393 // compute mean for each segment 1394 for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ ) 1395 { 1396 if( iSumPix[ucSeg] > 0 ) 1397 rpSegMeans[ucSeg] = iSumDepth[ucSeg] / iSumPix[ucSeg]; 1398 else 1399 rpSegMeans[ucSeg] = 0; // this happens for zero-segments 1400 } 1401 } 1402 #endif 1403 1211 1404 //! \} -
trunk/source/Lib/TLibDecoder/TDecCu.h
r56 r189 121 121 Void xFillPCMBuffer (TComDataCU* pCU, UInt absPartIdx, UInt depth); 122 122 #endif 123 #if RWTH_SDC_DLT_B0036 124 Void xAnalyzeSegmentsSDC ( Pel* pOrig, 125 UInt uiStride, 126 UInt uiSize, 127 Pel* rpSegMeans, 128 UInt uiNumSegments, 129 Bool* pMask, 130 UInt uiMaskStride ); 131 132 Void xReconIntraSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 133 #endif 123 134 }; 124 135 -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r100 r189 67 67 } 68 68 69 #if LGE_ILLUCOMP_B0045 70 Void TDecEntropy::decodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 71 { 72 pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 73 74 if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) || pcCU->getSlice()->getSPS()->isDepth()) 75 { 76 return; 77 } 78 79 if(!pcCU->getSlice()->getApplyIC()) 80 return; 81 82 if(pcCU->isICFlagRequired(uiAbsPartIdx)) 83 m_pcEntropyDecoderIf->parseICFlag( pcCU, uiAbsPartIdx, uiDepth ); 84 } 85 #endif 69 86 /** decode merge index 70 87 * \param pcCU … … 130 147 { 131 148 m_pcEntropyDecoderIf->parsePredMode( pcCU, uiAbsPartIdx, uiDepth ); 149 150 #if RWTH_SDC_DLT_B0036 151 // if B-Slice, code SDC flag later 152 if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->isDepth() ) 153 { 154 // decode SDC flag 155 decodeSDCFlag(pcCU, uiAbsPartIdx, uiDepth); 156 } 157 #endif 132 158 } 133 159 134 160 Void TDecEntropy::decodePartSize( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 135 161 { 162 #if RWTH_SDC_DLT_B0036 163 if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx) ) 164 { 165 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 166 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 167 return; 168 } 169 #endif 170 136 171 m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth ); 172 173 #if RWTH_SDC_DLT_B0036 174 if( pcCU->getSlice()->isInterB() && pcCU->getSlice()->getSPS()->isDepth() && pcCU->isIntra(uiAbsPartIdx) ) 175 { 176 // decode SDC flag 177 decodeSDCFlag(pcCU, uiAbsPartIdx, uiDepth); 178 179 if( pcCU->getSDCFlag(uiAbsPartIdx) ) 180 { 181 // part size is also known for SDC intra 182 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 183 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 184 } 185 } 186 #endif 137 187 } 138 188 139 189 Void TDecEntropy::decodePredInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU ) 140 190 { 191 #if RWTH_SDC_DLT_B0036 192 if( pcCU->getSDCFlag(uiAbsPartIdx) ) 193 { 194 decodeSDCPredMode(pcCU, uiAbsPartIdx, uiDepth); 195 return; 196 } 197 #endif 198 141 199 PartSize eMode = pcCU->getPartitionSize( uiAbsPartIdx ); 142 200 … … 179 237 return; 180 238 } 239 240 #if RWTH_SDC_DLT_B0036 241 if( pcCU->getSDCFlag(uiAbsPartIdx) ) 242 { 243 return; 244 } 245 #endif 181 246 182 247 m_pcEntropyDecoderIf->parseIPCMInfo( pcCU, uiAbsPartIdx, uiDepth ); … … 427 492 #endif 428 493 } 494 #if SHARP_INTERVIEW_DECOUPLE_B0111 495 pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo, iMVPIdx); 496 #else 429 497 pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo); 498 #endif 430 499 pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth); 431 500 pcSubCU->setMVPIdxSubParts( iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth ); … … 895 964 #endif 896 965 966 #if RWTH_SDC_DLT_B0036 967 if( pcCU->getSDCAvailable(uiAbsPartIdx) && pcCU->getSDCFlag( uiAbsPartIdx ) ) 968 { 969 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 970 assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 ); 971 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 ); 972 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 973 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 974 975 decodeSDCResidualData(pcCU, uiAbsPartIdx, uiDepth); 976 return; 977 } 978 #endif 979 897 980 if( pcCU->isIntra(uiAbsPartIdx) ) 898 981 { … … 930 1013 #endif // !UNIFIED_TRANSFORM_TREE 931 1014 } 1015 1016 #if FIX_MPI_B0065 1017 if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N && pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 ) 1018 { 1019 TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ); 1020 if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx)) 1021 { 1022 PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx); 1023 pcCU->setPartSizeSubParts( partSize, uiAbsPartIdx, uiDepth ); 1024 } 1025 else 1026 { 1027 pcCU->setPartSizeSubParts( SIZE_NxN, uiAbsPartIdx, uiDepth ); 1028 } 1029 } 1030 #endif 1031 932 1032 #if UNIFIED_TRANSFORM_TREE 933 1033 xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, 0, temp, temp1, temp2, bCodeDQP ); … … 935 1035 xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, uiLumaTrMode, bCodeDQP ); 936 1036 #endif // UNIFIED_TRANSFORM_TREE 937 } 1037 1038 #if FIX_MPI_B0065 1039 if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N && pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 ) 1040 { 1041 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 1042 } 1043 #endif 1044 } 1045 1046 #if RWTH_SDC_DLT_B0036 1047 Void TDecEntropy::decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1048 { 1049 assert( pcCU->getSlice()->getSPS()->isDepth() ); 1050 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 1051 1052 m_pcEntropyDecoderIf->parseSDCPredMode(pcCU, uiAbsPartIdx, uiDepth ); 1053 } 1054 1055 Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1056 { 1057 assert( pcCU->getSlice()->getSPS()->isDepth() ); 1058 1059 m_pcEntropyDecoderIf->parseSDCFlag(pcCU, uiAbsPartIdx, uiDepth ); 1060 } 1061 1062 Void TDecEntropy::decodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1063 { 1064 assert( pcCU->getSlice()->getSPS()->isDepth() ); 1065 assert( pcCU->getSDCFlag(uiAbsPartIdx) ); 1066 1067 // number of segments depends on prediction mode for INTRA 1068 UInt uiNumSegments = 2; 1069 UInt uiLumaPredMode = pcCU->getLumaIntraDir( uiAbsPartIdx ); 1070 if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && (uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX) ) 1071 uiNumSegments = 1; 1072 1073 // decode residual data for each segment 1074 for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ ) 1075 m_pcEntropyDecoderIf->parseSDCResidualData(pcCU, uiAbsPartIdx, uiDepth, uiSeg); 1076 } 1077 #endif 938 1078 939 1079 //! \} -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r77 r189 103 103 public: 104 104 virtual Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 105 #if LGE_ILLUCOMP_B0045 106 virtual Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 107 #endif 105 108 virtual Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 106 109 virtual Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ) = 0; … … 138 141 virtual Void readTileMarker ( UInt& uiTileIdx, UInt uiBitsUsed ) = 0; 139 142 virtual Void updateContextTables( SliceType eSliceType, Int iQp ) = 0; 143 144 #if RWTH_SDC_DLT_B0036 145 virtual Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 146 virtual Void parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 147 virtual Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0; 148 #endif 140 149 141 150 virtual ~TDecEntropyIf() {} … … 196 205 Void decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 197 206 Void decodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 207 #if LGE_ILLUCOMP_B0045 208 Void decodeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 209 #endif 198 210 Void decodeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 199 211 Void decodeMergeIndex ( TComDataCU* pcSubCU, UInt uiPartIdx, UInt uiPartAddr, PartSize eCUMode, UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, UInt uiDepth ); … … 250 262 Void decodeFlush() { m_pcEntropyDecoderIf->decodeFlush(); } 251 263 #endif 264 265 #if RWTH_SDC_DLT_B0036 266 Void decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 267 Void decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 268 Void decodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 269 #endif 252 270 253 271 };// END CLASS DEFINITION TDecEntropy -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r100 r189 303 303 { 304 304 m_pcDepthMapGenerator->initViewComponent( rpcPic ); 305 #if !QC_MULTI_DIS_CAN 305 #if !QC_MULTI_DIS_CAN_A0097 306 306 m_pcDepthMapGenerator->predictDepthMap ( rpcPic ); 307 307 #endif … … 312 312 #endif 313 313 314 #if QC_SIMPLE_NBDV_B0047 315 if(pcSlice->getViewId() && pcSlice->getSPS()->getMultiviewMvPredMode()) 316 { 317 Int iColPoc = pcSlice->getRefPOC(RefPicList(pcSlice->getColDir()), pcSlice->getColRefIdx()); 318 rpcPic->setRapbCheck(rpcPic->getDisCandRefPictures(iColPoc)); 319 } 320 #endif 314 321 315 322 m_pcSbacDecoders[0].load(m_pcSbacDecoder); … … 341 348 #endif 342 349 #if DEPTH_MAP_GENERATION 343 #if !QC_MULTI_DIS_CAN 350 #if !QC_MULTI_DIS_CAN_A0097 344 351 // update virtual depth map 345 352 m_pcDepthMapGenerator->updateDepthMap( rpcPic ); -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r100 r189 38 38 #include "TDecSbac.h" 39 39 40 #if RWTH_SDC_DLT_B0036 41 #define GetNumDepthValues() (pcCU->getSlice()->getSPS()->getNumDepthValues()) 42 #define GetBitsPerDepthValue() (pcCU->getSlice()->getSPS()->getBitsPerDepthValue()) 43 #endif 44 40 45 //! \ingroup TLibDecoder 41 46 //! \{ … … 52 57 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels ) 53 58 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 59 #if LGE_ILLUCOMP_B0045 60 , m_cCUICFlagSCModel ( 1, 1, NUM_IC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 61 #endif 54 62 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 55 63 , m_cCUMergeIdxExtSCModel ( 1, 1, NUM_MERGE_IDX_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 98 106 , m_cDmmDataSCModel ( 1, 1, NUM_DMM_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 99 107 #endif 100 #if LGE_EDGE_INTRA 108 #if LGE_EDGE_INTRA_A0070 101 109 , m_cEdgeIntraSCModel ( 1, 1, NUM_EDGE_INTRA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 102 110 #if LGE_EDGE_INTRA_DELTA_DC 103 111 , m_cEdgeIntraDeltaDCSCModel ( 1, 1, NUM_EDGE_INTRA_DELTA_DC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 104 112 #endif 113 #endif 114 #if RWTH_SDC_DLT_B0036 115 , m_cSDCFlagSCModel ( 1, 1, SDC_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 116 , m_cSDCResidualFlagSCModel ( 1, 2, SDC_NUM_RESIDUAL_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 117 , m_cSDCResidualSignFlagSCModel ( 1, 2, SDC_NUM_SIGN_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 118 , m_cSDCResidualSCModel ( 1, 2, SDC_NUM_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) 119 , m_cSDCPredModeSCModel ( 1, 3, SDC_NUM_PRED_MODE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 105 120 #endif 106 121 { … … 146 161 m_cCUSplitFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 147 162 m_cCUSkipFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SKIP_FLAG ); 163 #if LGE_ILLUCOMP_B0045 164 m_cCUICFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_IC_FLAG ); 165 #endif 148 166 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); 149 167 m_cCUMergeIdxExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT ); … … 188 206 189 207 m_cCUTransSubdivFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 190 #if LGE_EDGE_INTRA 208 #if LGE_EDGE_INTRA_A0070 191 209 m_cEdgeIntraSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_EDGE_INTRA ); 192 210 #if LGE_EDGE_INTRA_DELTA_DC … … 199 217 m_cDmmModeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM_MODE ); 200 218 m_cDmmDataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM_DATA ); 219 #endif 220 #if RWTH_SDC_DLT_B0036 221 m_cSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_FLAG ); 222 m_cSDCResidualFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 223 m_cSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL ); 224 m_cSDCResidualSignFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_SIGN_FLAG ); 225 m_cSDCPredModeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_PRED_MODE ); 201 226 #endif 202 227 … … 230 255 m_cCUSplitFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG ); 231 256 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 257 #if LGE_ILLUCOMP_B0045 258 m_cCUICFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_IC_FLAG ); 259 #endif 232 260 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT ); 233 261 m_cCUMergeIdxExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT ); … … 276 304 m_cDmmDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_DATA ); 277 305 #endif 306 #if RWTH_SDC_DLT_B0036 307 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 308 m_cSDCResidualFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 309 m_cSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL ); 310 m_cSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG ); 311 m_cSDCPredModeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE ); 312 #endif 278 313 279 314 m_pcTDecBinIf->start(); … … 578 613 } 579 614 615 #if LGE_ILLUCOMP_B0045 616 /** parse illumination compensation flag 617 * \param pcCU 618 * \param uiAbsPartIdx 619 * \param uiDepth 620 * \returns Void 621 */ 622 Void TDecSbac::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 623 { 624 UInt uiSymbol = 0; 625 UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx ); 626 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) ); 627 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 628 DTRACE_CABAC_T( "\tICFlag" ); 629 DTRACE_CABAC_T( "\tuiCtxIC: "); 630 DTRACE_CABAC_V( uiCtxIC ); 631 DTRACE_CABAC_T( "\tuiSymbol: "); 632 DTRACE_CABAC_V( uiSymbol ); 633 DTRACE_CABAC_T( "\n"); 634 635 pcCU->setICFlagSubParts( uiSymbol ? true : false , uiAbsPartIdx, 0, uiDepth ); 636 } 637 #endif 638 639 580 640 /** parse merge flag 581 641 * \param pcCU … … 693 753 694 754 UInt uiSymbol; 695 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) ); 696 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 697 DTRACE_CABAC_T( "\tSplitFlag\n" ) 755 756 #if OL_QTLIMIT_PREDCODING_B0068 757 Bool bParseSplitFlag = true; 758 759 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 760 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 761 Bool bDepthMapDetect = (pcTexture != NULL); 762 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 763 764 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC()) 765 { 766 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 767 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 768 bParseSplitFlag = (pcTextureCU->getDepth(uiAbsPartIdx) > uiDepth); 769 } 770 771 if(bParseSplitFlag) 772 { 773 #endif 774 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) ); 775 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 776 DTRACE_CABAC_T( "\tSplitFlag\n" ) 777 #if OL_QTLIMIT_PREDCODING_B0068 778 } 779 else 780 uiSymbol = 0; 781 #endif 782 698 783 pcCU->setDepthSubParts( uiDepth + uiSymbol, uiAbsPartIdx ); 699 784 … … 711 796 UInt uiSymbol, uiMode = 0; 712 797 PartSize eMode; 798 799 #if OL_QTLIMIT_PREDCODING_B0068 800 Bool bParsePartSize = true; 801 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 802 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 803 Bool bDepthMapDetect = (pcTexture != NULL); 804 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 805 806 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC()) 807 { 808 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 809 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 810 if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN) 811 { 812 bParsePartSize = false; 813 eMode = SIZE_2Nx2N; 814 } 815 } 816 #endif 713 817 714 818 if ( pcCU->isIntra( uiAbsPartIdx ) ) 715 819 { 716 uiSymbol = 1; 717 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 718 { 719 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 720 } 721 eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN; 820 #if OL_QTLIMIT_PREDCODING_B0068 821 if(bParsePartSize) 822 { 823 #endif 824 uiSymbol = 1; 825 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 826 { 827 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 828 } 829 eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN; 830 #if OL_QTLIMIT_PREDCODING_B0068 831 } 832 #endif 722 833 UInt uiTrLevel = 0; 723 834 UInt uiWidthInBit = g_aucConvertToBit[pcCU->getWidth(uiAbsPartIdx)]+2; … … 735 846 else 736 847 { 737 UInt uiMaxNumBits = 2; 738 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 739 { 740 uiMaxNumBits ++; 741 } 742 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 743 { 744 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 745 if ( uiSymbol ) 746 { 747 break; 748 } 749 uiMode++; 750 } 751 eMode = (PartSize) uiMode; 752 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 753 { 754 if (eMode == SIZE_2NxN) 755 { 848 #if OL_QTLIMIT_PREDCODING_B0068 849 if(bParsePartSize) 850 { 851 #endif 852 UInt uiMaxNumBits = 2; 853 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 854 { 855 uiMaxNumBits ++; 856 } 857 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 858 { 859 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 860 if ( uiSymbol ) 861 { 862 break; 863 } 864 uiMode++; 865 } 866 eMode = (PartSize) uiMode; 867 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 868 { 869 if (eMode == SIZE_2NxN) 870 { 871 #if AMP_CTX 872 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 873 #else 874 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 )); 875 #endif 876 if (uiSymbol == 0) 877 { 878 #if AMP_CTX 879 m_pcTDecBinIf->decodeBinEP(uiSymbol); 880 #else 881 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 )); 882 #endif 883 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 884 } 885 } 886 else if (eMode == SIZE_Nx2N) 887 { 756 888 #if AMP_CTX 757 889 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 758 890 #else 759 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 ));760 #endif 761 if (uiSymbol == 0)762 {891 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 )); 892 #endif 893 if (uiSymbol == 0) 894 { 763 895 #if AMP_CTX 764 m_pcTDecBinIf->decodeBinEP(uiSymbol); 765 #else 766 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 )); 767 #endif 768 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 896 m_pcTDecBinIf->decodeBinEP(uiSymbol); 897 #else 898 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 )); 899 #endif 900 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 901 } 769 902 } 770 903 } 771 else if (eMode == SIZE_Nx2N) 772 { 773 #if AMP_CTX 774 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 775 #else 776 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 )); 777 #endif 778 if (uiSymbol == 0) 779 { 780 #if AMP_CTX 781 m_pcTDecBinIf->decodeBinEP(uiSymbol); 782 #else 783 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 )); 784 #endif 785 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 786 } 787 } 788 } 904 #if OL_QTLIMIT_PREDCODING_B0068 905 } 906 #endif 789 907 } 790 908 pcCU->setPartSizeSubParts( eMode, uiAbsPartIdx, uiDepth ); … … 862 980 #endif 863 981 864 #if LGE_EDGE_INTRA 982 #if LGE_EDGE_INTRA_A0070 865 983 Bool bCodeEdgeIntra = false; 866 984 if( pcCU->getSlice()->getSPS()->isDepth() ) … … 878 996 #endif 879 997 Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds); 880 #if LGE_EDGE_INTRA 998 #if LGE_EDGE_INTRA_A0070 881 999 UInt uiCheckBit = 0; 882 1000 #endif … … 903 1021 904 1022 m_pcTDecBinIf->decodeBinsEP( uiSymbol, 5 ); 905 #if LGE_EDGE_INTRA 1023 #if LGE_EDGE_INTRA_A0070 906 1024 if (bCodeEdgeIntra) 907 1025 { … … 939 1057 } 940 1058 #endif 941 #if LGE_EDGE_INTRA 1059 #if LGE_EDGE_INTRA_A0070 942 1060 if ( intraPredMode != EDGE_INTRA_IDX) 943 1061 { … … 947 1065 intraPredMode += ( intraPredMode >= uiPreds[i] ); 948 1066 } 949 #if LGE_EDGE_INTRA 950 } 951 #endif 952 } 953 954 #if LGE_EDGE_INTRA 1067 #if LGE_EDGE_INTRA_A0070 1068 } 1069 #endif 1070 } 1071 1072 #if LGE_EDGE_INTRA_A0070 955 1073 if( intraPredMode == EDGE_INTRA_IDX ) 956 1074 { … … 2096 2214 #endif 2097 2215 2098 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA && LGE_EDGE_INTRA_DELTA_DC)2216 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA_A0070 && LGE_EDGE_INTRA_DELTA_DC) 2099 2217 Void TDecSbac::xReadExGolombLevel( UInt& ruiSymbol, ContextModel& rcSCModel ) 2100 2218 { … … 2355 2473 #endif 2356 2474 2357 #if LGE_EDGE_INTRA 2475 #if LGE_EDGE_INTRA_A0070 2358 2476 Void TDecSbac::xParseEdgeIntraInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2359 2477 { … … 2452 2570 } 2453 2571 #endif 2572 2573 #if RWTH_SDC_DLT_B0036 2574 Void TDecSbac::parseSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2575 { 2576 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2577 2578 UInt uiSymbol = 0; 2579 UInt uiCtxSDCFlag = pcCU->getCtxSDCFlag( uiAbsPartIdx ); 2580 m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) ); 2581 2582 if( uiSymbol == 1 ) 2583 { 2584 pcCU->setPartSizeSubParts(SIZE_2Nx2N, uiAbsPartIdx, uiDepth); 2585 2586 pcCU->setSDCFlagSubParts( true, uiAbsPartIdx, 0, uiDepth); 2587 pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth); 2588 pcCU->setCbfSubParts(1, 1, 1, uiAbsPartIdx, uiDepth); 2589 } 2590 } 2591 2592 Void TDecSbac::parseSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2593 { 2594 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2595 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 2596 2597 assert( pcCU->getSDCFlag(uiAbsPartIdx) ); 2598 2599 UInt uiCtx = 0; 2600 2601 UInt uiMPModeIdx = 0; 2602 2603 for(Int i=0; i<RWTH_SDC_NUM_PRED_MODES-1; i++) 2604 { 2605 UInt uiIsMostProb = 0; 2606 m_pcTDecBinIf->decodeBin( uiIsMostProb, m_cSDCPredModeSCModel.get( 0, i, uiCtx ) ); 2607 2608 if ( uiIsMostProb == 1 ) 2609 break; 2610 2611 // else: get next most probable pred mode 2612 uiMPModeIdx = (uiMPModeIdx+1)%RWTH_SDC_NUM_PRED_MODES; 2613 } 2614 2615 Int intraPredMode = g_auiSDCPredModes[uiMPModeIdx]; 2616 2617 #if HHI_DMM_WEDGE_INTRA 2618 if( intraPredMode == DMM_WEDGE_FULL_IDX ) { xParseWedgeFullInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 2619 if( intraPredMode == DMM_WEDGE_PREDDIR_IDX ) { xParseWedgePredDirInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 2620 #endif 2621 2622 pcCU->setLumaIntraDirSubParts((UChar)intraPredMode, uiAbsPartIdx, uiDepth); 2623 } 2624 2625 Void TDecSbac::parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment ) 2626 { 2627 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2628 assert( pcCU->getSDCFlag(uiAbsPartIdx) ); 2629 assert( uiSegment < 2 ); 2630 2631 UInt uiResidual = 0; 2632 UInt uiBit = 0; 2633 UInt uiAbsIdx = 0; 2634 UInt uiSign = 0; 2635 Int iIdx = 0; 2636 2637 UInt uiMaxResidualBits = GetBitsPerDepthValue(); 2638 assert( uiMaxResidualBits <= g_uiBitDepth ); 2639 2640 m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, uiSegment, 0 ) ); 2641 2642 if (uiResidual) 2643 { 2644 // decode residual sign bit 2645 m_pcTDecBinIf->decodeBin(uiSign, m_cSDCResidualSignFlagSCModel.get( 0, uiSegment, 0 ) ); 2646 2647 // decode residual magnitude 2648 for (Int i=0; i<uiMaxResidualBits; i++) 2649 { 2650 m_pcTDecBinIf->decodeBin(uiBit, m_cSDCResidualSCModel.get( 0, uiSegment, i ) ); 2651 uiAbsIdx |= uiBit << i; 2652 } 2653 2654 uiAbsIdx += 1; 2655 iIdx =(Int)(uiSign ? -1 : 1)*uiAbsIdx; 2656 } 2657 2658 pcCU->setSDCSegmentDCOffset(iIdx, uiSegment, uiAbsPartIdx); 2659 } 2660 #endif 2454 2661 2455 2662 //! \} -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r100 r189 126 126 Void parseSaoOffset (SaoLcuParam* psSaoLcuParam); 127 127 #endif 128 129 #if RWTH_SDC_DLT_B0036 130 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 131 Void parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 132 Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 133 #endif 128 134 private: 129 135 Void xReadUnarySymbol ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset ); … … 146 152 #endif 147 153 148 #if LGE_EDGE_INTRA 154 #if LGE_EDGE_INTRA_A0070 149 155 Void xParseEdgeIntraInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 150 156 #endif … … 166 172 167 173 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 174 #if LGE_ILLUCOMP_B0045 175 Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 176 #endif 168 177 Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 169 178 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); … … 207 216 ContextModel3DBuffer m_cCUSplitFlagSCModel; 208 217 ContextModel3DBuffer m_cCUSkipFlagSCModel; 218 #if LGE_ILLUCOMP_B0045 219 ContextModel3DBuffer m_cCUICFlagSCModel; 220 #endif 209 221 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; 210 222 ContextModel3DBuffer m_cCUMergeIdxExtSCModel; … … 257 269 ContextModel3DBuffer m_cDmmDataSCModel; 258 270 #endif 259 #if LGE_EDGE_INTRA 271 #if LGE_EDGE_INTRA_A0070 260 272 ContextModel3DBuffer m_cEdgeIntraSCModel; 261 273 #if LGE_EDGE_INTRA_DELTA_DC … … 263 275 #endif 264 276 #endif 277 278 #if RWTH_SDC_DLT_B0036 279 ContextModel3DBuffer m_cSDCFlagSCModel; 280 281 ContextModel3DBuffer m_cSDCResidualFlagSCModel; 282 ContextModel3DBuffer m_cSDCResidualSignFlagSCModel; 283 ContextModel3DBuffer m_cSDCResidualSCModel; 284 285 ContextModel3DBuffer m_cSDCPredModeSCModel; 286 #endif 265 287 }; 266 288
Note: See TracChangeset for help on using the changeset viewer.