Changeset 1163 in 3DVCSoftware for branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
- Timestamp:
- 16 Mar 2015, 12:40:05 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r1133 r1163 437 437 #if H_3D_VSP 438 438 DisInfo DvInfo; 439 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 439 440 DvInfo.bDV = false; 441 #endif 440 442 DvInfo.m_acNBDV.setZero(); 441 443 DvInfo.m_aVIdxCan = 0; … … 583 585 if (rpcTempCU->getSlice()->getIsDepth() ) 584 586 { 587 #if SEC_ARP_REM_ENC_RESTRICT_K0035 588 rpcTempCU->getDispforDepth(0, 0, &DvInfo); 589 #else 585 590 DvInfo.bDV = rpcTempCU->getDispforDepth(0, 0, &DvInfo); 591 #endif 586 592 } 587 593 else … … 590 596 #if H_3D_NBDV_REF 591 597 if( rpcTempCU->getSlice()->getDepthRefinementFlag() ) 598 #if SEC_ARP_REM_ENC_RESTRICT_K0035 599 rpcTempCU->getDisMvpCandNBDV(&DvInfo, true); 600 #else 592 601 DvInfo.bDV = rpcTempCU->getDisMvpCandNBDV(&DvInfo, true); 602 #endif 593 603 else 594 604 #endif 605 #if SEC_ARP_REM_ENC_RESTRICT_K0035 606 rpcTempCU->getDisMvpCandNBDV(&DvInfo); 607 #else 595 608 DvInfo.bDV = rpcTempCU->getDisMvpCandNBDV(&DvInfo); 609 #endif 596 610 597 611 #if H_3D_IV_MERGE … … 712 726 } 713 727 #endif 728 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 729 rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP ); 730 if( rpcBestCU->getSlice()->getDepthIntraSkipFlag() ) 731 { 732 xCheckRDCostDIS( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 733 rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP ); 734 } 735 #else 714 736 #if H_3D_SINGLE_DEPTH 715 737 rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP ); … … 719 741 rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP ); 720 742 } 743 #endif 721 744 #endif 722 745 if(!earlyDetectionSkipMode) … … 1577 1600 return; 1578 1601 } 1602 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1603 m_pcEntropyCoder->encodeDIS( pcCU, uiAbsPartIdx ); 1604 if(!pcCU->getDISFlag(uiAbsPartIdx)) 1605 { 1606 #else 1579 1607 #if H_3D_SINGLE_DEPTH 1580 1608 m_pcEntropyCoder->encodeSingleDepthMode( pcCU, uiAbsPartIdx ); 1581 1609 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) 1582 1610 { 1611 #endif 1583 1612 #endif 1584 1613 m_pcEntropyCoder->encodePredMode( pcCU, uiAbsPartIdx ); … … 1614 1643 m_pcEntropyCoder->encodeCoeff( pcCU, uiAbsPartIdx, uiDepth, pcCU->getWidth (uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), bCodeDQP ); 1615 1644 setdQPFlag( bCodeDQP ); 1645 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1646 } 1647 #else 1616 1648 #if H_3D_SINGLE_DEPTH 1617 1649 } 1650 #endif 1618 1651 #endif 1619 1652 // --- write terminating bit --- … … 1834 1867 #if H_3D_ARP 1835 1868 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 1869 #if SEC_ARP_REM_ENC_RESTRICT_K0035 1870 if( nARPWMax < 0 || bICFlag ) 1871 #else 1836 1872 if( nARPWMax < 0 || !rpcTempCU->getDvInfo(0).bDV || bICFlag ) 1873 #endif 1837 1874 { 1838 1875 nARPWMax = 0; … … 2000 2037 2001 2038 rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth ); 2039 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2040 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2041 #else 2002 2042 #if H_3D_SINGLE_DEPTH 2003 2043 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth ); 2044 #endif 2004 2045 #endif 2005 2046 #if H_3D_VSP // possible bug fix … … 2042 2083 } 2043 2084 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2085 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2086 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2087 #else 2044 2088 #if H_3D_SINGLE_DEPTH 2045 2089 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth ); 2090 #endif 2046 2091 #endif 2047 2092 rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth ); … … 2166 2211 Bool bFirstTime = true; 2167 2212 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 2168 2213 #if SEC_ARP_REM_ENC_RESTRICT_K0035 2214 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || rpcTempCU->getICFlag(0) ) 2215 #else 2169 2216 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || !rpcTempCU->getDvInfo(0).bDV || rpcTempCU->getICFlag(0) ) 2217 #endif 2170 2218 { 2171 2219 nARPWMax = 0; … … 2193 2241 2194 2242 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2243 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2244 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2245 #else 2195 2246 #if H_3D_SINGLE_DEPTH 2196 2247 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth ); 2248 #endif 2197 2249 #endif 2198 2250 rpcTempCU->setPartSizeSubParts ( ePartSize, 0, uhDepth ); … … 2303 2355 } 2304 2356 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2357 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2358 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2359 #else 2305 2360 #if H_3D_SINGLE_DEPTH 2306 2361 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth ); 2362 #endif 2307 2363 #endif 2308 2364 rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth ); … … 2413 2469 } 2414 2470 } 2471 2472 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2473 Void TEncCu::xCheckRDCostDIS( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize ) 2474 { 2475 UInt uiDepth = rpcTempCU->getDepth( 0 ); 2476 if( !rpcBestCU->getSlice()->getIsDepth() || (eSize != SIZE_2Nx2N)) 2477 { 2478 return; 2479 } 2480 2481 #if H_3D_VSO // M5 2482 if( m_pcRdCost->getUseRenModel() ) 2483 { 2484 UInt uiWidth = m_ppcOrigYuv[uiDepth]->getWidth (); 2485 UInt uiHeight = m_ppcOrigYuv[uiDepth]->getHeight (); 2486 Pel* piSrc = m_ppcOrigYuv[uiDepth]->getLumaAddr(); 2487 UInt uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride (); 2488 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 2489 } 2490 #endif 2491 2492 rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth ); 2493 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 2494 rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth ); 2495 rpcTempCU->setCUTransquantBypassSubParts( rpcTempCU->getCUTransquantBypass(0), 0, uiDepth ); 2496 2497 rpcTempCU->setTrIdxSubParts(0, 0, uiDepth); 2498 rpcTempCU->setCbfSubParts(0, 1, 1, 0, uiDepth); 2499 rpcTempCU->setDISFlagSubParts(true, 0, uiDepth); 2500 rpcTempCU->setLumaIntraDirSubParts (DC_IDX, 0, uiDepth); 2501 #if H_3D_DIM_SDC 2502 rpcTempCU->setSDCFlagSubParts( false, 0, uiDepth); 2503 #endif 2504 2505 UInt uiPreCalcDistC; 2506 m_pcPredSearch ->estIntraPredDIS ( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC, false ); 2507 2508 2509 m_ppcRecoYuvTemp[uiDepth]->copyToPicLuma(rpcTempCU->getPic()->getPicYuvRec(), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU() ); 2510 2511 2512 m_pcEntropyCoder->resetBits(); 2513 if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag()) 2514 { 2515 m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0, true ); 2516 } 2517 m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0, true ); 2518 m_pcEntropyCoder->encodeDIS( rpcTempCU, 0, true ); 2519 2520 2521 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]); 2522 2523 rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits(); 2524 rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded(); 2525 2526 2527 #if H_3D_VSO // M6 2528 if( m_pcRdCost->getUseLambdaScaleVSO()) 2529 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 2530 else 2531 #endif 2532 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 2533 2534 2535 xCheckDQP( rpcTempCU ); 2536 xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth); 2537 } 2538 #else 2415 2539 #if H_3D_SINGLE_DEPTH 2416 2540 Void TEncCu::xCheckRDCostSingleDepth( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize ) … … 2479 2603 xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth); 2480 2604 } 2605 #endif 2481 2606 #endif 2482 2607 … … 2636 2761 2637 2762 rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth ); 2763 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2764 rpcTempCU->setDISFlagSubParts( false, 0, uiDepth ); 2765 #else 2638 2766 #if H_3D_SINGLE_DEPTH 2639 2767 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth ); 2768 #endif 2640 2769 #endif 2641 2770 rpcTempCU->setPartSizeSubParts( eSize, 0, uiDepth ); … … 2666 2795 } 2667 2796 m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0, true ); 2797 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2798 m_pcEntropyCoder->encodeDIS( rpcTempCU, 0, true ); 2799 if(!rpcTempCU->getDISFlag(0)) 2800 { 2801 #else 2668 2802 #if H_3D_SINGLE_DEPTH 2669 2803 m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0, true ); 2670 2804 if(!rpcTempCU->getSingleDepthFlag(0)) 2671 2805 { 2806 #endif 2672 2807 #endif 2673 2808 m_pcEntropyCoder->encodePredMode( rpcTempCU, 0, true ); … … 2683 2818 m_pcEntropyCoder->encodeCoeff( rpcTempCU, 0, uiDepth, rpcTempCU->getWidth (0), rpcTempCU->getHeight(0), bCodeDQP ); 2684 2819 setdQPFlag( bCodeDQP ); 2820 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2821 } 2822 #else 2685 2823 #if H_3D_SINGLE_DEPTH 2686 2824 } 2687 #endif 2825 #endif 2826 #endif 2688 2827 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]); 2689 2828 … … 2713 2852 2714 2853 rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth ); 2854 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2855 rpcTempCU->setDISFlagSubParts( false, 0, uiDepth ); 2856 #else 2715 2857 #if H_3D_SINGLE_DEPTH 2716 2858 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth ); 2859 #endif 2717 2860 #endif 2718 2861 rpcTempCU->setIPCMFlag(0, true); … … 2732 2875 } 2733 2876 m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0, true ); 2877 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2878 m_pcEntropyCoder->encodeDIS( rpcTempCU, 0, true ); 2879 #else 2734 2880 #if H_3D_SINGLE_DEPTH 2735 2881 m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0, true ); 2882 #endif 2736 2883 #endif 2737 2884 m_pcEntropyCoder->encodePredMode ( rpcTempCU, 0, true );
Note: See TracChangeset for help on using the changeset viewer.