Changeset 1176 in 3DVCSoftware
- Timestamp:
- 7 Apr 2015, 15:48:27 (10 years ago)
- Location:
- branches/HTM-13.1-dev0
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1175 r1176 2486 2486 READ_FLAG(uiCode, "slice_sao_luma_flag"); rpcSlice->setSaoEnabledFlag((Bool)uiCode); 2487 2487 #if H_3D_DISABLE_CHROMA 2488 if( !rpcSlice->getIsDepth())2488 if( rpcSlice->getSPS()->getChromaFormatIdc() != 0 ) 2489 2489 { 2490 2490 READ_FLAG(uiCode, "slice_sao_chroma_flag"); rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode); … … 3271 3271 wpScalingParam *wp; 3272 3272 #if H_3D_DISABLE_CHROMA 3273 Bool bChroma = !pcSlice->getIsDepth();3273 Bool bChroma = ( pcSlice->getSPS()->getChromaFormatIdc() != 0 ); 3274 3274 #else 3275 3275 Bool bChroma = true; // color always present in HEVC ? -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
r1175 r1176 184 184 if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() ) 185 185 #else 186 if(!pcCU->getS lice()->getIsDepth())186 if(!pcCU->getSDCFlag(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 187 187 #endif 188 188 #else … … 867 867 { 868 868 #if H_3D_DISABLE_CHROMA 869 if ( !pcCU->getSlice()->getIsDepth())869 if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 870 870 { 871 871 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) ) … … 1061 1061 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 ); 1062 1062 #if H_3D_DISABLE_CHROMA 1063 if ( !pcCU->getSlice()->getIsDepth())1063 if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 1064 1064 { 1065 1065 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r1175 r1176 503 503 504 504 #if H_3D_DISABLE_CHROMA 505 if( !pcCU->getSlice()->getIsDepth())505 if( pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 506 506 { 507 507 #endif -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r1175 r1176 1659 1659 // Encode Coefficients 1660 1660 Bool bCodeDQP = getdQPFlag(); 1661 #if H_3D_DISABLE_CHROMA 1662 m_pcEntropyCoder->encodeCoeff( pcCU, uiAbsPartIdx, uiDepth, pcCU->getWidth (uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), bCodeDQP, false ); 1663 #else 1661 1664 m_pcEntropyCoder->encodeCoeff( pcCU, uiAbsPartIdx, uiDepth, pcCU->getWidth (uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), bCodeDQP ); 1665 #endif 1662 1666 setdQPFlag( bCodeDQP ); 1663 1667 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 … … 2858 2862 // Encode Coefficients 2859 2863 Bool bCodeDQP = getdQPFlag(); 2864 #if H_3D_DISABLE_CHROMA 2865 m_pcEntropyCoder->encodeCoeff( rpcTempCU, 0, uiDepth, rpcTempCU->getWidth (0), rpcTempCU->getHeight(0), bCodeDQP, true ); 2866 #else 2860 2867 m_pcEntropyCoder->encodeCoeff( rpcTempCU, 0, uiDepth, rpcTempCU->getWidth (0), rpcTempCU->getHeight(0), bCodeDQP ); 2868 #endif 2869 2870 2861 2871 setdQPFlag( bCodeDQP ); 2862 2872 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
r1175 r1176 304 304 } 305 305 306 #if H_3D_DISABLE_CHROMA 307 Void TEncEntropy::xEncodeTransform( TComDataCU* pcCU,UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Bool rd ) 308 #else 306 309 Void TEncEntropy::xEncodeTransform( TComDataCU* pcCU,UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP ) 310 #endif 307 311 { 308 312 … … 325 329 UInt cbfU = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx ); 326 330 UInt cbfV = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrIdx ); 327 331 #if H_3D_DISABLE_CHROMA 332 if( !rd && pcCU->getSlice()->getSPS()->getChromaFormatIdc() == 0 ) 333 { 334 cbfU = 0; 335 cbfV = 0; 336 } 337 #endif 328 338 if(uiTrIdx==0) 329 339 { … … 342 352 cbfU = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_U, uiTrIdx ); 343 353 cbfV = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_V, uiTrIdx ); 354 #if H_3D_DISABLE_CHROMA 355 if( !rd && pcCU->getSlice()->getSPS()->getChromaFormatIdc() == 0 ) 356 { 357 cbfU = 0; 358 cbfV = 0; 359 } 360 #endif 344 361 } 345 362 } … … 383 400 { 384 401 #if H_3D_DISABLE_CHROMA 385 if ( !pcCU->getSlice()->getIsDepth())402 if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 || rd) 386 403 { 387 404 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr - 1 ) ) … … 394 411 } 395 412 } 396 else397 {398 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr - 1 ) )399 {400 assert( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr ) == 0 );401 }402 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr - 1 ) )403 {404 assert( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr ) == 0 );405 }406 }407 413 #else 408 414 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr - 1 ) ) … … 418 424 else if( uiLog2TrafoSize == 2 ) 419 425 { 426 #if H_3D_DISABLE_CHROMA 427 if ( rd && pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 428 { 420 429 assert( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr ) == pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr - 1 ) ); 421 430 assert( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr ) == pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr - 1 ) ); 431 } 432 #else 433 assert( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr ) == pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepthCurr - 1 ) ); 434 assert( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr ) == pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepthCurr - 1 ) ); 435 #endif 422 436 } 423 437 … … 432 446 const UInt partNum = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1); 433 447 448 #if H_3D_DISABLE_CHROMA 449 xEncodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP, rd ); 450 451 uiAbsPartIdx += partNum; offsetLuma += size; offsetChroma += (size>>2); 452 xEncodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP ,rd ); 453 454 uiAbsPartIdx += partNum; offsetLuma += size; offsetChroma += (size>>2); 455 xEncodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP, rd ); 456 457 uiAbsPartIdx += partNum; offsetLuma += size; offsetChroma += (size>>2); 458 xEncodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP, rd ); 459 #else 434 460 xEncodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP ); 435 461 … … 442 468 uiAbsPartIdx += partNum; offsetLuma += size; offsetChroma += (size>>2); 443 469 xEncodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP ); 470 #endif 444 471 } 445 472 else … … 458 485 #endif 459 486 487 #if H_3D_DISABLE_CHROMA 488 Bool notcbfUV = !rd && pcCU->getSlice()->getSPS()->getChromaFormatIdc() == 0 ? 1 : ( !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) ) ; 489 if( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA && 490 uiDepth == pcCU->getDepth( uiAbsPartIdx ) && notcbfUV ) 491 #else 460 492 if( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) ) 493 #endif 461 494 { 462 495 assert( pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, 0 ) ); … … 548 581 #if H_3D_DIM_SDC 549 582 #if H_3D_DISABLE_CHROMA 550 if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() )583 if(!pcCU->getSDCFlag(uiAbsPartIdx) && ( !pcCU->getSlice()->getIsDepth() || bRD ) ) 551 584 #else 552 585 if(!pcCU->getSDCFlag(uiAbsPartIdx)) … … 719 752 * \param uiHeight 720 753 */ 754 #if H_3D_DISABLE_CHROMA 755 Void TEncEntropy::encodeCoeff( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, Bool& bCodeDQP, Bool rd ) 756 #else 721 757 Void TEncEntropy::encodeCoeff( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, Bool& bCodeDQP ) 758 #endif 722 759 { 723 760 UInt uiMinCoeffSize = pcCU->getPic()->getMinCUWidth()*pcCU->getPic()->getMinCUHeight(); … … 794 831 } 795 832 833 #if H_3D_DISABLE_CHROMA 834 xEncodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, bCodeDQP, rd); 835 #else 796 836 xEncodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, bCodeDQP); 837 #endif 797 838 } 798 839 -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncEntropy.h
r1175 r1176 226 226 227 227 private: 228 #if H_3D_DISABLE_CHROMA 229 Void xEncodeTransform ( TComDataCU* pcCU,UInt offsetLumaOffset, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Bool rd ); 230 public: 231 Void encodeCoeff ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, Bool& bCodeDQP, Bool rd ); 232 #else 228 233 Void xEncodeTransform ( TComDataCU* pcCU,UInt offsetLumaOffset, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP ); 229 234 public: 230 235 Void encodeCoeff ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, Bool& bCodeDQP ); 236 #endif 231 237 232 238 Void encodeCoeffNxN ( TComDataCU* pcCU, TCoeff* pcCoeff, UInt uiAbsPartIdx, UInt uiTrWidth, UInt uiTrHeight, UInt uiDepth, TextType eType ); -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r1175 r1176 2329 2329 2330 2330 Bool bDummy = false; 2331 #if H_3D_DISABLE_CHROMA 2332 m_pcEntropyCoder->encodeCoeff( pcCU, 0, pcCU->getDepth( 0 ), uiWidth, uiHeight, bDummy, true ); 2333 #else 2331 2334 m_pcEntropyCoder->encodeCoeff( pcCU, 0, pcCU->getDepth( 0 ), uiWidth, uiHeight, bDummy ); 2335 #endif 2332 2336 UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits(); 2333 2337 … … 7541 7545 #endif 7542 7546 Bool bDummy = false; 7547 #if H_3D_DISABLE_CHROMA 7548 m_pcEntropyCoder->encodeCoeff ( pcCU, 0, pcCU->getDepth(0), pcCU->getWidth(0), pcCU->getHeight(0), bDummy, true ); 7549 #else 7543 7550 m_pcEntropyCoder->encodeCoeff ( pcCU, 0, pcCU->getDepth(0), pcCU->getWidth(0), pcCU->getHeight(0), bDummy ); 7551 #endif 7544 7552 7545 7553 ruiBits += m_pcEntropyCoder->getNumberOfWrittenBits();
Note: See TracChangeset for help on using the changeset viewer.