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


Ignore:
Timestamp:
2 Feb 2014, 06:01:53 (11 years ago)
Author:
seregin
Message:

merge with SHM-5.0-dev branch

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/source

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

    r540 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    323323#endif
    324324
    325 #if HM_CLEANUP_SAO
    326325    if ( pcSlice->getSPS()->getUseSAO() )
    327326    {
     
    358357      }
    359358    }
    360 #else
    361     if ( pcSlice->getSPS()->getUseSAO() && (pcSlice->getSaoEnabledFlag()||pcSlice->getSaoEnabledFlagChroma()) )
    362     {
    363       SAOParam *saoParam = rpcPic->getPicSym()->getSaoParam();
    364       saoParam->bSaoFlag[0] = pcSlice->getSaoEnabledFlag();
    365       if (iCUAddr == iStartCUAddr)
    366       {
    367         saoParam->bSaoFlag[1] = pcSlice->getSaoEnabledFlagChroma();
    368       }
    369       Int numCuInWidth     = saoParam->numCuInWidth;
    370       Int cuAddrInSlice = iCUAddr - rpcPic->getPicSym()->getCUOrderMap(pcSlice->getSliceCurStartCUAddr()/rpcPic->getNumPartInCU());
    371       Int cuAddrUpInSlice  = cuAddrInSlice - numCuInWidth;
    372       Int rx = iCUAddr % numCuInWidth;
    373       Int ry = iCUAddr / numCuInWidth;
    374       Int allowMergeLeft = 1;
    375       Int allowMergeUp   = 1;
    376       if (rx!=0)
    377       {
    378         if (rpcPic->getPicSym()->getTileIdxMap(iCUAddr-1) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr))
    379         {
    380           allowMergeLeft = 0;
    381         }
    382       }
    383       if (ry!=0)
    384       {
    385         if (rpcPic->getPicSym()->getTileIdxMap(iCUAddr-numCuInWidth) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr))
    386         {
    387           allowMergeUp = 0;
    388         }
    389       }
    390       pcSbacDecoder->parseSaoOneLcuInterleaving(rx, ry, saoParam,pcCU, cuAddrInSlice, cuAddrUpInSlice, allowMergeLeft, allowMergeUp);
    391     }
    392     else if ( pcSlice->getSPS()->getUseSAO() )
    393     {
    394       Int addr = pcCU->getAddr();
    395       SAOParam *saoParam = rpcPic->getPicSym()->getSaoParam();
    396       for (Int cIdx=0; cIdx<3; cIdx++)
    397       {
    398         SaoLcuParam *saoLcuParam = &(saoParam->saoLcuParam[cIdx][addr]);
    399         if ( ((cIdx == 0) && !pcSlice->getSaoEnabledFlag()) || ((cIdx == 1 || cIdx == 2) && !pcSlice->getSaoEnabledFlagChroma()))
    400         {
    401           saoLcuParam->mergeUpFlag   = 0;
    402           saoLcuParam->mergeLeftFlag = 0;
    403           saoLcuParam->subTypeIdx    = 0;
    404           saoLcuParam->typeIdx       = -1;
    405           saoLcuParam->offset[0]     = 0;
    406           saoLcuParam->offset[1]     = 0;
    407           saoLcuParam->offset[2]     = 0;
    408           saoLcuParam->offset[3]     = 0;
    409         }
    410       }
    411     }
    412 #endif
    413359
    414360    m_pcCuDecoder->decodeCU     ( pcCU, uiIsLast );
Note: See TracChangeset for help on using the changeset viewer.