Changeset 1502 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp
- Timestamp:
- 11 Dec 2015, 00:05:48 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r1474 r1502 173 173 174 174 // store lambda 175 #if SVC_EXTENSION176 m_pcRdCost ->setLambda( dLambda, slice->getBitDepths() );177 #else178 175 m_pcRdCost ->setLambda( dLambda, slice->getSPS()->getBitDepths() ); 179 #endif180 176 181 177 // for RDO … … 193 189 { 194 190 dLambdas[0] = dLambda * 1.1; 195 m_pcRdCost->setLambda( dLambdas[0], slice->get BitDepths() );191 m_pcRdCost->setLambda( dLambdas[0], slice->getSPS()->getBitDepths() ); 196 192 197 193 m_pcRdCost->setDistortionWeight(compID, tmpWeight * 1.15); … … 337 333 if(eSliceType!=I_SLICE) 338 334 { 339 #if SVC_EXTENSION340 if (!(( m_pcCfg->getMaxDeltaQP() == 0 ) && (dQP == -rpcSlice->getQpBDOffset(CHANNEL_TYPE_LUMA) ) && (rpcSlice->getPPS()->getTransquantBypassEnableFlag())))341 #else342 335 if (!(( m_pcCfg->getMaxDeltaQP() == 0 ) && (dQP == -rpcSlice->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA) ) && (rpcSlice->getPPS()->getTransquantBypassEnableFlag()))) 343 #endif344 336 { 345 337 dQP += m_pcCfg->getGOPEntry(iGOPid).m_QPOffset; … … 378 370 379 371 #if FULL_NBIT 380 #if SVC_EXTENSION381 Int bitdepth_luma_qp_scale = 6 * (rpcSlice->getBitDepth(CHANNEL_TYPE_LUMA) - 8);382 #else383 372 Int bitdepth_luma_qp_scale = 6 * (rpcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 8); 384 #endif385 373 #else 386 374 Int bitdepth_luma_qp_scale = 0; … … 423 411 } 424 412 425 #if SVC_EXTENSION426 iQP = max( -rpcSlice->getQpBDOffset(CHANNEL_TYPE_LUMA), min( MAX_QP, (Int) floor( dQP + 0.5 ) ) );427 #else428 413 iQP = max( -rpcSlice->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), min( MAX_QP, (Int) floor( dQP + 0.5 ) ) ); 429 #endif430 414 431 415 m_pdRdPicLambda[iDQpIdx] = dLambda; … … 489 473 { 490 474 dQP = xGetQPValueAccordingToLambda( dLambda ); 491 #if SVC_EXTENSION492 iQP = max( -rpcSlice->getQpBDOffset(CHANNEL_TYPE_LUMA), min( MAX_QP, (Int) floor( dQP + 0.5 ) ) );493 #else494 475 iQP = max( -rpcSlice->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), min( MAX_QP, (Int) floor( dQP + 0.5 ) ) ); 495 #endif496 476 } 497 477 … … 669 649 Double dFrameLambda; 670 650 #if FULL_NBIT 671 #if SVC_EXTENSION672 Int SHIFT_QP = 12 + 6 * (pcSlice->getBitDepth(CHANNEL_TYPE_LUMA) - 8);673 #else674 651 Int SHIFT_QP = 12 + 6 * (pcSlice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 8); 675 #endif676 652 #else 677 653 Int SHIFT_QP = 12; … … 732 708 TComSlice * const pcSlice = pcPic->getSlice(getSliceIdx()); 733 709 const TComSPS &sps = *(pcSlice->getSPS()); 734 #if SVC_EXTENSION735 const Int shift = pcSlice->getBitDepth(CHANNEL_TYPE_LUMA)-8;736 #else737 710 const Int shift = sps.getBitDepth(CHANNEL_TYPE_LUMA)-8; 738 #endif739 711 const Int offset = (shift>0)?(1<<(shift-1)):0; 740 712 … … 752 724 pCtu->initCtu( pcPic, ctuRsAddr ); 753 725 754 #if SVC_EXTENSION755 Int height = min( sps.getMaxCUHeight(),pcSlice->getPicHeightInLumaSamples() - ctuRsAddr / pcPic->getFrameWidthInCtus() * sps.getMaxCUHeight() );756 Int width = min( sps.getMaxCUWidth(),pcSlice->getPicWidthInLumaSamples() - ctuRsAddr % pcPic->getFrameWidthInCtus() * sps.getMaxCUWidth() );757 #else758 726 Int height = min( sps.getMaxCUHeight(),sps.getPicHeightInLumaSamples() - ctuRsAddr / pcPic->getFrameWidthInCtus() * sps.getMaxCUHeight() ); 759 727 Int width = min( sps.getMaxCUWidth(), sps.getPicWidthInLumaSamples() - ctuRsAddr % pcPic->getFrameWidthInCtus() * sps.getMaxCUWidth() ); 760 #endif761 728 762 729 Int iSumHad = m_pcCuEncoder->updateCtuDataISlice(pCtu, width, height); … … 938 905 } 939 906 940 #if SVC_EXTENSION941 estQP = Clip3( -pcSlice->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, estQP );942 943 m_pcRdCost->setLambda(estLambda, pcSlice->getBitDepths());944 #else945 907 estQP = Clip3( -pcSlice->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), MAX_QP, estQP ); 946 908 947 909 m_pcRdCost->setLambda(estLambda, pcSlice->getSPS()->getBitDepths()); 948 #endif949 910 950 911 #if RDOQ_CHROMA_LAMBDA … … 1040 1001 actualQP = pCtu->getQP( 0 ); 1041 1002 } 1042 #if SVC_EXTENSION1043 m_pcRdCost->setLambda(oldLambda, pcSlice->getBitDepths());1044 #else1045 1003 m_pcRdCost->setLambda(oldLambda, pcSlice->getSPS()->getBitDepths()); 1046 #endif1047 1004 m_pcRateCtrl->getRCPic()->updateAfterCTU( m_pcRateCtrl->getRCPic()->getLCUCoded(), actualBits, actualQP, actualLambda, 1048 1005 pCtu->getSlice()->getSliceType() == I_SLICE ? 0 : m_pcCfg->getLCULevelRC() ); … … 1201 1158 } 1202 1159 1203 #if SVC_EXTENSION1204 m_pcEntropyCoder->encodeSAOBlkParam(saoblkParam, pcPic->getPicSym()->getSlice(0)->getBitDepths(), sliceEnabled, leftMergeAvail, aboveMergeAvail);1205 #else1206 1160 m_pcEntropyCoder->encodeSAOBlkParam(saoblkParam, pcPic->getPicSym()->getSPS().getBitDepths(), sliceEnabled, leftMergeAvail, aboveMergeAvail); 1207 #endif1208 1161 } 1209 1162 }
Note: See TracChangeset for help on using the changeset viewer.