Changeset 296 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 20 Feb 2013, 22:07:43 (12 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/NALread.cpp
r210 r296 124 124 assert(forbidden_zero_bit == 0); 125 125 126 #if NAL_REF_FLAG127 126 nalu.m_nalRefFlag = (bs.read(1) != 0 ); 128 127 nalu.m_nalUnitType = (NalUnitType) bs.read(6); 129 #else130 nalu.m_nalRefIDC = (NalRefIdc) bs.read(2);131 nalu.m_nalUnitType = (NalUnitType) bs.read(5);132 #endif133 128 134 129 #if QC_MVHEVC_B0046 … … 137 132 nalu.m_temporalId = bs.read(3) - 1; 138 133 #else 139 #if H0388140 134 nalu.m_temporalId = bs.read(3); 141 135 // unsigned reserved_one_5bits = bs.read(5); … … 147 141 nalu.m_isDepth = bs.read(1); 148 142 #endif 149 #if H0566_TLA150 143 if ( nalu.m_temporalId ) 151 144 { … … 157 150 } 158 151 #endif 159 #else160 switch (nalu.m_nalUnitType)161 {162 case NAL_UNIT_CODED_SLICE:163 case NAL_UNIT_CODED_SLICE_IDR:164 #if H0566_TLA165 #if !QC_REM_IDV_B0046166 case NAL_UNIT_CODED_SLICE_IDV:167 #endif168 case NAL_UNIT_CODED_SLICE_CRA:169 case NAL_UNIT_CODED_SLICE_TLA:170 #else171 case NAL_UNIT_CODED_SLICE_CDR:172 #endif173 {174 nalu.m_temporalId = bs.read(3);175 #if VIDYO_VPS_INTEGRATION176 nalu.m_layerId = bs.read(5) - 1;177 #else178 nalu.m_OutputFlag = bs.read(1);179 // unsigned reserved_one_4bits = bs.read(4);180 // assert(reserved_one_4bits == 1);181 nalu.m_viewId = bs.read(3)-1;182 nalu.m_isDepth = bs.read(1);183 #endif184 185 #if H0566_TLA186 if (nalu.m_temporalId == 0)187 {188 #if QC_REM_IDV_B0046189 assert(nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR);190 #else191 assert(nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDV );192 #endif193 }194 else195 {196 assert(nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TLA);197 }198 #endif199 }200 break;201 default:202 nalu.m_temporalId = 0;203 nalu.m_OutputFlag = true;204 break;205 }206 #endif207 #endif208 152 } 209 153 //! \} -
trunk/source/Lib/TLibDecoder/TDecBinCoder.h
r56 r296 54 54 virtual Void start () = 0; 55 55 virtual Void finish () = 0; 56 #if OL_FLUSH57 56 virtual Void flush () = 0; 58 #endif59 57 60 58 virtual Void decodeBin ( UInt& ruiBin, ContextModel& rcCtxModel ) = 0; … … 64 62 65 63 virtual Void resetBac () = 0; 66 #if BURST_IPCM67 64 virtual Void decodeNumSubseqIPCM( Int& numSubseqIPCM ) = 0; 68 #endif69 65 virtual Void decodePCMAlignBits() = 0; 70 66 virtual Void xReadPCMCode ( UInt uiLength, UInt& ruiCode) = 0; -
trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp
r56 r296 65 65 TDecBinCABAC::start() 66 66 { 67 #if !OL_FLUSH ||OL_FLUSH_ALIGN67 #if OL_FLUSH_ALIGN 68 68 assert( m_pcTComBitstream->getNumBitsUntilByteAligned() == 0 ); 69 69 #endif … … 72 72 m_bitsNeeded = -8; 73 73 m_uiValue = m_pcTComBitstream->readByte() << 8; 74 #if OL_FLUSH &&!OL_FLUSH_ALIGN74 #if !OL_FLUSH_ALIGN 75 75 m_uiLastByte = m_pcTComBitstream->readByte(); 76 76 m_uiValue |= m_uiLastByte; … … 85 85 } 86 86 87 #if OL_FLUSH88 87 Void 89 88 TDecBinCABAC::flush() … … 108 107 #endif // OL_FLUSH_ALIGN 109 108 } 110 #endif // OL_FLUSH111 109 112 110 /** … … 122 120 m_uiValue = pcTDecBinCABAC->m_uiValue; 123 121 m_bitsNeeded= pcTDecBinCABAC->m_bitsNeeded; 124 #if OL_FLUSH &&!OL_FLUSH_ALIGN122 #if !OL_FLUSH_ALIGN 125 123 m_uiLastByte= pcTDecBinCABAC->m_uiLastByte; 126 124 #endif … … 152 150 { 153 151 m_bitsNeeded = -8; 154 #if OL_FLUSH &&!OL_FLUSH_ALIGN152 #if !OL_FLUSH_ALIGN 155 153 m_uiLastByte = m_pcTComBitstream->readByte(); 156 154 m_uiValue += m_uiLastByte; … … 173 171 if ( m_bitsNeeded >= 0 ) 174 172 { 175 #if OL_FLUSH &&!OL_FLUSH_ALIGN173 #if !OL_FLUSH_ALIGN 176 174 m_uiLastByte = m_pcTComBitstream->readByte(); 177 175 m_uiValue += m_uiLastByte << m_bitsNeeded; … … 192 190 { 193 191 m_bitsNeeded = -8; 194 #if OL_FLUSH &&!OL_FLUSH_ALIGN192 #if !OL_FLUSH_ALIGN 195 193 m_uiLastByte = m_pcTComBitstream->readByte(); 196 194 m_uiValue += m_uiLastByte; … … 215 213 while ( numBins > 8 ) 216 214 { 217 #if OL_FLUSH &&!OL_FLUSH_ALIGN215 #if !OL_FLUSH_ALIGN 218 216 m_uiLastByte = m_pcTComBitstream->readByte(); 219 217 m_uiValue = ( m_uiValue << 8 ) + ( m_uiLastByte << ( 8 + m_bitsNeeded ) ); … … 241 239 if ( m_bitsNeeded >= 0 ) 242 240 { 243 #if OL_FLUSH &&!OL_FLUSH_ALIGN241 #if !OL_FLUSH_ALIGN 244 242 m_uiLastByte = m_pcTComBitstream->readByte(); 245 243 m_uiValue += m_uiLastByte << m_bitsNeeded; … … 285 283 { 286 284 m_bitsNeeded = -8; 287 #if OL_FLUSH &&!OL_FLUSH_ALIGN285 #if !OL_FLUSH_ALIGN 288 286 m_uiLastByte = m_pcTComBitstream->readByte(); 289 287 m_uiValue += m_uiLastByte; … … 306 304 } 307 305 308 #if BURST_IPCM309 306 /** Decode subsequent_pcm_num. 310 307 * \param numSubseqIPCM … … 323 320 { 324 321 m_bitsNeeded = -8; 325 #if OL_FLUSH &&!OL_FLUSH_ALIGN322 #if !OL_FLUSH_ALIGN 326 323 m_uiLastByte = m_pcTComBitstream->readByte(); 327 324 m_uiValue += m_uiLastByte; … … 342 339 numSubseqIPCM --; 343 340 } 344 #endif345 341 346 342 /** Decode PCM alignment zero bits. -
trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h
r56 r296 56 56 Void start (); 57 57 Void finish (); 58 #if OL_FLUSH59 58 Void flush (); 60 #endif61 59 62 60 Void decodeBin ( UInt& ruiBin, ContextModel& rcCtxModel ); … … 66 64 67 65 Void resetBac (); 68 #if BURST_IPCM69 66 Void decodeNumSubseqIPCM( Int& numSubseqIPCM ) ; 70 #endif71 67 Void decodePCMAlignBits(); 72 68 Void xReadPCMCode ( UInt uiLength, UInt& ruiCode ); … … 82 78 UInt m_uiRange; 83 79 UInt m_uiValue; 84 #if OL_FLUSH &&!OL_FLUSH_ALIGN80 #if !OL_FLUSH_ALIGN 85 81 UInt m_uiLastByte; 86 82 #endif -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r210 r296 169 169 assert(m_pcBitstream->getNumBitsLeft() == 8); /* rsbp_trailing_bits */ 170 170 } 171 #if RPS_IN_SPS172 171 void TDecCavlc::parseShortTermRefPicSet( TComSPS* sps, TComReferencePictureSet* rps, Int idx ) 173 #else174 void TDecCavlc::parseShortTermRefPicSet( TComPPS* pcPPS, TComReferencePictureSet* rps, Int idx )175 #endif176 172 { 177 173 UInt code; … … 184 180 Int rIdx = idx - 1 - code; 185 181 assert (rIdx <= idx && rIdx >= 0); 186 #if RPS_IN_SPS187 182 TComReferencePictureSet* rpsRef = sps->getRPSList()->getReferencePictureSet(rIdx); 188 #else189 TComReferencePictureSet* rpsRef = pcPPS->getRPSList()->getReferencePictureSet(rIdx);190 #endif191 183 Int k = 0, k0 = 0, k1 = 0; 192 184 READ_CODE(1, bit, "delta_rps_sign"); // delta_RPS_sign … … 265 257 READ_FLAG(uiCode, "aps_scaling_list_data_present_flag"); aps->setScalingListEnabled( (uiCode==1)?true:false ); 266 258 READ_FLAG(uiCode, "aps_deblocking_filter_flag"); aps->setLoopFilterOffsetInAPS( (uiCode==1)?true:false ); 267 #if !SAO_UNIT_INTERLEAVING268 READ_FLAG(uiCode, "aps_sample_adaptive_offset_flag"); aps->setSaoEnabled( (uiCode==1)?true:false );269 #endif270 #if !LCU_SYNTAX_ALF271 READ_FLAG(uiCode, "aps_adaptive_loop_filter_flag"); aps->setAlfEnabled( (uiCode==1)?true:false );272 #endif273 259 if(aps->getScalingListEnabled()) 274 260 { 275 261 parseScalingList( aps->getScalingList() ); 276 262 } 277 #if DBL_CONTROL278 263 if(aps->getLoopFilterOffsetInAPS()) 279 264 { 280 265 xParseDblParam( aps ); 281 266 } 282 #endif283 #if SAO_UNIT_INTERLEAVING284 267 READ_FLAG(uiCode, "aps_sao_interleaving_flag"); aps->setSaoInterleavingFlag( (uiCode==1)?true:false ); 285 268 if(!aps->getSaoInterleavingFlag()) 286 269 { 287 270 READ_FLAG(uiCode, "aps_sample_adaptive_offset_flag"); aps->setSaoEnabled( (uiCode==1)?true:false ); 288 #endif289 271 if(aps->getSaoEnabled()) 290 272 { … … 292 274 xParseSaoParam( aps->getSaoParam() ); 293 275 } 294 #if SAO_UNIT_INTERLEAVING 295 } 296 #endif 297 #if LCU_SYNTAX_ALF 276 } 298 277 READ_FLAG(uiCode, "aps_adaptive_loop_filter_flag"); aps->setAlfEnabled( (uiCode==1)?true:false ); 299 #endif300 278 if(aps->getAlfEnabled()) 301 279 { 302 #if !LCU_SYNTAX_ALF303 aps->getAlfParam()->alf_flag = 1;304 #endif305 280 xParseAlfParam( aps->getAlfParam()); 306 281 } … … 316 291 } 317 292 318 #if DBL_CONTROL319 293 Void TDecCavlc::xParseDblParam ( TComAPS* aps ) 320 294 { … … 333 307 } 334 308 } 335 #endif336 309 /** parse SAO parameters 337 310 * \param pSaoParam … … 341 314 UInt uiSymbol; 342 315 343 #if SAO_UNIT_INTERLEAVING344 316 int i,j, compIdx; 345 317 int numCuInWidth; … … 393 365 } 394 366 } 395 #else 396 if (pSaoParam->bSaoFlag[0]) 397 { 398 xParseSaoSplitParam (pSaoParam, 0, 0); 399 xParseSaoOffsetParam(pSaoParam, 0, 0); 400 READ_FLAG (uiSymbol, "sao_flag_cb"); 401 pSaoParam->bSaoFlag[1] = uiSymbol? true:false; 402 if (pSaoParam->bSaoFlag[1]) 403 { 404 xParseSaoSplitParam (pSaoParam, 0, 1); 405 xParseSaoOffsetParam(pSaoParam, 0, 1); 406 } 407 408 READ_FLAG (uiSymbol, "sao_flag_cr"); 409 pSaoParam->bSaoFlag[2] = uiSymbol? true:false; 410 if (pSaoParam->bSaoFlag[2]) 411 { 412 xParseSaoSplitParam (pSaoParam, 0, 2); 413 xParseSaoOffsetParam(pSaoParam, 0, 2); 414 } 415 } 416 #endif 417 } 418 #if SAO_UNIT_INTERLEAVING 367 } 419 368 /** copy SAO parameter 420 369 * \param dst … … 584 533 } 585 534 586 #else 587 /** Decode quadtree split flag 588 * \param pSaoParam, iPartIdx 589 */ 590 Void TDecCavlc::xParseSaoSplitParam(SAOParam* pSaoParam, Int iPartIdx, Int iYCbCr) 591 { 592 UInt uiSymbol; 593 SAOQTPart* pSaoPart = NULL; 594 pSaoPart= &(pSaoParam->psSaoPart[iYCbCr][iPartIdx]); 595 596 if(pSaoPart->PartLevel < pSaoParam->iMaxSplitLevel) 597 { 598 READ_FLAG (uiSymbol, "sao_split_flag"); 599 pSaoPart->bSplit = uiSymbol? true:false; 600 if(pSaoPart->bSplit) 601 { 602 for (Int i=0;i<NUM_DOWN_PART;i++) 603 { 604 xParseSaoSplitParam(pSaoParam, pSaoPart->DownPartsIdx[i], iYCbCr); 605 } 606 } 607 } 608 else 609 { 610 pSaoPart->bSplit = false; 611 } 612 } 613 614 /** Decode SAO for one partition 615 * \param pSaoParam, iPartIdx 616 */ 617 Void TDecCavlc::xParseSaoOffsetParam(SAOParam* pSaoParam, Int iPartIdx, Int iYCbCr) 618 { 619 UInt uiSymbol; 620 Int iSymbol; 621 SAOQTPart* pSaoPart = NULL; 622 pSaoPart = &(pSaoParam->psSaoPart[iYCbCr][iPartIdx]); 623 624 static Int iTypeLength[MAX_NUM_SAO_TYPE] = { 625 SAO_EO_LEN, 626 SAO_EO_LEN, 627 SAO_EO_LEN, 628 SAO_EO_LEN, 629 SAO_BO_LEN, 630 SAO_BO_LEN 631 }; 632 if(!pSaoPart->bSplit) 633 { 634 READ_UVLC (uiSymbol, "sao_type_idx"); 635 if (uiSymbol) 636 { 637 pSaoPart->iBestType = uiSymbol-1; 638 pSaoPart->bEnableFlag = true; 639 } 640 else 641 { 642 pSaoPart->iBestType = -1; 643 pSaoPart->bEnableFlag = false; 644 } 645 646 if (pSaoPart->bEnableFlag) 647 { 648 pSaoPart->iLength = iTypeLength[pSaoPart->iBestType]; 649 for(Int i=0; i< pSaoPart->iLength; i++) 650 { 651 READ_SVLC (iSymbol, "sao_offset"); 652 pSaoPart->iOffset[i] = iSymbol; 653 } 654 } 655 return; 656 } 657 658 //split 659 if (pSaoPart->PartLevel < pSaoParam->iMaxSplitLevel) 660 { 661 for(Int i=0;i<NUM_DOWN_PART;i++) 662 { 663 xParseSaoOffsetParam(pSaoParam, pSaoPart->DownPartsIdx[i], iYCbCr); 664 } 665 } 666 } 667 #endif 668 669 #if LCU_SYNTAX_ALF 535 670 536 Void TDecCavlc::xParseAlfParam(AlfParamSet* pAlfParamSet, Bool bSentInAPS, Int firstLCUAddr, Bool acrossSlice, Int numLCUInWidth, Int numLCUInHeight) 671 537 { … … 931 797 } 932 798 933 #endif934 799 935 800 Void TDecCavlc::xParseAlfParam(ALFParam* pAlfParam) … … 937 802 UInt uiSymbol; 938 803 Int iSymbol; 939 #if ALF_SINGLE_FILTER_SHAPE940 804 Int sqrFiltLengthTab[NUM_ALF_FILTER_SHAPE] = {ALF_FILTER_LEN}; 941 #else 942 Int sqrFiltLengthTab[2] = { 9, 9}; 943 #endif 944 945 #if LCU_SYNTAX_ALF 805 946 806 switch(pAlfParam->componentID) 947 807 { … … 961 821 case ALF_Y: 962 822 { 963 #endif964 823 pAlfParam->filters_per_group = 0; 965 824 memset (pAlfParam->filterPattern, 0 , sizeof(Int)*NO_VAR_BINS); 966 #if !LCU_SYNTAX_ALF967 READ_FLAG (uiSymbol, "alf_region_adaptation_flag");968 pAlfParam->alf_pcr_region_flag = uiSymbol;969 #endif970 #if ALF_SINGLE_FILTER_SHAPE971 825 pAlfParam->filter_shape = 0; 972 #else973 READ_UVLC (uiSymbol, "alf_length_luma_minus_5_div2");974 pAlfParam->filter_shape = uiSymbol;975 #endif976 826 pAlfParam->num_coeff = sqrFiltLengthTab[pAlfParam->filter_shape]; 977 827 … … 989 839 { 990 840 pAlfParam->filters_per_group = 1; 991 #if LCU_SYNTAX_ALF992 #if ALF_16_BA_GROUPS993 841 Int numMergeFlags = 16; 994 #else995 Int numMergeFlags = 15;996 #endif997 #else998 #if ALF_16_BA_GROUPS999 Int numMergeFlags = 16;1000 #else1001 Int numMergeFlags = pAlfParam->alf_pcr_region_flag ? 16 : 15;1002 #endif1003 #endif1004 842 for (Int i=1; i<numMergeFlags; i++) 1005 843 { … … 1021 859 } 1022 860 1023 #if ALF_SINGLE_FILTER_SHAPE1024 861 Int minScanVal = MIN_SCAN_POS_CROSS; 1025 #else1026 Int minScanVal = (pAlfParam->filter_shape == ALF_STAR5x5) ? 0: MIN_SCAN_POS_CROSS;1027 #endif1028 862 1029 863 // Determine maxScanVal … … 1036 870 1037 871 // Golomb parameters 1038 #if LCU_SYNTAX_ALF1039 872 if( pAlfParam->filters_per_group > 1 ) 1040 873 { 1041 #endif1042 874 READ_UVLC (uiSymbol, "alf_min_kstart_minus1"); 1043 875 pAlfParam->minKStart = 1 + uiSymbol; … … 1051 883 kMin = pAlfParam->kMinTab[scanPos]; 1052 884 } 1053 #if LCU_SYNTAX_ALF 1054 } 1055 #endif 885 } 1056 886 1057 887 Int scanPos; … … 1061 891 { 1062 892 scanPos = pDepthInt[i] - 1; 1063 #if LCU_SYNTAX_ALF1064 893 Int k = (pAlfParam->filters_per_group == 1) ? kTableTabShapes[ALF_CROSS9x7_SQUARE3x3][i] : pAlfParam->kMinTab[scanPos]; 1065 894 pAlfParam->coeffmulti[idx][i] = xGolombDecode(k); 1066 #else 1067 pAlfParam->coeffmulti[idx][i] = xGolombDecode(pAlfParam->kMinTab[scanPos]); 1068 #endif 1069 } 1070 } 1071 #if LCU_SYNTAX_ALF 895 } 896 } 1072 897 } 1073 898 break; … … 1079 904 } 1080 905 } 1081 #else1082 // filter parameters for chroma1083 READ_UVLC (uiSymbol, "alf_chroma_idc");1084 pAlfParam->chroma_idc = uiSymbol;1085 1086 if(pAlfParam->chroma_idc)1087 {1088 1089 #if ALF_SINGLE_FILTER_SHAPE1090 pAlfParam->filter_shape_chroma = 0;1091 #else1092 READ_UVLC (uiSymbol, "alf_length_chroma_minus_5_div2");1093 1094 pAlfParam->filter_shape_chroma = uiSymbol;1095 #endif1096 pAlfParam->num_coeff_chroma = sqrFiltLengthTab[pAlfParam->filter_shape_chroma];1097 // filter coefficients for chroma1098 for(Int pos=0; pos<pAlfParam->num_coeff_chroma; pos++)1099 {1100 READ_SVLC (iSymbol, "alf_coeff_chroma");1101 pAlfParam->coeff_chroma[pos] = iSymbol;1102 }1103 }1104 #endif1105 906 } 1106 907 … … 1137 938 } 1138 939 1139 #if TILES_OR_ENTROPY_SYNC_IDC1140 940 Void TDecCavlc::parsePPS(TComPPS* pcPPS, ParameterSetManagerDecoder *parameterSet) 1141 #else1142 Void TDecCavlc::parsePPS(TComPPS* pcPPS)1143 #endif1144 941 { 1145 942 #if ENC_DEC_TRACE … … 1150 947 Int iCode; 1151 948 1152 #if !RPS_IN_SPS1153 TComRPSList* rpsList = pcPPS->getRPSList();1154 #endif1155 949 READ_UVLC( uiCode, "pic_parameter_set_id"); pcPPS->setPPSId (uiCode); 1156 950 READ_UVLC( uiCode, "seq_parameter_set_id"); pcPPS->setSPSId (uiCode); 1157 951 1158 #if MULTIBITS_DATA_HIDING1159 952 READ_FLAG ( uiCode, "sign_data_hiding_flag" ); pcPPS->setSignHideFlag( uiCode ); 1160 953 if( pcPPS->getSignHideFlag() ) … … 1162 955 READ_CODE( 4, uiCode, "sign_hiding_threshold"); pcPPS->setTSIG(uiCode); 1163 956 } 1164 #endif1165 957 1166 958 #if CABAC_INIT_FLAG 1167 959 READ_FLAG( uiCode, "cabac_init_present_flag" ); pcPPS->setCabacInitPresentFlag( uiCode ? true : false ); 1168 #endif1169 #if !RPS_IN_SPS1170 // RPS is put before entropy_coding_mode_flag1171 // since entropy_coding_mode_flag will probably be removed from the WD1172 TComReferencePictureSet* pcRPS;1173 1174 READ_UVLC( uiCode, "num_short_term_ref_pic_sets" );1175 rpsList->create(uiCode);1176 1177 for(Int i=0; i< rpsList->getNumberOfReferencePictureSets(); i++)1178 {1179 pcRPS = rpsList->getReferencePictureSet(i);1180 parseShortTermRefPicSet(pcPPS,pcRPS,i);1181 }1182 READ_FLAG( uiCode, "long_term_ref_pics_present_flag" ); pcPPS->setLongTermRefsPresent(uiCode);1183 960 #endif 1184 961 // entropy_coding_mode_flag … … 1187 964 if (pcPPS->getEntropyCodingMode()) 1188 965 { 1189 #if !WPP_SIMPLIFICATION 1190 READ_UVLC( uiCode, "entropy_coding_synchro" ); pcPPS->setEntropyCodingSynchro( uiCode ); 1191 READ_FLAG( uiCode, "cabac_istate_reset" ); pcPPS->setCabacIstateReset( uiCode ? true : false ); 1192 #endif 1193 #if !TILES_OR_ENTROPY_SYNC_IDC 1194 #if !WPP_SIMPLIFICATION 1195 if ( pcPPS->getEntropyCodingSynchro() ) 1196 #endif 1197 { 1198 READ_UVLC( uiCode, "num_substreams_minus1" ); pcPPS->setNumSubstreams(uiCode+1); 1199 } 1200 #endif 1201 } 1202 #if !H0566_TLA 1203 READ_UVLC( uiCode, "num_temporal_layer_switching_point_flags" ); pcPPS->setNumTLayerSwitchingFlags( uiCode ); 1204 for ( UInt i = 0; i < pcPPS->getNumTLayerSwitchingFlags(); i++ ) 1205 { 1206 READ_FLAG( uiCode, "temporal_layer_switching_point_flag" ); pcPPS->setTLayerSwitchingFlag( i, uiCode > 0 ? true : false ); 1207 } 1208 #endif 966 } 1209 967 1210 968 // num_ref_idx_l0_default_active_minus1 … … 1241 999 //printf("TDecCavlc::parsePPS():\tm_bUseWeightPred=%d\tm_uiBiPredIdc=%d\n", pcPPS->getUseWP(), pcPPS->getWPBiPredIdc()); 1242 1000 1243 #if H03881244 1001 READ_FLAG( uiCode, "output_flag_present_flag" ); 1245 1002 pcPPS->setOutputFlagPresentFlag( uiCode==1 ); 1246 #endif 1247 1248 #if TILES_OR_ENTROPY_SYNC_IDC 1003 1249 1004 if(parameterSet->getPrefetchedSPS(pcPPS->getSPSId())->getTilesOrEntropyCodingSyncIdc()==1) 1250 1005 { 1251 #endif1252 1006 READ_FLAG ( uiCode, "tile_info_present_flag" ); 1253 1007 pcPPS->setColumnRowInfoPresent(uiCode); … … 1290 1044 Int iNumColTilesMinus1 = (pcPPS->getColumnRowInfoPresent() == 1)?(pcPPS->getNumColumnsMinus1()):(pcPPS->getSPS()->getNumColumnsMinus1()); 1291 1045 Int iNumRowTilesMinus1 = (pcPPS->getColumnRowInfoPresent() == 1)?(pcPPS->getNumColumnsMinus1()):(pcPPS->getSPS()->getNumRowsMinus1()); 1292 #if !REMOVE_TILE_DEPENDENCE1293 pcPPS->setTileBoundaryIndependenceIdr( 1 ); //default1294 #endif1295 1046 pcPPS->setLFCrossTileBoundaryFlag(true); //default 1296 1047 1297 1048 if(iNumColTilesMinus1 !=0 || iNumRowTilesMinus1 !=0) 1298 1049 { 1299 #if !REMOVE_TILE_DEPENDENCE1300 READ_FLAG ( uiCode, "tile_boundary_independence_flag" );1301 pcPPS->setTileBoundaryIndependenceIdr( uiCode );1302 1303 if(pcPPS->getTileBoundaryIndependenceIdr() == 1)1304 {1305 #endif1306 1050 READ_FLAG ( uiCode, "loop_filter_across_tile_flag" ); 1307 1051 pcPPS->setLFCrossTileBoundaryFlag( (uiCode == 1)?true:false ); 1308 #if !REMOVE_TILE_DEPENDENCE 1309 } 1310 #endif 1311 } 1312 } 1313 #if TILES_OR_ENTROPY_SYNC_IDC 1052 } 1053 } 1314 1054 } 1315 1055 else if(parameterSet->getPrefetchedSPS(pcPPS->getSPSId())->getTilesOrEntropyCodingSyncIdc()==2) … … 1317 1057 READ_UVLC( uiCode, "num_substreams_minus1" ); pcPPS->setNumSubstreams(uiCode+1); 1318 1058 } 1319 #endif 1320 1321 #if DBL_CONTROL 1059 1322 1060 READ_FLAG( uiCode, "deblocking_filter_control_present_flag" ); 1323 1061 pcPPS->setDeblockingFilterControlPresent( uiCode ? true : false); 1324 #endif1325 #if PARALLEL_MERGE1326 1062 READ_UVLC( uiCode, "log2_parallel_merge_level_minus2"); 1327 1063 assert(uiCode == LOG2_PARALLEL_MERGE_LEVEL_MINUS2); 1328 1064 pcPPS->setLog2ParallelMergeLevelMinus2 (uiCode); 1329 #endif1330 1065 1331 1066 READ_FLAG( uiCode, "pps_extension_flag"); … … 1458 1193 } 1459 1194 } 1195 #if INTER_VIEW_VECTOR_SCALING_C0115 1196 READ_FLAG( uiCode, "inter_view_vector_scaling_flag" ); pcVPS->setIVScalingFlag( uiCode ? true:false); 1197 #endif 1460 1198 } 1461 1199 … … 1468 1206 #endif 1469 1207 #endif 1470 #if HHI_MPI 1208 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068 1471 1209 Void TDecCavlc::parseSPS(TComSPS* pcSPS, Bool bIsDepth) 1472 1210 #else … … 1493 1231 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 1494 1232 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 1495 #if PIC_CROPPING1496 1233 READ_FLAG( uiCode, "pic_cropping_flag"); pcSPS->setPicCroppingFlag ( uiCode ? true : false ); 1497 1234 if (uiCode != 0) … … 1502 1239 READ_UVLC( uiCode, "pic_crop_bottom_offset" ); pcSPS->setPicCropBottomOffset( uiCode ); 1503 1240 } 1504 #endif1505 1241 1506 1242 #if FULL_NBIT … … 1522 1258 #endif 1523 1259 1524 #if H0736_AVC_STYLE_QP_RANGE1525 1260 pcSPS->setQpBDOffsetY( (Int) (6*uiCode) ); 1526 #endif1527 1261 1528 1262 g_uiBASE_MAX = ((1<<(g_uiBitDepth))-1); … … 1534 1268 #endif 1535 1269 READ_UVLC( uiCode, "bit_depth_chroma_minus8" ); 1536 #if H0736_AVC_STYLE_QP_RANGE1537 1270 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 1538 #endif1539 1271 1540 1272 READ_FLAG( uiCode, "pcm_enabled_flag" ); pcSPS->setUsePCM( uiCode ? true : false ); … … 1551 1283 1552 1284 READ_UVLC( uiCode, "log2_max_pic_order_cnt_lsb_minus4" ); pcSPS->setBitsForPOC( 4 + uiCode ); 1553 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER1554 1285 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 1555 1286 { … … 1561 1292 pcSPS->setMaxLatencyIncrease( uiCode, i ); 1562 1293 } 1563 #else 1564 READ_UVLC( uiCode, "max_num_ref_pics" ); pcSPS->setMaxNumberOfReferencePictures(uiCode); 1565 READ_UVLC( uiCode, "num_reorder_frames" ); pcSPS->setNumReorderFrames(uiCode); 1566 READ_UVLC ( uiCode, "max_dec_frame_buffering"); 1567 pcSPS->setMaxDecFrameBuffering( uiCode ); 1568 READ_UVLC ( uiCode, "max_latency_increase"); 1569 pcSPS->setMaxLatencyIncrease( uiCode ); 1570 #endif 1571 1572 #if H0412_REF_PIC_LIST_RESTRICTION 1294 1573 1295 READ_FLAG( uiCode, "restricted_ref_pic_lists_flag" ); 1574 1296 pcSPS->setRestrictedRefPicListsFlag( uiCode ); … … 1582 1304 pcSPS->setListsModificationPresentFlag(true); 1583 1305 } 1584 #endif1585 1306 READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" ); 1586 1307 UInt log2MinCUSize = uiCode + 3; … … 1625 1346 READ_FLAG( uiCode, "sample_adaptive_offset_enabled_flag" ); pcSPS->setUseSAO ( uiCode ? true : false ); 1626 1347 READ_FLAG( uiCode, "adaptive_loop_filter_enabled_flag" ); pcSPS->setUseALF ( uiCode ? true : false ); 1627 #if LCU_SYNTAX_ALF1628 1348 if(pcSPS->getUseALF()) 1629 1349 { 1630 1350 READ_FLAG( uiCode, "alf_coef_in_slice_flag" ); pcSPS->setUseALFCoefInSlice ( uiCode ? true : false ); 1631 1351 } 1632 #endif1633 1352 if( pcSPS->getUsePCM() ) 1634 1353 { … … 1639 1358 1640 1359 1641 #if RPS_IN_SPS1642 1360 TComRPSList* rpsList = pcSPS->getRPSList(); 1643 1361 TComReferencePictureSet* rps; … … 1652 1370 } 1653 1371 READ_FLAG( uiCode, "long_term_ref_pics_present_flag" ); pcSPS->setLongTermRefsPresent(uiCode); 1654 #endif1655 #if !PIC_CROPPING1656 //!!!KS: Syntax not in WD !!!1657 1658 xReadUvlc ( uiCode ); pcSPS->setPadX ( uiCode );1659 xReadUvlc ( uiCode ); pcSPS->setPadY ( uiCode );1660 #endif1661 1372 1662 1373 // AMVP mode for each depth (AM_NONE or AM_EXPL) … … 1667 1378 } 1668 1379 1669 #if TILES_WPP_ENTRY_POINT_SIGNALLING1670 1380 READ_CODE(2, uiCode, "tiles_or_entropy_coding_sync_idc"); pcSPS->setTilesOrEntropyCodingSyncIdc(uiCode); 1671 #endif 1672 1673 #if TILES_OR_ENTROPY_SYNC_IDC 1381 1674 1382 if(pcSPS->getTilesOrEntropyCodingSyncIdc() == 1) 1675 1383 { 1676 #endif1677 1384 READ_UVLC ( uiCode, "num_tile_columns_minus1" ); 1678 1385 pcSPS->setNumColumnsMinus1( uiCode ); … … 1701 1408 free(rowHeight); 1702 1409 } 1703 #if !REMOVE_TILE_DEPENDENCE1704 pcSPS->setTileBoundaryIndependenceIdr( 1 ); //default1705 #endif1706 1410 pcSPS->setLFCrossTileBoundaryFlag(true); //default 1707 1411 1708 1412 if( pcSPS->getNumColumnsMinus1() !=0 || pcSPS->getNumRowsMinus1() != 0) 1709 1413 { 1710 #if !REMOVE_TILE_DEPENDENCE1711 READ_FLAG ( uiCode, "tile_boundary_independence_flag" );1712 pcSPS->setTileBoundaryIndependenceIdr( uiCode );1713 if(pcSPS->getTileBoundaryIndependenceIdr() == 1)1714 {1715 #endif1716 1414 READ_FLAG ( uiCode, "loop_filter_across_tile_flag" ); 1717 1415 pcSPS->setLFCrossTileBoundaryFlag( (uiCode==1)?true:false); 1718 #if !REMOVE_TILE_DEPENDENCE 1719 } 1720 #endif 1721 } 1722 #if TILES_OR_ENTROPY_SYNC_IDC 1723 } 1724 #endif 1416 } 1417 } 1725 1418 READ_FLAG( uiCode, "sps_extension_flag"); 1726 1419 #if !QC_MVHEVC_B0046 … … 1799 1492 pcSPS->setPredDepthMapGeneration( 0, false ); 1800 1493 #endif 1801 #if H HI_INTER_VIEW_RESIDUAL_PRED1494 #if H3D_IVRP 1802 1495 pcSPS->setMultiviewResPredMode ( 0 ); 1803 1496 #endif … … 1814 1507 pcSPS->setPredDepthMapGeneration( uiCode, true ); 1815 1508 #endif 1816 #if H HI_INTER_VIEW_RESIDUAL_PRED1509 #if H3D_IVRP 1817 1510 pcSPS->setMultiviewResPredMode ( 0 ); 1818 1511 #endif … … 1841 1534 #if DEPTH_MAP_GENERATION 1842 1535 UInt uiPredDepthMapGeneration = 0, uiPdmPrecision = 0; 1843 #if H HI_INTER_VIEW_MOTION_PRED1536 #if H3D_IVMP 1844 1537 UInt uiMultiviewMvPredMode = 0; 1845 1538 #endif 1846 #if H HI_INTER_VIEW_RESIDUAL_PRED1539 #if H3D_IVRP 1847 1540 UInt uiMultiviewResPredMode = 0; 1848 1541 #endif … … 1856 1549 READ_SVLC( iCode, "Pdm_offset" ); m_aaiTempPdmOffset [ uiViewId ][ uiBaseId ] = iCode; 1857 1550 } 1858 #if H HI_INTER_VIEW_MOTION_PRED1551 #if H3D_IVMP 1859 1552 READ_UVLC( uiMultiviewMvPredMode, "multi_view_mv_pred_mode" ); 1860 1553 #endif 1861 #if H HI_INTER_VIEW_RESIDUAL_PRED1554 #if H3D_IVRP 1862 1555 READ_FLAG( uiMultiviewResPredMode, "multi_view_residual_pred_mode" ); 1863 1556 #endif 1864 1557 } 1865 #if H HI_INTER_VIEW_MOTION_PRED1558 #if H3D_IVMP 1866 1559 pcSPS->setPredDepthMapGeneration( uiViewId, false, uiPredDepthMapGeneration, uiMultiviewMvPredMode, uiPdmPrecision, m_aaiTempPdmScaleNomDelta, m_aaiTempPdmOffset ); 1867 1560 #else … … 1869 1562 #endif 1870 1563 #endif 1871 #if H HI_INTER_VIEW_RESIDUAL_PRED1564 #if H3D_IVRP 1872 1565 pcSPS->setMultiviewResPredMode ( uiMultiviewResPredMode ); 1873 1566 #endif … … 1891 1584 } 1892 1585 1893 #if LCU_SYNTAX_ALF 1586 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 1587 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth) 1588 #else 1894 1589 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet) 1895 #else1896 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl)1897 1590 #endif 1898 1591 { … … 1927 1620 { 1928 1621 UInt uiCodeTmp = 0; 1929 if ( rpcSlice->getSPS()->getViewId() && !rpcSlice->getSPS()->isDepth() ) 1622 if ( rpcSlice->getSPS()->getViewId() 1623 #if !LGE_ILLUCOMP_DEPTH_C0046 1624 && !rpcSlice->getSPS()->isDepth() 1625 #endif 1626 ) 1930 1627 { 1931 1628 READ_FLAG (uiCodeTmp, "applying IC flag"); … … 1977 1674 rpcSlice->setSPS(sps); 1978 1675 rpcSlice->setPPS(pps); 1979 #if H03881980 1676 if( pps->getOutputFlagPresentFlag() ) 1981 1677 { … … 1987 1683 rpcSlice->setPicOutputFlag( true ); 1988 1684 } 1989 #endif1990 1685 #if QC_REM_IDV_B0046 1991 1686 #if !QC_MVHEVC_B0046 … … 2054 1749 { 2055 1750 rps = rpcSlice->getLocalRPS(); 2056 #if RPS_IN_SPS2057 1751 parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets()); 2058 #else2059 parseShortTermRefPicSet(pps,rps, pps->getRPSList()->getNumberOfReferencePictureSets());2060 #endif2061 1752 rpcSlice->setRPS(rps); 2062 1753 } 2063 1754 else // use reference to short-term reference picture set in PPS 2064 1755 { 2065 #if RPS_IN_SPS2066 1756 READ_UVLC( uiCode, "short_term_ref_pic_set_idx"); rpcSlice->setRPS(sps->getRPSList()->getReferencePictureSet(uiCode)); 2067 #else2068 READ_UVLC( uiCode, "short_term_ref_pic_set_idx"); rpcSlice->setRPS(pps->getRPSList()->getReferencePictureSet(uiCode));2069 #endif2070 1757 rps = rpcSlice->getRPS(); 2071 1758 } 2072 #if RPS_IN_SPS2073 1759 if(sps->getLongTermRefsPresent()) 2074 #else2075 if(pps->getLongTermRefsPresent())2076 #endif2077 1760 { 2078 1761 Int offset = rps->getNumberOfNegativePictures()+rps->getNumberOfPositivePictures(); 2079 1762 READ_UVLC( uiCode, "num_long_term_pics"); rps->setNumberOfLongtermPictures(uiCode); 2080 1763 Int prev = 0; 2081 #if LTRP_MULT2082 1764 Int prevMsb=0; 2083 1765 Int prevDeltaPocLt=0; 2084 #endif2085 1766 for(Int j=rps->getNumberOfLongtermPictures()+offset-1 ; j > offset-1; j--) 2086 1767 { … … 2088 1769 prev += uiCode; 2089 1770 2090 #if LTRP_MULT2091 1771 READ_FLAG(uiCode,"delta_poc_msb_present_flag"); 2092 1772 Int decDeltaPOCMsbPresent=uiCode; … … 2109 1789 else 2110 1790 { 2111 #endif2112 1791 rps->setPOC(j,rpcSlice->getPOC()-prev); 2113 1792 rps->setDeltaPOC(j,-(Int)prev); 2114 #if LTRP_MULT2115 1793 } 2116 1794 prevDeltaPocLt=prev; 2117 #endif2118 1795 READ_FLAG( uiCode, "used_by_curr_pic_lt_flag"); rps->setUsed(j,uiCode); 2119 1796 } … … 2134 1811 if (sps->getUseSAO()) 2135 1812 { 2136 #if SAO_UNIT_INTERLEAVING2137 1813 READ_FLAG(uiCode, "slice_sao_interleaving_flag"); rpcSlice->setSaoInterleavingFlag(uiCode); 2138 #endif2139 1814 READ_FLAG(uiCode, "slice_sample_adaptive_offset_flag"); rpcSlice->setSaoEnabledFlag((Bool)uiCode); 2140 #if SAO_UNIT_INTERLEAVING2141 1815 if (rpcSlice->getSaoEnabledFlag() && rpcSlice->getSaoInterleavingFlag()) 2142 1816 { … … 2149 1823 rpcSlice->setSaoEnabledFlagCr(0); 2150 1824 } 2151 #endif2152 1825 } 2153 1826 READ_UVLC ( uiCode, "aps_id" ); rpcSlice->setAPSId(uiCode); … … 2177 1850 if( !rpcSlice->isIntra() ) 2178 1851 { 2179 #if H0412_REF_PIC_LIST_RESTRICTION2180 1852 #if QC_MVHEVC_B0046 2181 1853 if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() ) … … 2188 1860 else 2189 1861 { 2190 #endif2191 1862 READ_FLAG( uiCode, "ref_pic_list_modification_flag_l0" ); refPicListModification->setRefPicListModificationFlagL0( uiCode ? 1 : 0 ); 2192 #if H0412_REF_PIC_LIST_RESTRICTION 2193 } 2194 #endif 1863 } 2195 1864 2196 1865 if(refPicListModification->getRefPicListModificationFlagL0()) … … 2198 1867 uiCode = 0; 2199 1868 Int i = 0; 2200 #if H0137_0138_LIST_MODIFICATION2201 1869 Int NumPocTotalCurr = rpcSlice->getNumPocTotalCurrMvc(); 2202 1870 if ( NumPocTotalCurr > 1 ) … … 2221 1889 } 2222 1890 } 2223 #else 2224 Int list_modification_idc = 0; 2225 while(list_modification_idc != 3) 2226 { 2227 READ_UVLC( uiCode, "list_modification_idc" ); refPicListModification->setListIdcL0(i, uiCode ); 2228 list_modification_idc = uiCode; 2229 if(uiCode != 3) 2230 { 2231 READ_UVLC( uiCode, "ref_pic_set_idx" ); refPicListModification->setRefPicSetIdxL0(i, uiCode ); 2232 } 2233 i++; 2234 } 2235 refPicListModification->setNumberOfRefPicListModificationsL0(i-1); 2236 #endif 2237 } 2238 #if !H0137_0138_LIST_MODIFICATION 2239 else 2240 { 2241 refPicListModification->setNumberOfRefPicListModificationsL0(0); 2242 } 2243 #endif 1891 } 2244 1892 } 2245 1893 else 2246 1894 { 2247 1895 refPicListModification->setRefPicListModificationFlagL0(0); 2248 #if !H0137_0138_LIST_MODIFICATION2249 refPicListModification->setNumberOfRefPicListModificationsL0(0);2250 #endif2251 1896 } 2252 1897 if(rpcSlice->isInterB()) 2253 1898 { 2254 #if H0412_REF_PIC_LIST_RESTRICTION2255 1899 #if QC_MVHEVC_B0046 2256 1900 if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() ) … … 2263 1907 else 2264 1908 { 2265 #endif2266 1909 READ_FLAG( uiCode, "ref_pic_list_modification_flag_l1" ); refPicListModification->setRefPicListModificationFlagL1( uiCode ? 1 : 0 ); 2267 #if H0412_REF_PIC_LIST_RESTRICTION 2268 } 2269 #endif 1910 } 2270 1911 if(refPicListModification->getRefPicListModificationFlagL1()) 2271 1912 { 2272 1913 uiCode = 0; 2273 1914 Int i = 0; 2274 #if H0137_0138_LIST_MODIFICATION2275 1915 Int NumPocTotalCurr = rpcSlice->getNumPocTotalCurrMvc(); 2276 1916 if ( NumPocTotalCurr > 1 ) … … 2295 1935 } 2296 1936 } 2297 #else 2298 Int list_modification_idc = 0; 2299 while(list_modification_idc != 3) 2300 { 2301 READ_UVLC( uiCode, "list_modification_idc" ); refPicListModification->setListIdcL1(i, uiCode ); 2302 list_modification_idc = uiCode; 2303 if(uiCode != 3) 2304 { 2305 READ_UVLC( uiCode, "ref_pic_set_idx" ); refPicListModification->setRefPicSetIdxL1(i, uiCode ); 2306 } 2307 i++; 2308 } 2309 refPicListModification->setNumberOfRefPicListModificationsL1(i-1); 2310 #endif 2311 } 2312 #if !H0137_0138_LIST_MODIFICATION 2313 else 2314 { 2315 refPicListModification->setNumberOfRefPicListModificationsL1(0); 2316 } 2317 #endif 1937 } 2318 1938 } 2319 1939 else 2320 1940 { 2321 1941 refPicListModification->setRefPicListModificationFlagL1(0); 2322 #if !H0137_0138_LIST_MODIFICATION2323 refPicListModification->setNumberOfRefPicListModificationsL1(0);2324 #endif2325 1942 } 2326 1943 } … … 2340 1957 READ_UVLC( uiCode, "num_ref_idx_lc_active_minus1" ); rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 ); 2341 1958 2342 #if H0412_REF_PIC_LIST_RESTRICTION2343 1959 #if QC_MVHEVC_B0046 2344 1960 if( rpcSlice->getViewId() && rpcSlice->getSPS()->getListsModificationPresentFlag() ) … … 2347 1963 #endif 2348 1964 { 2349 #endif2350 1965 READ_FLAG( uiCode, "ref_pic_list_modification_flag_lc" ); rpcSlice->setRefPicListModificationFlagLC( uiCode ? 1 : 0 ); 2351 1966 if(uiCode) … … 2355 1970 READ_FLAG( uiCode, "pic_from_list_0_flag" ); 2356 1971 rpcSlice->setListIdFromIdxOfLC(i, uiCode); 2357 #if H0137_0138_LIST_MODIFICATION2358 1972 if (((rpcSlice->getListIdFromIdxOfLC(i) == REF_PIC_LIST_0) && (rpcSlice->getNumRefIdx( REF_PIC_LIST_0 ) == 1)) || ((rpcSlice->getListIdFromIdxOfLC(i) == REF_PIC_LIST_1) && (rpcSlice->getNumRefIdx( REF_PIC_LIST_1 ) == 1)) ) 2359 1973 { … … 2364 1978 READ_UVLC( uiCode, "ref_idx_list_curr" ); 2365 1979 } 2366 #else2367 READ_UVLC( uiCode, "ref_idx_list_curr" );2368 #endif2369 1980 rpcSlice->setRefIdxFromIdxOfLC(i, uiCode); 2370 1981 rpcSlice->setRefIdxOfLC((RefPicList)rpcSlice->getListIdFromIdxOfLC(i), rpcSlice->getRefIdxFromIdxOfLC(i), i); 2371 1982 } 2372 1983 } 2373 #if H0412_REF_PIC_LIST_RESTRICTION2374 1984 } 2375 1985 else … … 2377 1987 rpcSlice->setRefPicListModificationFlagLC(false); 2378 1988 } 2379 #endif2380 1989 } 2381 1990 else … … 2390 1999 } 2391 2000 2392 #if H0111_MVD_L1_ZERO2393 2001 if (rpcSlice->isInterB()) 2394 2002 { 2395 2003 READ_FLAG( uiCode, "mvd_l1_zero_flag" ); rpcSlice->setMvdL1ZeroFlag( (uiCode ? true : false) ); 2396 2004 } 2397 #endif2398 2005 2399 2006 #if CABAC_INIT_FLAG … … 2421 2028 rpcSlice->setSliceQp (26 + pps->getPicInitQPMinus26() + iCode); 2422 2029 2423 #if H0736_AVC_STYLE_QP_RANGE2424 2030 assert( rpcSlice->getSliceQp() >= -sps->getQpBDOffsetY() ); 2425 2031 assert( rpcSlice->getSliceQp() <= 51 ); 2426 #endif 2427 2428 #if DBL_CONTROL 2032 2429 2033 if (rpcSlice->getPPS()->getDeblockingFilterControlPresent()) 2430 2034 { … … 2436 2040 rpcSlice->setInheritDblParamFromAPS(0); 2437 2041 } 2438 #else2439 READ_FLAG ( uiCode, "inherit_dbl_param_from_APS_flag" ); rpcSlice->setInheritDblParamFromAPS(uiCode ? 1 : 0);2440 #endif2441 2042 if(!rpcSlice->getInheritDblParamFromAPS()) 2442 2043 { … … 2448 2049 } 2449 2050 } 2450 #if DBL_CONTROL2451 2051 } 2452 #endif2453 2052 if ( rpcSlice->getSliceType() == B_SLICE ) 2454 2053 { … … 2490 2089 } 2491 2090 2492 #if ( HHI_MPI || H HI_INTER_VIEW_MOTION_PRED)2493 #if ( HHI_MPI && H HI_INTER_VIEW_MOTION_PRED)2091 #if ( HHI_MPI || H3D_IVMP ) 2092 #if ( HHI_MPI && H3D_IVMP ) 2494 2093 const int iExtraMergeCandidates = ( sps->getUseMVI() || sps->getMultiviewMvPredMode() ) ? 1 : 0; 2495 2094 #elif HHI_MPI 2496 2095 const int iExtraMergeCandidates = sps->getUseMVI() ? 1 : 0; 2096 #elif MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 2097 const int iExtraMergeCandidates = ( (isDepth || sps->getMultiviewMvPredMode()) ) ? 1 : 0; 2497 2098 #else 2498 2099 const int iExtraMergeCandidates = sps->getMultiviewMvPredMode() ? 1 : 0; … … 2518 2119 2519 2120 Int uiNumCUsInFrame = uiNumLCUsInWidth* uiNumLCUsInHeight; 2520 #if LCU_SYNTAX_ALF2521 2121 if(sps->getUseALFCoefInSlice()) 2522 2122 { … … 2531 2131 if(!sps->getUseALFCoefInSlice()) 2532 2132 { 2533 #endif2534 2133 xParseAlfCuControlParam(alfCUCtrl, uiNumCUsInFrame); 2535 #if LCU_SYNTAX_ALF 2536 } 2537 #endif 2134 } 2538 2135 2539 2136 } … … 2544 2141 if (!bEntropySlice) 2545 2142 { 2546 #if !REMOVE_TILE_DEPENDENCE2547 if (sps->getTileBoundaryIndependenceIdr())2548 {2549 #endif2550 2143 xReadCode(1, uiCode); // read flag indicating if tile markers transmitted 2551 2144 rpcSlice->setTileMarkerFlag( uiCode ); 2552 #if !REMOVE_TILE_DEPENDENCE 2553 } 2554 #endif 2555 } 2556 2557 #if TILES_WPP_ENTRY_POINT_SIGNALLING 2145 } 2146 2558 2147 Int tilesOrEntropyCodingSyncIdc = rpcSlice->getSPS()->getTilesOrEntropyCodingSyncIdc(); 2559 2148 UInt *entryPointOffset = NULL; … … 2616 2205 delete [] entryPointOffset; 2617 2206 } 2618 #else2619 #if WPP_SIMPLIFICATION2620 if (pps->getNumSubstreams() > 1)2621 #else2622 if (pps->getEntropyCodingSynchro())2623 #endif2624 {2625 UInt uiNumSubstreams = pps->getNumSubstreams();2626 rpcSlice->allocSubstreamSizes(uiNumSubstreams);2627 UInt *puiSubstreamSizes = rpcSlice->getSubstreamSizes();2628 2629 for (UInt ui = 0; ui+1 < uiNumSubstreams; ui++)2630 {2631 xReadCode(2, uiCode);2632 2633 switch ( uiCode )2634 {2635 case 0:2636 xReadCode(8, uiCode);2637 break;2638 case 1:2639 xReadCode(16, uiCode);2640 break;2641 case 2:2642 xReadCode(24, uiCode);2643 break;2644 case 3:2645 xReadCode(32, uiCode);2646 break;2647 default:2648 printf("Error in parseSliceHeader\n");2649 exit(-1);2650 break;2651 }2652 puiSubstreamSizes[ui] = uiCode;2653 }2654 }2655 #endif2656 2207 2657 2208 if (!bEntropySlice) 2658 2209 { 2659 2210 // Reading location information 2660 #if !REMOVE_TILE_DEPENDENCE2661 if (sps->getTileBoundaryIndependenceIdr())2662 {2663 #endif2664 #if !TILES_WPP_ENTRY_POINT_SIGNALLING2665 xReadCode(1, uiCode); // read flag indicating if location information signaled in slice header2666 Bool bTileLocationInformationInSliceHeaderFlag = (uiCode)? true : false;2667 2668 if (bTileLocationInformationInSliceHeaderFlag)2669 {2670 // location count2671 xReadCode(5, uiCode); // number of tiles for which location information signaled2672 rpcSlice->setTileLocationCount ( uiCode + 1 );2673 2674 xReadCode(5, uiCode); // number of bits used by diff2675 Int iBitsUsedByDiff = uiCode + 1;2676 2677 // read out tile start location2678 Int iLastSize = 0;2679 for (UInt uiIdx=0; uiIdx<rpcSlice->getTileLocationCount(); uiIdx++)2680 {2681 Int iAbsDiff, iCurSize, iCurDiff;2682 if (uiIdx==0)2683 {2684 xReadCode(iBitsUsedByDiff-1, uiCode); iAbsDiff = uiCode;2685 rpcSlice->setTileLocation( uiIdx, iAbsDiff );2686 iCurDiff = iAbsDiff;2687 iLastSize = iAbsDiff;2688 }2689 else2690 {2691 xReadCode(1, uiCode); // read sign2692 Int iSign = (uiCode) ? -1 : +1;2693 2694 xReadCode(iBitsUsedByDiff-1, uiCode); iAbsDiff = uiCode;2695 iCurDiff = (iSign) * iAbsDiff;2696 iCurSize = iLastSize + iCurDiff;2697 iLastSize = iCurSize;2698 rpcSlice->setTileLocation( uiIdx, rpcSlice->getTileLocation( uiIdx-1 ) + iCurSize ); // calculate byte location2699 }2700 }2701 }2702 #endif2703 2211 2704 2212 // read out trailing bits 2705 2213 m_pcBitstream->readOutTrailingBits(); 2706 #if !REMOVE_TILE_DEPENDENCE2707 }2708 #endif2709 2214 } 2710 2215 return; … … 2767 2272 #endif 2768 2273 2769 #if H HI_INTER_VIEW_MOTION_PRED2274 #if H3D_IVMP 2770 2275 Void TDecCavlc::parseMVPIdx( Int& riMVPIdx, Int iAMVPCands ) 2771 2276 #else … … 2801 2306 Void TDecCavlc::parseIPCMInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2802 2307 { 2803 #if BURST_IPCM2804 2308 assert(0); 2805 #else2806 UInt uiSymbol;2807 2808 xReadFlag( uiSymbol );2809 2810 if ( uiSymbol )2811 {2812 Bool bIpcmFlag = true;2813 2814 xReadPCMAlignZero();2815 2816 pcCU->setPartSizeSubParts ( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );2817 pcCU->setSizeSubParts ( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );2818 pcCU->setIPCMFlagSubParts ( bIpcmFlag, uiAbsPartIdx, uiDepth );2819 2820 UInt uiMinCoeffSize = pcCU->getPic()->getMinCUWidth()*pcCU->getPic()->getMinCUHeight();2821 UInt uiLumaOffset = uiMinCoeffSize*uiAbsPartIdx;2822 UInt uiChromaOffset = uiLumaOffset>>2;2823 2824 Pel* piPCMSample;2825 UInt uiWidth;2826 UInt uiHeight;2827 UInt uiSampleBits;2828 UInt uiX, uiY;2829 2830 piPCMSample = pcCU->getPCMSampleY() + uiLumaOffset;2831 uiWidth = pcCU->getWidth(uiAbsPartIdx);2832 uiHeight = pcCU->getHeight(uiAbsPartIdx);2833 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthLuma();2834 2835 for(uiY = 0; uiY < uiHeight; uiY++)2836 {2837 for(uiX = 0; uiX < uiWidth; uiX++)2838 {2839 UInt uiSample;2840 xReadCode(uiSampleBits, uiSample);2841 2842 piPCMSample[uiX] = uiSample;2843 }2844 piPCMSample += uiWidth;2845 }2846 2847 piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;2848 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;2849 uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;2850 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();2851 2852 for(uiY = 0; uiY < uiHeight; uiY++)2853 {2854 for(uiX = 0; uiX < uiWidth; uiX++)2855 {2856 UInt uiSample;2857 xReadCode(uiSampleBits, uiSample);2858 piPCMSample[uiX] = uiSample;2859 }2860 piPCMSample += uiWidth;2861 }2862 2863 piPCMSample = pcCU->getPCMSampleCr() + uiChromaOffset;2864 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;2865 uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;2866 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();2867 2868 for(uiY = 0; uiY < uiHeight; uiY++)2869 {2870 for(uiX = 0; uiX < uiWidth; uiX++)2871 {2872 UInt uiSample;2873 xReadCode(uiSampleBits, uiSample);2874 piPCMSample[uiX] = uiSample;2875 }2876 piPCMSample += uiWidth;2877 }2878 }2879 #endif2880 2309 } 2881 2310 … … 2907 2336 Void TDecCavlc::parseDeltaQP( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2908 2337 { 2909 #if H0736_AVC_STYLE_QP_RANGE2910 2338 Int qp; 2911 #else2912 UInt uiQp;2913 #endif2914 2339 Int iDQp; 2915 2340 2916 2341 xReadSvlc( iDQp ); 2917 2342 2918 #if H0736_AVC_STYLE_QP_RANGE2919 2343 Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffsetY(); 2920 2344 qp = (((Int) pcCU->getRefQP( uiAbsPartIdx ) + iDQp + 52 + 2*qpBdOffsetY )%(52+ qpBdOffsetY)) - qpBdOffsetY; 2921 #else2922 uiQp = pcCU->getRefQP( uiAbsPartIdx ) + iDQp;2923 #endif2924 2345 2925 2346 UInt uiAbsQpCUPartIdx = (uiAbsPartIdx>>(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))<<(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)) ; 2926 2347 UInt uiQpCUDepth = min(uiDepth,pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()) ; 2927 2348 2928 #if H0736_AVC_STYLE_QP_RANGE2929 2349 pcCU->setQPSubParts( qp, uiAbsQpCUPartIdx, uiQpCUDepth ); 2930 #else2931 pcCU->setQPSubParts( uiQp, uiAbsQpCUPartIdx, uiQpCUDepth );2932 #endif2933 2350 } 2934 2351 … … 2964 2381 } 2965 2382 2966 #if H HI_INTER_VIEW_RESIDUAL_PRED2383 #if H3D_IVRP 2967 2384 Void 2968 2385 TDecCavlc::parseResPredFlag( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth ) … … 3394 2811 READ_UVLC( code, "scaling_list_pred_matrix_id_delta"); 3395 2812 scalingList->setRefMatrixId (sizeId,listId,(UInt)((Int)(listId)-(code+1))); 3396 #if SCALING_LIST3397 2813 if( sizeId > SCALING_LIST_8x8 ) 3398 2814 { 3399 2815 scalingList->setScalingListDC(sizeId,listId,scalingList->getScalingListDC(sizeId, scalingList->getRefMatrixId (sizeId,listId))); 3400 2816 } 3401 #endif3402 2817 scalingList->processRefMatrix( sizeId, listId, scalingList->getRefMatrixId (sizeId,listId)); 3403 2818 … … 3420 2835 Void TDecCavlc::xDecodeScalingList(TComScalingList *scalingList, UInt sizeId, UInt listId) 3421 2836 { 3422 #if SCALING_LIST3423 2837 Int i,coefNum = min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId]); 3424 2838 Int data; … … 3460 2874 } 3461 2875 } 3462 #else3463 Int i,coefNum = g_scalingListSize[sizeId];3464 Int data;3465 Int nextCoef = SCALING_LIST_START_VALUE;3466 UInt* scan = g_auiFrameScanXY [ sizeId + 1 ];3467 Int *dst = scalingList->getScalingListAddress(sizeId, listId);3468 3469 for(i = 0; i < coefNum; i++)3470 {3471 READ_SVLC( data, "scaling_list_delta_coef");3472 nextCoef = (nextCoef + data + 256 ) % 256;3473 dst[scan[i]] = nextCoef;3474 }3475 #endif3476 2876 } 3477 2877 -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r210 r296 82 82 UInt xGetBit (); 83 83 84 #if RPS_IN_SPS85 84 void parseShortTermRefPicSet (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx); 86 #else87 void parseShortTermRefPicSet (TComPPS* pcPPS, TComReferencePictureSet* pcRPS, Int idx);88 #endif89 85 private: 90 86 TComInputBitstream* m_pcBitstream; … … 118 114 Void parseVPS ( TComVPS* pcVPS ); 119 115 #endif 120 #if HHI_MPI 116 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068 121 117 Void parseSPS ( TComSPS* pcSPS, Bool bIsDepth ); 122 118 #else 123 119 Void parseSPS ( TComSPS* pcSPS ); 124 120 #endif 125 #if TILES_OR_ENTROPY_SYNC_IDC126 121 Void parsePPS ( TComPPS* pcPPS, ParameterSetManagerDecoder *parameterSet); 127 #else128 Void parsePPS ( TComPPS* pcPPS);129 #endif130 122 Void parseSEI(SEImessages&); 131 123 Void parseAPS ( TComAPS* pAPS ); 132 #if LCU_SYNTAX_ALF 124 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 125 Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth); 126 #else 133 127 Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet); 134 #else135 Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl );136 128 #endif 137 129 Void parseTerminatingBit ( UInt& ruiBit ); 138 130 139 #if H HI_INTER_VIEW_MOTION_PRED131 #if H3D_IVMP 140 132 Void parseMVPIdx ( Int& riMVPIdx, Int iAMVPCands ); 141 133 #else … … 149 141 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 150 142 Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ); 151 #if H HI_INTER_VIEW_RESIDUAL_PRED143 #if H3D_IVRP 152 144 Void parseResPredFlag ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth ); 153 145 #endif … … 171 163 Void readTileMarker ( UInt& uiTileIdx, UInt uiBitsUsed ); 172 164 Void updateContextTables ( SliceType eSliceType, Int iQp ) { return; } 173 #if OL_FLUSH174 165 Void decodeFlush() {}; 175 #endif176 166 177 167 Void xParsePredWeightTable ( TComSlice* pcSlice ); … … 186 176 #endif 187 177 protected: 188 #if DBL_CONTROL189 178 Void xParseDblParam ( TComAPS* aps ); 190 #endif191 179 Void xParseSaoParam ( SAOParam* pSaoParam ); 192 #if SAO_UNIT_INTERLEAVING193 180 Void xParseSaoOffset (SaoLcuParam* saoLcuParam); 194 181 Void xParseSaoUnit (Int rx, Int ry, Int compIdx, SAOParam* saoParam, Bool& repeatedRow ); 195 #else196 Void xParseSaoSplitParam ( SAOParam* pSaoParam, Int iPartIdx, Int iYCbCr );197 Void xParseSaoOffsetParam ( SAOParam* pSaoParam, Int iPartIdx, Int iYCbCr );198 #endif199 #if LCU_SYNTAX_ALF200 182 Void xParseAlfParam(AlfParamSet* pAlfParamSet, Bool bSentInAPS = true, Int firstLCUAddr = 0, Bool acrossSlice = true, Int numLCUInWidth= -1, Int numLCUInHeight= -1); 201 183 Void parseAlfParamSet(AlfParamSet* pAlfParamSet, Int firstLCUAddr, Bool alfAcrossSlice); 202 184 Void parseAlfFixedLengthRun(UInt& idx, UInt rx, UInt numLCUInWidth); 203 185 Void parseAlfStoredFilterIdx(UInt& idx, UInt numFilterSetsInBuffer); 204 #endif205 186 Void xParseAlfParam ( ALFParam* pAlfParam ); 206 187 Void xParseAlfCuControlParam(AlfCUCtrlInfo& cAlfParam, Int iNumCUsInPic); -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r189 r296 54 54 m_ppcYuvResi = NULL; 55 55 m_ppcYuvReco = NULL; 56 #if H HI_INTER_VIEW_RESIDUAL_PRED56 #if H3D_IVRP 57 57 m_ppcYuvResPred = NULL; 58 58 #endif … … 82 82 m_ppcYuvResi = new TComYuv*[m_uiMaxDepth-1]; 83 83 m_ppcYuvReco = new TComYuv*[m_uiMaxDepth-1]; 84 #if H HI_INTER_VIEW_RESIDUAL_PRED84 #if H3D_IVRP 85 85 m_ppcYuvResPred = new TComYuv* [m_uiMaxDepth-1]; 86 86 #endif … … 96 96 m_ppcYuvResi[ui] = new TComYuv; m_ppcYuvResi[ui]->create( uiWidth, uiHeight ); 97 97 m_ppcYuvReco[ui] = new TComYuv; m_ppcYuvReco[ui]->create( uiWidth, uiHeight ); 98 #if H HI_INTER_VIEW_RESIDUAL_PRED98 #if H3D_IVRP 99 99 m_ppcYuvResPred[ui] = new TComYuv; m_ppcYuvResPred[ui]->create( uiWidth, uiHeight ); 100 100 #endif … … 120 120 m_ppcYuvResi[ui]->destroy(); delete m_ppcYuvResi[ui]; m_ppcYuvResi[ui] = NULL; 121 121 m_ppcYuvReco[ui]->destroy(); delete m_ppcYuvReco[ui]; m_ppcYuvReco[ui] = NULL; 122 #if H HI_INTER_VIEW_RESIDUAL_PRED122 #if H3D_IVRP 123 123 m_ppcYuvResPred[ui]->destroy(); delete m_ppcYuvResPred[ui]; m_ppcYuvResPred[ui] = NULL; 124 124 #endif … … 128 128 delete [] m_ppcYuvResi; m_ppcYuvResi = NULL; 129 129 delete [] m_ppcYuvReco; m_ppcYuvReco = NULL; 130 #if H HI_INTER_VIEW_RESIDUAL_PRED130 #if H3D_IVRP 131 131 delete [] m_ppcYuvResPred; m_ppcYuvResPred = NULL; 132 132 #endif … … 148 148 } 149 149 150 #if BURST_IPCM151 150 pcCU->setNumSucIPCM(0); 152 #endif153 151 154 152 // start from the top level CU … … 240 238 if((!bStartInCU) && ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 241 239 { 242 #if BURST_IPCM243 240 if(pcCU->getNumSucIPCM() == 0) 244 241 { … … 252 249 pcCU->setDepthSubParts( uiDepth, uiAbsPartIdx ); 253 250 } 254 #else255 #if HHI_MPI256 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) )257 #endif258 m_pcEntropyDecoder->decodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth );259 #endif260 251 } 261 252 else … … 323 314 324 315 // decode CU mode and the partition size 325 #if BURST_IPCM326 316 if( !pcCU->getSlice()->isIntra() && pcCU->getNumSucIPCM() == 0 ) 327 #else328 if( !pcCU->getSlice()->isIntra() )329 #endif330 317 #if HHI_MPI 331 318 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 ) … … 339 326 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); 340 327 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); 341 #if H HI_INTER_VIEW_MOTION_PRED328 #if H3D_IVMP 342 329 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 343 330 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; … … 361 348 362 349 UInt uiCurrPartNumb = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1); 350 363 351 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) 364 352 { 365 353 const UChar uhNewDepth = max<UInt>( uiDepth, pcTextureCU->getDepth( uiAbsPartIdx + ui ) ); 354 #if MERL_VSP_C0152 355 Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui); 356 pcCU->setVSPIndex( uiAbsPartIdx + ui, vspIdx); 357 #endif 366 358 pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_SKIP ); 367 359 pcCU->setPartitionSize( uiAbsPartIdx + ui, SIZE_2Nx2N ); … … 370 362 pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth ); 371 363 } 364 #if LGE_ILLUCOMP_DEPTH_C0046 365 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 366 #endif 372 367 } 373 368 else 374 369 { 375 370 #endif 376 #if SIMP_MRG_PRUN377 371 UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx); 372 #if MERL_VSP_C0152 373 Int iVSPIndexTrue[3] = {-1, -1, -1}; 374 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue, uiMergeIndex ); 375 { 376 Int iVSPIdx = 0; 377 Int numVspIdx; 378 numVspIdx = 3; 379 for (Int i = 0; i < numVspIdx; i++) 380 { 381 if (iVSPIndexTrue[i] == uiMergeIndex) 382 { 383 iVSPIdx = i+1; 384 break; 385 } 386 } 387 pcCU->setVSPIndexSubParts( iVSPIdx, uiAbsPartIdx, 0, uiDepth ); //Initialize the VSP, may change later in get InterMergeCandidates() 388 } 389 #else 378 390 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 379 #else380 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );381 UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx);382 391 #endif 383 392 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); … … 400 409 } 401 410 #endif 402 #if H HI_INTER_VIEW_RESIDUAL_PRED411 #if H3D_IVRP && !MTK_MDIVRP_C0138 403 412 m_pcEntropyDecoder->decodeResPredFlag( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 ); 404 413 #endif … … 411 420 { 412 421 #endif 413 #if BURST_IPCM414 422 if( pcCU->getNumSucIPCM() == 0 ) 415 423 { … … 424 432 pcCU->setTrIdxSubParts( 0, uiAbsPartIdx, uiDepth ); 425 433 } 426 #else427 m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );428 m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );429 #endif430 434 431 435 if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) … … 449 453 450 454 #if LGE_ILLUCOMP_B0045 455 #if LGE_ILLUCOMP_DEPTH_C0046 && HHI_MPI 456 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) != uiDepth ) 457 { 458 #endif 451 459 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 452 460 #endif 453 461 454 #if H HI_INTER_VIEW_RESIDUAL_PRED462 #if H3D_IVRP && !MTK_MDIVRP_C0138 455 463 if( !pcCU->isIntra( uiAbsPartIdx ) ) 456 464 { 457 465 m_pcEntropyDecoder->decodeResPredFlag ( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 ); 466 } 467 #endif 468 #if LGE_ILLUCOMP_DEPTH_C0046 && HHI_MPI 458 469 } 459 470 #endif … … 467 478 468 479 UInt uiCurrPartNumb = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1); 480 469 481 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) 470 482 { 471 483 const UChar uhNewDepth = max<UInt>( uiDepth, pcTextureCU->getDepth( uiAbsPartIdx + ui ) ); 484 #if MERL_VSP_C0152 485 Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui); 486 pcCU->setVSPIndex( uiAbsPartIdx + ui, vspIdx); 487 #endif 472 488 pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_INTER ); 473 489 pcCU->setPartitionSize( uiAbsPartIdx + ui, SIZE_2Nx2N ); … … 476 492 pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth ); 477 493 } 478 494 #if LGE_ILLUCOMP_DEPTH_C0046 495 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 496 #endif 479 497 if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth ) ) || bBoundary ) 480 498 { … … 551 569 } 552 570 553 #if BURST_IPCM554 571 if( pcCU->getNumSucIPCM() > 0 ) 555 572 { … … 557 574 return; 558 575 } 559 #endif560 576 561 577 ruiIsLast = xDecodeSliceEnd( pcCU, uiAbsPartIdx, uiDepth); … … 658 674 659 675 // inter prediction 676 #if MERL_VSP_C0152 677 m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth], uiAbsPartIdx ); 678 #else 660 679 m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] ); 661 680 #endif 681 #if MTK_MDIVRP_C0138 682 if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0)) 683 { 684 m_pcPrediction->residualPrediction(pcCU, m_ppcYuvReco[uiDepth], m_ppcYuvResPred[uiDepth]); 685 } 686 #endif 687 662 688 #if HHI_MPI 663 689 if( pcCU->getTextureModeDepth( 0 ) != -1 ) … … 665 691 #endif 666 692 667 #if H HI_INTER_VIEW_RESIDUAL_PRED693 #if H3D_IVRP && !MTK_MDIVRP_C0138 668 694 if( pcCU->getResPredFlag( 0 ) ) 669 695 { … … 695 721 else 696 722 { 697 #if HHI_INTER_VIEW_RESIDUAL_PRED 723 #if H3D_IVRP 724 #if MTK_MDIVRP_C0138 725 if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0)) 726 #else 698 727 if( pcCU->getResPredFlag( 0 ) ) 728 #endif 699 729 { 700 730 m_ppcYuvReco[uiDepth]->clip( pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) ); … … 765 795 766 796 //===== inverse transform ===== 767 #if H0736_AVC_STYLE_QP_RANGE768 797 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA, pcCU->getSlice()->getSPS()->getQpBDOffsetY(), 0 ); 769 #else770 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA, 0 );771 #endif772 798 773 799 Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)TEXT_LUMA]; … … 885 911 if(eText == TEXT_CHROMA_U) 886 912 { 887 #if H0736_AVC_STYLE_QP_RANGE888 913 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), eText, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), pcCU->getSlice()->getPPS()->getChromaQpOffset() ); 889 #else890 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), eText, pcCU->getSlice()->getPPS()->getChromaQpOffset() );891 #endif892 914 } 893 915 else 894 916 { 895 #if H0736_AVC_STYLE_QP_RANGE896 917 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), eText, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), pcCU->getSlice()->getPPS()->getChromaQpOffset2nd() ); 897 #else898 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), eText, pcCU->getSlice()->getPPS()->getChromaQpOffset2nd() );899 #endif900 918 } 901 919 … … 1197 1215 pResi = m_ppcYuvResi[uiDepth]->getLumaAddr(); 1198 1216 1199 #if H0736_AVC_STYLE_QP_RANGE1200 1217 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA, pcCU->getSlice()->getSPS()->getQpBDOffsetY(), 0 ); 1201 #else1202 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA, 0 );1203 #endif1204 1218 1205 1219 m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_LUMA, pResi, 0, m_ppcYuvResi[uiDepth]->getStride(), uiWidth, uiHeight, uiLumaTrMode, 0, piCoeff ); 1206 1220 1207 1221 // Cb and Cr 1208 #if H0736_AVC_STYLE_QP_RANGE1209 1222 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), pcCU->getSlice()->getPPS()->getChromaQpOffset() ); 1210 #else1211 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA, pcCU->getSlice()->getPPS()->getChromaQpOffset() );1212 #endif1213 1223 1214 1224 uiWidth >>= 1; … … 1217 1227 m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_CHROMA_U, pResi, 0, m_ppcYuvResi[uiDepth]->getCStride(), uiWidth, uiHeight, uiChromaTrMode, 0, piCoeff ); 1218 1228 1219 #if H0736_AVC_STYLE_QP_RANGE1220 1229 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), pcCU->getSlice()->getPPS()->getChromaQpOffset2nd() ); 1221 #else1222 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA, pcCU->getSlice()->getPPS()->getChromaQpOffset2nd() );1223 #endif1224 1230 1225 1231 piCoeff = pcCU->getCoeffCr(); pResi = m_ppcYuvResi[uiDepth]->getCrAddr(); … … 1375 1381 Int iSumPix[2]; 1376 1382 memset(iSumPix, 0, sizeof(Int)*2); 1377 1383 #if HS_REFERENCE_SUBSAMPLE_C0154 1384 Int subSamplePix; 1385 if ( uiSize == 64 || uiSize == 32 ) 1386 { 1387 subSamplePix = 2; 1388 } 1389 else 1390 { 1391 subSamplePix = 1; 1392 } 1393 for (Int y=0; y<uiSize; y+=subSamplePix) 1394 { 1395 for (Int x=0; x<uiSize; x+=subSamplePix) 1396 { 1397 UChar ucSegment = pMask?(UChar)pMask[x]:0; 1398 assert( ucSegment < uiNumSegments ); 1399 1400 iSumDepth[ucSegment] += pOrig[x]; 1401 iSumPix[ucSegment] += 1; 1402 } 1403 pOrig += uiStride*subSamplePix; 1404 pMask += uiMaskStride*subSamplePix; 1405 } 1406 #else 1378 1407 for (Int y=0; y<uiSize; y++) 1379 1408 { … … 1390 1419 pMask += uiMaskStride; 1391 1420 } 1392 1421 #endif 1393 1422 // compute mean for each segment 1394 1423 for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ ) -
trunk/source/Lib/TLibDecoder/TDecCu.h
r189 r296 61 61 TComYuv** m_ppcYuvResi; ///< array of residual buffer 62 62 TComYuv** m_ppcYuvReco; ///< array of prediction & reconstruction buffer 63 #if H HI_INTER_VIEW_RESIDUAL_PRED63 #if H3D_IVRP 64 64 TComYuv** m_ppcYuvResPred; ///< residual prediction buffer 65 65 #endif 66 66 TComDataCU** m_ppcCU; ///< CU data array 67 67 68 68 // access channel 69 69 TComTrQuant* m_pcTrQuant; … … 85 85 /// destroy internal buffers 86 86 Void destroy (); 87 87 88 88 /// decode CU information 89 89 Void decodeCU ( TComDataCU* pcCU, UInt& ruiIsLast ); -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r189 r296 72 72 pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 73 73 74 if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) || pcCU->getSlice()->getSPS()->isDepth()) 74 if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) 75 #if !LGE_ILLUCOMP_DEPTH_C0046 76 || pcCU->getSlice()->getSPS()->isDepth() 77 #endif 78 ) 75 79 { 76 80 return; … … 80 84 return; 81 85 86 #if LGE_ILLUCOMP_DEPTH_C0046 87 if(pcCU->isICFlagRequired(uiAbsPartIdx, uiDepth)) //This modification is not needed after integrating JCT3V-C0137 88 #else 82 89 if(pcCU->isICFlagRequired(uiAbsPartIdx)) 90 #endif 83 91 m_pcEntropyDecoderIf->parseICFlag( pcCU, uiAbsPartIdx, uiDepth ); 84 92 } … … 100 108 } 101 109 102 #if H HI_INTER_VIEW_RESIDUAL_PRED110 #if H3D_IVRP && !MTK_MDIVRP_C0138 103 111 Void 104 112 TDecEntropy::decodeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx ) … … 115 123 if( bResPredAllowed ) 116 124 { 117 bResPredAvailable = pcSubCU->getResidualSamples( uiPUIdx 118 #if QC_SIMPLIFIEDIVRP_M24938 119 , false 120 #endif 121 ); 125 bResPredAvailable = pcSubCU->getResidualSamples( uiPUIdx , false ); 122 126 } 123 127 … … 272 276 273 277 #if CU_BASED_MRG_CAND_LIST 274 #if H HI_INTER_VIEW_MOTION_PRED278 #if H3D_IVMP 275 279 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 276 280 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; … … 293 297 { 294 298 #if !CU_BASED_MRG_CAND_LIST 295 #if H HI_INTER_VIEW_MOTION_PRED299 #if H3D_IVMP 296 300 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 297 301 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; … … 326 330 else 327 331 { 328 #if SIMP_MRG_PRUN329 332 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 330 333 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 331 #else332 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );333 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);334 #endif335 334 } 336 335 #else 337 #if SIMP_MRG_PRUN338 336 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 337 #if MERL_VSP_C0152 338 Int iVSPIndexTrue[3] = {-1, -1, -1}; 339 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue, uiMergeIndex ); 340 341 #if HHI_MPI 342 if(pcCU->getTextureModeDepth( uiSubPartIdx ) == uiDepth)//MPI is used 343 { 344 TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ); 345 UInt uiCurrPartNumb = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1); 346 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) 347 { 348 Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui); 349 pcCU->setVSPIndex( uiAbsPartIdx + ui, vspIdx); 350 } 351 } 352 else // MPI not used 353 #endif 354 { 355 Int iVSPIdx = 0; 356 Int numVspIdx; 357 numVspIdx = 3; 358 for (Int i = 0; i < numVspIdx; i++) 359 { 360 if (iVSPIndexTrue[i] == uiMergeIndex) 361 { 362 iVSPIdx = i+1; 363 break; 364 } 365 } 366 pcCU->setVSPIndexSubParts( iVSPIdx, uiSubPartIdx, uiPartIdx, uiDepth ); //Initialize the VSP, may change later in get InterMergeCandidates() 367 } 368 369 #else 339 370 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 340 #else341 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );342 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);343 371 #endif 344 372 #endif … … 485 513 if ( (pcSubCU->getInterDir(uiPartAddr) & ( 1 << eRefList )) && (pcSubCU->getAMVPMode(uiPartAddr) == AM_EXPL) ) 486 514 { 487 #if H HI_INTER_VIEW_MOTION_PRED515 #if H3D_IVMP 488 516 const Int iNumAMVPCands = AMVP_MAX_NUM_CANDS + ( pcSubCU->getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 ); 489 517 m_pcEntropyDecoderIf->parseMVPIdx( iMVPIdx, iNumAMVPCands ); … … 492 520 #endif 493 521 } 494 #if SHARP_INTERVIEW_DECOUPLE_B0111522 #if H3D_IVMP 495 523 pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo, iMVPIdx); 496 524 #else … … 509 537 } 510 538 511 #if UNIFIED_TRANSFORM_TREE512 539 Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt absTUPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3, Bool& bCodeDQP ) 513 #else514 Void TDecEntropy::xDecodeTransformSubdiv( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt absTUPartIdx, UInt uiDepth, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3 )515 #endif516 540 { 517 541 UInt uiSubdiv; 518 542 const UInt uiLog2TrafoSize = g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()]+2 - uiDepth; 519 543 520 #if UNIFIED_TRANSFORM_TREE521 544 if(uiTrIdx==0) 522 545 { … … 532 555 } 533 556 } 534 #endif // UNIFIED_TRANSFORM_TREE535 557 if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) ) 536 558 { 537 559 uiSubdiv = 1; 538 560 } 539 #if G519_TU_AMP_NSQT_HARMONIZATION540 561 else if( (pcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter() == 1) && (pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER) && ( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) && (uiDepth == pcCU->getDepth(uiAbsPartIdx)) ) 541 #else542 else if( (pcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter() == 1) && (pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER) && ( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && (uiDepth == pcCU->getDepth(uiAbsPartIdx)) )543 #endif544 562 { 545 563 uiSubdiv = (uiLog2TrafoSize > pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx)); … … 618 636 if( uiSubdiv ) 619 637 { 620 #if UNIFIED_TRANSFORM_TREE621 638 UInt size; 622 639 width >>= 1; … … 624 641 size = width*height; 625 642 uiTrIdx++; 626 #endif627 643 ++uiDepth; 628 644 const UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1); … … 640 656 for( Int i = 0; i < 4; i++ ) 641 657 { 642 #if UNIFIED_TRANSFORM_TREE643 658 UInt nsAddr = 0; 644 659 nsAddr = pcCU->getNSAbsPartIdx( uiLog2TrafoSize-1, uiAbsPartIdx, absTUPartIdx, i, uiTrDepth+1 ); 645 660 xDecodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, nsAddr, uiDepth, width, height, uiTrIdx, i, uiCurrentCbfY, uiCurrentCbfU, uiCurrentCbfV, bCodeDQP ); 646 #else647 UInt nsAddr = 0;648 nsAddr = pcCU->getNSAbsPartIdx( uiLog2TrafoSize-1, uiAbsPartIdx, absTUPartIdx, i, uiTrDepth+1 );649 xDecodeTransformSubdiv( pcCU, uiAbsPartIdx, nsAddr, uiDepth, i, uiCurrentCbfY, uiCurrentCbfU, uiCurrentCbfV );650 #endif651 661 uiYCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiLumaTrMode ); 652 662 uiUCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiChromaTrMode ); 653 663 uiVCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiChromaTrMode ); 654 664 uiAbsPartIdx += uiQPartNum; 655 #if UNIFIED_TRANSFORM_TREE656 665 offsetLuma += size; offsetChroma += (size>>2); 657 #endif658 666 } 659 667 … … 713 721 } 714 722 } 715 #if UNIFIED_TRANSFORM_TREE716 723 // transform_unit begin 717 724 UInt cbfY = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA , uiTrIdx ); … … 779 786 } 780 787 // transform_unit end 781 #endif // UNIFIED_TRANSFORM_TREE 782 } 783 } 784 785 #if !UNIFIED_TRANSFORM_TREE 786 Void TDecEntropy::decodeTransformIdx( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 787 { 788 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 789 DTRACE_CABAC_T( "\tdecodeTransformIdx()\tCUDepth=" ) 790 DTRACE_CABAC_V( uiDepth ) 791 DTRACE_CABAC_T( "\n" ) 792 UInt temp = 0; 793 UInt temp1 = 0; 794 UInt temp2 = 0; 795 xDecodeTransformSubdiv( pcCU, uiAbsPartIdx, uiAbsPartIdx, uiDepth, 0, temp, temp1, temp2 ); 796 } 797 #endif // UNIFIED_TRANSFORM_TREE 798 799 #if UNIFIED_TRANSFORM_TREE 788 } 789 } 790 791 800 792 Void TDecEntropy::decodeQP ( TComDataCU* pcCU, UInt uiAbsPartIdx ) 801 793 { … … 805 797 } 806 798 } 807 #else 808 Void TDecEntropy::decodeQP ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 809 { 810 if ( pcCU->getSlice()->getPPS()->getUseDQP() ) 811 { 812 m_pcEntropyDecoderIf->parseDeltaQP( pcCU, uiAbsPartIdx, uiDepth ); 813 } 814 } 815 #endif 816 817 #if !UNIFIED_TRANSFORM_TREE 818 Void TDecEntropy::xDecodeCoeff( TComDataCU* pcCU, UInt uiLumaOffset, UInt uiChromaOffset, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, UInt uiTrIdx, UInt uiCurrTrIdx, Bool& bCodeDQP ) 819 { 820 UInt uiLog2TrSize = g_aucConvertToBit[ pcCU->getSlice()->getSPS()->getMaxCUWidth() >> uiDepth ] + 2; 821 UInt uiCbfY = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrIdx ); 822 UInt uiCbfU = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx ); 823 UInt uiCbfV = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrIdx ); 824 if( uiLog2TrSize == 2 ) 825 { 826 UInt uiQPDiv = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 ); 827 if( ( uiAbsPartIdx % uiQPDiv ) == 0 ) 828 { 829 m_uiBakAbsPartIdx = uiAbsPartIdx; 830 m_uiBakChromaOffset = uiChromaOffset; 831 } 832 else if( ( uiAbsPartIdx % uiQPDiv ) == (uiQPDiv - 1) ) 833 { 834 uiCbfU = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_U, uiTrIdx ); 835 uiCbfV = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_V, uiTrIdx ); 836 } 837 } 838 839 if ( uiCbfY || uiCbfU || uiCbfV ) 840 { 841 // dQP: only for LCU 842 if ( pcCU->getSlice()->getPPS()->getUseDQP() ) 843 { 844 if ( bCodeDQP ) 845 { 846 decodeQP( pcCU, uiAbsPartIdx, uiDepth); 847 bCodeDQP = false; 848 } 849 } 850 UInt uiLumaTrMode, uiChromaTrMode; 851 pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx( uiAbsPartIdx ), uiLumaTrMode, uiChromaTrMode ); 852 const UInt uiStopTrMode = uiLumaTrMode; 853 854 if( uiTrIdx == uiStopTrMode ) 855 { 856 if( pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrIdx ) ) 857 { 858 Int trWidth = uiWidth; 859 Int trHeight = uiHeight; 860 pcCU->getNSQTSize( uiTrIdx, uiAbsPartIdx, trWidth, trHeight ); 861 m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffY()+uiLumaOffset), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_LUMA ); 862 } 863 864 uiWidth >>= 1; 865 uiHeight >>= 1; 866 867 if( uiLog2TrSize == 2 ) 868 { 869 UInt uiQPDiv = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 ); 870 if( ( uiAbsPartIdx % uiQPDiv ) == (uiQPDiv - 1) ) 871 { 872 uiWidth <<= 1; 873 uiHeight <<= 1; 874 Int trWidth = uiWidth; 875 Int trHeight = uiHeight; 876 pcCU->getNSQTSize( uiTrIdx-1, uiAbsPartIdx, trWidth, trHeight ); 877 if( pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_U, uiTrIdx ) ) 878 { 879 m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCb()+m_uiBakChromaOffset), m_uiBakAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_U ); 880 } 881 if( pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_V, uiTrIdx ) ) 882 { 883 m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCr()+m_uiBakChromaOffset), m_uiBakAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_V ); 884 } 885 } 886 } 887 else 888 { 889 Int trWidth = uiWidth; 890 Int trHeight = uiHeight; 891 pcCU->getNSQTSize( uiTrIdx, uiAbsPartIdx, trWidth, trHeight ); 892 if( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx ) ) 893 { 894 m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCb()+uiChromaOffset), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_U ); 895 } 896 if( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrIdx ) ) 897 { 898 m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCr()+uiChromaOffset), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_V ); 899 } 900 } 901 } 902 else 903 { 904 { 905 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 906 DTRACE_CABAC_T( "\tgoing down\tdepth=" ); 907 DTRACE_CABAC_V( uiDepth ); 908 DTRACE_CABAC_T( "\ttridx=" ); 909 DTRACE_CABAC_V( uiTrIdx ); 910 DTRACE_CABAC_T( "\n" ); 911 } 912 if( uiCurrTrIdx <= uiTrIdx ) 913 { 914 assert(1); 915 } 916 UInt uiSize; 917 uiWidth >>= 1; 918 uiHeight >>= 1; 919 uiSize = uiWidth*uiHeight; 920 uiDepth++; 921 uiTrIdx++; 922 923 UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1); 924 UInt uiIdx = uiAbsPartIdx; 925 926 xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP ); 927 uiLumaOffset += uiSize; uiChromaOffset += (uiSize>>2); uiIdx += uiQPartNum; 928 929 xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP ); 930 uiLumaOffset += uiSize; uiChromaOffset += (uiSize>>2); uiIdx += uiQPartNum; 931 932 xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP ); 933 uiLumaOffset += uiSize; uiChromaOffset += (uiSize>>2); uiIdx += uiQPartNum; 934 935 xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP ); 936 { 937 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 938 DTRACE_CABAC_T( "\tgoing up\n" ); 939 } 940 } 941 } 942 } 943 #endif // !UNIFIED_TRANSFORM_TREE 799 944 800 945 801 /** decode coefficients … … 956 812 UInt uiLumaOffset = uiMinCoeffSize*uiAbsPartIdx; 957 813 UInt uiChromaOffset = uiLumaOffset>>2; 958 #if UNIFIED_TRANSFORM_TREE959 814 UInt temp = 0; 960 815 UInt temp1 = 0; 961 816 UInt temp2 = 0; 962 #else963 UInt uiLumaTrMode, uiChromaTrMode;964 #endif965 817 966 818 #if RWTH_SDC_DLT_B0036 … … 980 832 if( pcCU->isIntra(uiAbsPartIdx) ) 981 833 { 982 #if !UNIFIED_TRANSFORM_TREE983 decodeTransformIdx( pcCU, uiAbsPartIdx, pcCU->getDepth(uiAbsPartIdx) );984 985 pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx(uiAbsPartIdx), uiLumaTrMode, uiChromaTrMode );986 987 #endif // !UNIFIED_TRANSFORM_TREE988 834 } 989 835 else … … 1007 853 } 1008 854 1009 #if !UNIFIED_TRANSFORM_TREE1010 decodeTransformIdx( pcCU, uiAbsPartIdx, pcCU->getDepth(uiAbsPartIdx) );1011 1012 pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx(uiAbsPartIdx), uiLumaTrMode, uiChromaTrMode );1013 #endif // !UNIFIED_TRANSFORM_TREE1014 855 } 1015 856 … … 1030 871 #endif 1031 872 1032 #if UNIFIED_TRANSFORM_TREE1033 873 xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, 0, temp, temp1, temp2, bCodeDQP ); 1034 #else // UNIFIED_TRANSFORM_TREE1035 xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, uiLumaTrMode, bCodeDQP );1036 #endif // UNIFIED_TRANSFORM_TREE1037 874 1038 875 #if FIX_MPI_B0065 -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r210 r296 67 67 virtual Void setBitstream ( TComInputBitstream* p ) = 0; 68 68 69 #if OL_FLUSH70 69 virtual Void decodeFlush() = 0; 71 #endif72 70 73 71 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 74 72 virtual Void parseVPS ( TComVPS* pcVPS ) = 0; 75 73 #endif 76 #if HHI_MPI 74 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068 77 75 virtual Void parseSPS ( TComSPS* pcSPS, Bool bIsDepth ) = 0; 78 76 #else 79 77 virtual Void parseSPS ( TComSPS* pcSPS ) = 0; 80 78 #endif 81 #if TILES_OR_ENTROPY_SYNC_IDC82 79 virtual Void parsePPS ( TComPPS* pcPPS, ParameterSetManagerDecoder *parameterSet ) = 0; 83 #else84 virtual Void parsePPS ( TComPPS* pcPPS ) = 0;85 #endif86 80 virtual Void parseAPS ( TComAPS* pAPS ) = 0; 87 81 virtual void parseSEI(SEImessages&) = 0; 88 82 89 #if LCU_SYNTAX_ALF 83 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 84 virtual Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth) = 0; 85 #else 90 86 virtual Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet) = 0; 91 #else92 virtual Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl ) = 0;93 87 #endif 94 88 95 89 virtual Void parseTerminatingBit ( UInt& ruilsLast ) = 0; 96 90 97 #if H HI_INTER_VIEW_MOTION_PRED91 #if H3D_IVMP 98 92 virtual Void parseMVPIdx ( Int& riMVPIdx, Int iNumAMVPCands ) = 0; 99 93 #else … … 109 103 virtual Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ) = 0; 110 104 virtual Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 111 #if H HI_INTER_VIEW_RESIDUAL_PRED105 #if H3D_IVRP 112 106 virtual Void parseResPredFlag ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 113 107 #endif … … 159 153 UInt m_uiBakAbsPartIdx; 160 154 UInt m_uiBakChromaOffset; 161 #if UNIFIED_TRANSFORM_TREE162 155 UInt m_bakAbsPartIdxCU; 163 #endif164 156 165 157 public: … … 179 171 #endif 180 172 181 #if HHI_MPI 173 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068 182 174 Void decodeSPS ( TComSPS* pcSPS, Bool bIsDepth ) { m_pcEntropyDecoderIf->parseSPS(pcSPS, bIsDepth); } 183 175 #else 184 176 Void decodeSPS ( TComSPS* pcSPS ) { m_pcEntropyDecoderIf->parseSPS(pcSPS); } 185 177 #endif 186 #if TILES_OR_ENTROPY_SYNC_IDC187 178 Void decodePPS ( TComPPS* pcPPS, ParameterSetManagerDecoder *parameterSet ) { m_pcEntropyDecoderIf->parsePPS(pcPPS, parameterSet); } 188 #else189 Void decodePPS ( TComPPS* pcPPS ) { m_pcEntropyDecoderIf->parsePPS(pcPPS); }190 #endif191 179 Void decodeAPS ( TComAPS* pAPS ) { m_pcEntropyDecoderIf->parseAPS(pAPS);} 192 180 void decodeSEI(SEImessages& seis) { m_pcEntropyDecoderIf->parseSEI(seis); } 193 181 194 #if LCU_SYNTAX_ALF 182 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 183 Void decodeSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth) { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager, alfCUCtrl, alfParamSet, isDepth); } 184 #else 195 185 Void decodeSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet) { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager, alfCUCtrl, alfParamSet); } 196 #else197 Void decodeSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl ) { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager, alfCUCtrl); }198 186 #endif 199 187 … … 210 198 Void decodeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 211 199 Void decodeMergeIndex ( TComDataCU* pcSubCU, UInt uiPartIdx, UInt uiPartAddr, PartSize eCUMode, UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, UInt uiDepth ); 212 #if H HI_INTER_VIEW_RESIDUAL_PRED200 #if H3D_IVRP && !MTK_MDIVRP_C0138 213 201 Void decodeResPredFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx ); 214 202 #endif … … 223 211 Void decodeIntraDirModeChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 224 212 225 #if !UNIFIED_TRANSFORM_TREE226 Void decodeTransformIdx ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );227 #endif228 #if UNIFIED_TRANSFORM_TREE229 213 Void decodeQP ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 230 #else231 Void decodeQP ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );232 #endif233 214 234 215 Void readTileMarker ( UInt& uiTileIdx, UInt uiBitsUsed ) { m_pcEntropyDecoderIf->readTileMarker( uiTileIdx, uiBitsUsed ); } … … 237 218 238 219 private: 239 #if UNIFIED_TRANSFORM_TREE240 220 Void xDecodeTransform ( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt absTUPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3, Bool& bCodeDQP ); 241 #else242 Void xDecodeTransformSubdiv ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt absTUPartIdx, UInt uiDepth, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3 );243 244 Void xDecodeCoeff ( TComDataCU* pcCU, UInt uiLumaOffset, UInt uiChromaOffset, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, UInt uiTrIdx, UInt uiCurrTrIdx, Bool& bCodeDQP );245 #endif //UNIFIED_TRANSFORM_TREE246 221 247 222 public: … … 253 228 Void setSliceGranularity (Int iSliceGranularity) {m_pcEntropyDecoderIf->setSliceGranularity(iSliceGranularity);} 254 229 255 #if SAO_UNIT_INTERLEAVING256 230 Void decodeSaoParam (SAOParam* saoParam); 257 231 void decodeSaoLcu(Int rx, Int ry, Int compIdx, SAOParam* saoParam, Bool &repeatedRow ); 258 232 Void decodeSaoOneLcu(SaoLcuParam* saoLcuParam); 259 #endif 260 261 #if OL_FLUSH 233 262 234 Void decodeFlush() { m_pcEntropyDecoderIf->decodeFlush(); } 263 #endif264 235 265 236 #if RWTH_SDC_DLT_B0036 -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r189 r296 79 79 Void TDecGop::destroy() 80 80 { 81 #if LCU_SYNTAX_ALF82 81 m_alfParamSetPilot.releaseALFParam(); 83 #endif84 82 } 85 83 … … 95 93 ,TComDepthMapGenerator* pcDepthMapGenerator 96 94 #endif 97 #if H HI_INTER_VIEW_RESIDUAL_PRED95 #if H3D_IVRP 98 96 ,TComResidualGenerator* pcResidualGenerator 99 97 #endif … … 111 109 m_pcDepthMapGenerator = pcDepthMapGenerator; 112 110 #endif 113 #if H HI_INTER_VIEW_RESIDUAL_PRED111 #if H3D_IVRP 114 112 m_pcResidualGenerator = pcResidualGenerator; 115 113 #endif … … 120 118 // Private member functions 121 119 // ==================================================================================================================== 122 #if LCU_SYNTAX_ALF123 120 Void TDecGop::patchAlfLCUParams(ALFParam*** alfLCUParam, AlfParamSet* alfParamSet, Int firstLCUAddr) 124 121 { … … 195 192 } 196 193 197 #endif198 194 // ==================================================================================================================== 199 195 // Public member functions … … 279 275 if(pcSlice->getAlfEnabledFlag()) 280 276 { 281 #if LCU_SYNTAX_ALF282 277 if(pcSlice->getSPS()->getUseALFCoefInSlice()) 283 278 { … … 289 284 if( !pcSlice->getSPS()->getUseALFCoefInSlice()) 290 285 { 291 #endif292 286 m_vAlfCUCtrlSlices.push_back(m_cAlfCUCtrlOneSlice); 293 #if LCU_SYNTAX_ALF294 287 } 295 #endif296 288 } 297 289 } … … 303 295 { 304 296 m_pcDepthMapGenerator->initViewComponent( rpcPic ); 305 #if ! QC_MULTI_DIS_CAN_A0097297 #if !H3D_NBDV 306 298 m_pcDepthMapGenerator->predictDepthMap ( rpcPic ); 307 299 #endif 308 #if H HI_INTER_VIEW_RESIDUAL_PRED300 #if H3D_IVRP 309 301 m_pcResidualGenerator->initViewComponent( rpcPic ); 310 302 #endif … … 312 304 #endif 313 305 314 #if QC_SIMPLE_NBDV_B0047306 #if H3D_NBDV 315 307 if(pcSlice->getViewId() && pcSlice->getSPS()->getMultiviewMvPredMode()) 316 308 { … … 323 315 m_pcSliceDecoder->decompressSlice( pcBitstream, ppcSubstreams, rpcPic, m_pcSbacDecoder, m_pcSbacDecoders); 324 316 m_pcEntropyDecoder->setBitstream( ppcSubstreams[uiNumSubstreams-1] ); 325 #if WPP_SIMPLIFICATION326 317 if ( uiNumSubstreams > 1 ) 327 #else328 if ( pcSlice->getPPS()->getEntropyCodingSynchro() )329 #endif330 318 { 331 319 // deallocate all created substreams, including internal buffers. … … 343 331 else 344 332 { 345 #if H HI_INTER_VIEW_RESIDUAL_PRED333 #if H3D_IVRP 346 334 // set residual picture 347 335 m_pcResidualGenerator->setRecResidualPic( rpcPic ); 348 336 #endif 349 337 #if DEPTH_MAP_GENERATION 350 #if ! QC_MULTI_DIS_CAN_A0097338 #if !H3D_NBDV 351 339 // update virtual depth map 352 340 m_pcDepthMapGenerator->updateDepthMap( rpcPic ); … … 356 344 Bool bLFCrossTileBoundary = (pcSlice->getPPS()->getTileBehaviorControlPresentFlag() == 1)? 357 345 (pcSlice->getPPS()->getLFCrossTileBoundaryFlag()):(pcSlice->getPPS()->getSPS()->getLFCrossTileBoundaryFlag()); 358 #if DBL_CONTROL359 346 if (pcSlice->getPPS()->getDeblockingFilterControlPresent()) 360 347 { 361 #endif362 348 if(pcSlice->getSPS()->getUseDF()) 363 349 { … … 372 358 } 373 359 } 374 #if DBL_CONTROL375 360 } 376 361 m_pcLoopFilter->setCfg(pcSlice->getPPS()->getDeblockingFilterControlPresent(), pcSlice->getLoopFilterDisable(), pcSlice->getLoopFilterBetaOffset(), pcSlice->getLoopFilterTcOffset(), bLFCrossTileBoundary); 377 #else378 m_pcLoopFilter->setCfg(pcSlice->getLoopFilterDisable(), pcSlice->getLoopFilterBetaOffset(), pcSlice->getLoopFilterTcOffset(), bLFCrossTileBoundary);379 #endif380 362 m_pcLoopFilter->loopFilterPic( rpcPic ); 381 363 … … 392 374 if(pcSlice->getSaoEnabledFlag()) 393 375 { 394 #if SAO_UNIT_INTERLEAVING395 376 if (pcSlice->getSaoInterleavingFlag()) 396 377 { … … 402 383 } 403 384 m_pcSAO->setSaoInterleavingFlag(pcSlice->getAPS()->getSaoInterleavingFlag()); 404 #endif405 385 m_pcSAO->createPicSaoInfo(rpcPic, m_uiILSliceCount); 406 386 m_pcSAO->SAOProcess(rpcPic, pcSlice->getAPS()->getSaoParam()); … … 413 393 if( pcSlice->getSPS()->getUseALF() ) 414 394 { 415 #if LCU_SYNTAX_ALF416 395 if( (pcSlice->getSPS()->getUseALFCoefInSlice())?(true):(pcSlice->getAlfEnabledFlag())) 417 #else 418 if(pcSlice->getAlfEnabledFlag()) 419 #endif 420 { 421 422 #if LCU_SYNTAX_ALF 396 { 397 423 398 if(!pcSlice->getSPS()->getUseALFCoefInSlice()) 424 399 { … … 427 402 m_pcAdaptiveLoopFilter->createPicAlfInfo(rpcPic, m_uiILSliceCount, pcSlice->getSliceQp()); 428 403 m_pcAdaptiveLoopFilter->ALFProcess(rpcPic, m_vAlfCUCtrlSlices, pcSlice->getSPS()->getUseALFCoefInSlice()); 429 #else430 m_pcAdaptiveLoopFilter->createPicAlfInfo(rpcPic, m_uiILSliceCount);431 m_pcAdaptiveLoopFilter->ALFProcess(rpcPic, pcSlice->getAPS()->getAlfParam(), m_vAlfCUCtrlSlices);432 #endif433 404 m_pcAdaptiveLoopFilter->PCMLFDisableProcess(rpcPic); 434 405 m_pcAdaptiveLoopFilter->destroyPicAlfInfo(); 435 406 } 436 #if LCU_SYNTAX_ALF437 407 m_pcAdaptiveLoopFilter->resetLCUAlfInfo(); //reset all LCU ALFParam->alf_flag = 0 438 #endif439 408 } 440 409 … … 511 480 m_vAlfCUCtrlSlices.clear(); 512 481 } 482 fflush(stdout); 513 483 } 514 484 -
trunk/source/Lib/TLibDecoder/TDecGop.h
r56 r296 90 90 TComDepthMapGenerator* m_pcDepthMapGenerator; 91 91 #endif 92 #if H HI_INTER_VIEW_RESIDUAL_PRED92 #if H3D_IVRP 93 93 TComResidualGenerator* m_pcResidualGenerator; 94 94 #endif … … 101 101 bool m_pictureDigestEnabled; ///< if true, handle picture_digest SEI messages 102 102 AlfCUCtrlInfo m_cAlfCUCtrlOneSlice; 103 #if LCU_SYNTAX_ALF104 103 AlfParamSet m_alfParamSetPilot; 105 #endif106 104 107 105 public: … … 120 118 ,TComDepthMapGenerator* pcDepthMapGenerator 121 119 #endif 122 #if H HI_INTER_VIEW_RESIDUAL_PRED120 #if H3D_IVRP 123 121 ,TComResidualGenerator* pcResidualGenerator 124 122 #endif … … 131 129 void setPictureDigestEnabled(bool enabled) { m_pictureDigestEnabled = enabled; } 132 130 AlfCUCtrlInfo& getAlfCuCtrlParam() { return m_cAlfCUCtrlOneSlice; } 133 #if LCU_SYNTAX_ALF134 131 AlfParamSet& getAlfParamSet() {return m_alfParamSetPilot;} 135 #endif136 132 137 133 private: 138 #if LCU_SYNTAX_ALF139 134 Void patchAlfLCUParams(ALFParam*** alfLCUParam, AlfParamSet* alfParamSet, Int firstLCUAddr = 0); 140 #endif141 135 142 136 -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r189 r296 62 62 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 63 63 , m_cCUMergeIdxExtSCModel ( 1, 1, NUM_MERGE_IDX_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 64 #if H HI_INTER_VIEW_RESIDUAL_PRED64 #if H3D_IVRP 65 65 , m_cResPredFlagSCModel ( 1, 1, NUM_RES_PRED_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 66 66 #endif … … 87 87 , m_cALFUvlcSCModel ( 1, 1, NUM_ALF_UVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 88 88 , m_cALFSvlcSCModel ( 1, 1, NUM_ALF_SVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 89 #if AMP_CTX90 89 , m_cCUAMPSCModel ( 1, 1, NUM_CU_AMP_CTX , m_contextModels + m_numContextModels, m_numContextModels) 91 #else92 , m_cCUXPosiSCModel ( 1, 1, NUM_CU_X_POS_CTX , m_contextModels + m_numContextModels, m_numContextModels)93 , m_cCUYPosiSCModel ( 1, 1, NUM_CU_Y_POS_CTX , m_contextModels + m_numContextModels, m_numContextModels)94 #endif95 90 , m_cSaoFlagSCModel ( 1, 1, NUM_SAO_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 96 91 , m_cSaoUvlcSCModel ( 1, 1, NUM_SAO_UVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 97 92 , m_cSaoSvlcSCModel ( 1, 1, NUM_SAO_SVLC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 98 #if SAO_UNIT_INTERLEAVING99 93 , m_cSaoMergeLeftSCModel ( 1, 1, NUM_SAO_MERGE_LEFT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 100 94 , m_cSaoMergeUpSCModel ( 1, 1, NUM_SAO_MERGE_UP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 101 95 , m_cSaoTypeIdxSCModel ( 1, 1, NUM_SAO_TYPE_IDX_CTX , m_contextModels + m_numContextModels, m_numContextModels) 102 #endif103 96 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 104 97 , m_cDmmFlagSCModel ( 1, 1, NUM_DMM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 166 159 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); 167 160 m_cCUMergeIdxExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT ); 168 #if H HI_INTER_VIEW_RESIDUAL_PRED161 #if H3D_IVRP 169 162 m_cResPredFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_RES_PRED_FLAG ); 170 163 #endif 171 164 m_cCUAlfCtrlFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ALF_CTRL_FLAG ); 172 165 m_cCUPartSizeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_PART_SIZE ); 173 #if AMP_CTX174 166 m_cCUAMPSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_CU_AMP_POS ); 175 #else176 m_cCUXPosiSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_CU_X_POS );177 m_cCUYPosiSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_CU_Y_POS );178 #endif179 167 m_cCUPredModeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_PRED_MODE ); 180 168 m_cCUIntraPredSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTRA_PRED_MODE ); … … 199 187 m_cSaoUvlcSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_UVLC ); 200 188 m_cSaoSvlcSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_SVLC ); 201 #if SAO_UNIT_INTERLEAVING202 189 m_cSaoMergeLeftSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_MERGE_LEFT_FLAG ); 203 190 m_cSaoMergeUpSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_MERGE_UP_FLAG ); 204 191 m_cSaoTypeIdxSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SAO_TYPE_IDX ); 205 #endif206 192 207 193 m_cCUTransSubdivFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); … … 260 246 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT ); 261 247 m_cCUMergeIdxExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT ); 262 #if H HI_INTER_VIEW_RESIDUAL_PRED248 #if H3D_IVRP 263 249 m_cResPredFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_RES_PRED_FLAG ); 264 250 #endif 265 251 m_cCUAlfCtrlFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ALF_CTRL_FLAG ); 266 252 m_cCUPartSizeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_PART_SIZE ); 267 #if AMP_CTX268 253 m_cCUAMPSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_CU_AMP_POS ); 269 #else270 m_cCUXPosiSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_CU_X_POS );271 m_cCUYPosiSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_CU_Y_POS );272 #endif273 254 m_cCUPredModeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_PRED_MODE ); 274 255 m_cCUIntraPredSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_PRED_MODE ); … … 293 274 m_cSaoUvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_UVLC ); 294 275 m_cSaoSvlcSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_SVLC ); 295 #if SAO_UNIT_INTERLEAVING296 276 m_cSaoMergeLeftSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_LEFT_FLAG ); 297 277 m_cSaoMergeUpSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_UP_FLAG ); 298 278 m_cSaoTypeIdxSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX ); 299 #endif300 279 m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 301 280 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX … … 449 428 } 450 429 451 #if EIGHT_BITS_RICE_CODE452 430 ruiGoRiceParam = g_aauiGoRiceUpdate[ ruiGoRiceParam ][ min<UInt>( ruiSymbol, 23 ) ]; 453 #else454 ruiGoRiceParam = g_aauiGoRiceUpdate[ ruiGoRiceParam ][ min<UInt>( ruiSymbol, 15 ) ];455 #endif456 431 457 432 return; … … 470 445 { 471 446 UInt uiSymbol; 472 #if BURST_IPCM473 447 Int numSubseqIPCM = 0; 474 448 Bool readPCMSampleFlag = false; … … 490 464 } 491 465 } 492 #else 493 m_pcTDecBinIf->decodeBinTrm(uiSymbol); 494 #endif 495 496 #if BURST_IPCM 466 497 467 if (readPCMSampleFlag == true) 498 #else499 if (uiSymbol)500 #endif501 468 { 502 469 Bool bIpcmFlag = true; 503 470 504 #if !BURST_IPCM505 m_pcTDecBinIf->decodePCMAlignBits();506 #endif507 471 508 472 pcCU->setPartSizeSubParts ( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); … … 568 532 } 569 533 570 #if BURST_IPCM571 534 pcCU->setNumSucIPCM( pcCU->getNumSucIPCM() - 1); 572 535 if(pcCU->getNumSucIPCM() == 0) … … 574 537 m_pcTDecBinIf->resetBac(); 575 538 } 576 #else577 m_pcTDecBinIf->resetBac();578 #endif579 539 } 580 540 } … … 664 624 { 665 625 UInt uiNumCand = MRG_MAX_NUM_CANDS; 666 #if !MRG_IDX_CTX_RED667 UInt auiCtx[4] = { 0, 1, 2, 3 };668 #endif669 626 UInt uiUnaryIdx = 0; 670 627 uiNumCand = pcCU->getSlice()->getMaxNumMergeCand(); … … 678 635 { 679 636 UInt uiSymbol = 0; 680 #if MRG_IDX_CTX_RED681 637 if ( uiUnaryIdx==0 ) 682 638 { … … 687 643 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 688 644 } 689 #else690 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUMergeIdxExtSCModel.get( 0, 0, auiCtx[uiUnaryIdx] ) );691 #endif692 645 if( uiSymbol == 0 ) 693 646 { … … 717 670 } 718 671 719 #if H HI_INTER_VIEW_RESIDUAL_PRED672 #if H3D_IVRP 720 673 Void 721 674 TDecSbac::parseResPredFlag( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth ) … … 728 681 #endif 729 682 730 #if H HI_INTER_VIEW_MOTION_PRED683 #if H3D_IVMP 731 684 Void TDecSbac::parseMVPIdx ( Int& riMVPIdx, Int iNumAMVPCands ) 732 685 { … … 762 715 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 763 716 717 #if HHI_QTLPC_RAU_OFF_C0160 718 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 719 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC()) 720 #else 764 721 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC()) 722 #endif 765 723 { 766 724 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); … … 804 762 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 805 763 764 #if HHI_QTLPC_RAU_OFF_C0160 765 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 766 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTLPC()) 767 #else 806 768 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC()) 769 #endif 807 770 { 808 771 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); … … 869 832 if (eMode == SIZE_2NxN) 870 833 { 871 #if AMP_CTX872 834 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 873 #else874 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 ));875 #endif876 835 if (uiSymbol == 0) 877 836 { 878 #if AMP_CTX879 837 m_pcTDecBinIf->decodeBinEP(uiSymbol); 880 #else881 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 ));882 #endif883 838 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 884 839 } … … 886 841 else if (eMode == SIZE_Nx2N) 887 842 { 888 #if AMP_CTX889 843 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 890 #else891 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 ));892 #endif893 844 if (uiSymbol == 0) 894 845 { 895 #if AMP_CTX896 846 m_pcTDecBinIf->decodeBinEP(uiSymbol); 897 #else898 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 ));899 #endif900 847 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 901 848 } … … 970 917 #if HHI_DMM_PRED_TEX 971 918 if( intraPredMode == DMM_WEDGE_PREDTEX_D_IDX ) { xParseWedgePredTexDeltaInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 919 #if LGE_DMM3_SIMP_C0044 920 if( intraPredMode == DMM_WEDGE_PREDTEX_IDX ) { xParseWedgePredTexInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 921 #endif 972 922 if( intraPredMode == DMM_CONTOUR_PREDTEX_D_IDX ) { xParseContourPredTexDeltaInfo( pcCU, uiAbsPartIdx, uiDepth ); } 973 923 #endif … … 975 925 else 976 926 { 977 #endif978 #if !LOGI_INTRA_NAME_3MPM979 Int iIntraIdx = pcCU->getIntraSizeIdx(uiAbsPartIdx);980 927 #endif 981 928 … … 990 937 #endif 991 938 992 #if LOGI_INTRA_NAME_3MPM993 939 Int uiPreds[3] = {-1, -1, -1}; 994 #else995 Int uiPreds[2] = {-1, -1};996 #endif997 940 Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds); 998 941 #if LGE_EDGE_INTRA_A0070 … … 1005 948 { 1006 949 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 1007 #if LOGI_INTRA_NAME_3MPM1008 950 if (uiSymbol) 1009 951 { … … 1011 953 uiSymbol++; 1012 954 } 1013 #endif1014 955 intraPredMode = uiPreds[uiSymbol]; 1015 956 } … … 1018 959 intraPredMode = 0; 1019 960 1020 #if LOGI_INTRA_NAME_3MPM1021 961 1022 962 m_pcTDecBinIf->decodeBinsEP( uiSymbol, 5 ); … … 1047 987 std::swap(uiPreds[1], uiPreds[2]); 1048 988 } 1049 #else1050 m_pcTDecBinIf->decodeBinsEP( uiSymbol, g_aucIntraModeBitsAng[iIntraIdx] - 1 );1051 intraPredMode = uiSymbol;1052 1053 if ( intraPredMode == 31 )1054 {1055 m_pcTDecBinIf->decodeBinEP( uiSymbol );1056 intraPredMode += uiSymbol;1057 }1058 #endif1059 989 #if LGE_EDGE_INTRA_A0070 1060 990 if ( intraPredMode != EDGE_INTRA_IDX) … … 1145 1075 { 1146 1076 UInt uiIPredMode; 1147 #if CHROMA_MODE_CODING1148 1077 m_pcTDecBinIf->decodeBinsEP( uiIPredMode, 2 ); 1149 #else1150 xReadUnaryMaxSymbol( uiIPredMode, m_cCUChromaPredSCModel.get( 0, 0 ) + 1, 0, 3 );1151 #endif1152 1078 UInt uiAllowedChromaDir[ NUM_CHROMA_MODE ]; 1153 1079 pcCU->getAllowedChromaDir( uiAbsPartIdx, uiAllowedChromaDir ); … … 1217 1143 ContextModel *pCtx = m_cCUMvdSCModel.get( 0 ); 1218 1144 1219 #if H0111_MVD_L1_ZERO1220 1145 if(pcCU->getSlice()->getMvdL1ZeroFlag() && eRefList == REF_PIC_LIST_1 && pcCU->getInterDir(uiAbsPartIdx)==3) 1221 1146 { … … 1225 1150 else 1226 1151 { 1227 #endif1228 1152 1229 1153 m_pcTDecBinIf->decodeBin( uiHorAbs, *pCtx ); … … 1268 1192 } 1269 1193 1270 #if H0111_MVD_L1_ZERO 1271 } 1272 #endif 1194 } 1273 1195 1274 1196 const TComMv cMv( uiHorSign ? -Int( uiHorAbs ): uiHorAbs, uiVerSign ? -Int( uiVerAbs ) : uiVerAbs ); … … 1310 1232 Void TDecSbac::parseDeltaQP( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1311 1233 { 1312 #if H0736_AVC_STYLE_QP_RANGE1313 1234 Int qp; 1314 #endif1315 1235 UInt uiDQp; 1316 1236 Int iDQp; … … 1320 1240 if ( uiDQp == 0 ) 1321 1241 { 1322 #if H0736_AVC_STYLE_QP_RANGE1323 1242 qp = pcCU->getRefQP(uiAbsPartIdx); 1324 #else1325 uiDQp = pcCU->getRefQP(uiAbsPartIdx);1326 #endif1327 1243 } 1328 1244 else 1329 1245 { 1330 1246 UInt uiSign; 1331 #if H0736_AVC_STYLE_QP_RANGE1332 1247 Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffsetY(); 1333 #else1334 UInt uiQpBdOffsetY = 6*(g_uiBitIncrement + g_uiBitDepth - 8);1335 #endif1336 1248 m_pcTDecBinIf->decodeBinEP(uiSign); 1337 1249 1338 #if H0736_AVC_STYLE_QP_RANGE1339 1250 UInt uiMaxAbsDQpMinus1 = 24 + (qpBdOffsetY/2) + (uiSign); 1340 #else1341 UInt uiMaxAbsDQpMinus1 = 24 + (uiQpBdOffsetY/2) + (uiSign);1342 #endif1343 1251 UInt uiAbsDQpMinus1; 1344 1252 xReadUnaryMaxSymbol (uiAbsDQpMinus1, &m_cCUDeltaQpSCModel.get( 0, 0, 1 ), 1, uiMaxAbsDQpMinus1); … … 1351 1259 } 1352 1260 1353 #if H0736_AVC_STYLE_QP_RANGE1354 1261 qp = (((Int) pcCU->getRefQP( uiAbsPartIdx ) + iDQp + 52 + 2*qpBdOffsetY )%(52+qpBdOffsetY)) - qpBdOffsetY; 1355 #else1356 #if LOSSLESS_CODING1357 uiDQp = (pcCU->getRefQP(uiAbsPartIdx) + iDQp + 52) % 52;1358 #else1359 uiDQp = pcCU->getRefQP(uiAbsPartIdx) + iDQp;1360 #endif1361 #endif1362 1262 } 1363 1263 1364 1264 UInt uiAbsQpCUPartIdx = (uiAbsPartIdx>>(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))<<(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)) ; 1365 1265 UInt uiQpCUDepth = min(uiDepth,pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()) ; 1366 #if H0736_AVC_STYLE_QP_RANGE1367 1266 pcCU->setQPSubParts( qp, uiAbsQpCUPartIdx, uiQpCUDepth ); 1368 #else1369 pcCU->setQPSubParts( uiDQp, uiAbsQpCUPartIdx, uiQpCUDepth );1370 #endif1371 1267 } 1372 1268 … … 1409 1305 1410 1306 // posX 1411 #if LAST_CTX_REDUCTION1412 1307 Int widthCtx = eTType ? 4 : width; 1413 1308 const UInt *puiCtxIdxX = g_uiLastCtx + ( g_aucConvertToBit[ widthCtx ] * ( g_aucConvertToBit[ widthCtx ] + 3 ) ); 1414 #else1415 const UInt *puiCtxIdxX = g_uiLastCtx + ( g_aucConvertToBit[ width ] * ( g_aucConvertToBit[ width ] + 3 ) );1416 #endif1417 1309 for( uiPosLastX = 0; uiPosLastX < g_uiGroupIdx[ width - 1 ]; uiPosLastX++ ) 1418 1310 { 1419 #if LAST_CTX_REDUCTION1420 1311 if ( eTType ) 1421 1312 { … … 1424 1315 else 1425 1316 { 1426 #endif1427 1317 m_pcTDecBinIf->decodeBin( uiLast, *( pCtxX + puiCtxIdxX[ uiPosLastX ] ) ); 1428 #if LAST_CTX_REDUCTION 1429 } 1430 #endif 1318 } 1431 1319 if( !uiLast ) 1432 1320 { … … 1436 1324 1437 1325 // posY 1438 #if LAST_CTX_REDUCTION1439 1326 Int heightCtx = eTType? 4 : height; 1440 1327 const UInt *puiCtxIdxY = g_uiLastCtx + ( g_aucConvertToBit[ heightCtx ] * ( g_aucConvertToBit[ heightCtx ] + 3 ) ); 1441 #else1442 const UInt *puiCtxIdxY = g_uiLastCtx + ( g_aucConvertToBit[ height ] * ( g_aucConvertToBit[ height ] + 3 ) );1443 #endif1444 1328 for( uiPosLastY = 0; uiPosLastY < g_uiGroupIdx[ height - 1 ]; uiPosLastY++ ) 1445 1329 { 1446 #if LAST_CTX_REDUCTION1447 1330 if (eTType) 1448 1331 { … … 1451 1334 else 1452 1335 { 1453 #endif1454 1336 m_pcTDecBinIf->decodeBin( uiLast, *( pCtxY + puiCtxIdxY[ uiPosLastY ] ) ); 1455 #if LAST_CTX_REDUCTION 1456 } 1457 #endif 1337 } 1458 1338 if( !uiLast ) 1459 1339 { … … 1575 1455 UInt uiGoRiceParam = 0; 1576 1456 1577 #if MULTIBITS_DATA_HIDING1578 1457 UInt const tsig = pcCU->getSlice()->getPPS()->getTSIG(); 1579 1458 #if LOSSLESS_CODING … … 1591 1470 #endif 1592 1471 UInt absSum = 0; 1593 #endif // MULTIBITS_DATA_HIDING1594 1472 1595 1473 UInt uiSigCoeffGroupFlag[ MLS_GRP_NUM ]; … … 1600 1478 { 1601 1479 scanCG = g_auiSigLastScan[ uiScanIdx ][ uiLog2BlockSize > 3 ? uiLog2BlockSize-2-1 : 0 ]; 1602 #if MULTILEVEL_SIGMAP_EXT1603 1480 if( uiLog2BlockSize == 3 ) 1604 1481 { … … 1609 1486 scanCG = g_sigLastScanCG32x32; 1610 1487 } 1611 #endif1612 1488 } 1613 1489 else … … 1622 1498 Int numNonZero = 0; 1623 1499 1624 #if MULTIBITS_DATA_HIDING1625 1500 Int lastNZPosInCG = -1, firstNZPosInCG = SCAN_SET_SIZE; 1626 #endif1627 1501 1628 1502 Int pos[SCAN_SET_SIZE]; 1629 1503 if( iScanPosSig == (Int) uiScanPosLast ) 1630 1504 { 1631 #if MULTIBITS_DATA_HIDING1632 1505 lastNZPosInCG = iScanPosSig; 1633 1506 firstNZPosInCG = iScanPosSig; 1634 #endif1635 1507 iScanPosSig--; 1636 1508 pos[ numNonZero ] = uiBlkPosLast; … … 1638 1510 } 1639 1511 1640 #if !MULTILEVEL_SIGMAP_EXT1641 if( blockType > 3 )1642 {1643 #endif1644 1512 // decode significant_coeffgroup_flag 1645 1513 Int iCGBlkPos = scanCG[ iSubSet ]; 1646 1514 Int iCGPosY = iCGBlkPos / uiNumBlkSide; 1647 1515 Int iCGPosX = iCGBlkPos - (iCGPosY * uiNumBlkSide); 1648 #if MULTILEVEL_SIGMAP_EXT1649 1516 if( uiWidth == 8 && uiHeight == 8 && (uiScanIdx == SCAN_HOR || uiScanIdx == SCAN_VER) ) 1650 1517 { … … 1652 1519 iCGPosX = (uiScanIdx == SCAN_VER ? iCGBlkPos : 0); 1653 1520 } 1654 #endif1655 #if !REMOVE_INFER_SIGGRP1656 Bool bInferredCGFlag = false;1657 #endif1658 #if REMOVE_INFER_SIGGRP1659 1521 if( iSubSet == iLastScanSet || iSubSet == 0) 1660 #else1661 if( iSubSet == iLastScanSet )1662 #endif1663 1522 { 1664 1523 uiSigCoeffGroupFlag[ iCGBlkPos ] = 1; … … 1666 1525 else 1667 1526 { 1668 #if !REMOVE_INFER_SIGGRP1669 #if MULTILEVEL_SIGMAP_EXT1670 if( !TComTrQuant::bothCGNeighboursOne( uiSigCoeffGroupFlag, iCGPosX, iCGPosY, uiScanIdx, uiWidth, uiHeight) && ( iSubSet ) )1671 #else1672 if( !TComTrQuant::bothCGNeighboursOne( uiSigCoeffGroupFlag, iCGPosX, iCGPosY, uiWidth, uiHeight) && ( iSubSet ) )1673 #endif1674 {1675 #endif1676 1527 UInt uiSigCoeffGroup; 1677 #if MULTILEVEL_SIGMAP_EXT1678 1528 UInt uiCtxSig = TComTrQuant::getSigCoeffGroupCtxInc( uiSigCoeffGroupFlag, iCGPosX, iCGPosY, uiScanIdx, uiWidth, uiHeight ); 1679 #else1680 UInt uiCtxSig = TComTrQuant::getSigCoeffGroupCtxInc( uiSigCoeffGroupFlag, iCGPosX, iCGPosY, uiWidth, uiHeight );1681 #endif1682 1529 m_pcTDecBinIf->decodeBin( uiSigCoeffGroup, baseCoeffGroupCtx[ uiCtxSig ] ); 1683 1530 uiSigCoeffGroupFlag[ iCGBlkPos ] = uiSigCoeffGroup; 1684 #if !REMOVE_INFER_SIGGRP1685 }1686 else1687 {1688 uiSigCoeffGroupFlag[ iCGBlkPos ] = 1;1689 bInferredCGFlag = true;1690 }1691 #endif1692 1531 } 1693 1532 … … 1703 1542 if( uiSigCoeffGroupFlag[ iCGBlkPos ] ) 1704 1543 { 1705 #if REMOVE_INFER_SIGGRP1706 1544 if( iScanPosSig > iSubPos || iSubSet == 0 || numNonZero ) 1707 #else1708 if( iScanPosSig > iSubPos || bInferredCGFlag || numNonZero )1709 #endif1710 1545 { 1711 1546 uiCtxSig = TComTrQuant::getSigCtxInc( pcCoef, uiPosX, uiPosY, blockType, uiWidth, uiHeight, eTType ); … … 1722 1557 pos[ numNonZero ] = uiBlkPos; 1723 1558 numNonZero ++; 1724 #if MULTIBITS_DATA_HIDING1725 1559 if( lastNZPosInCG == -1 ) 1726 1560 { … … 1728 1562 } 1729 1563 firstNZPosInCG = iScanPosSig; 1730 #endif1731 1564 } 1732 1565 } 1733 #if !MULTILEVEL_SIGMAP_EXT1734 }1735 else1736 {1737 for( ; iScanPosSig >= iSubPos; iScanPosSig-- )1738 {1739 UInt uiBlkPos = scan[ iScanPosSig ];1740 UInt uiPosY = uiBlkPos >> uiLog2BlockSize;1741 UInt uiPosX = uiBlkPos - ( uiPosY << uiLog2BlockSize );1742 UInt uiSig = 0;1743 UInt uiCtxSig = TComTrQuant::getSigCtxInc( pcCoef, uiPosX, uiPosY, blockType, uiWidth, uiHeight, eTType );1744 m_pcTDecBinIf->decodeBin( uiSig, baseCtx[ uiCtxSig ] );1745 pcCoef[ uiBlkPos ] = uiSig;1746 if( uiSig )1747 {1748 pos[ numNonZero ] = uiBlkPos;1749 numNonZero ++;1750 #if MULTIBITS_DATA_HIDING1751 if( lastNZPosInCG == -1 )1752 {1753 lastNZPosInCG = iScanPosSig;1754 }1755 firstNZPosInCG = iScanPosSig;1756 #endif1757 }1758 }1759 }1760 #endif1761 1566 1762 1567 1763 1568 if( numNonZero ) 1764 1569 { 1765 #if MULTIBITS_DATA_HIDING1766 1570 Bool signHidden = ( lastNZPosInCG - firstNZPosInCG >= (Int)tsig ); 1767 1571 absSum = 0; 1768 #endif // MULTIBITS_DATA_HIDING1769 1572 1770 1573 UInt c1 = 1; 1771 #if !RESTRICT_GR1GR2FLAG_NUMBER1772 UInt c2 = 0;1773 #endif1774 #if LEVEL_CTX_LUMA_RED1775 1574 UInt uiCtxSet = (iSubSet > 0 && eTType==TEXT_LUMA) ? 2 : 0; 1776 #else1777 UInt uiCtxSet = (iSubSet > 0 && eTType==TEXT_LUMA) ? 3 : 0;1778 #endif1779 1575 UInt uiBin; 1780 1576 … … 1782 1578 { 1783 1579 uiCtxSet++; 1784 #if !LEVEL_CTX_LUMA_RED1785 if(eTType==TEXT_LUMA && uiNumOne > 3)1786 {1787 uiCtxSet++;1788 }1789 #endif1790 1580 } 1791 1581 … … 1794 1584 Int absCoeff[SCAN_SET_SIZE]; 1795 1585 1796 #if RESTRICT_GR1GR2FLAG_NUMBER1797 1586 for ( Int i = 0; i < numNonZero; i++) absCoeff[i] = 1; 1798 1587 Int numC1Flag = min(numNonZero, C1FLAG_NUMBER); … … 1800 1589 1801 1590 for( Int idx = 0; idx < numC1Flag; idx++ ) 1802 #else1803 for( Int idx = 0; idx < numNonZero; idx++ )1804 #endif1805 1591 { 1806 1592 m_pcTDecBinIf->decodeBin( uiBin, baseCtxMod[c1] ); … … 1808 1594 { 1809 1595 c1 = 0; 1810 #if RESTRICT_GR1GR2FLAG_NUMBER1811 1596 if (firstC2FlagIdx == -1) 1812 1597 { 1813 1598 firstC2FlagIdx = idx; 1814 1599 } 1815 #endif1816 1600 } 1817 1601 else if( (c1 < 3) && (c1 > 0) ) … … 1824 1608 if (c1 == 0) 1825 1609 { 1826 #if RESTRICT_GR1GR2FLAG_NUMBER1827 1610 baseCtxMod = ( eTType==TEXT_LUMA ) ? m_cCUAbsSCModel.get( 0, 0 ) + uiCtxSet : m_cCUAbsSCModel.get( 0, 0 ) + NUM_ABS_FLAG_CTX_LUMA + uiCtxSet; 1828 1611 if ( firstC2FlagIdx != -1) … … 1831 1614 absCoeff[ firstC2FlagIdx ] = uiBin + 2; 1832 1615 } 1833 #else 1834 baseCtxMod = ( eTType==TEXT_LUMA ) ? m_cCUAbsSCModel.get( 0, 0 ) + 3 * uiCtxSet : m_cCUAbsSCModel.get( 0, 0 ) + NUM_ABS_FLAG_CTX_LUMA + 3 * uiCtxSet; 1616 } 1617 1618 UInt coeffSigns; 1619 if ( signHidden && beValid ) 1620 { 1621 m_pcTDecBinIf->decodeBinsEP( coeffSigns, numNonZero-1 ); 1622 coeffSigns <<= 32 - (numNonZero-1); 1623 } 1624 else 1625 { 1626 m_pcTDecBinIf->decodeBinsEP( coeffSigns, numNonZero ); 1627 coeffSigns <<= 32 - numNonZero; 1628 } 1629 1630 Int iFirstCoeff2 = 1; 1631 if (c1 == 0 || numNonZero > C1FLAG_NUMBER) 1632 { 1835 1633 for( Int idx = 0; idx < numNonZero; idx++ ) 1836 1634 { 1837 if( absCoeff[ idx ] == 2 )1838 {1839 m_pcTDecBinIf->decodeBin( uiBin, baseCtxMod[c2] );1840 absCoeff[ idx ] = uiBin + 2;1841 c2 += (c2 < 2);1842 uiNumOne++;1843 }1844 }1845 #endif1846 }1847 1848 #if MULTIBITS_DATA_HIDING1849 UInt coeffSigns;1850 if ( signHidden && beValid )1851 {1852 m_pcTDecBinIf->decodeBinsEP( coeffSigns, numNonZero-1 );1853 coeffSigns <<= 32 - (numNonZero-1);1854 }1855 else1856 {1857 m_pcTDecBinIf->decodeBinsEP( coeffSigns, numNonZero );1858 coeffSigns <<= 32 - numNonZero;1859 }1860 #else1861 UInt coeffSigns;1862 m_pcTDecBinIf->decodeBinsEP( coeffSigns, numNonZero );1863 coeffSigns <<= 32 - numNonZero;1864 #endif1865 1866 #if RESTRICT_GR1GR2FLAG_NUMBER1867 Int iFirstCoeff2 = 1;1868 if (c1 == 0 || numNonZero > C1FLAG_NUMBER)1869 #else1870 if (c1 == 0)1871 #endif1872 {1873 for( Int idx = 0; idx < numNonZero; idx++ )1874 {1875 #if RESTRICT_GR1GR2FLAG_NUMBER1876 1635 UInt baseLevel = (idx < C1FLAG_NUMBER)? (2 + iFirstCoeff2) : 1; 1877 1636 … … 1888 1647 uiNumOne++; 1889 1648 } 1890 #else1891 if( absCoeff[ idx ] == 3 )1892 {1893 UInt uiLevel;1894 xReadGoRiceExGolomb( uiLevel, uiGoRiceParam );1895 absCoeff[ idx ] = uiLevel + 3;1896 }1897 #endif1898 1649 } 1899 1650 } … … 1902 1653 { 1903 1654 Int blkPos = pos[ idx ]; 1904 #if MULTIBITS_DATA_HIDING1905 1655 // Signs applied later. 1906 1656 pcCoef[ blkPos ] = absCoeff[ idx ]; … … 1919 1669 coeffSigns <<= 1; 1920 1670 } 1921 #else1922 Int sign = static_cast<Int>( coeffSigns ) >> 31;1923 pcCoef[ blkPos ] = ( absCoeff[ idx ] ^ sign ) - sign;1924 coeffSigns <<= 1;1925 #endif1926 1671 } 1927 1672 } … … 1936 1681 1937 1682 1938 #if SAO_UNIT_INTERLEAVING1939 1683 Void TDecSbac::parseSaoUvlc (UInt& ruiVal) 1940 1684 { … … 2173 1917 } 2174 1918 } 2175 #endif2176 1919 2177 1920 /** … … 2204 1947 } 2205 1948 2206 #if OL_FLUSH2207 1949 Void TDecSbac::decodeFlush ( ) 2208 1950 { … … 2212 1954 2213 1955 } 2214 #endif2215 1956 2216 1957 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA_A0070 && LGE_EDGE_INTRA_DELTA_DC) … … 2412 2153 #endif 2413 2154 #if HHI_DMM_PRED_TEX 2155 #if LGE_DMM3_SIMP_C0044 2156 Void TDecSbac::xParseWedgePredTexInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2157 { 2158 Int iIntraIdx = pcCU->getIntraSizeIdx(uiAbsPartIdx); 2159 Int iBits = g_aucWedgeTexPredBitsListIdx[iIntraIdx]; 2160 2161 UInt uiSymbol, uiTabIdx = 0; 2162 for ( Int i = 0; i < iBits; i++ ) 2163 { 2164 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmmDataSCModel.get(0, 0, 3) ); 2165 uiTabIdx += ( uiSymbol && i == 0 ) ? 1 : 0; 2166 uiTabIdx += ( uiSymbol && i == 1 ) ? 2 : 0; 2167 uiTabIdx += ( uiSymbol && i == 2 ) ? 4 : 0; 2168 uiTabIdx += ( uiSymbol && i == 3 ) ? 8 : 0; 2169 uiTabIdx += ( uiSymbol && i == 4 ) ? 16 : 0; 2170 uiTabIdx += ( uiSymbol && i == 5 ) ? 32 : 0; 2171 uiTabIdx += ( uiSymbol && i == 6 ) ? 64 : 0; 2172 uiTabIdx += ( uiSymbol && i == 7 ) ? 128 : 0; 2173 uiTabIdx += ( uiSymbol && i == 8 ) ? 256 : 0; 2174 uiTabIdx += ( uiSymbol && i == 9 ) ? 512 : 0; 2175 uiTabIdx += ( uiSymbol && i == 10 ) ? 1024 : 0; 2176 } 2177 2178 pcCU->setWedgePredTexIntraTabIdxSubParts( uiTabIdx, uiAbsPartIdx, uiDepth ); 2179 } 2180 #endif 2181 2414 2182 Void TDecSbac::xParseWedgePredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2415 2183 { 2184 #if LGE_DMM3_SIMP_C0044 2185 xParseWedgePredTexInfo( pcCU, uiAbsPartIdx, uiDepth ); 2186 #endif 2416 2187 UInt uiDC1, uiDC2; 2417 2188 xReadExGolombLevel( uiDC1, m_cDmmDataSCModel.get(0, 0, 1) ); -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r210 r296 74 74 Void xCopyFrom ( TDecSbac* pSrc ); 75 75 Void xCopyContextsFrom ( TDecSbac* pSrc ); 76 #if OL_FLUSH77 76 Void decodeFlush(); 78 #endif79 77 80 78 #if CABAC_INIT_FLAG … … 90 88 Void parseVPS ( TComVPS* pcVPS ) {} 91 89 #endif 92 #if HHI_MPI 90 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068 93 91 Void parseSPS ( TComSPS* pcSPS, Bool bIsDepth ) {} 94 92 #else 95 93 Void parseSPS ( TComSPS* pcSPS ) {} 96 94 #endif 97 #if TILES_OR_ENTROPY_SYNC_IDC98 95 Void parsePPS ( TComPPS* pcPPS, ParameterSetManagerDecoder *parameterSet ) {} 99 #else100 Void parsePPS ( TComPPS* pcPPS ) {}101 #endif102 96 Void parseAPS ( TComAPS* pAPS ) {} 103 97 void parseSEI(SEImessages&) {} 104 98 105 #if LCU_SYNTAX_ALF 99 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 100 Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth) {} 101 #else 106 102 Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet) {} 107 #else108 Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl ) {}109 103 #endif 110 104 111 105 Void parseTerminatingBit ( UInt& ruiBit ); 112 #if H HI_INTER_VIEW_MOTION_PRED106 #if H3D_IVMP 113 107 Void parseMVPIdx ( Int& riMVPIdx, Int iNumAMVPCands ); 114 108 #else … … 116 110 #endif 117 111 118 #if SAO_UNIT_INTERLEAVING119 112 Void parseSaoUvlc ( UInt& ruiVal ); 120 113 Void parseSaoSvlc ( Int& riVal ); … … 125 118 Void parseSaoOneLcuInterleaving(Int rx, Int ry, SAOParam* pSaoParam, TComDataCU* pcCU, Int iCUAddrInSlice, Int iCUAddrUpInSlice, Bool bLFCrossSliceBoundaryFlag); 126 119 Void parseSaoOffset (SaoLcuParam* psSaoLcuParam); 127 #endif128 120 129 121 #if RWTH_SDC_DLT_B0036 … … 148 140 #endif 149 141 #if HHI_DMM_PRED_TEX 142 #if LGE_DMM3_SIMP_C0044 143 Void xParseWedgePredTexInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 144 #endif 150 145 Void xParseWedgePredTexDeltaInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 151 146 Void xParseContourPredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 178 173 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 179 174 Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ); 180 #if H HI_INTER_VIEW_RESIDUAL_PRED175 #if H3D_IVRP 181 176 Void parseResPredFlag ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth ); 182 177 #endif … … 221 216 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; 222 217 ContextModel3DBuffer m_cCUMergeIdxExtSCModel; 223 #if H HI_INTER_VIEW_RESIDUAL_PRED218 #if H3D_IVRP 224 219 ContextModel3DBuffer m_cResPredFlagSCModel; 225 220 #endif … … 249 244 ContextModel3DBuffer m_cALFUvlcSCModel; 250 245 ContextModel3DBuffer m_cALFSvlcSCModel; 251 #if AMP_CTX252 246 ContextModel3DBuffer m_cCUAMPSCModel; 253 #else254 ContextModel3DBuffer m_cCUXPosiSCModel;255 ContextModel3DBuffer m_cCUYPosiSCModel;256 #endif257 247 ContextModel3DBuffer m_cSaoFlagSCModel; 258 248 ContextModel3DBuffer m_cSaoUvlcSCModel; 259 249 ContextModel3DBuffer m_cSaoSvlcSCModel; 260 #if SAO_UNIT_INTERLEAVING261 250 ContextModel3DBuffer m_cSaoMergeLeftSCModel; 262 251 ContextModel3DBuffer m_cSaoMergeUpSCModel; 263 252 ContextModel3DBuffer m_cSaoTypeIdxSCModel; 264 #endif265 253 266 254 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX -
trunk/source/Lib/TLibDecoder/TDecSlice.cpp
r210 r296 148 148 UInt uiCol=0, uiLin=0, uiSubStrm=0; 149 149 150 #if !REMOVE_TILE_DEPENDENCE151 Int iBreakDep;152 #endif153 150 UInt uiTileCol; 154 151 UInt uiTileStartLCU; … … 163 160 pcCU = rpcPic->getCU( iCUAddr ); 164 161 pcCU->initCU( rpcPic, iCUAddr ); 165 #if !REMOVE_TILE_DEPENDENCE166 iBreakDep = rpcPic->getPicSym()->getTileBoundaryIndependenceIdr();167 #endif168 162 uiTileCol = rpcPic->getPicSym()->getTileIdxMap(iCUAddr) % (rpcPic->getPicSym()->getNumColumnsMinus1()+1); // what column of tiles are we in? 169 163 uiTileStartLCU = rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getFirstCUAddr(); … … 175 169 uiLin = iCUAddr / uiWidthInLCUs; 176 170 // inherit from TR if necessary, select substream to use. 177 #if WPP_SIMPLIFICATION178 171 if( iSymbolMode && pcSlice->getPPS()->getNumSubstreams() > 1 ) 179 #else 180 if( iSymbolMode && pcSlice->getPPS()->getEntropyCodingSynchro() ) 181 #endif 182 { 183 #if !REMOVE_TILE_DEPENDENCE 184 #if WPP_SIMPLIFICATION 185 if (iBreakDep && pcSlice->getPPS()->getNumSubstreams() > 1) 186 #else 187 if (iBreakDep && pcSlice->getPPS()->getEntropyCodingSynchro()) 188 #endif 189 #else 190 #if WPP_SIMPLIFICATION 172 { 191 173 if (pcSlice->getPPS()->getNumSubstreams() > 1) 192 #else193 if (pcSlice->getPPS()->getEntropyCodingSynchro())194 #endif195 #endif196 174 { 197 175 // independent tiles => substreams are "per tile". iNumSubstreams has already been multiplied. … … 207 185 m_pcEntropyDecoder->setBitstream( ppcSubstreams[uiSubStrm] ); 208 186 // Synchronize cabac probabilities with upper-right LCU if it's available and we're at the start of a line. 209 #if WPP_SIMPLIFICATION210 187 if (pcSlice->getPPS()->getNumSubstreams() > 1 && uiCol == uiTileLCUX) 211 #else212 if (pcSlice->getPPS()->getEntropyCodingSynchro() && uiCol == uiTileLCUX)213 #endif214 188 { 215 189 // We'll sync if the TR is available. … … 217 191 UInt uiWidthInCU = rpcPic->getFrameWidthInCU(); 218 192 TComDataCU *pcCUTR = NULL; 219 #if WPP_SIMPLIFICATION220 193 if ( pcCUUp && ((iCUAddr%uiWidthInCU+1) < uiWidthInCU) ) 221 194 { 222 195 pcCUTR = rpcPic->getCU( iCUAddr - uiWidthInCU + 1 ); 223 196 } 224 #else225 if ( pcCUUp && ((iCUAddr%uiWidthInCU+pcSlice->getPPS()->getEntropyCodingSynchro()) < uiWidthInCU) )226 {227 pcCUTR = rpcPic->getCU( iCUAddr - uiWidthInCU + pcSlice->getPPS()->getEntropyCodingSynchro() );228 }229 #endif230 197 UInt uiMaxParts = 1<<(pcSlice->getSPS()->getMaxCUDepth()<<1); 231 198 … … 233 200 ((pcCUTR==NULL) || (pcCUTR->getSlice()==NULL) || 234 201 ((pcCUTR->getSCUAddr()+uiMaxParts-1) < pcSlice->getSliceCurStartCUAddr()) || 235 #if !REMOVE_TILE_DEPENDENCE236 (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr() && (rpcPic->getPicSym()->getTileIdxMap( pcCUTR->getAddr() ) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr)))237 #else238 202 ((rpcPic->getPicSym()->getTileIdxMap( pcCUTR->getAddr() ) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr))) 239 #endif240 203 ))|| 241 204 (true/*bEnforceEntropySliceRestriction*/ && 242 205 ((pcCUTR==NULL) || (pcCUTR->getSlice()==NULL) || 243 206 ((pcCUTR->getSCUAddr()+uiMaxParts-1) < pcSlice->getEntropySliceCurStartCUAddr()) || 244 #if !REMOVE_TILE_DEPENDENCE245 (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr() && (rpcPic->getPicSym()->getTileIdxMap( pcCUTR->getAddr() ) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr)))246 #else247 207 ((rpcPic->getPicSym()->getTileIdxMap( pcCUTR->getAddr() ) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr))) 248 #endif249 208 )) 250 209 ) … … 260 219 pcSbacDecoder->load(&pcSbacDecoders[uiSubStrm]); //this load is used to simplify the code (avoid to change all the call to pcSbacDecoders) 261 220 } 262 #if WPP_SIMPLIFICATION263 221 else if ( iSymbolMode && pcSlice->getPPS()->getNumSubstreams() <= 1 ) 264 #else265 else if ( iSymbolMode && !pcSlice->getPPS()->getEntropyCodingSynchro() )266 #endif267 222 { 268 223 // Set variables to appropriate values to avoid later code change. … … 273 228 (iCUAddr!=0) && (iCUAddr!=rpcPic->getPicSym()->getPicSCUAddr(rpcPic->getSlice(rpcPic->getCurrSliceIdx())->getSliceCurStartCUAddr())/rpcPic->getNumPartInCU())) // !1st in frame && !1st in slice 274 229 { 275 #if WPP_SIMPLIFICATION276 230 if (pcSlice->getPPS()->getNumSubstreams() > 1) 277 #else278 if (pcSlice->getPPS()->getEntropyCodingSynchro())279 #endif280 231 { 281 232 // We're crossing into another tile, tiles are independent. … … 330 281 } 331 282 332 #if !REMOVE_TILE_DEPENDENCE333 if ( (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr()==0) && (rpcPic->getPicSym()->getNumColumnsMinus1()!=0) )334 {335 // Synchronize cabac probabilities with LCU among Tiles336 if( (uiTileLCUX != 0) &&337 (iCUAddr == rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getFirstCUAddr()) )338 {339 TComDataCU *pcCULeft = pcCU->getCULeft();340 UInt uiMaxParts = 1<<(pcSlice->getSPS()->getMaxCUDepth()<<1);341 342 if ( (true/*bEnforceSliceRestriction*/ &&343 ((pcCULeft==NULL) || (pcCULeft->getSlice()==NULL) ||344 ((pcCULeft->getSCUAddr()+uiMaxParts-1) < pcSlice->getSliceCurStartCUAddr())345 )346 )||347 (true/*bEnforceEntropySliceRestriction*/ &&348 ((pcCULeft==NULL) || (pcCULeft->getSlice()==NULL) ||349 ((pcCULeft->getSCUAddr()+uiMaxParts-1) < pcSlice->getEntropySliceCurStartCUAddr())350 )351 )352 )353 {354 // Left not available.355 }356 else357 {358 // Left is available, we use it.359 pcSbacDecoders[uiSubStrm].loadContexts( &m_pcBufferLowLatSbacDecoders[uiTileCol-1] );360 pcSbacDecoder->loadContexts(&pcSbacDecoders[uiSubStrm]); //this load is used to simplify the code (avoid to change all the call to pcSbacDecoders)361 }362 }363 }364 #endif365 283 366 284 … … 368 286 g_bJustDoIt = g_bEncDecTraceEnable; 369 287 #endif 370 #if SAO_UNIT_INTERLEAVING371 288 if ( pcSlice->getSPS()->getUseSAO() && pcSlice->getSaoInterleavingFlag() && pcSlice->getSaoEnabledFlag() ) 372 289 { … … 384 301 pcSbacDecoder->parseSaoOneLcuInterleaving(rx, ry, pcSlice->getAPS()->getSaoParam(),pcCU, cuAddrInSlice, cuAddrUpInSlice, pcSlice->getSPS()->getLFCrossSliceBoundaryFlag() ); 385 302 } 386 #endif387 303 388 304 m_pcCuDecoder->decodeCU ( pcCU, uiIsLast ); … … 394 310 if( iSymbolMode ) 395 311 { 396 #if OL_FLUSH397 312 /*If at the end of a LCU line but not at the end of a substream, perform CABAC flush*/ 398 #if WPP_SIMPLIFICATION399 313 if (!uiIsLast && pcSlice->getPPS()->getNumSubstreams() > 1) 400 #else 401 if (!uiIsLast && pcSlice->getPPS()->getCabacIstateReset()) 402 #endif 403 { 404 #if !REMOVE_TILE_DEPENDENCE 405 if ((iBreakDep && (uiCol == uiTileLCUX+uiTileWidth-1) && (uiLin+iNumSubstreamsPerTile < uiTileLCUY+uiTileHeight)) 406 || (!iBreakDep && (uiCol == uiWidthInLCUs-1) && (uiLin+iNumSubstreams < pcCU->getPic()->getFrameHeightInCU()))) 407 #else 314 { 408 315 if ((uiCol == uiTileLCUX+uiTileWidth-1) && (uiLin+iNumSubstreamsPerTile < uiTileLCUY+uiTileHeight)) 409 #endif410 316 { 411 317 m_pcEntropyDecoder->decodeFlush(); 412 318 } 413 319 } 414 #endif415 320 pcSbacDecoders[uiSubStrm].load(pcSbacDecoder); 416 321 417 322 //Store probabilities of second LCU in line into buffer 418 #if WPP_SIMPLIFICATION419 323 if (pcSlice->getPPS()->getNumSubstreams() > 1 && (uiCol == uiTileLCUX+1)) 420 #else421 if (pcSlice->getPPS()->getEntropyCodingSynchro() && (uiCol == uiTileLCUX+pcSlice->getPPS()->getEntropyCodingSynchro()))422 #endif423 324 { 424 325 m_pcBufferSbacDecoders[uiTileCol].loadContexts( &pcSbacDecoders[uiSubStrm] ); … … 426 327 427 328 } 428 #if !REMOVE_TILE_DEPENDENCE429 if ( (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr()==0) && (rpcPic->getPicSym()->getNumColumnsMinus1()!=0) )430 {431 pcSbacDecoders[uiSubStrm].load(pcSbacDecoder);432 //Store probabilties for next tile433 if( (uiLin == (rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getFirstCUAddr() / uiWidthInLCUs )) &&434 (uiCol == rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getRightEdgePosInCU()) )435 {436 m_pcBufferLowLatSbacDecoders[uiTileCol].loadContexts( &pcSbacDecoders[uiSubStrm] );437 }438 }439 #endif440 329 } 441 330 -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r210 r296 59 59 m_aaiCodedScale [ uiId ] = new Int [ MAX_VIEW_NUM ]; 60 60 } 61 62 #if MERL_VSP_C0152 63 xCreateLUTs( (UInt)MAX_VIEW_NUM, (UInt)MAX_VIEW_NUM, m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 64 m_iLog2Precision = LOG2_DISP_PREC_LUT; 65 m_uiBitDepthForLUT = 8; // fixed 66 #endif 61 67 } 62 68 … … 72 78 delete [] m_aiViewOrderIndex; 73 79 delete [] m_aiViewReceived; 80 81 #if MERL_VSP_C0152 82 xDeleteArray( m_adBaseViewShiftLUT, MAX_VIEW_NUM, MAX_VIEW_NUM, 2 ); 83 xDeleteArray( m_aiBaseViewShiftLUT, MAX_VIEW_NUM, MAX_VIEW_NUM, 2 ); 84 #endif 74 85 } 75 86 … … 85 96 m_uiMaxViewId = 0; 86 97 } 98 99 #if MERL_VSP_C0152 100 Void 101 CamParsCollector::xCreateLUTs( UInt uiNumberSourceViews, UInt uiNumberTargetViews, Double****& radLUT, Int****& raiLUT) 102 { 103 //AOF( m_uiBitDepthForLUT == 8 ); 104 //AOF(radLUT == NULL && raiLUT == NULL ); 105 106 uiNumberSourceViews = Max( 1, uiNumberSourceViews ); 107 uiNumberTargetViews = Max( 1, uiNumberTargetViews ); 108 109 radLUT = new Double***[ uiNumberSourceViews ]; 110 raiLUT = new Int ***[ uiNumberSourceViews ]; 111 112 for( UInt uiSourceView = 0; uiSourceView < uiNumberSourceViews; uiSourceView++ ) 113 { 114 radLUT [ uiSourceView ] = new Double**[ uiNumberTargetViews ]; 115 raiLUT [ uiSourceView ] = new Int **[ uiNumberTargetViews ]; 116 117 for( UInt uiTargetView = 0; uiTargetView < uiNumberTargetViews; uiTargetView++ ) 118 { 119 radLUT [ uiSourceView ][ uiTargetView ] = new Double*[ 2 ]; 120 radLUT [ uiSourceView ][ uiTargetView ][ 0 ] = new Double [ 257 ]; 121 radLUT [ uiSourceView ][ uiTargetView ][ 1 ] = new Double [ 257 ]; 122 123 raiLUT [ uiSourceView ][ uiTargetView ] = new Int* [ 2 ]; 124 raiLUT [ uiSourceView ][ uiTargetView ][ 0 ] = new Int [ 257 ]; 125 raiLUT [ uiSourceView ][ uiTargetView ][ 1 ] = new Int [ 257 ]; 126 } 127 } 128 } 129 130 Void 131 CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT) 132 { 133 Int iLog2DivLuma = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 134 Int iLog2DivChroma = iLog2DivLuma + 1; 135 136 iOffset <<= m_uiBitDepthForLUT; 137 138 Double dScale = (Double) iScale / (( Double ) ( 1 << iLog2DivLuma )); 139 Double dOffset = (Double) iOffset / (( Double ) ( 1 << iLog2DivLuma )); 140 141 // offsets including rounding offsets 142 Int64 iOffsetLuma = iOffset + ( ( 1 << iLog2DivLuma ) >> 1 ); 143 Int64 iOffsetChroma = iOffset + ( ( 1 << iLog2DivChroma ) >> 1 ); 144 145 146 for( UInt uiDepthValue = 0; uiDepthValue < 256; uiDepthValue++ ) 147 { 148 149 // real-valued look-up tables 150 Double dShiftLuma = ( (Double)uiDepthValue * dScale + dOffset ) * Double( 1 << m_iLog2Precision ); 151 Double dShiftChroma = dShiftLuma / 2; 152 radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ uiDepthValue ] = dShiftLuma; 153 radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ uiDepthValue ] = dShiftChroma; 154 155 // integer-valued look-up tables 156 Int64 iTempScale = (Int64)uiDepthValue * iScale; 157 Int64 iShiftLuma = ( iTempScale + iOffsetLuma ) >> iLog2DivLuma; 158 Int64 iShiftChroma = ( iTempScale + iOffsetChroma ) >> iLog2DivChroma; 159 raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ uiDepthValue ] = (Int)iShiftLuma; 160 raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ uiDepthValue ] = (Int)iShiftChroma; 161 162 // maximum deviation 163 //dMaxDispDev = Max( dMaxDispDev, fabs( Double( (Int) iTestScale ) - dShiftLuma * Double( 1 << iLog2DivLuma ) ) / Double( 1 << iLog2DivLuma ) ); 164 //dMaxRndDispDvL = Max( dMaxRndDispDvL, fabs( Double( (Int) iShiftLuma ) - dShiftLuma ) ); 165 //dMaxRndDispDvC = Max( dMaxRndDispDvC, fabs( Double( (Int) iShiftChroma ) - dShiftChroma ) ); 166 } 167 168 radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 256 ] = radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 255 ]; 169 radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 256 ] = radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 255 ]; 170 raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 256 ] = raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 255 ]; 171 raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 256 ] = raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 255 ]; 172 } 173 #endif // end MERL_VSP_C0152 87 174 88 175 Void … … 167 254 m_aaiCodedScale [ uiViewId ][ uiBaseId ] = pcSlice->getInvCodedScale () [ uiBaseId ]; 168 255 m_aaiCodedOffset[ uiViewId ][ uiBaseId ] = pcSlice->getInvCodedOffset() [ uiBaseId ]; 256 #if MERL_VSP_C0152 257 xInitLUTs( uiBaseId, uiViewId, m_aaiCodedScale[ uiBaseId ][ uiViewId ], m_aaiCodedOffset[ uiBaseId ][ uiViewId ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT); 258 xInitLUTs( uiViewId, uiBaseId, m_aaiCodedScale[ uiViewId ][ uiBaseId ], m_aaiCodedOffset[ uiViewId ][ uiBaseId ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT); 259 #endif 169 260 } 170 261 else … … 174 265 m_aaiCodedScale [ uiViewId ][ uiBaseId ] = pcSlice->getSPS()->getInvCodedScale () [ uiBaseId ]; 175 266 m_aaiCodedOffset[ uiViewId ][ uiBaseId ] = pcSlice->getSPS()->getInvCodedOffset() [ uiBaseId ]; 267 #if MERL_VSP_C0152 268 xInitLUTs( uiBaseId, uiViewId, m_aaiCodedScale[ uiBaseId ][ uiViewId ], m_aaiCodedOffset[ uiBaseId ][ uiViewId ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 269 xInitLUTs( uiViewId, uiBaseId, m_aaiCodedScale[ uiViewId ][ uiBaseId ], m_aaiCodedOffset[ uiViewId ][ uiBaseId ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 270 #endif 176 271 } 177 272 } … … 188 283 m_aaiCodedScale [ uiViewId ][ uiBaseId ] = pcSlice->getInvCodedScale () [ uiBaseId ]; 189 284 m_aaiCodedOffset[ uiViewId ][ uiBaseId ] = pcSlice->getInvCodedOffset() [ uiBaseId ]; 285 #if MERL_VSP_C0152 286 xInitLUTs( uiBaseId, uiViewId, m_aaiCodedScale[ uiBaseId ][ uiViewId ], m_aaiCodedOffset[ uiBaseId ][ uiViewId ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 287 xInitLUTs( uiViewId, uiBaseId, m_aaiCodedScale[ uiViewId ][ uiBaseId ], m_aaiCodedOffset[ uiViewId ][ uiBaseId ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 288 #endif 190 289 } 191 290 } … … 254 353 m_iMaxRefPicNum = 0; 255 354 m_uiValidPS = 0; 256 #if SONY_COLPIC_AVAILABILITY257 m_iViewOrderIdx = 0;258 #endif259 355 #if ENC_DEC_TRACE 260 g_hTrace = fopen( "TraceDec.txt", "wb" );356 if(!g_hTrace) g_hTrace = fopen( "TraceDec.txt", "wb" ); 261 357 g_bJustDoIt = g_bEncDecTraceDisable; 262 358 g_nSymbolCounter = 0; … … 277 373 { 278 374 #if ENC_DEC_TRACE 279 fclose( g_hTrace ); 375 if(g_hTrace) fclose( g_hTrace ); 376 g_hTrace=NULL; 280 377 #endif 281 378 } … … 301 398 m_cDepthMapGenerator.destroy(); 302 399 #endif 303 #if H HI_INTER_VIEW_RESIDUAL_PRED400 #if H3D_IVRP 304 401 m_cResidualGenerator.destroy(); 305 402 #endif 403 306 404 } 307 405 … … 317 415 , &m_cDepthMapGenerator 318 416 #endif 319 #if H HI_INTER_VIEW_RESIDUAL_PRED417 #if H3D_IVRP 320 418 , &m_cResidualGenerator 321 419 #endif … … 331 429 #endif 332 430 #endif 333 #if H HI_INTER_VIEW_RESIDUAL_PRED431 #if H3D_IVRP 334 432 m_cResidualGenerator.init( &m_cTrQuant, &m_cDepthMapGenerator ); 335 433 #endif … … 367 465 } 368 466 369 #if H HI_INTER_VIEW_RESIDUAL_PRED467 #if H3D_IVRP 370 468 Void 371 469 TDecTop::deleteExtraPicBuffers( Int iPoc ) … … 427 525 xUpdateGopSize(pcSlice); 428 526 429 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER430 527 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()) + 1; // +1 to have space for the picture currently being decoded 431 #else432 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxNumberOfReferencePictures()+pcSlice->getSPS()->getNumReorderFrames() + 1; // +1 to have space for the picture currently being decoded433 #endif434 528 435 529 #if DEPTH_MAP_GENERATION … … 618 712 } 619 713 620 #if !LCU_SYNTAX_ALF621 // create ALF temporary buffer622 m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );623 #endif624 714 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 625 715 m_cLoopFilter. create( g_uiMaxCUDepth ); 626 716 } 627 717 628 #if SKIPFRAME_BUGFIX629 718 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay ) 630 #else631 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int iSkipFrame, Int iPOCLastDisplay )632 #endif633 719 { 634 720 TComPic*& pcPic = m_pcPic; … … 687 773 } 688 774 689 #if SONY_COLPIC_AVAILABILITY690 m_apcSlicePilot->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx());691 #endif692 693 #if NAL_REF_FLAG694 775 m_apcSlicePilot->setReferenced(nalu.m_nalRefFlag); 776 m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId); 777 778 // ALF CU parameters should be part of the slice header -> needs to be fixed 779 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 780 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_cGopDecoder.getAlfCuCtrlParam(), m_cGopDecoder.getAlfParamSet(),m_apcSlicePilot->getVPS()->getDepthFlag(nalu.m_layerId)); 695 781 #else 696 m_apcSlicePilot->setReferenced(nalu.m_nalRefIDC != NAL_REF_IDC_PRIORITY_LOWEST);697 #endif698 m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId);699 700 // ALF CU parameters should be part of the slice header -> needs to be fixed701 #if LCU_SYNTAX_ALF702 782 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_cGopDecoder.getAlfCuCtrlParam(), m_cGopDecoder.getAlfParamSet()); 703 #else704 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_cGopDecoder.getAlfCuCtrlParam() );705 783 #endif 706 784 // byte align … … 718 796 if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence) 719 797 { 720 #if START_DECODING_AT_CRA721 798 if (m_prevPOC >= m_pocRandomAccess) 722 799 { … … 725 802 } 726 803 m_prevPOC = m_apcSlicePilot->getPOC(); 727 #else728 m_prevPOC = m_apcSlicePilot->getPOC();729 return true;730 #endif731 804 } 732 805 // actual decoding starts here … … 748 821 } 749 822 //detect lost reference picture and insert copy of earlier frame. 750 #if START_DECODING_AT_CRA751 823 while(m_apcSlicePilot->checkThatAllRefPicsAreAvailable(m_cListPic, m_apcSlicePilot->getRPS(), true, m_pocRandomAccess) > 0) 752 #else753 while(m_apcSlicePilot->checkThatAllRefPicsAreAvailable(m_cListPic, m_apcSlicePilot->getRPS(), true) > 0)754 #endif755 824 { 756 825 xCreateLostPicture(m_apcSlicePilot->checkThatAllRefPicsAreAvailable(m_cListPic, m_apcSlicePilot->getRPS(), false)-1); … … 764 833 xGetNewPicBuffer (m_apcSlicePilot, pcPic); 765 834 766 #if SONY_COLPIC_AVAILABILITY 767 pcPic->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx() ); 768 #endif 769 835 #if INTER_VIEW_VECTOR_SCALING_C0115 836 pcPic->setViewOrderIdx( m_apcSlicePilot->getVPS()->getViewOrderIdx(nalu.m_layerId) ); // will be changed to view_id 837 #endif 770 838 /* transfer any SEI messages that have been received to the picture */ 771 839 pcPic->setSEIs(m_SEIs); … … 787 855 } 788 856 #endif 789 #if H HI_INTER_VIEW_RESIDUAL_PRED857 #if H3D_IVRP 790 858 m_cResidualGenerator.create( true, m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement ); 791 859 #endif … … 800 868 UInt i, j, p; 801 869 802 #if !REMOVE_TILE_DEPENDENCE803 //set the TileBoundaryIndependenceIdr804 if(pcSlice->getPPS()->getTileBehaviorControlPresentFlag() == 1)805 {806 pcPic->getPicSym()->setTileBoundaryIndependenceIdr( pcSlice->getPPS()->getTileBoundaryIndependenceIdr() );807 }808 else809 {810 pcPic->getPicSym()->setTileBoundaryIndependenceIdr( pcSlice->getPPS()->getSPS()->getTileBoundaryIndependenceIdr() );811 }812 #endif813 870 814 871 if( pcSlice->getPPS()->getColumnRowInfoPresent() == 1 ) … … 992 1049 #endif 993 1050 994 #if SONY_COLPIC_AVAILABILITY1051 #if INTER_VIEW_VECTOR_SCALING_C0115 995 1052 #if VIDYO_VPS_INTEGRATION 996 pcSlice->setViewOrderIdx( pcSlice->getVPS()->getViewOrderIdx(nalu.m_layerId) ); 1053 pcSlice->setViewOrderIdx( pcSlice->getVPS()->getViewOrderIdx(nalu.m_layerId) ); // will be changed to view_id 997 1054 #else 998 1055 pcSlice->setViewOrderIdx( pcPic->getViewOrderIdx() ); 999 1056 #endif 1057 #endif 1058 1059 #if INTER_VIEW_VECTOR_SCALING_C0115 1060 pcSlice->setIVScalingFlag( pcSlice->getVPS()->getIVScalingFlag()); 1000 1061 #endif 1001 1062 … … 1111 1172 #endif 1112 1173 1174 #if MERL_VSP_C0152 // set BW LUT 1175 if( m_pcCamParsCollector ) // Initialize the LUT elements 1176 { 1177 m_pcCamParsCollector->setSlice( pcSlice ); 1178 } 1179 if( pcSlice->getViewId() !=0 ) 1180 { 1181 TComPic* pcBaseTxtPic = m_tAppDecTop->getPicFromView( 0, pcSlice->getPOC(), false ); // get base view reconstructed texture 1182 TComPic* pcBaseDepthPic = m_tAppDecTop->getPicFromView( 0, pcSlice->getPOC(), true ); // get base view reconstructed depth 1183 pcSlice->setRefPicBaseTxt(pcBaseTxtPic); 1184 pcSlice->setRefPicBaseDepth(pcBaseDepthPic); 1185 } 1186 getTAppDecTop()->setBWVSPLUT( pcSlice, pcSlice->getViewId(), pcSlice->getPOC() ); // get the LUT for backward warping 1187 #endif 1188 1113 1189 // Decode a picture 1114 1190 m_cGopDecoder.decompressGop(nalu.m_Bitstream, pcPic, false); … … 1149 1225 { 1150 1226 TComSPS* sps = new TComSPS(); 1151 #if RPS_IN_SPS1152 1227 TComRPSList* rps = new TComRPSList(); 1153 1228 sps->setRPSList(rps); 1154 #endif 1155 #if HHI_MPI 1229 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068 1156 1230 m_cEntropyDecoder.decodeSPS( sps, m_isDepth ); 1157 1231 #else … … 1159 1233 #endif 1160 1234 m_parameterSetManagerDecoder.storePrefetchedSPS(sps); 1161 #if LCU_SYNTAX_ALF1162 1235 m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 1163 #endif1164 1236 } 1165 1237 1166 1238 Void TDecTop::xDecodePPS() 1167 1239 { 1168 #if !RPS_IN_SPS1169 TComRPSList* rps = new TComRPSList();1170 #endif1171 1240 TComPPS* pps = new TComPPS(); 1172 #if !RPS_IN_SPS1173 pps->setRPSList(rps);1174 #endif1175 #if TILES_OR_ENTROPY_SYNC_IDC1176 1241 m_cEntropyDecoder.decodePPS( pps, &m_parameterSetManagerDecoder ); 1177 #else1178 m_cEntropyDecoder.decodePPS( pps );1179 #endif1180 1242 m_parameterSetManagerDecoder.storePrefetchedPPS( pps ); 1181 1243 … … 1230 1292 case NAL_UNIT_CODED_SLICE: 1231 1293 case NAL_UNIT_CODED_SLICE_IDR: 1232 #if H0566_TLA1233 1294 #if !QC_REM_IDV_B0046 1234 1295 case NAL_UNIT_CODED_SLICE_IDV: … … 1236 1297 case NAL_UNIT_CODED_SLICE_CRA: 1237 1298 case NAL_UNIT_CODED_SLICE_TLA: 1238 #else1239 case NAL_UNIT_CODED_SLICE_CDR:1240 #endif1241 1299 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay); 1242 1300 break; … … 1259 1317 sps = pSPSV0; 1260 1318 m_parameterSetManagerDecoder.storePrefetchedSPS(sps); 1261 #if LCU_SYNTAX_ALF1262 1319 m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 1263 #endif1264 1320 } 1265 1321 … … 1296 1352 else if (m_pocRandomAccess == MAX_INT) // start of random access point, m_pocRandomAccess has not been set yet. 1297 1353 { 1298 #if H0566_TLA1299 1354 if( m_apcSlicePilot->getNalUnitTypeBaseViewMvc() == NAL_UNIT_CODED_SLICE_CRA ) 1300 #else1301 if( m_apcSlicePilot->getNalUnitTypeBaseViewMvc() == NAL_UNIT_CODED_SLICE_CDR )1302 #endif1303 1355 { 1304 1356 m_pocRandomAccess = m_apcSlicePilot->getPOC(); // set the POC random access since we need to skip the reordered pictures in CRA. … … 1310 1362 else 1311 1363 { 1312 #if START_DECODING_AT_CRA1313 1364 static bool warningMessage = false; 1314 1365 if(!warningMessage) … … 1318 1369 } 1319 1370 return true; 1320 #else1321 printf("\nUnsafe random access point. Decoder may crash.");1322 m_pocRandomAccess = 0;1323 #endif1324 1371 } 1325 1372 } … … 1342 1389 m_cSAO.allocSaoParam(pAPS->getSaoParam()); 1343 1390 pAPS->createAlfParam(); 1344 #if !LCU_SYNTAX_ALF1345 m_cAdaptiveLoopFilter.allocALFParam(pAPS->getAlfParam());1346 #endif1347 1391 } 1348 1392 -
trunk/source/Lib/TLibDecoder/TDecTop.h
r210 r296 77 77 Bool isInitialized() const { return m_bInitialized; } 78 78 79 #if MERL_VSP_C0152 80 Int**** getBaseViewShiftLUTI() { return m_aiBaseViewShiftLUT; } 81 #endif 79 82 private: 80 83 Bool xIsComplete (); … … 97 100 Int m_iLastPOC; 98 101 UInt m_uiMaxViewId; 102 103 #if MERL_VSP_C0152 104 UInt m_uiBitDepthForLUT; 105 UInt m_iLog2Precision; 106 UInt m_uiInputBitDepth; 107 // look-up tables 108 Double**** m_adBaseViewShiftLUT; ///< Disparity LUT 109 Int**** m_aiBaseViewShiftLUT; ///< Disparity LUT 110 Void xCreateLUTs( UInt uiNumberSourceViews, UInt uiNumberTargetViews, Double****& radLUT, Int****& raiLUT); 111 Void xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT); 112 template<class T> Void xDeleteArray ( T*& rpt, UInt uiSize1, UInt uiSize2, UInt uiSize3 ); 113 template<class T> Void xDeleteArray ( T*& rpt, UInt uiSize1, UInt uiSize2 ); 114 template<class T> Void xDeleteArray ( T*& rpt, UInt uiSize ); 115 #endif 116 99 117 }; 118 119 #if MERL_VSP_C0152 120 template <class T> 121 Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize1, UInt uiSize2, UInt uiSize3 ) 122 { 123 if( rpt ) 124 { 125 for( UInt uiK = 0; uiK < uiSize1; uiK++ ) 126 { 127 for( UInt uiL = 0; uiL < uiSize2; uiL++ ) 128 { 129 for( UInt uiM = 0; uiM < uiSize3; uiM++ ) 130 { 131 delete[] rpt[ uiK ][ uiL ][ uiM ]; 132 } 133 delete[] rpt[ uiK ][ uiL ]; 134 } 135 delete[] rpt[ uiK ]; 136 } 137 delete[] rpt; 138 } 139 rpt = NULL; 140 }; 141 142 143 template <class T> 144 Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize1, UInt uiSize2 ) 145 { 146 if( rpt ) 147 { 148 for( UInt uiK = 0; uiK < uiSize1; uiK++ ) 149 { 150 for( UInt uiL = 0; uiL < uiSize2; uiL++ ) 151 { 152 delete[] rpt[ uiK ][ uiL ]; 153 } 154 delete[] rpt[ uiK ]; 155 } 156 delete[] rpt; 157 } 158 rpt = NULL; 159 }; 160 161 162 template <class T> 163 Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize ) 164 { 165 if( rpt ) 166 { 167 for( UInt uiK = 0; uiK < uiSize; uiK++ ) 168 { 169 delete[] rpt[ uiK ]; 170 } 171 delete[] rpt; 172 } 173 rpt = NULL; 174 }; 175 176 #endif 100 177 101 178 /// decoder class … … 118 195 119 196 SEImessages *m_SEIs; ///< "all" SEI messages. If not NULL, we own the object. 120 121 #if SONY_COLPIC_AVAILABILITY122 Int m_iViewOrderIdx;123 #endif124 197 125 198 // functional classes … … 140 213 TComDepthMapGenerator m_cDepthMapGenerator; 141 214 #endif 142 #if H HI_INTER_VIEW_RESIDUAL_PRED215 #if H3D_IVRP 143 216 TComResidualGenerator m_cResidualGenerator; 144 217 #endif … … 176 249 Void xCopyVPS( TComVPS* pVPSV0); 177 250 #endif 178 #if H HI_INTER_VIEW_RESIDUAL_PRED251 #if H3D_IVRP 179 252 Void deleteExtraPicBuffers ( Int iPoc ); 180 253 #endif … … 186 259 Int getViewId() { return m_viewId ;} 187 260 Void setIsDepth( Bool isDepth ) { m_isDepth = isDepth; } 188 189 #if SONY_COLPIC_AVAILABILITY190 Void setViewOrderIdx(Int i) { m_iViewOrderIdx = i ;}191 Int getViewOrderIdx() { return m_iViewOrderIdx ; }192 #endif193 261 194 262 #if DEPTH_MAP_GENERATION … … 206 274 ParameterSetManagerDecoder* xGetParaSetDec () {return &m_parameterSetManagerDecoder;} 207 275 #endif 276 208 277 protected: 209 278 Void xGetNewPicBuffer (TComSlice* pcSlice, TComPic*& rpcPic); … … 213 282 Void decodeAPS( TComAPS* cAPS) { m_cEntropyDecoder.decodeAPS(cAPS); }; 214 283 Void xActivateParameterSets(); 215 #if SKIPFRAME_BUGFIX216 284 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay); 217 #else218 Bool xDecodeSlice(InputNALUnit &nalu, Int iSkipFrame, Int iPOCLastDisplay);219 #endif220 285 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 221 286 Void xDecodeVPS();
Note: See TracChangeset for help on using the changeset viewer.