Changeset 100 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 9 Aug 2012, 12:53:16 (13 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r77 r100 1891 1891 rpcSlice->setPOC( iPOCmsb+iPOClsb ); 1892 1892 1893 #if HHI_FIX1894 1893 if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV && rpcSlice->getPOC() == 0 ) 1895 #else1896 if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV )1897 #endif1898 1894 { 1899 1895 TComReferencePictureSet* rps = rpcSlice->getLocalRPS(); -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r77 r100 643 643 AOF( bOK ); 644 644 #if LG_RESTRICTEDRESPRED_M24766 645 646 647 645 Int iPUResiPredShift[4]; 646 pcCU->getPUResiPredShift(iPUResiPredShift, 0); 647 m_ppcYuvReco[uiDepth]->add(iPUResiPredShift, pcCU->getPartitionSize(0), m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) ); 648 648 #else 649 649 m_ppcYuvReco[uiDepth]->add( m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) ); … … 705 705 m_pcPrediction->getPredicBufHeight (), 706 706 bAboveAvail, bLeftAvail ); 707 #if LGE_EDGE_INTRA 708 if( uiLumaPredMode >= EDGE_INTRA_IDX ) 709 { 710 m_pcPrediction->predIntraLumaEdge( pcCU, pcCU->getPattern(), uiAbsPartIdx, uiWidth, uiHeight, piPred, uiStride 711 #if LGE_EDGE_INTRA_DELTA_DC 712 , uiLumaPredMode == EDGE_INTRA_DELTA_IDX 713 #endif 714 ); 715 } 716 else 717 #endif 707 718 708 719 //===== get prediction signal ===== -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r77 r100 109 109 { 110 110 #if LG_RESTRICTEDRESPRED_M24766 111 112 113 111 Int iPUResiPredShift[4]; 112 pcCU->getPUResiPredShift(iPUResiPredShift, uiAbsPartIdx); 113 if(iPUResiPredShift[0] >= 0 || iPUResiPredShift[1] >= 0 || iPUResiPredShift[2] >= 0 || iPUResiPredShift[3] >= 0 ) 114 114 #endif 115 115 m_pcEntropyDecoderIf->parseResPredFlag( pcCU, bResPredFlag, uiAbsPartIdx, uiDepth ); -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r56 r100 303 303 { 304 304 m_pcDepthMapGenerator->initViewComponent( rpcPic ); 305 #if !QC_MULTI_DIS_CAN 305 306 m_pcDepthMapGenerator->predictDepthMap ( rpcPic ); 307 #endif 306 308 #if HHI_INTER_VIEW_RESIDUAL_PRED 307 309 m_pcResidualGenerator->initViewComponent( rpcPic ); … … 339 341 #endif 340 342 #if DEPTH_MAP_GENERATION 343 #if !QC_MULTI_DIS_CAN 341 344 // update virtual depth map 342 345 m_pcDepthMapGenerator->updateDepthMap( rpcPic ); 346 #endif 343 347 #endif 344 348 // deblocking filter -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r56 r100 98 98 , m_cDmmDataSCModel ( 1, 1, NUM_DMM_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 99 99 #endif 100 #if LGE_EDGE_INTRA 101 , m_cEdgeIntraSCModel ( 1, 1, NUM_EDGE_INTRA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 102 #if LGE_EDGE_INTRA_DELTA_DC 103 , m_cEdgeIntraDeltaDCSCModel ( 1, 1, NUM_EDGE_INTRA_DELTA_DC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 104 #endif 105 #endif 100 106 { 101 107 assert( m_numContextModels <= MAX_NUM_CTX_MOD ); … … 182 188 183 189 m_cCUTransSubdivFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 190 #if LGE_EDGE_INTRA 191 m_cEdgeIntraSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_EDGE_INTRA ); 192 #if LGE_EDGE_INTRA_DELTA_DC 193 m_cEdgeIntraDeltaDCSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_EDGE_INTRA_DELTA_DC ); 194 #endif 195 #endif 184 196 m_uiLastDQpNonZero = 0; 185 197 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX … … 815 827 { 816 828 UInt uiDMMode; 817 829 818 830 #if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX 819 831 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmmModeSCModel.get(0, 0, 0) ); uiDMMode = uiSymbol; … … 847 859 #endif 848 860 #if !LOGI_INTRA_NAME_3MPM 849 Int iIntraIdx = pcCU->getIntraSizeIdx(uiAbsPartIdx); 850 #endif 851 861 Int iIntraIdx = pcCU->getIntraSizeIdx(uiAbsPartIdx); 862 #endif 863 864 #if LGE_EDGE_INTRA 865 Bool bCodeEdgeIntra = false; 866 if( pcCU->getSlice()->getSPS()->isDepth() ) 867 { 868 UInt uiPUWidth = pcCU->getWidth( uiAbsPartIdx ) >> (pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ? 1 : 0); 869 if( uiPUWidth <= LGE_EDGE_INTRA_MAX_SIZE && uiPUWidth >= LGE_EDGE_INTRA_MIN_SIZE ) 870 bCodeEdgeIntra = true; 871 } 872 #endif 873 852 874 #if LOGI_INTRA_NAME_3MPM 853 Int uiPreds[3] = {-1, -1, -1}; 854 #else 855 Int uiPreds[2] = {-1, -1}; 856 #endif 857 Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds); 858 859 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUIntraPredSCModel.get( 0, 0, 0) ); 860 861 if ( uiSymbol ) 862 { 863 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 875 Int uiPreds[3] = {-1, -1, -1}; 876 #else 877 Int uiPreds[2] = {-1, -1}; 878 #endif 879 Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds); 880 #if LGE_EDGE_INTRA 881 UInt uiCheckBit = 0; 882 #endif 883 884 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUIntraPredSCModel.get( 0, 0, 0) ); 885 886 if ( uiSymbol ) 887 { 888 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 864 889 #if LOGI_INTRA_NAME_3MPM 865 if (uiSymbol)866 {867 m_pcTDecBinIf->decodeBinEP( uiSymbol );868 uiSymbol++;869 }870 #endif 871 intraPredMode = uiPreds[uiSymbol];872 }873 else874 {875 intraPredMode = 0;876 890 if (uiSymbol) 891 { 892 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 893 uiSymbol++; 894 } 895 #endif 896 intraPredMode = uiPreds[uiSymbol]; 897 } 898 else 899 { 900 intraPredMode = 0; 901 877 902 #if LOGI_INTRA_NAME_3MPM 878 879 m_pcTDecBinIf->decodeBinsEP( uiSymbol, 5 ); 880 intraPredMode = uiSymbol; 881 882 //postponed sorting of MPMs (only in remaining branch) 883 if (uiPreds[0] > uiPreds[1]) 884 { 885 std::swap(uiPreds[0], uiPreds[1]); 886 } 887 if (uiPreds[0] > uiPreds[2]) 888 { 889 std::swap(uiPreds[0], uiPreds[2]); 890 } 891 if (uiPreds[1] > uiPreds[2]) 892 { 893 std::swap(uiPreds[1], uiPreds[2]); 894 } 895 #else 896 m_pcTDecBinIf->decodeBinsEP( uiSymbol, g_aucIntraModeBitsAng[iIntraIdx] - 1 ); 897 intraPredMode = uiSymbol; 898 899 if ( intraPredMode == 31 ) 900 { 901 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 902 intraPredMode += uiSymbol; 903 } 904 #endif 905 for ( Int i = 0; i < uiPredNum; i++ ) 906 { 907 intraPredMode += ( intraPredMode >= uiPreds[i] ); 908 } 909 } 903 904 m_pcTDecBinIf->decodeBinsEP( uiSymbol, 5 ); 905 #if LGE_EDGE_INTRA 906 if (bCodeEdgeIntra) 907 { 908 if (uiSymbol==31) 909 { 910 m_pcTDecBinIf->decodeBinsEP(uiCheckBit,1); 911 if (uiCheckBit) 912 uiSymbol = EDGE_INTRA_IDX; 913 } 914 } 915 #endif 916 intraPredMode = uiSymbol; 917 918 //postponed sorting of MPMs (only in remaining branch) 919 if (uiPreds[0] > uiPreds[1]) 920 { 921 std::swap(uiPreds[0], uiPreds[1]); 922 } 923 if (uiPreds[0] > uiPreds[2]) 924 { 925 std::swap(uiPreds[0], uiPreds[2]); 926 } 927 if (uiPreds[1] > uiPreds[2]) 928 { 929 std::swap(uiPreds[1], uiPreds[2]); 930 } 931 #else 932 m_pcTDecBinIf->decodeBinsEP( uiSymbol, g_aucIntraModeBitsAng[iIntraIdx] - 1 ); 933 intraPredMode = uiSymbol; 934 935 if ( intraPredMode == 31 ) 936 { 937 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 938 intraPredMode += uiSymbol; 939 } 940 #endif 941 #if LGE_EDGE_INTRA 942 if ( intraPredMode != EDGE_INTRA_IDX) 943 { 944 #endif 945 for ( Int i = 0; i < uiPredNum; i++ ) 946 { 947 intraPredMode += ( intraPredMode >= uiPreds[i] ); 948 } 949 #if LGE_EDGE_INTRA 950 } 951 #endif 952 } 953 954 #if LGE_EDGE_INTRA 955 if( intraPredMode == EDGE_INTRA_IDX ) 956 { 957 xParseEdgeIntraInfo( pcCU, uiAbsPartIdx, uiDepth ); 958 #if LGE_EDGE_INTRA_DELTA_DC 959 m_pcTDecBinIf->decodeBin( uiSymbol, m_cEdgeIntraDeltaDCSCModel.get(0, 0, 0) ); 960 if( uiSymbol ) 961 { 962 intraPredMode = EDGE_INTRA_DELTA_IDX; 963 Int iDeltaDC0; 964 Int iDeltaDC1; 965 966 xReadExGolombLevel( (UInt &) iDeltaDC0, m_cEdgeIntraDeltaDCSCModel.get(0, 0, 1) ); 967 if( iDeltaDC0 != 0 ) 968 { 969 UInt uiSign; 970 m_pcTDecBinIf->decodeBinEP( uiSign ); 971 if ( uiSign ) 972 { 973 iDeltaDC0 = -iDeltaDC0; 974 } 975 } 976 xReadExGolombLevel( (UInt &) iDeltaDC1, m_cEdgeIntraDeltaDCSCModel.get(0, 0, 1) ); 977 if( iDeltaDC1 != 0 ) 978 { 979 UInt uiSign; 980 m_pcTDecBinIf->decodeBinEP( uiSign ); 981 if ( uiSign ) 982 { 983 iDeltaDC1 = -iDeltaDC1; 984 } 985 } 986 987 pcCU->setEdgeDeltaDC0( uiAbsPartIdx, iDeltaDC0 ); 988 pcCU->setEdgeDeltaDC1( uiAbsPartIdx, iDeltaDC1 ); 989 } 990 #endif 991 } 992 #endif 993 910 994 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 911 995 } 912 996 #endif 913 997 914 998 pcCU->setLumaIntraDirSubParts( (UChar)intraPredMode, uiAbsPartIdx, uiDepth ); 915 999 } … … 2012 2096 #endif 2013 2097 2014 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 2098 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA && LGE_EDGE_INTRA_DELTA_DC) 2015 2099 Void TDecSbac::xReadExGolombLevel( UInt& ruiSymbol, ContextModel& rcSCModel ) 2016 2100 { … … 2270 2354 } 2271 2355 #endif 2356 2357 #if LGE_EDGE_INTRA 2358 Void TDecSbac::xParseEdgeIntraInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2359 { 2360 UInt uiSymbol = 0; 2361 2362 // 1. Top(0) or Left(1) 2363 UChar ucLeft; 2364 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 2365 ucLeft = uiSymbol; 2366 2367 // 2. Start position (lowest bit first) 2368 UChar ucStart = 0; 2369 for( UInt ui = 0; ui < 6 - uiDepth; ui++ ) 2370 { 2371 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 2372 ucStart |= (uiSymbol << ui); 2373 } 2374 2375 // 3. Number of edges 2376 UChar ucMax = 0; 2377 for( UInt ui = 0; ui < 7 - uiDepth; ui++ ) 2378 { 2379 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 2380 ucMax |= (uiSymbol << ui); 2381 } 2382 ucMax++; // +1 2383 2384 // 4. Edges 2385 UChar* pucSymbolList = (UChar*) xMalloc( UChar, 256 * LGE_EDGE_INTRA_MAX_EDGE_NUM_PER_4x4 ); 2386 UInt uiCtxEdgeIntra = pcCU->getCtxEdgeIntra( uiAbsPartIdx ); 2387 for( Int iPtr = 0; iPtr < ucMax; iPtr++ ) 2388 { 2389 UChar ucEdge = 0; 2390 UInt uiReorderEdge = 0; 2391 // Left-friendly direction 2392 // 0 ( 0deg) => 0 2393 // 1 ( 45deg) => 10 2394 // 2 ( -45deg) => 110 2395 // 3 ( 90deg) => 1110 2396 // 4 ( -90deg) => 11110 2397 // 5 ( 135deg) => 111110 2398 // 6 (-135deg) => 111111 2399 // Right-friendly direction 2400 // 0 ( 0deg) => 0 2401 // 1 ( -45deg) => 10 2402 // 2 ( 45deg) => 110 2403 // 3 ( -90deg) => 1110 2404 // 4 ( 90deg) => 11110 2405 // 5 (-135deg) => 111110 2406 // 6 ( 135deg) => 111111 2407 // refer to a paper "An efficient chain code with Huffman coding" 2408 for( UInt ui = 0; ui < 6; ui++ ) 2409 { 2410 m_pcTDecBinIf->decodeBin( uiSymbol, m_cEdgeIntraSCModel.get( 0, 0, uiCtxEdgeIntra ) ); 2411 ucEdge <<= 1; 2412 ucEdge |= uiSymbol; 2413 if( uiSymbol == 0 ) 2414 break; 2415 } 2416 2417 switch( ucEdge ) 2418 { 2419 case 0 : // "0" 2420 uiReorderEdge = 0; 2421 break; 2422 case 2 : // "10" 2423 uiReorderEdge = 1; 2424 break; 2425 case 6 : // "110" 2426 uiReorderEdge = 2; 2427 break; 2428 case 14 : // "1110" 2429 uiReorderEdge = 3; 2430 break; 2431 case 30 : // "11110" 2432 uiReorderEdge = 4; 2433 break; 2434 case 62 : // "111110" 2435 uiReorderEdge = 5; 2436 break; 2437 case 63 : // "111111" 2438 uiReorderEdge = 6; 2439 break; 2440 default : 2441 printf("parseIntraEdgeChain: error (unknown code %d)\n",ucEdge); 2442 assert(false); 2443 break; 2444 } 2445 pucSymbolList[iPtr] = uiReorderEdge; 2446 } 2447 ///////////////////// 2448 // Edge Reconstruction 2449 Bool* pbRegion = pcCU->getEdgePartition( uiAbsPartIdx ); 2450 pcCU->reconPartition( uiAbsPartIdx, uiDepth, ucLeft == 1, ucStart, ucMax, pucSymbolList, pbRegion ); 2451 xFree( pucSymbolList ); 2452 } 2453 #endif 2454 2272 2455 //! \} -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r77 r100 146 146 #endif 147 147 148 #if LGE_EDGE_INTRA 149 Void xParseEdgeIntraInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 150 #endif 151 148 152 private: 149 153 TComInputBitstream* m_pcBitstream; … … 253 257 ContextModel3DBuffer m_cDmmDataSCModel; 254 258 #endif 259 #if LGE_EDGE_INTRA 260 ContextModel3DBuffer m_cEdgeIntraSCModel; 261 #if LGE_EDGE_INTRA_DELTA_DC 262 ContextModel3DBuffer m_cEdgeIntraDeltaDCSCModel; 263 #endif 264 #endif 255 265 }; 256 266 -
trunk/source/Lib/TLibDecoder/TDecSlice.h
r77 r100 107 107 ParameterSetMap<TComAPS> m_apsBuffer; 108 108 #if VIDYO_VPS_INTEGRATION 109 109 ParameterSetMap<TComVPS> m_vpsBuffer; 110 110 #endif 111 111 }; -
trunk/source/Lib/TLibDecoder/TDecTop.h
r77 r100 176 176 Void executeDeblockAndAlf(UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, Int& iSkipFrame, Int& iPOCLastDisplay); 177 177 178 Void setViewId(Int viewId) 179 Int getViewId() 178 Void setViewId(Int viewId) { m_viewId = viewId;} 179 Int getViewId() { return m_viewId ;} 180 180 Void setIsDepth( Bool isDepth ) { m_isDepth = isDepth; } 181 181 182 182 #if SONY_COLPIC_AVAILABILITY 183 Void setViewOrderIdx(Int i) 184 Int getViewOrderIdx() 183 Void setViewOrderIdx(Int i) { m_iViewOrderIdx = i ;} 184 Int getViewOrderIdx() { return m_iViewOrderIdx ; } 185 185 #endif 186 186 … … 209 209 #endif 210 210 #if VIDYO_VPS_INTEGRATION 211 211 Void xDecodeVPS(); 212 212 #endif 213 213 Void xDecodeSPS();
Note: See TracChangeset for help on using the changeset viewer.