Ignore:
Timestamp:
16 Mar 2015, 12:40:05 (9 years ago)
Author:
tech
Message:

Merged branch 13.1-dev1-Samsung2@1162

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp

    r1133 r1163  
    437437#if H_3D_VSP
    438438  DisInfo DvInfo;
     439#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    439440  DvInfo.bDV = false;
     441#endif
    440442  DvInfo.m_acNBDV.setZero();
    441443  DvInfo.m_aVIdxCan = 0;
     
    583585          if (rpcTempCU->getSlice()->getIsDepth() )
    584586          {
     587#if SEC_ARP_REM_ENC_RESTRICT_K0035
     588            rpcTempCU->getDispforDepth(0, 0, &DvInfo);
     589#else
    585590            DvInfo.bDV = rpcTempCU->getDispforDepth(0, 0, &DvInfo);
     591#endif
    586592          }
    587593          else
     
    590596#if H_3D_NBDV_REF
    591597          if( rpcTempCU->getSlice()->getDepthRefinementFlag() )
     598#if SEC_ARP_REM_ENC_RESTRICT_K0035
     599            rpcTempCU->getDisMvpCandNBDV(&DvInfo, true);
     600#else
    592601            DvInfo.bDV = rpcTempCU->getDisMvpCandNBDV(&DvInfo, true);
     602#endif
    593603          else
    594604#endif
     605#if SEC_ARP_REM_ENC_RESTRICT_K0035
     606            rpcTempCU->getDisMvpCandNBDV(&DvInfo);
     607#else
    595608            DvInfo.bDV = rpcTempCU->getDisMvpCandNBDV(&DvInfo);
     609#endif
    596610
    597611#if H_3D_IV_MERGE
     
    712726    }
    713727#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
    714736#if H_3D_SINGLE_DEPTH
    715737    rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
     
    719741      rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
    720742    }
     743#endif
    721744#endif
    722745    if(!earlyDetectionSkipMode)
     
    15771600    return;
    15781601  }
     1602#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1603  m_pcEntropyCoder->encodeDIS( pcCU, uiAbsPartIdx );
     1604  if(!pcCU->getDISFlag(uiAbsPartIdx))
     1605  {
     1606#else
    15791607#if H_3D_SINGLE_DEPTH
    15801608  m_pcEntropyCoder->encodeSingleDepthMode( pcCU, uiAbsPartIdx );
    15811609  if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
    15821610  {
     1611#endif
    15831612#endif
    15841613  m_pcEntropyCoder->encodePredMode( pcCU, uiAbsPartIdx );
     
    16141643  m_pcEntropyCoder->encodeCoeff( pcCU, uiAbsPartIdx, uiDepth, pcCU->getWidth (uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), bCodeDQP );
    16151644  setdQPFlag( bCodeDQP );
     1645#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1646  }
     1647#else
    16161648#if H_3D_SINGLE_DEPTH
    16171649  }
     1650#endif
    16181651#endif
    16191652  // --- write terminating bit ---
     
    18341867#if H_3D_ARP
    18351868  Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1;
     1869#if SEC_ARP_REM_ENC_RESTRICT_K0035
     1870  if( nARPWMax < 0 || bICFlag )
     1871#else
    18361872  if( nARPWMax < 0 || !rpcTempCU->getDvInfo(0).bDV || bICFlag )
     1873#endif
    18371874  {
    18381875    nARPWMax = 0;
     
    20002037
    20012038          rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth );
     2039#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2040          rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
     2041#else
    20022042#if H_3D_SINGLE_DEPTH
    20032043          rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
     2044#endif
    20042045#endif
    20052046#if H_3D_VSP // possible bug fix
     
    20422083              }
    20432084              rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
     2085#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2086              rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
     2087#else
    20442088#if H_3D_SINGLE_DEPTH
    20452089              rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
     2090#endif
    20462091#endif
    20472092              rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );
     
    21662211  Bool bFirstTime = true;
    21672212  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
    21692216  if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || !rpcTempCU->getDvInfo(0).bDV || rpcTempCU->getICFlag(0) )
     2217#endif
    21702218  {
    21712219    nARPWMax = 0;
     
    21932241 
    21942242  rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
     2243#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2244  rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
     2245#else
    21952246#if H_3D_SINGLE_DEPTH
    21962247  rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
     2248#endif
    21972249#endif
    21982250  rpcTempCU->setPartSizeSubParts  ( ePartSize,  0, uhDepth );
     
    23032355      }
    23042356      rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
     2357#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2358      rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
     2359#else
    23052360#if H_3D_SINGLE_DEPTH
    23062361      rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
     2362#endif
    23072363#endif
    23082364      rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );
     
    24132469  }
    24142470}
     2471
     2472#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2473Void 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
    24152539#if H_3D_SINGLE_DEPTH
    24162540Void TEncCu::xCheckRDCostSingleDepth( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize )
     
    24792603  xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);
    24802604}
     2605#endif
    24812606#endif
    24822607
     
    26362761
    26372762  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
     2763#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2764  rpcTempCU->setDISFlagSubParts( false, 0, uiDepth );
     2765#else
    26382766#if H_3D_SINGLE_DEPTH
    26392767  rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth );
     2768#endif
    26402769#endif
    26412770  rpcTempCU->setPartSizeSubParts( eSize, 0, uiDepth );
     
    26662795  }
    26672796  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
    26682802#if H_3D_SINGLE_DEPTH
    26692803  m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0,          true );
    26702804  if(!rpcTempCU->getSingleDepthFlag(0))
    26712805  {
     2806#endif
    26722807#endif
    26732808  m_pcEntropyCoder->encodePredMode( rpcTempCU, 0,          true );
     
    26832818  m_pcEntropyCoder->encodeCoeff( rpcTempCU, 0, uiDepth, rpcTempCU->getWidth (0), rpcTempCU->getHeight(0), bCodeDQP );
    26842819  setdQPFlag( bCodeDQP );
     2820#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2821  }
     2822#else
    26852823#if H_3D_SINGLE_DEPTH
    26862824  }
    2687 #endif       
     2825#endif
     2826#endif
    26882827  m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
    26892828 
     
    27132852
    27142853  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
     2854#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2855  rpcTempCU->setDISFlagSubParts( false, 0, uiDepth );
     2856#else
    27152857#if H_3D_SINGLE_DEPTH
    27162858  rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth );
     2859#endif
    27172860#endif
    27182861  rpcTempCU->setIPCMFlag(0, true);
     
    27322875  }
    27332876  m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
     2877#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2878  m_pcEntropyCoder->encodeDIS( rpcTempCU, 0,          true );
     2879#else
    27342880#if H_3D_SINGLE_DEPTH
    27352881  m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0,          true );
     2882#endif
    27362883#endif
    27372884  m_pcEntropyCoder->encodePredMode ( rpcTempCU, 0,          true );
Note: See TracChangeset for help on using the changeset viewer.