Changeset 540 in SHVCSoftware for trunk/source/Lib/TLibDecoder/TDecSlice.cpp


Ignore:
Timestamp:
9 Jan 2014, 05:04:17 (11 years ago)
Author:
seregin
Message:

merge SHM-4.1-dev branch

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/source

  • trunk/source/Lib/TLibDecoder/TDecSlice.cpp

    r345 r540  
    197197  UInt uiTileLCUX;
    198198  Int iNumSubstreamsPerTile = 1; // if independent.
    199 
    200199  Bool depSliceSegmentsEnabled = rpcPic->getSlice(rpcPic->getCurrSliceIdx())->getPPS()->getDependentSliceSegmentsEnabledFlag();
    201200  uiTileStartLCU = rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iStartCUAddr))->getFirstCUAddr();
     
    323322    g_bJustDoIt = g_bEncDecTraceEnable;
    324323#endif
     324
     325#if HM_CLEANUP_SAO
     326    if ( pcSlice->getSPS()->getUseSAO() )
     327    {
     328      SAOBlkParam& saoblkParam = (rpcPic->getPicSym()->getSAOBlkParam())[iCUAddr];
     329      if (pcSlice->getSaoEnabledFlag()||pcSlice->getSaoEnabledFlagChroma())
     330      {
     331        Bool sliceEnabled[NUM_SAO_COMPONENTS];
     332        sliceEnabled[SAO_Y] = pcSlice->getSaoEnabledFlag();
     333        sliceEnabled[SAO_Cb]= sliceEnabled[SAO_Cr]= pcSlice->getSaoEnabledFlagChroma();
     334
     335        Bool leftMergeAvail = false;
     336        Bool aboveMergeAvail= false;
     337
     338        //merge left condition
     339        Int rx = (iCUAddr % uiWidthInLCUs);
     340        if(rx > 0)
     341        {
     342          leftMergeAvail = rpcPic->getSAOMergeAvailability(iCUAddr, iCUAddr-1);
     343        }
     344        //merge up condition
     345        Int ry = (iCUAddr / uiWidthInLCUs);
     346        if(ry > 0)
     347        {
     348          aboveMergeAvail = rpcPic->getSAOMergeAvailability(iCUAddr, iCUAddr-uiWidthInLCUs);
     349        }
     350
     351        pcSbacDecoder->parseSAOBlkParam( saoblkParam, sliceEnabled, leftMergeAvail, aboveMergeAvail);
     352      }
     353      else
     354      {
     355        saoblkParam[SAO_Y ].modeIdc = SAO_MODE_OFF;
     356        saoblkParam[SAO_Cb].modeIdc = SAO_MODE_OFF;
     357        saoblkParam[SAO_Cr].modeIdc = SAO_MODE_OFF;
     358      }
     359    }
     360#else
    325361    if ( pcSlice->getSPS()->getUseSAO() && (pcSlice->getSaoEnabledFlag()||pcSlice->getSaoEnabledFlagChroma()) )
    326362    {
     
    374410      }
    375411    }
     412#endif
     413
    376414    m_pcCuDecoder->decodeCU     ( pcCU, uiIsLast );
    377415    m_pcCuDecoder->decompressCU ( pcCU );
Note: See TracChangeset for help on using the changeset viewer.