Ignore:
Timestamp:
22 Jan 2014, 09:44:36 (10 years ago)
Author:
mediatek-htm
Message:

JCT3V-G0055 Integrated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-9.3-dev2-MediaTek/source/Lib/TLibDecoder/TDecSbac.cpp

    r773 r790  
    783783
    784784  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
    785 
     785#if MTK_TEX_DEP_PAR_G0055
     786  Bool depthDependent = false;
     787  UInt uiTexturePart = uiMode;
     788#endif
    786789  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC())
    787790  {
    788791    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
    789792    assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth);
     793#if !MTK_TEX_DEP_PAR_G0055
    790794    if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN)
     795#else
     796    if(pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth )
     797    {
     798      depthDependent = true;
     799      uiTexturePart = pcTextureCU->getPartitionSize( uiAbsPartIdx );
     800    }
     801    if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N)
     802#endif
    791803    {
    792804      bParsePartSize = false;
     
    796808#endif
    797809
    798  
     810
    799811  if ( pcCU->isIntra( uiAbsPartIdx ) )
    800812  {
     
    803815    {
    804816#endif
    805      uiSymbol = 1;
     817      uiSymbol = 1;
    806818      if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
    807819      {
     
    834846    {
    835847#endif
    836       UInt uiMaxNumBits = 2;
    837       if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) )
    838       {
    839         uiMaxNumBits ++;
    840       }
    841       for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
    842       {
    843         m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
    844         if ( uiSymbol )
    845         {
    846           break;
    847         }
    848         uiMode++;
    849       }
    850       eMode = (PartSize) uiMode;
    851       if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
    852       {
    853         if (eMode == SIZE_2NxN)
    854         {
    855           m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
    856           if (uiSymbol == 0)
     848#if MTK_TEX_DEP_PAR_G0055
     849      if (depthDependent==false || uiTexturePart == SIZE_NxN|| uiTexturePart == SIZE_2Nx2N)
     850      {
     851#endif
     852        UInt uiMaxNumBits = 2;
     853        if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) )
     854        {
     855          uiMaxNumBits ++;
     856        }
     857        for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
     858        {
     859          m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
     860          if ( uiSymbol )
    857861          {
    858             m_pcTDecBinIf->decodeBinEP(uiSymbol);
    859             eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
     862            break;
    860863          }
    861         }
    862         else if (eMode == SIZE_Nx2N)
    863         {
    864           m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
    865           if (uiSymbol == 0)
     864          uiMode++;
     865        }
     866        eMode = (PartSize) uiMode;
     867        if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     868        {
     869          if (eMode == SIZE_2NxN)
    866870          {
    867             m_pcTDecBinIf->decodeBinEP(uiSymbol);
    868             eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
     871            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
     872            if (uiSymbol == 0)
     873            {
     874              m_pcTDecBinIf->decodeBinEP(uiSymbol);
     875              eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
     876            }
    869877          }
    870         }
    871       }
     878          else if (eMode == SIZE_Nx2N)
     879          {
     880            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
     881            if (uiSymbol == 0)
     882            {
     883              m_pcTDecBinIf->decodeBinEP(uiSymbol);
     884              eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
     885            }
     886          }
     887        }
     888#if MTK_TEX_DEP_PAR_G0055
     889      }
     890      else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD)
     891      {
     892        UInt uiMaxNumBits = 1;
     893        if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     894        {
     895          uiMaxNumBits ++;
     896        }
     897        for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
     898        {
     899          m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
     900          if ( uiSymbol )
     901          {
     902            break;
     903          }
     904          uiMode++;
     905        }
     906        eMode = (PartSize) uiMode;
     907        if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==1 )
     908        {
     909          eMode = SIZE_2NxN;
     910        }
     911        else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0  && uiSymbol==0)
     912        {
     913          eMode = SIZE_2NxN;
     914        }
     915        else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==0)
     916        {
     917          m_pcTDecBinIf->decodeBinEP(uiSymbol);
     918          eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
     919        }
     920      }
     921      else if(uiTexturePart == SIZE_Nx2N|| uiTexturePart==SIZE_nLx2N || uiTexturePart==SIZE_nRx2N)
     922      {
     923        UInt uiMaxNumBits = 1;
     924        if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     925        {
     926          uiMaxNumBits ++;
     927        }
     928        for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
     929        {
     930          m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
     931          if ( uiSymbol )
     932          {
     933            break;
     934          }
     935          uiMode++;
     936        }
     937        eMode = (PartSize) uiMode;
     938        if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==1 )
     939        {
     940          eMode = SIZE_Nx2N;
     941        }
     942        else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0  && uiSymbol==0)
     943        {
     944          eMode = SIZE_Nx2N;
     945        }
     946        else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==0)
     947        {
     948          m_pcTDecBinIf->decodeBinEP(uiSymbol);
     949          eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
     950        }
     951      }
     952      else
     953        assert(0);
     954#endif
    872955#if H_MV_ENC_DEC_TRAC         
    873956      DTRACE_CU("part_mode", eMode )
Note: See TracChangeset for help on using the changeset viewer.