Changeset 1196 in 3DVCSoftware for trunk/source/Lib/TLibDecoder


Ignore:
Timestamp:
4 May 2015, 17:47:40 (10 years ago)
Author:
tech
Message:

Merged 14.0-dev0@1187.

Location:
trunk/source/Lib/TLibDecoder
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1179 r1196  
    3939#include "SEIread.h"
    4040#include "TDecSlice.h"
    41 #if H_3D_ANNEX_SELECTION_FIX
     41#if H_3D
    4242#include "TDecTop.h"
    4343#endif
     
    9393TDecCavlc::TDecCavlc()
    9494{
    95 #if !HHI_CAM_PARA_K0052
    96 #if H_3D
    97   m_aaiTempScale            = new Int* [ MAX_NUM_LAYERS ];
    98   m_aaiTempOffset           = new Int* [ MAX_NUM_LAYERS ];
    99   for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ )
    100   {
    101     m_aaiTempScale            [ uiVId ] = new Int [ MAX_NUM_LAYERS ];
    102     m_aaiTempOffset           [ uiVId ] = new Int [ MAX_NUM_LAYERS ];
    103   }
    104 #endif
    105 #endif
    10695}
    10796
    10897TDecCavlc::~TDecCavlc()
    10998{
    110 #if !HHI_CAM_PARA_K0052
    111 #if H_3D
    112   for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ )
    113   {
    114     delete [] m_aaiTempScale            [ uiVId ];
    115     delete [] m_aaiTempOffset           [ uiVId ];
    116   }
    117   delete [] m_aaiTempScale;
    118   delete [] m_aaiTempOffset;
    119 #endif
    120 #endif
    12199}
    122100
     
    10481026      READ_FLAG( uiCode, "qt_pred_flag" ); sps3dExt->setQtPredFlag( d, uiCode == 1 );
    10491027      READ_FLAG( uiCode, "inter_sdc_flag" ); sps3dExt->setInterSdcFlag( d, uiCode == 1 );
    1050 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
    10511028      READ_FLAG( uiCode, "intra_skip_flag" ); sps3dExt->setDepthIntraSkipFlag( d, uiCode == 1 );
    1052 #else
    1053       READ_FLAG( uiCode, "intra_single_flag" ); sps3dExt->setIntraSingleFlag( d, uiCode == 1 );
    1054 #endif
    10551029    }
    10561030  }
     
    10631037  READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
    10641038  READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 );
    1065 #if FIX_TICKET_95
    10661039  if (pcPPS->getPpsInferScalingListFlag())
    10671040  {
    10681041  READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );
    10691042  }
    1070 #else
    1071   READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );
    1072 #endif
    10731043
    10741044  UInt numRefLocOffsets;;
     
    13361306  }
    13371307
    1338 #if HHI_INTER_COMP_PRED_K0052
    13391308#if H_3D
    13401309  pcVPS->initViewCompLayer( );
    1341 #endif
    13421310#endif
    13431311
     
    19291897Void TDecCavlc::parseVPS3dExtension( TComVPS* pcVPS )
    19301898{
    1931 #if HHI_CAM_PARA_K0052
    19321899  UInt uiCode;   
    19331900  READ_UVLC( uiCode, "cp_precision"); pcVPS->setCpPrecision( uiCode ) ;
     
    19591926  }
    19601927  pcVPS->deriveCpPresentFlag();
    1961 #else
    1962   UInt uiCode;
    1963 
    1964   UInt uiCamParPrecision = 0;
    1965   Bool bCamParSlice      = false;
    1966   Bool bCamParPresentFlag = false;
    1967 
    1968   READ_UVLC( uiCamParPrecision, "cp_precision" );
    1969 #if HHI_VIEW_ID_LIST_I5_J0107
    1970   for (Int n = 1; n < pcVPS->getNumViews(); n++)
    1971   {
    1972     Int viewIndex = pcVPS->getViewOIdxList( n );
    1973 #else
    1974   for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++)
    1975   {
    1976 #endif
    1977     pcVPS->setCamParPresent         ( viewIndex, false );
    1978     pcVPS->setHasCamParInSliceHeader( viewIndex, false );
    1979     READ_FLAG( uiCode, "cp_present_flag[i]" );                  bCamParPresentFlag = ( uiCode == 1);
    1980     if ( bCamParPresentFlag )
    1981     {
    1982       READ_FLAG( uiCode, "cp_in_slice_segment_header_flag[i]" );          bCamParSlice = ( uiCode == 1);
    1983       if ( !bCamParSlice )
    1984       {
    1985 #if HHI_VIEW_ID_LIST_I5_J0107
    1986         for( UInt m = 0; m < n; n++ )
    1987         {
    1988           Int uiBaseIndex = pcVPS->getViewOIdxList ( m );
    1989           Int iCode;
    1990           READ_SVLC( iCode, "vps_cp_scale" );                m_aaiTempScale  [ uiBaseIndex ][ viewIndex ]   = iCode;
    1991           READ_SVLC( iCode, "vps_cp_off" );                  m_aaiTempOffset [ uiBaseIndex ][ viewIndex ]   = iCode;
    1992           READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale  [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];
    1993           READ_SVLC( iCode, "vps_cp_inv_off_plus_off" );     m_aaiTempOffset [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];
    1994         }
    1995       }
    1996       pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );
    1997 #else
    1998         for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )
    1999         {
    2000           Int iCode;
    2001           READ_SVLC( iCode, "vps_cp_scale" );                m_aaiTempScale  [ uiBaseIndex ][ viewIndex ]   = iCode;
    2002           READ_SVLC( iCode, "vps_cp_off" );                  m_aaiTempOffset [ uiBaseIndex ][ viewIndex ]   = iCode;
    2003           READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale  [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];
    2004           READ_SVLC( iCode, "vps_cp_inv_off_plus_off" );     m_aaiTempOffset [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];
    2005         }
    2006       }
    2007       pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );
    2008 #endif
    2009     }
    2010   }
    2011 #endif
    20121928}
    20131929#endif
     
    20701986#endif
    20711987  rpcSlice->setSPS(sps);
    2072 #if !HHI_INTER_COMP_PRED_K0052
    2073 #if H_3D
    2074   rpcSlice->init3dToolParameters();
    2075 #endif
    2076 #endif
    20771988  rpcSlice->setPPS(pps);
    20781989  if( pps->getDependentSliceSegmentsEnabledFlag() && ( !firstSliceSegmentInPic ))
     
    24682379      }
    24692380    }
    2470 #if HHI_INTER_COMP_PRED_K0052
    24712381#if H_3D
    24722382    if ( getDecTop()->decProcAnnexI() )
     
    24812391#endif
    24822392#endif
    2483 #endif
    24842393    if(sps->getUseSAO())
    24852394    {
     
    24882397      if( rpcSlice->getSPS()->getChromaFormatIdc() != 0 )
    24892398      {
    2490       READ_FLAG(uiCode, "slice_sao_chroma_flag");  rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode);
    2491     }
     2399        READ_FLAG(uiCode, "slice_sao_chroma_flag");  rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode);
     2400      }
    24922401      else
    24932402      {
    24942403        rpcSlice->setSaoEnabledFlagChroma( false );
    24952404      }
    2496      
    24972405#else
    24982406      READ_FLAG(uiCode, "slice_sao_chroma_flag");  rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode);
     
    26622570    }
    26632571#if H_3D_IC
    2664 #if H_3D_ANNEX_SELECTION_FIX
    26652572    else if(    rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE )
    26662573             && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0
    26672574             && getDecTop()->decProcAnnexI()
    26682575           )
    2669 #else
    2670     else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )
    2671 #endif
    26722576    {
    26732577      UInt uiCodeTmp = 0;
     
    27662670    rpcSlice->setLFCrossSliceBoundaryFlag( (uiCode==1)?true:false);
    27672671
    2768 #if HHI_CAM_PARA_K0052
    27692672#if H_3D
    27702673    if ( getDecTop()->decProcAnnexI() )
     
    27842687    }
    27852688#endif
    2786 #endif
    27872689  }
    27882690 
     
    28082710  }
    28092711
    2810 #if !HHI_CAM_PARA_K0052
    2811 #if H_3D
    2812 #if H_3D_FCO
    2813   if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && rpcSlice->getIsDepth() )
    2814 #else
    2815   if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && !rpcSlice->getIsDepth() )
    2816 #endif
    2817   {
    2818     UInt uiViewIndex = rpcSlice->getViewIndex();
    2819     for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
    2820     {
    2821       READ_SVLC( iCode, "cp_scale" );                m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ] = iCode;
    2822       READ_SVLC( iCode, "cp_off" );                  m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ] = iCode;
    2823       READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ];
    2824       READ_SVLC( iCode, "cp_inv_off_plus_off" );     m_aaiTempOffset[ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ];
    2825     }
    2826     rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset );
    2827   }
    2828 #endif
    2829 #endif
    28302712
    28312713  if(pps->getSliceHeaderExtensionPresentFlag())
     
    31002982  assert(0);
    31012983}
    3102 
    3103 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2984#if H_3D
    31042985Void TDecCavlc::parseDIS( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
    31052986{
    31062987  assert(0);
    31072988}
    3108 #else
    3109 #if H_3D_SINGLE_DEPTH
    3110 Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
    3111 {
    3112   assert(0);
    3113 }
    3114 #endif
    31152989#endif
    31162990
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r1179 r1196  
    5252// Class definition
    5353// ====================================================================================================================
    54 #if H_3D_ANNEX_SELECTION_FIX
     54#if H_3D
    5555class TDecTop;
    5656#endif
    57 
    5857/// CAVLC decoder class
    5958class TDecCavlc : public SyntaxElementParser, public TDecEntropyIf
     
    6665  void  parseShortTermRefPicSet            (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx);
    6766 
    68 
    69 #if !HHI_CAM_PARA_K0052
    7067#if H_3D
    71   Int**    m_aaiTempScale;
    72   Int**    m_aaiTempOffset;
    73 #endif
    74 #endif
    75 #if H_3D_ANNEX_SELECTION_FIX
    7668  TDecTop*  m_decTop;
    7769#endif
     
    118110  Void  parsePPS            ( TComPPS* pcPPS);
    119111#endif
    120 #if H_3D_ANNEX_SELECTION_FIX
     112#if H_3D
    121113  Void  setDecTop           ( TDecTop* decTop ) { m_decTop = decTop; };
    122114#endif
     
    136128 
    137129  Void  parseSkipFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    138 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     130#if H_3D
    139131  Void  parseDIS            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    140 #else
    141 #if H_3D_SINGLE_DEPTH
    142   Void  parseSingleDepthMode        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    143 #endif
    144132#endif
    145133  Void  parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    182170  Void  parseScalingList               ( TComScalingList* scalingList );
    183171  Void xDecodeScalingList    ( TComScalingList *scalingList, UInt sizeId, UInt listId);
    184 
    185 #if H_3D_ANNEX_SELECTION_FIX
     172#if H_3D
    186173  TDecTop*  getDecTop()      { return m_decTop; };
    187174#endif
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r1179 r1196  
    310310#if H_3D_NBDV
    311311  DisInfo DvInfo;
    312 #if !SEC_ARP_REM_ENC_RESTRICT_K0035
    313   DvInfo.bDV = false;
    314 #endif
    315312  DvInfo.m_acNBDV.setZero();
    316313  DvInfo.m_aVIdxCan = 0;
     
    347344      if( pcCU->getSlice()->getIsDepth())
    348345      {
    349 #if SEC_ARP_REM_ENC_RESTRICT_K0035
    350346        m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);
    351 #else
    352         DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);
    353 #endif
    354347      }
    355348      else
     
    359352      if( pcCU->getSlice()->getDepthBasedBlkPartFlag() )  //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done.
    360353      {
    361 #if SEC_ARP_REM_ENC_RESTRICT_K0035
    362354        m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);
    363 #else
    364         DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);
    365 #endif
    366355      }
    367356      else
    368357#endif
    369358      {
    370 #if SEC_ARP_REM_ENC_RESTRICT_K0035
    371359        m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
    372 #else
    373         DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
    374 #endif
    375360      }
    376361#if H_3D_IV_MERGE
     
    545530    return;
    546531  }
    547 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     532#if H_3D
    548533  m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth );
    549534  if(!pcCU->getDISFlag(uiAbsPartIdx))
    550535  {
    551 #else
    552 #if H_3D_SINGLE_DEPTH
    553   m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
    554   if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
    555   {
    556 #endif
    557536#endif
    558537  m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
    559538  m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );
    560539
    561 #if !HHI_MOVE_SYN_K0052
    562 #if H_3D_DIM_SDC
    563   m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    564 #endif
    565 #endif
    566540  if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
    567541  {
     
    570544    if(pcCU->getIPCMFlag(uiAbsPartIdx))
    571545    {
    572 #if HHI_MOVE_SYN_K0052
    573546#if H_3D_DIM_SDC
    574547      m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    575 #endif
    576548#endif
    577549      xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
     
    593565  m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP );
    594566  setdQPFlag( bCodeDQP );
    595 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
    596   }
    597 #else
    598 #if H_3D_SINGLE_DEPTH
    599   }
    600 #endif
     567#if H_3D
     568  }
    601569#endif
    602570  xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
     
    625593  UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
    626594  UInt uiBPelY   = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1;
    627  
     595
    628596  UInt uiCurNumParts    = pcPic->getNumPartInCU() >> (uiDepth<<1);
    629597  TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx());
     
    633601    bBoundary = true;
    634602  }
    635  
     603
    636604  if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth ) ) || bBoundary )
    637605  {
     
    643611      uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiIdx] ];
    644612      uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ];
    645      
     613
    646614      Bool binSlice = (pcCU->getSCUAddr()+uiIdx+uiQNumParts>pcSlice->getSliceSegmentCurStartCUAddr())&&(pcCU->getSCUAddr()+uiIdx<pcSlice->getSliceSegmentCurEndCUAddr());
    647615      if(binSlice&&( uiLPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
     
    649617        xDecompressCU(pcCU, uiIdx, uiNextDepth );
    650618      }
    651      
     619
    652620      uiIdx += uiQNumParts;
    653621    }
     
    657625  // Residual reconstruction
    658626  m_ppcYuvResi[uiDepth]->clear();
    659  
     627
    660628  m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth );
    661629
    662630  switch( m_ppcCU[uiDepth]->getPredictionMode(0) )
    663631  {
    664     case MODE_INTER:
     632  case MODE_INTER:
    665633#if H_3D_DBBP
    666       if( m_ppcCU[uiDepth]->getDBBPFlag(0) )
    667       {
    668         xReconInterDBBP( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
    669       }
    670       else
    671       {
     634    if( m_ppcCU[uiDepth]->getDBBPFlag(0) )
     635    {
     636      xReconInterDBBP( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
     637    }
     638    else
     639    {
    672640#endif
    673641#if H_3D_INTER_SDC
     
    679647      {
    680648#endif
    681       xReconInter( m_ppcCU[uiDepth], uiDepth );
     649        xReconInter( m_ppcCU[uiDepth], uiDepth );
    682650#if H_3D_INTER_SDC
    683651      }
    684652#endif
    685653#if H_3D_DBBP
    686       }
    687 #endif
    688       break;
    689     case MODE_INTRA:
    690 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
    691       if( m_ppcCU[uiDepth]->getDISFlag(0) )
    692       {
    693         xReconDIS( m_ppcCU[uiDepth], 0, uiDepth );
    694       }
     654    }
     655#endif
     656    break;
     657  case MODE_INTRA:
     658#if H_3D
     659    if( m_ppcCU[uiDepth]->getDISFlag(0) )
     660    {
     661      xReconDIS( m_ppcCU[uiDepth], 0, uiDepth );
     662    }
    695663#if H_3D_DIM_SDC
    696       else if( m_ppcCU[uiDepth]->getSDCFlag(0) )
    697       {
    698         xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
    699       }
    700 #endif
    701       else
    702 #else
    703 #if H_3D_SINGLE_DEPTH
    704       if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) )
    705         xReconIntraSingleDepth( m_ppcCU[uiDepth], 0, uiDepth );
    706 #if H_3D_DIM_SDC
    707       else if( m_ppcCU[uiDepth]->getSDCFlag(0) )
    708         xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
    709 #endif
    710       else
    711 #else
    712 #if H_3D_DIM_SDC
    713       if( m_ppcCU[uiDepth]->getSDCFlag(0) )
    714         xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
    715       else
    716 #endif
    717 #endif
     664    else if( m_ppcCU[uiDepth]->getSDCFlag(0) )
     665    {
     666      xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
     667    }
     668#endif
     669    else
    718670#endif
    719671      xReconIntraQT( m_ppcCU[uiDepth], uiDepth );
    720       break;
    721     default:
    722       assert(0);
    723       break;
     672    break;
     673  default:
     674    assert(0);
     675    break;
    724676  }
    725677  if ( m_ppcCU[uiDepth]->isLosslessCoded(0) && (m_ppcCU[uiDepth]->getIPCMFlag(0) == false))
     
    727679    xFillPCMBuffer(m_ppcCU[uiDepth], uiDepth);
    728680  }
    729  
     681
    730682  xCopyToPic( m_ppcCU[uiDepth], pcPic, uiAbsPartIdx, uiDepth );
    731683}
     
    751703}
    752704
    753 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     705#if H_3D
    754706Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    755707{
     
    828780  }
    829781}
    830 #else
    831 #if H_3D_SINGLE_DEPTH
    832 Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    833 {
    834   UInt uiWidth        = pcCU->getWidth  ( 0 );
    835   UInt uiHeight       = pcCU->getHeight ( 0 );
    836 
    837   TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
    838 
    839   UInt    uiStride    = pcRecoYuv->getStride  ();
    840   Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
    841 
    842 
    843   AOF( uiWidth == uiHeight );
    844   AOF( uiAbsPartIdx == 0 );
    845 
    846   //construction of depth candidates
    847   Pel testDepth;
    848   Pel DepthNeighbours[2];
    849   Int index =0;
    850   for( Int i = 0; (i < 2) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ )
    851   {
    852     if(!pcCU->getNeighDepth (0, uiAbsPartIdx, &testDepth, i))
    853     {
    854       continue;
    855     }
    856     DepthNeighbours[index]=testDepth;
    857     index++;
    858   }
    859 
    860   if(index==0)
    861   {
    862     DepthNeighbours[index]=1<<(g_bitDepthY-1);
    863     index++;
    864   }
    865 
    866   if(index==1)
    867   {
    868     DepthNeighbours[index]=ClipY(DepthNeighbours[0] + 1 );
    869     index++;
    870   }
    871 
    872   for( UInt uiY = 0; uiY < uiHeight; uiY++ )
    873   {
    874     for( UInt uiX = 0; uiX < uiWidth; uiX++ )
    875     {
    876       piReco[ uiX ] =DepthNeighbours[(Int)pcCU->getSingleDepthValue(uiAbsPartIdx)];
    877     }
    878     piReco     += uiStride;
    879   }
    880 
    881   // clear UV
    882   UInt  uiStrideC     = pcRecoYuv->getCStride();
    883   Pel   *pRecCb       = pcRecoYuv->getCbAddr();
    884   Pel   *pRecCr       = pcRecoYuv->getCrAddr();
    885 
    886   for (Int y=0; y<uiHeight/2; y++)
    887   {
    888     for (Int x=0; x<uiWidth/2; x++)
    889     {
    890       pRecCb[x] = 1<<(g_bitDepthC-1);
    891       pRecCr[x] = 1<<(g_bitDepthC-1);
    892     }
    893 
    894     pRecCb += uiStrideC;
    895     pRecCr += uiStrideC;
    896   }
    897 }
    898 #endif
    899 #endif
    900 
     782#endif
    901783#if H_3D_INTER_SDC
    902784Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    962844  // compute mask by segmenting depth block
    963845  Bool pMask[MAX_CU_SIZE*MAX_CU_SIZE];
    964 #if HS_DBBP_CLEAN_K0048
    965846  Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask, pcCU);
    966 #else
    967   Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask);
    968 #endif
    969847  AOF(bValidMask);
    970848 
    971   DBBPTmpData* pDBBPTmpData = pcCU->getDBBPTmpData();
     849  DbbpTmpData* pDBBPTmpData = pcCU->getDBBPTmpData();
    972850  TComYuv* apSegPredYuv[2] = { m_ppcYuvReco[uiDepth], m_ppcYuvRecoDBBP[uiDepth] };
    973851 
  • trunk/source/Lib/TLibDecoder/TDecCu.h

    r1179 r1196  
    123123  Void setdQPFlag               ( Bool b )                { m_bDecodeDQP = b;           }
    124124  Void xFillPCMBuffer           (TComDataCU* pCU, UInt depth);
    125 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     125#if H_3D
    126126  Void xReconDIS               ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    127 #else
    128 #if H_3D_SINGLE_DEPTH
    129   Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    130 #endif
    131127#endif
    132128#if H_3D_DIM_SDC
  • trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1179 r1196  
    5252  m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
    5353}
    54 
    55 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     54#if H_3D
    5655Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    5756{
     
    6362  m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth );
    6463}
    65 #else
    66 #if H_3D_SINGLE_DEPTH
    67 Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    68 {
    69   if( !pcCU->getSlice()->getIntraSingleFlag() )
    70   {
    71     return;
    72   } 
    73 
    74   m_pcEntropyDecoderIf->parseSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
    75 }
    76 #endif
    7764#endif
    7865
     
    161148{
    162149  m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth );
    163 #if !HHI_MOVE_SYN_K0052 
    164 #if H_3D_DBBP
    165 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
    166   {
    167     decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);
    168   }
    169 #endif
    170 #endif
    171150}
    172151
     
    176155  {
    177156    decodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx, uiDepth );
    178 #if HHI_MOVE_SYN_K0052
     157#if H_3D_DIM_SDC
    179158    decodeSDCFlag   ( pcCU, uiAbsPartIdx, uiDepth );   
    180 #endif
    181 #if H_3D_DIM_SDC
    182159#if H_3D_DISABLE_CHROMA
    183 #if !HHI_MOVE_SYN_K0052
    184     if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() )
    185 #else
    186160    if(!pcCU->getSDCFlag(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0  )
    187 #endif
    188161#else
    189162    if(!pcCU->getSDCFlag(uiAbsPartIdx))
     
    247220#endif
    248221#if H_3D_SPIVMP
    249   Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
    250   TComMvField*  pcMvFieldSP;
    251   UChar* puhInterDirSP;
    252   pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2];
    253   puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()];
     222  Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];     
     223  TComMvField*  pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2];
     224  UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()];
    254225#endif
    255226  for ( UInt ui = 0; ui < pcCU->getSlice()->getMaxNumMergeCand(); ui++ )
     
    265236  pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx);
    266237#endif
    267 #if HHI_MOVE_SYN_K0052
     238#if H_3D
    268239  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
    269240  {
     
    475446      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
    476447      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    477 #if H_3D_ARP
    478       decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    479 #endif
    480 #if H_3D_IC
    481       decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    482 #endif
    483 #if H_3D_DBBP
    484       if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )
    485 #else
    486448      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 )
    487 #endif
    488449      {
    489450        pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
    490451        if ( !isMerged )
    491452        {
    492 #if H_3D_VSP
    493           Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    494           memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    495 #if H_3D_SPIVMP
    496           memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    497 #endif
    498           pcSubCU->initAvailableFlags();
    499           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    500           pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
    501 #if H_3D_SPIVMP
    502             , pcMvFieldSP, puhInterDirSP
    503 #endif
    504             , numValidMergeCand );
    505           pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
    506 #if H_3D_SPIVMP
    507             , bSPIVMPFlag
    508 #endif
    509             , numValidMergeCand );
    510           pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    511 
    512 #else
    513 #if H_3D
    514           pcSubCU->initAvailableFlags();
    515           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    516           pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    517 
    518 #else
    519453          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    520 #endif
    521 #endif
    522454          isMerged = true;
    523455        }
     
    527459      {
    528460        uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    529 #if H_3D_VSP
    530         Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    531         memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    532 #if H_3D_SPIVMP
    533         memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    534 #endif
    535         pcSubCU->initAvailableFlags();
    536461        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    537         pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
    538 #if H_3D_SPIVMP
    539           , pcMvFieldSP, puhInterDirSP
    540 #endif
    541           ,numValidMergeCand, uiMergeIndex );
    542         pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
    543 #if H_3D_SPIVMP
    544           , bSPIVMPFlag
    545 #endif
    546           ,numValidMergeCand );
    547         pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    548 #else
    549 #if H_3D
    550         pcSubCU->initAvailableFlags();
    551         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    552         pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    553 #else
    554         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    555 #endif
    556 #endif
    557462      }
    558463      pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
     
    567472          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    568473          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    569 #if H_3D_VSP
    570 #if H_3D_DBBP
    571           if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) )
    572 #else
    573           if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 )
    574 #endif
    575           {
    576             if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) )
    577             {
    578               UInt dummy;
    579               Int vspSize;
    580               Int width, height;
    581               pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 );
    582               pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize );
    583               pcCU->setVSPFlag( uiSubPartIdx, vspSize );
    584             }
    585           }
    586 #endif
    587         }
    588       }
    589 #if H_3D_SPIVMP
    590       pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 
    591       if (bSPIVMPFlag[uiMergeIndex] != 0)
    592       {
    593         Int iWidth, iHeight;
    594         UInt uiIdx;
    595         pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true );
    596 
    597         UInt uiSPAddr;
    598 
    599         Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
    600 
    601         pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
    602 
    603         for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++)
    604         {
    605           pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr);
    606           pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight);
    607           pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight);
    608           pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight);
    609         }
    610       }
    611 #endif
     474        }
     475      }
    612476    }
    613477    else
     
    623487        }
    624488      }
    625 #if H_3D_ARP
    626       decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    627 #endif
    628 #if H_3D_IC
    629       decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    630 #endif
    631489    }
    632490    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) )
     
    706564}
    707565
    708 #if HHI_MOVE_SYN_K0052
     566#if H_3D
    709567Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
    710568{
     
    753611  pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx);
    754612}
    755 
    756613#else
    757614Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
     
    798655}
    799656#endif
     657
    800658Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU)
    801659{
     
    869727      if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 )     
    870728      {
    871       if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
    872       {
    873         m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth );
    874       }
    875       if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )
    876       {
    877         m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );
    878       }
    879     }
    880     else
    881     {
     729        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
     730        {
     731          m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth );
     732        }
     733        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )
     734        {
     735          m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );
     736        }
     737      }
     738      else
     739      {
    882740        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
    883741        {
     
    1131989{
    1132990  pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth );
    1133 #if HHI_MOVE_SYN_K0052
    1134991  if ( pcCU->isSkipped( uiAbsPartIdx ) )
    1135992  {
    1136993    return;
    1137994  }
    1138 #endif
    1139995
    1140996
     
    11571013Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    11581014{
    1159 #if HHI_MOVE_SYN_K0052
    11601015  if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
    11611016  {
    1162 #endif
    11631017    m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth );
    1164 #if HHI_MOVE_SYN_K0052
    1165   }
    1166 #endif
     1018  }
    11671019}
    11681020#endif
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r1179 r1196  
    8585public:
    8686  virtual Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    87 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     87#if H_3D
    8888  virtual Void parseDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    89 #else
    90 #if H_3D_SINGLE_DEPTH
    91   virtual Void parseSingleDepthMode       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    92 #endif
    9389#endif
    9490  virtual Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     
    152148  Void decodeMvdPU        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    153149  Void decodeMVPIdxPU     ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    154 #if HHI_MOVE_SYN_K0052
    155   Void decodeMvsAMVP       ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    156 #endif 
     150#if H_3D
     151  Void decodeMvsAMVP       ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx,
     152RefPicList eRefList );
     153#endif
    157154  Void    setEntropyDecoder           ( TDecEntropyIf* p );
    158155  Void    setBitstream                ( TComInputBitstream* p ) { m_pcEntropyDecoderIf->setBitstream(p);                    }
     
    177174  Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    178175  Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    179 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     176#if H_3D
    180177  Void decodeDIS               ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;
    181 #else
    182 #if H_3D_SINGLE_DEPTH
    183   Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;
    184 #endif
    185178#endif
    186179  Void decodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • trunk/source/Lib/TLibDecoder/TDecGop.h

    r1179 r1196  
    6363// Class definition
    6464// ====================================================================================================================
    65 #if H_3D_ANNEX_SELECTION_FIX
     65#if H_3D
    6666class TDecTop;
    6767#endif
     
    8383  TDecSlice*            m_pcSliceDecoder;
    8484  TComLoopFilter*       m_pcLoopFilter;
    85 #if H_3D_ANNEX_SELECTION_FIX
     85#if H_3D
    8686  TDecTop*              m_decTop;
    8787#endif
  • trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r1179 r1196  
    5252, m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels )
    5353, m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    54 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     54#if H_3D
    5555, m_cCUDISFlagSCModel         ( 1,             1,               NUM_DIS_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    5656, m_cCUDISTypeSCModel         ( 1,             1,               NUM_DIS_TYPE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    57 #else
    58 #if H_3D_SINGLE_DEPTH
    59 , m_cCUSingleDepthFlagSCModel        ( 1,             1,               NUM_SINGLEDEPTH_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    60 , m_cSingleDepthValueSCModel         ( 1,             1,               NUM_SINGLE_DEPTH_VALUE_DATA_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
    61 #endif
    6257#endif
    6358, m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        , m_contextModels + m_numContextModels, m_numContextModels)
     
    141136  m_cCUSplitFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    142137  m_cCUSkipFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SKIP_FLAG );
    143 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     138#if H_3D
    144139  m_cCUDISFlagSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_DIS_FLAG );
    145140  m_cCUDISTypeSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_DIS_TYPE );
    146 #else
    147 #if H_3D_SINGLE_DEPTH
    148   m_cCUSingleDepthFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    149   m_cSingleDepthValueSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
    150 #endif
    151141#endif
    152142  m_cCUMergeFlagExtSCModel.initBuffer    ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT );
     
    217207  m_cCUSplitFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG );
    218208  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
    219 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     209#if H_3D
    220210  m_cCUDISFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG );
    221211  m_cCUDISTypeSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );
    222 #else
    223 #if H_3D_SINGLE_DEPTH
    224   m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    225   m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
    226 #endif
    227212#endif
    228213  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT );
     
    461446  UInt uiSymbol;
    462447
    463     m_pcTDecBinIf->decodeBinTrm(uiSymbol);
     448  m_pcTDecBinIf->decodeBinTrm(uiSymbol);
    464449
    465450#if H_MV_ENC_DEC_TRAC
    466       DTRACE_CU("pcm_flag", uiSymbol)
    467 #endif
    468     if (uiSymbol)
    469     {
     451  DTRACE_CU("pcm_flag", uiSymbol)
     452#endif
     453  if (uiSymbol)
     454  {
    470455    Bool bIpcmFlag = true;
    471456
     
    500485      piPCMSample += uiWidth;
    501486    }
    502 
    503 
    504487#if H_3D_DISABLE_CHROMA
    505488    if( pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 )
    506489    {   
    507490#endif
    508     piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;
    509     uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
    510     uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
    511     uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
    512 
    513     for(uiY = 0; uiY < uiHeight; uiY++)
    514     {
    515       for(uiX = 0; uiX < uiWidth; uiX++)
    516       {
    517         UInt uiSample;
    518         m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample);
    519         piPCMSample[uiX] = uiSample;
    520       }
    521       piPCMSample += uiWidth;
    522     }
    523 
    524     piPCMSample = pcCU->getPCMSampleCr() + uiChromaOffset;
    525     uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
    526     uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
    527     uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
    528 
    529     for(uiY = 0; uiY < uiHeight; uiY++)
    530     {
    531       for(uiX = 0; uiX < uiWidth; uiX++)
    532       {
    533         UInt uiSample;
    534         m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample);
    535         piPCMSample[uiX] = uiSample;
    536       }
    537       piPCMSample += uiWidth;
    538     }
     491      piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;
     492      uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
     493      uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
     494      uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
     495
     496      for(uiY = 0; uiY < uiHeight; uiY++)
     497      {
     498        for(uiX = 0; uiX < uiWidth; uiX++)
     499        {
     500          UInt uiSample;
     501          m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample);
     502          piPCMSample[uiX] = uiSample;
     503        }
     504        piPCMSample += uiWidth;
     505      }
     506
     507      piPCMSample = pcCU->getPCMSampleCr() + uiChromaOffset;
     508      uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
     509      uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
     510      uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
     511
     512      for(uiY = 0; uiY < uiHeight; uiY++)
     513      {
     514        for(uiX = 0; uiX < uiWidth; uiX++)
     515        {
     516          UInt uiSample;
     517          m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample);
     518          piPCMSample[uiX] = uiSample;
     519        }
     520        piPCMSample += uiWidth;
     521      }
    539522#if H_3D_DISABLE_CHROMA
    540523    }
    541524#endif
    542 
    543 
    544525    m_pcTDecBinIf->start();
    545526  }
     
    594575#endif
    595576}
    596 
    597 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     577#if H_3D
    598578Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    599579{
     
    639619  }
    640620}
    641 #else
    642 #if H_3D_SINGLE_DEPTH
    643 Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    644 {
    645   pcCU->setSingleDepthFlagSubParts( false,        uiAbsPartIdx, uiDepth );
    646   UInt uiSymbol = 0;
    647   m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSingleDepthFlagSCModel.get( 0, 0, 0 ) );
    648   if( uiSymbol )
    649   {
    650     pcCU->setSingleDepthFlagSubParts( true,        uiAbsPartIdx, uiDepth );
    651     pcCU->setSkipFlagSubParts( false,        uiAbsPartIdx, uiDepth );
    652     pcCU->setSDCFlagSubParts( false,        uiAbsPartIdx, uiDepth );
    653     pcCU->setPredModeSubParts( MODE_INTRA,  uiAbsPartIdx, uiDepth );
    654     pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    655     pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth );
    656     pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
    657     pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
    658     pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth);
    659     pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth);
    660 
    661     UInt absValDeltaDC = 0;
    662 
    663     UInt uiUnaryIdx = 0;
    664     UInt uiNumCand = SINGLE_DEPTH_MODE_CAND_LIST_SIZE;
    665     if ( uiNumCand > 1 )
    666     {
    667       for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx )
    668       {
    669         UInt uiSymbol2 = 0;
    670         if ( uiUnaryIdx==0 )
    671         {
    672           m_pcTDecBinIf->decodeBin( uiSymbol2, m_cSingleDepthValueSCModel.get( 0, 0, 0 ) );
    673         }
    674         else
    675         {
    676           m_pcTDecBinIf->decodeBinEP( uiSymbol2);
    677         }
    678         if( uiSymbol2 == 0 )
    679         {
    680           break;
    681         }
    682       }
    683     }
    684     absValDeltaDC = uiUnaryIdx;
    685     pcCU->setSingleDepthValueSubParts((Pel)absValDeltaDC,uiAbsPartIdx, 0, uiDepth);
    686   }
    687 }
    688 #endif
    689 #endif
    690 
     621#endif
    691622/** parse merge flag
    692623 * \param pcCU
     
    772703#if H_3D_QTLPC
    773704  Bool bParseSplitFlag    = true;
    774 
    775  
    776705  Bool    bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag();
    777706  TComPic *pcTexture      = pcCU->getSlice()->getTexturePic();
     
    810739#endif
    811740  pcCU->setDepthSubParts( uiDepth + uiSymbol, uiAbsPartIdx );
    812  
     741
    813742  return;
    814743}
     
    827756#if H_3D_QTLPC
    828757  Bool bParsePartSize    = true;
    829  
     758
    830759  Bool    bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag();
    831760  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
     
    859788#endif
    860789
    861  
     790
    862791  if ( pcCU->isIntra( uiAbsPartIdx ) )
    863792  {
     
    866795    {
    867796#endif
    868      uiSymbol = 1;
     797      uiSymbol = 1;
    869798      if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
    870799      {
     
    899828      {
    900829#endif
    901       UInt uiMaxNumBits = 2;
    902       if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) )
    903       {
    904         uiMaxNumBits ++;
    905       }
    906       for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
    907       {
    908         m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
    909         if ( uiSymbol )
    910         {
    911           break;
    912         }
    913         uiMode++;
    914       }
    915       eMode = (PartSize) uiMode;
    916       if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
    917       {
    918         if (eMode == SIZE_2NxN)
    919         {
    920         m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 ));
    921           if (uiSymbol == 0)
     830        UInt uiMaxNumBits = 2;
     831        if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) )
     832        {
     833          uiMaxNumBits ++;
     834        }
     835        for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
     836        {
     837          m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
     838          if ( uiSymbol )
    922839          {
    923             m_pcTDecBinIf->decodeBinEP(uiSymbol);
    924             eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
     840            break;
    925841          }
    926         }
    927         else if (eMode == SIZE_Nx2N)
    928         {
    929         m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 ));
    930           if (uiSymbol == 0)
     842          uiMode++;
     843        }
     844        eMode = (PartSize) uiMode;
     845        if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     846        {
     847          if (eMode == SIZE_2NxN)
    931848          {
    932             m_pcTDecBinIf->decodeBinEP(uiSymbol);
    933             eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
     849            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 ));
     850            if (uiSymbol == 0)
     851            {
     852              m_pcTDecBinIf->decodeBinEP(uiSymbol);
     853              eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
     854            }
    934855          }
    935         }
    936       }
     856          else if (eMode == SIZE_Nx2N)
     857          {
     858            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 ));
     859            if (uiSymbol == 0)
     860            {
     861              m_pcTDecBinIf->decodeBinEP(uiSymbol);
     862              eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
     863            }
     864          }
     865        }
    937866#if H_3D_QTLPC
    938867      }
     
    1060989    {
    1061990#endif
    1062     m_pcTDecBinIf->decodeBin( symbol, m_cCUIntraPredSCModel.get( 0, 0, 0) );
    1063     mpmPred[j] = symbol;
     991      m_pcTDecBinIf->decodeBin( symbol, m_cCUIntraPredSCModel.get( 0, 0, 0) );
     992      mpmPred[j] = symbol;
    1064993#if H_MV_ENC_DEC_TRAC         
    1065     DTRACE_CU("prev_intra_luma_pred_flag", symbol)
     994      DTRACE_CU("prev_intra_luma_pred_flag", symbol)
    1066995#endif
    1067996#if H_3D_DIM
     
    10751004    {
    10761005#endif
    1077     Int preds[3] = {-1, -1, -1};
    1078     Int predNum = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds); 
    1079     if (mpmPred[j])
    1080     {
    1081       m_pcTDecBinIf->decodeBinEP( symbol );
    1082       if (symbol)
     1006      Int preds[3] = {-1, -1, -1};
     1007      Int predNum = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds); 
     1008      if (mpmPred[j])
    10831009      {
    10841010        m_pcTDecBinIf->decodeBinEP( symbol );
    1085         symbol++;
    1086       }
     1011        if (symbol)
     1012        {
     1013          m_pcTDecBinIf->decodeBinEP( symbol );
     1014          symbol++;
     1015        }
    10871016#if H_MV_ENC_DEC_TRAC         
    1088       DTRACE_CU("mpm_idx", symbol)
    1089 #endif
    1090       intraPredMode = preds[symbol];
    1091     }
    1092     else
    1093     {
    1094       m_pcTDecBinIf->decodeBinsEP( symbol, 5 );
    1095       intraPredMode = symbol;
     1017        DTRACE_CU("mpm_idx", symbol)
     1018#endif
     1019          intraPredMode = preds[symbol];
     1020      }
     1021      else
     1022      {
     1023        m_pcTDecBinIf->decodeBinsEP( symbol, 5 );
     1024        intraPredMode = symbol;
    10961025#if H_MV_ENC_DEC_TRAC         
    1097       DTRACE_CU("rem_intra_luma_pred_mode", symbol)
     1026        DTRACE_CU("rem_intra_luma_pred_mode", symbol)
    10981027#endif       
    1099       //postponed sorting of MPMs (only in remaining branch)
    1100       if (preds[0] > preds[1])
    1101       {
    1102         std::swap(preds[0], preds[1]);
    1103       }
    1104       if (preds[0] > preds[2])
    1105       {
    1106         std::swap(preds[0], preds[2]);
    1107       }
    1108       if (preds[1] > preds[2])
    1109       {
    1110         std::swap(preds[1], preds[2]);
    1111       }
    1112       for ( Int i = 0; i < predNum; i++ )
    1113       {
    1114         intraPredMode += ( intraPredMode >= preds[i] );
    1115       }
    1116     }
    1117     pcCU->setLumaIntraDirSubParts( (UChar)intraPredMode, absPartIdx+partOffset*j, depth );
     1028          //postponed sorting of MPMs (only in remaining branch)
     1029          if (preds[0] > preds[1])
     1030          {
     1031            std::swap(preds[0], preds[1]);
     1032          }
     1033          if (preds[0] > preds[2])
     1034          {
     1035            std::swap(preds[0], preds[2]);
     1036          }
     1037          if (preds[1] > preds[2])
     1038          {
     1039            std::swap(preds[1], preds[2]);
     1040          }
     1041          for ( Int i = 0; i < predNum; i++ )
     1042          {
     1043            intraPredMode += ( intraPredMode >= preds[i] );
     1044          }
     1045      }
     1046      pcCU->setLumaIntraDirSubParts( (UChar)intraPredMode, absPartIdx+partOffset*j, depth );
    11181047#if H_3D_DIM
    11191048    }
     
    11331062    DTRACE_CU("intra_chroma_pred_mode", uiSymbol )
    11341063#endif       
    1135     uiSymbol = DM_CHROMA_IDX;
     1064      uiSymbol = DM_CHROMA_IDX;
    11361065  }
    11371066  else
     
    11431072      DTRACE_CU("intra_chroma_pred_mode", uiIPredMode )
    11441073#endif       
    1145       UInt uiAllowedChromaDir[ NUM_CHROMA_MODE ];
     1074        UInt uiAllowedChromaDir[ NUM_CHROMA_MODE ];
    11461075      pcCU->getAllowedChromaDir( uiAbsPartIdx, uiAllowedChromaDir );
    11471076      uiSymbol = uiAllowedChromaDir[ uiIPredMode ];
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r1179 r1196  
    125125 
    126126  Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    127 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     127#if H_3D
    128128  Void parseDIS          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    129 #else
    130 #if H_3D_SINGLE_DEPTH 
    131   Void parseSingleDepthMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    132 #endif
    133129#endif
    134130  Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    182178  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    183179  ContextModel3DBuffer m_cCUSkipFlagSCModel;
    184 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     180#if H_3D
    185181  ContextModel3DBuffer m_cCUDISFlagSCModel;
    186182  ContextModel3DBuffer m_cCUDISTypeSCModel;
    187 #else
    188 #if H_3D_SINGLE_DEPTH
    189   ContextModel3DBuffer m_cCUSingleDepthFlagSCModel;
    190   ContextModel3DBuffer m_cSingleDepthValueSCModel;
    191 #endif
    192183#endif
    193184  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r1179 r1196  
    7676  xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 );
    7777  xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 );
    78 #if HHI_CAM_PARA_K0052
    7978  xDeleteArray( m_receivedIdc, m_vps->getNumViews() );
    80 #else
    81   xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 );
    82 #endif
    8379}
    8480
     
    9591  m_firstReceivedPoc        = -2;
    9692
    97 #if HHI_CAM_PARA_K0052 
    9893  for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++)
    9994  {
     
    134129}
    135130
    136 #else
    137   m_uiMaxViewIndex            = -1;
    138   for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++)
    139   {
    140     Int curViewIdx = m_vps->getViewIndex( m_vps->getLayerIdInNuh( i ));
    141     m_bCamParsVaryOverTime = m_bCamParsVaryOverTime || vps->hasCamParInSliceHeader( curViewIdx );
    142     m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, curViewIdx  ) ;
    143   }
    144   assert( m_receivedIdc == NULL );
    145   m_receivedIdc = new Int*[ m_uiMaxViewIndex + 1];
    146   for (Int i = 0; i <= m_uiMaxViewIndex; i++)
    147   {
    148     m_receivedIdc[i] = new Int[ m_uiMaxViewIndex + 1 ];
    149   }
    150 
    151   xResetReceivedIdc( true );
    152 
    153   for (Int viewIndex = 0; viewIndex <= m_uiMaxViewIndex ; viewIndex++ )
    154   {
    155     if (m_vps->getCamParPresent( viewIndex ) )
    156     {   
    157       if( !m_vps->hasCamParInSliceHeader( viewIndex ) )
    158       {
    159         for (Int baseViewIndex = 0; baseViewIndex < viewIndex ; baseViewIndex++ )
    160         {
    161           m_receivedIdc   [ baseViewIndex ][ viewIndex ] = -1;
    162           m_aaiCodedScale [ baseViewIndex ][ viewIndex ] = m_vps->getCodedScale    (viewIndex) [ baseViewIndex ];
    163           m_aaiCodedOffset[ baseViewIndex ][ viewIndex ] = m_vps->getCodedOffset   (viewIndex) [ baseViewIndex ];
    164 
    165           m_receivedIdc   [ viewIndex ][ baseViewIndex ] = -1;
    166           m_aaiCodedScale [ viewIndex ][ baseViewIndex ] = m_vps->getInvCodedScale (viewIndex) [ baseViewIndex ];
    167           m_aaiCodedOffset[ viewIndex ][ baseViewIndex ] = m_vps->getInvCodedOffset(viewIndex) [ baseViewIndex ];
    168           xInitLUTs( baseViewIndex, viewIndex, m_aaiCodedScale[ baseViewIndex ][ viewIndex ], m_aaiCodedOffset[ baseViewIndex ][ viewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
    169           xInitLUTs( viewIndex, baseViewIndex, m_aaiCodedScale[ viewIndex ][ baseViewIndex ], m_aaiCodedOffset[ viewIndex ][ baseViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
    170         }
    171       }
    172     }
    173   }
    174 }
    175 
    176 #endif
    177131
    178132
     
    181135CamParsCollector::xResetReceivedIdc( Bool overWriteFlag )
    182136{
    183 #if HHI_CAM_PARA_K0052
    184137  for (Int i = 0; i < m_vps->getNumViews(); i++)
    185138  { 
    186139    for (Int j = 0; j < m_vps->getNumViews(); j++)
    187140    {
    188 #else
    189   for (Int i = 0; i <= m_uiMaxViewIndex; i++)
    190   { 
    191     for (Int j = 0; j <= m_uiMaxViewIndex; j++)
    192     {
    193 #endif
    194141      if ( overWriteFlag ||  ( m_receivedIdc[i][j] != -1 ) )
    195142      {
     
    232179  CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT)
    233180{
    234 #if HHI_CAM_PARA_K0052
    235181  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_vps->getCpPrecision() + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
    236 #else
    237   Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
    238 #endif
    239182  Int     iLog2DivChroma = iLog2DivLuma + 1;
    240183
     
    313256  }
    314257
    315 #if HHI_CAM_PARA_K0052
    316258  UInt voiInVps          = m_vps->getVoiInVps(pcSlice->getViewIndex()); 
    317259  if( m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) // check consistency of slice parameters here
     
    348290    }
    349291  } 
    350 #else
    351   UInt uiViewIndex          = pcSlice->getViewIndex(); 
    352   if( m_vps->getCamParPresent( uiViewIndex ) )
    353   {   
    354     if( m_vps->hasCamParInSliceHeader( uiViewIndex ) ) // check consistency of slice parameters here
    355     {   
    356       for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ )
    357       {       
    358         if ( m_receivedIdc[ uiViewIndex ][ uiBaseViewIndex ] != 0 )
    359         {     
    360           AOF( m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedScale () [ uiBaseViewIndex ] );
    361           AOF( m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedOffset() [ uiBaseViewIndex ] );
    362         }
    363         else
    364         {         
    365           m_receivedIdc   [ uiViewIndex ][ uiBaseViewIndex ]  = 1;
    366           m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ]  = pcSlice->getInvCodedScale () [ uiBaseViewIndex ];
    367           m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ]  = pcSlice->getInvCodedOffset() [ uiBaseViewIndex ];
    368           xInitLUTs( uiViewIndex, uiBaseViewIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseViewIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
    369         }
    370         if ( m_receivedIdc[ uiBaseViewIndex ][ uiViewIndex ] != 0 )
    371         {     
    372           AOF( m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedScale    () [ uiBaseViewIndex ] );
    373           AOF( m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedOffset   () [ uiBaseViewIndex ] );
    374         }
    375         else
    376         {       
    377           m_receivedIdc   [ uiBaseViewIndex ][ uiViewIndex ]  = 1;
    378           m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ]  = pcSlice->getCodedScale    () [ uiBaseViewIndex ];
    379           m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ]  = pcSlice->getCodedOffset   () [ uiBaseViewIndex ];
    380           xInitLUTs( uiBaseViewIndex, uiViewIndex, m_aaiCodedScale[ uiBaseViewIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
    381         }
    382       }
    383     }
    384   }
    385 #endif
    386 
    387 
    388292}
    389293
     
    408312    if( iPOC == m_firstReceivedPoc )
    409313    {
    410 #if HHI_CAM_PARA_K0052
    411314      fprintf( m_pCodedScaleOffsetFile, "#ViewOrderIdx     ViewIdVal\n" );
    412315      fprintf( m_pCodedScaleOffsetFile, "#------------ -------------\n" );
     
    436339                m_aaiCodedScale [ baseVoiInVps ][ voiInVps ],
    437340                m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_vps->getCpPrecision() );
    438 #else
    439       fprintf( m_pCodedScaleOffsetFile, "#  ViewIndex       ViewId\n" );
    440       fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" );
    441       for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
    442       {
    443         fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_vps->getViewIdVal( uiViewIndex ) );
    444       }
    445       fprintf( m_pCodedScaleOffsetFile, "\n\n");
    446       fprintf( m_pCodedScaleOffsetFile, "# StartFrame     EndFrame   TargetView     BaseView   CodedScale  CodedOffset    Precision\n" );
    447       fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" );
    448     }
    449     if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime  )
    450     {
    451       Int iS = iPOC;
    452       Int iE = ( m_bCamParsVaryOverTime ? iPOC : ~( 1 << 31 ) );
    453 #if HHI_CAM_PARA_K0052
    454       for( UInt uiViewIndex = 0; uiViewIndex < m_vps->getNumViews(); uiViewIndex++ )
    455       {
    456         for( UInt uiBaseIndex = 0; uiBaseIndex < m_vps->getNumViews(); uiBaseIndex++ )
    457 #else
    458       for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
    459       {
    460         for( UInt uiBaseIndex = 0; uiBaseIndex <= m_uiMaxViewIndex; uiBaseIndex++ )
    461 #endif
    462         {
    463           if( uiViewIndex != uiBaseIndex )
    464           {
    465             if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 )
    466             {           
    467 #if HHI_CAM_PARA_K0052
    468               fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",
    469                 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCpPrecision() );
    470 #else
    471               fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",
    472                 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() );
    473 #endif
    474 #endif
    475341            }           
    476342          }
     
    481347}
    482348#endif
     349
    483350TDecTop::TDecTop()
    484351{
     
    556423  initROM();
    557424#endif
    558 #if H_3D_ANNEX_SELECTION_FIX
     425#if H_3D
    559426  m_cCavlcDecoder.setDecTop( this );
    560427#endif
     
    867734
    868735#endif
    869 #if H_3D
    870 #if !HHI_INTER_COMP_PRED_K0052
    871   m_apcSlicePilot->init3dToolParameters();
    872 #endif
    873 #endif
    874736  pps->setSPS(sps);
    875737  pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumTileColumnsMinus1() + 1) : 1);
     
    1098960  xActivateParameterSets();
    1099961
    1100 #if SONY_MV_V_CONST_C0078
     962#if H_MV
    1101963  //Check Multiview Main profile constraint in G.11.1.1
    1102964  //  When ViewOrderIdx[ i ] derived according to any active VPS is equal to 1
     
    12301092  pcPic->setViewIndex( getViewIndex() );
    12311093  pcPic->setIsDepth  ( getIsDepth  () );
    1232 #endif
    1233 #endif
    1234 #if HHI_RES_PRED_K0052
    12351094  pcSlice->setIvPicLists( m_ivPicLists );         
    12361095#endif
     1096#endif
     1097
     1098
     1099
    12371100
    12381101  if (bNextSlice)
     
    12711134
    12721135#if H_3D
    1273 #if !HHI_RES_PRED_K0052
    1274     pcSlice->setIvPicLists( m_ivPicLists );         
    1275 #endif
    1276 
    1277 #if HHI_INTER_COMP_PRED_K0052
    12781136    pcSlice->checkInCompPredRefLayers();
    12791137#if H_3D_IV_MERGE
     
    12841142#endif
    12851143#endif   
    1286 #else
    1287 #if H_3D_IV_MERGE
    1288 #if H_3D_FCO
    1289     //assert( !getIsDepth() );
    1290 #else
    1291     assert( !getIsDepth() || ( pcSlice->getTexturePic() != 0 ) );
    1292 #endif
    1293 #endif   
    1294 #endif
    12951144#endif
    12961145#if H_MV
     
    13471196#if  H_3D_TMVP
    13481197    if(pcSlice->getLayerId())
     1198    {
    13491199      pcSlice->generateAlterRefforTMVP();
     1200    }
    13501201#endif
    13511202  }
     
    18001651}
    18011652
    1802 #if H_MV
    18031653Void TDecTop::xCeckNoClrasOutput()
    18041654{
     
    18341684  return allRefLayersInitilizedFlag;
    18351685}
     1686
     1687#if H_3D
     1688Void TDecTop::setProfileIdc()
     1689{
     1690  if (m_targetOptLayerSetIdx != -1 )
     1691  {   
     1692    TComVPS* vps = getPrefetchedVPS();
     1693    Int lsIdx = vps->olsIdxToLsIdx( m_targetOptLayerSetIdx );
     1694    Int lIdx = -1;
     1695    for (Int j = 0; j < vps->getNumLayersInIdList( lsIdx ); j++ )
     1696    {
     1697      if ( vps->getLayerSetLayerIdList( lsIdx, j ) == getLayerId() )
     1698      {
     1699        lIdx = j;
     1700        break;
     1701      }       
     1702    }
     1703    assert( lIdx != -1 );
     1704
     1705    Int profileIdc = vps->getPTL( vps->getProfileTierLevelIdx( m_targetOptLayerSetIdx, lIdx ) )->getGeneralPTL()->getProfileIdc();
     1706    assert( profileIdc == 1 || profileIdc == 6 || profileIdc == 8 );
     1707    m_profileIdc = profileIdc;   
     1708  };
     1709}
    18361710#endif
    18371711#endif
  • trunk/source/Lib/TLibDecoder/TDecTop.h

    r1179 r1196  
    9797  TComVPS* m_vps;
    9898  Int**    m_receivedIdc;
    99 #if!HHI_CAM_PARA_K0052
    100   Int      m_uiMaxViewIndex;
    101 #endif
    10299  Int      m_lastPoc;
    103100  Int      m_firstReceivedPoc;
     
    244241  Bool                    m_isDepth;
    245242  CamParsCollector*       m_pcCamParsCollector;
    246 #endif
    247 #if H_3D_ANNEX_SELECTION_FIX
    248243  Int                     m_profileIdc;
    249244#endif
     
    305300  Bool                    getIsDepth            ()               { return m_isDepth;    }
    306301  Void                    setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
    307 #endif
    308 #if H_3D_ANNEX_SELECTION_FIX
    309   Void                    setProfileIdc()
    310   {       
    311     if (m_targetOptLayerSetIdx != -1 )
    312     {   
    313       TComVPS* vps = getPrefetchedVPS();
    314       Int lsIdx = vps->olsIdxToLsIdx( m_targetOptLayerSetIdx );
    315       Int lIdx = -1;
    316       for (Int j = 0; j < vps->getNumLayersInIdList( lsIdx ); j++ )
    317       {
    318         if ( vps->getLayerSetLayerIdList( lsIdx, j ) == getLayerId() )
    319         {
    320           lIdx = j;
    321           break;
    322         }       
    323       }
    324       assert( lIdx != -1 );
    325 
    326       Int profileIdc = vps->getPTL( vps->getProfileTierLevelIdx( m_targetOptLayerSetIdx, lIdx ) )->getGeneralPTL()->getProfileIdc();
    327       assert( profileIdc == 1 || profileIdc == 6 || profileIdc == 8 );
    328       m_profileIdc = profileIdc;   
    329     };
    330   }
     302
     303  Void                    setProfileIdc();
    331304  Bool                    decProcAnnexI()           { assert( m_profileIdc != -1 ); return ( m_profileIdc == 8); }   
    332305#endif
    333 
    334306#endif
    335307protected:
Note: See TracChangeset for help on using the changeset viewer.