Changeset 843 in 3DVCSoftware


Ignore:
Timestamp:
8 Feb 2014, 19:59:02 (11 years ago)
Author:
tech
Message:

Further fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-10.0rc1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp

    r840 r843  
    31813181      {
    31823182#endif
    3183       // set context models
     3183        // set context models
    31843184        m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] );
    3185      
    3186       // determine residual for partition
     3185
     3186        // determine residual for partition
    31873187#if H_3D_VSO
    3188       Dist   uiPUDistY = 0;
     3188        Dist   uiPUDistY = 0;
    31893189#else
    3190       UInt   uiPUDistY = 0;
    3191 #endif
    3192       UInt   uiPUDistC = 0;
    3193       Double dPUCost   = 0.0;
     3190        UInt   uiPUDistY = 0;
     3191#endif
     3192        UInt   uiPUDistC = 0;
     3193        Double dPUCost   = 0.0;
    31943194#if H_3D_VSO // M36
    3195       if( m_pcRdCost->getUseRenModel() )
    3196       {
    3197         m_pcRdCost->setRenModelData( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight );
    3198       }
     3195        if( m_pcRdCost->getUseRenModel() )
     3196        {
     3197          m_pcRdCost->setRenModelData( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight );
     3198        }
    31993199#endif
    32003200#if H_3D_DIM_SDC
    3201             if( pcCU->getSDCFlag(uiPartOffset) )
    3202             {
    3203               pcCU->setTrIdxSubParts(0, uiPartOffset, uiDepth + uiInitTrDepth);
    3204               pcCU->setCbfSubParts(1, 1, 1, uiPartOffset, uiDepth + uiInitTrDepth);
    3205              
    3206               // start encoding with SDC
     3201        if( pcCU->getSDCFlag(uiPartOffset) )
     3202        {
     3203          pcCU->setTrIdxSubParts(0, uiPartOffset, uiDepth + uiInitTrDepth);
     3204          pcCU->setCbfSubParts(1, 1, 1, uiPartOffset, uiDepth + uiInitTrDepth);
     3205
     3206          // start encoding with SDC
    32073207#if QC_GENERIC_SDC_G0122
    3208               xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, ( testZeroResi != 0 ), iSDCDeltaResi );
     3208          xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, ( testZeroResi != 0 ), iSDCDeltaResi );
    32093209#else
    3210               xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, (testZeroResi!=0));
    3211 #endif
    3212             }
    3213             else
    3214             {
     3210          xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, (testZeroResi!=0));
     3211#endif
     3212        }
     3213        else
     3214        {
    32153215#endif
    32163216#if HHI_RQT_INTRA_SPEEDUP
    32173217#if H_3D_DIM_ENC
    3218       xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, true, dPUCost, (testZeroResi != 0) );
     3218          xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, true, dPUCost, (testZeroResi != 0) );
    32193219#else
    3220       xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, true, dPUCost );
     3220          xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, true, dPUCost );
    32213221#endif
    32223222#else
    32233223#if H_3D_DIM_ENC
    3224       xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, dPUCost, (testZeroResi != 0) );
     3224          xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, dPUCost, (testZeroResi != 0) );
    32253225#else
    3226       xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, dPUCost );
     3226          xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, dPUCost );
    32273227#endif
    32283228#endif
    32293229#if H_3D_DIM_SDC
    3230             }
    3231 #endif
    3232      
    3233       // check r-d cost
    3234       if( dPUCost < dBestPUCost )
    3235       {
     3230        }
     3231#endif
     3232
     3233        // check r-d cost
     3234        if( dPUCost < dBestPUCost )
     3235        {
    32363236#if HHI_RQT_INTRA_SPEEDUP_MOD
    3237         uiSecondBestMode  = uiBestPUMode;
    3238         dSecondBestPUCost = dBestPUCost;
    3239 #endif
    3240         uiBestPUMode  = uiOrgMode;
    3241         uiBestPUDistY = uiPUDistY;
    3242         uiBestPUDistC = uiPUDistC;
    3243         dBestPUCost   = dPUCost;
    3244        
     3237          uiSecondBestMode  = uiBestPUMode;
     3238          dSecondBestPUCost = dBestPUCost;
     3239#endif
     3240          uiBestPUMode  = uiOrgMode;
     3241          uiBestPUDistY = uiPUDistY;
     3242          uiBestPUDistC = uiPUDistC;
     3243          dBestPUCost   = dPUCost;
     3244
    32453245#if H_3D_DIM_SDC
    3246         if( pcCU->getSDCFlag(uiPartOffset) )
    3247         {
    3248           bBestUseSDC = true;
    3249          
    3250           // copy reconstruction
    3251           pcPredYuv->copyPartToPartYuv(pcRecoYuv, uiPartOffset, uiWidth, uiHeight);
    3252          
    3253           // copy DC values
    3254           apBestDCOffsets[0] = pcCU->getSDCSegmentDCOffset(0, uiPartOffset);
    3255           apBestDCOffsets[1] = pcCU->getSDCSegmentDCOffset(1, uiPartOffset);
    3256         }
    3257         else
    3258         {
    3259           bBestUseSDC = false;
    3260 #endif
    3261         xSetIntraResultQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcRecoYuv );
    3262        
    3263         UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> ( ( pcCU->getDepth(0) + uiInitTrDepth ) << 1 );
    3264         ::memcpy( m_puhQTTempTrIdx,  pcCU->getTransformIdx()       + uiPartOffset, uiQPartNum * sizeof( UChar ) );
    3265         ::memcpy( m_puhQTTempCbf[0], pcCU->getCbf( TEXT_LUMA     ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
    3266         ::memcpy( m_puhQTTempCbf[1], pcCU->getCbf( TEXT_CHROMA_U ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
    3267         ::memcpy( m_puhQTTempCbf[2], pcCU->getCbf( TEXT_CHROMA_V ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
    3268         ::memcpy( m_puhQTTempTransformSkipFlag[0], pcCU->getTransformSkip(TEXT_LUMA)     + uiPartOffset, uiQPartNum * sizeof( UChar ) );
    3269         ::memcpy( m_puhQTTempTransformSkipFlag[1], pcCU->getTransformSkip(TEXT_CHROMA_U) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
    3270         ::memcpy( m_puhQTTempTransformSkipFlag[2], pcCU->getTransformSkip(TEXT_CHROMA_V) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
     3246          if( pcCU->getSDCFlag(uiPartOffset) )
     3247          {
     3248            bBestUseSDC = true;
     3249
     3250            // copy reconstruction
     3251            pcPredYuv->copyPartToPartYuv(pcRecoYuv, uiPartOffset, uiWidth, uiHeight);
     3252
     3253            // copy DC values
     3254            apBestDCOffsets[0] = pcCU->getSDCSegmentDCOffset(0, uiPartOffset);
     3255            apBestDCOffsets[1] = pcCU->getSDCSegmentDCOffset(1, uiPartOffset);
     3256          }
     3257          else
     3258          {
     3259            bBestUseSDC = false;
     3260#endif
     3261            xSetIntraResultQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcRecoYuv );
     3262
     3263            UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> ( ( pcCU->getDepth(0) + uiInitTrDepth ) << 1 );
     3264            ::memcpy( m_puhQTTempTrIdx,  pcCU->getTransformIdx()       + uiPartOffset, uiQPartNum * sizeof( UChar ) );
     3265            ::memcpy( m_puhQTTempCbf[0], pcCU->getCbf( TEXT_LUMA     ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
     3266            ::memcpy( m_puhQTTempCbf[1], pcCU->getCbf( TEXT_CHROMA_U ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
     3267            ::memcpy( m_puhQTTempCbf[2], pcCU->getCbf( TEXT_CHROMA_V ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
     3268            ::memcpy( m_puhQTTempTransformSkipFlag[0], pcCU->getTransformSkip(TEXT_LUMA)     + uiPartOffset, uiQPartNum * sizeof( UChar ) );
     3269            ::memcpy( m_puhQTTempTransformSkipFlag[1], pcCU->getTransformSkip(TEXT_CHROMA_U) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
     3270            ::memcpy( m_puhQTTempTransformSkipFlag[2], pcCU->getTransformSkip(TEXT_CHROMA_V) + uiPartOffset, uiQPartNum * sizeof( UChar ) );
    32713271#if H_3D_DIM_SDC
    3272         }
    3273 #endif
    3274       }
     3272          }
     3273#endif
     3274        }
    32753275#if HHI_RQT_INTRA_SPEEDUP_MOD
    3276       else if( dPUCost < dSecondBestPUCost )
    3277       {
    3278         uiSecondBestMode  = uiOrgMode;
    3279         dSecondBestPUCost = dPUCost;
    3280       }
     3276        else if( dPUCost < dSecondBestPUCost )
     3277        {
     3278          uiSecondBestMode  = uiOrgMode;
     3279          dSecondBestPUCost = dPUCost;
     3280        }
    32813281#endif
    32823282#if H_3D_DIM_ENC || H_3D_DIM_SDC
Note: See TracChangeset for help on using the changeset viewer.