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


Ignore:
Timestamp:
7 Apr 2015, 17:05:30 (10 years ago)
Author:
tech
Message:

Merged branch 13.1-dev0@1178.

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

Legend:

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

    r872 r1179  
    44 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibDecoder/AnnexBread.h

    r964 r1179  
    44 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibDecoder/NALread.cpp

    r976 r1179  
    44 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibDecoder/NALread.h

    r872 r1179  
    44 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibDecoder/SEIread.cpp

    r964 r1179  
    44 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibDecoder/SEIread.h

    r884 r1179  
    44 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp

    r872 r1179  
    44* granted under this license. 
    55*
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77* All rights reserved.
    88*
     
    5454    return;
    5555  }
    56 #endif
    57   fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     56  if ( !g_disableNumbering )
     57  {
     58#endif
     59  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     60#if H_MV_ENC_DEC_TRAC
     61  }
     62#endif
     63
    5864  if (length < 10)
    5965  {
     
    7581    return;
    7682  }
    77 #endif
    78   fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     83  if ( !g_disableNumbering )
     84  {
     85#endif
     86  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     87#if H_MV_ENC_DEC_TRAC
     88  }
     89#endif
    7990  fprintf( g_hTrace, "%-50s ue(v) : %u\n", pSymbolName, rValue );
    8091  fflush ( g_hTrace );
     
    89100    return;
    90101  }
    91 #endif
    92   fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     102  if ( !g_disableNumbering )
     103  {
     104#endif
     105  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     106#if H_MV_ENC_DEC_TRAC
     107  }
     108#endif
     109
    93110  fprintf( g_hTrace, "%-50s se(v) : %d\n", pSymbolName, rValue );
    94111  fflush ( g_hTrace );
     
    103120    return;
    104121  }
    105 #endif
    106   fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     122  if ( !g_disableNumbering )
     123  {
     124#endif
     125  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     126#if H_MV_ENC_DEC_TRAC
     127  }
     128#endif
    107129  fprintf( g_hTrace, "%-50s u(1)  : %d\n", pSymbolName, rValue );
    108130  fflush ( g_hTrace );
  • trunk/source/Lib/TLibDecoder/SyntaxElementParser.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibDecoder/TDecBinCoder.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1133 r1179  
    44* granted under this license. 
    55*
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77* All rights reserved.
    88*
     
    3939#include "SEIread.h"
    4040#include "TDecSlice.h"
    41 
     41#if H_3D_ANNEX_SELECTION_FIX
     42#include "TDecTop.h"
     43#endif
    4244//! \ingroup TLibDecoder
    4345//! \{
     
    9193TDecCavlc::TDecCavlc()
    9294{
     95#if !HHI_CAM_PARA_K0052
    9396#if H_3D
    9497  m_aaiTempScale            = new Int* [ MAX_NUM_LAYERS ];
     
    100103  }
    101104#endif
     105#endif
    102106}
    103107
    104108TDecCavlc::~TDecCavlc()
    105109{
     110#if !HHI_CAM_PARA_K0052
    106111#if H_3D
    107112  for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ )
     
    112117  delete [] m_aaiTempScale;
    113118  delete [] m_aaiTempOffset;
     119#endif
    114120#endif
    115121}
     
    777783    assert(uiCode <= 3);
    778784    // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream
     785#if !H_3D_DISABLE_CHROMA
    779786    assert (uiCode == 1);
     787#endif
    780788    if( uiCode == 3 )
    781789    {
     
    10401048      READ_FLAG( uiCode, "qt_pred_flag" ); sps3dExt->setQtPredFlag( d, uiCode == 1 );
    10411049      READ_FLAG( uiCode, "inter_sdc_flag" ); sps3dExt->setInterSdcFlag( d, uiCode == 1 );
     1050#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1051      READ_FLAG( uiCode, "intra_skip_flag" ); sps3dExt->setDepthIntraSkipFlag( d, uiCode == 1 );
     1052#else
    10421053      READ_FLAG( uiCode, "intra_single_flag" ); sps3dExt->setIntraSingleFlag( d, uiCode == 1 );
     1054#endif
    10431055    }
    10441056  }
     
    10511063  READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
    10521064  READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 );
     1065#if FIX_TICKET_95
     1066  if (pcPPS->getPpsInferScalingListFlag())
     1067  {
    10531068  READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );
     1069  }
     1070#else
     1071  READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );
     1072#endif
    10541073
    10551074  UInt numRefLocOffsets;;
     
    13171336  }
    13181337
     1338#if HHI_INTER_COMP_PRED_K0052
     1339#if H_3D
     1340  pcVPS->initViewCompLayer( );
     1341#endif
     1342#endif
    13191343
    13201344  for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
     
    14661490    for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    14671491    {
    1468         READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
     1492      READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
    14691493    }
    14701494  }
     
    19051929Void TDecCavlc::parseVPS3dExtension( TComVPS* pcVPS )
    19061930{
     1931#if HHI_CAM_PARA_K0052
     1932  UInt uiCode;   
     1933  READ_UVLC( uiCode, "cp_precision"); pcVPS->setCpPrecision( uiCode ) ;
     1934 
     1935  for (Int n = 1; n < pcVPS->getNumViews(); n++)
     1936  {
     1937    Int i      = pcVPS->getViewOIdxList( n );
     1938    Int iInVps = pcVPS->getVoiInVps( i );
     1939    READ_CODE( 6, uiCode, "num_cp" ); pcVPS->setNumCp( iInVps, uiCode );
     1940
     1941    if( pcVPS->getNumCp( iInVps ) > 0 )
     1942    {
     1943      READ_FLAG( uiCode, "cp_in_slice_segment_header_flag" ); pcVPS->setCpInSliceSegmentHeaderFlag( iInVps, uiCode == 1 );
     1944      for( Int m = 0; m < pcVPS->getNumCp( iInVps ); m++ )
     1945      {
     1946        READ_UVLC( uiCode, "cp_ref_voi" ); pcVPS->setCpRefVoi( iInVps, m, uiCode );
     1947        if( !pcVPS->getCpInSliceSegmentHeaderFlag( iInVps ) )
     1948        {
     1949          Int j      = pcVPS->getCpRefVoi( iInVps, m );
     1950          Int jInVps = pcVPS->getVoiInVps( j );
     1951          Int iCode;
     1952          READ_SVLC( iCode, "vps_cp_scale" );                pcVPS->setVpsCpScale   ( iInVps, jInVps, iCode );
     1953          READ_SVLC( iCode, "vps_cp_off" );                  pcVPS->setVpsCpOff     ( iInVps, jInVps, iCode );
     1954          READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); pcVPS->setVpsCpInvScale( iInVps, jInVps, iCode - pcVPS->getVpsCpScale( iInVps, jInVps ) );
     1955          READ_SVLC( iCode, "vps_cp_inv_off_plus_off" );     pcVPS->setVpsCpInvOff  ( iInVps, jInVps, iCode - pcVPS->getVpsCpOff  ( iInVps, jInVps ) );
     1956        }
     1957      }
     1958    }   
     1959  }
     1960  pcVPS->deriveCpPresentFlag();
     1961#else
    19071962  UInt uiCode;
    1908 
    19091963
    19101964  UInt uiCamParPrecision = 0;
     
    19552009    }
    19562010  }
     2011#endif
    19572012}
    19582013#endif
     
    20152070#endif
    20162071  rpcSlice->setSPS(sps);
     2072#if !HHI_INTER_COMP_PRED_K0052
    20172073#if H_3D
    20182074  rpcSlice->init3dToolParameters();
     2075#endif
    20192076#endif
    20202077  rpcSlice->setPPS(pps);
     
    21082165    }
    21092166    // in the first version chroma_format_idc is equal to one, thus colour_plane_id will not be present
     2167
     2168#if H_3D_DISABLE_CHROMA
     2169    assert (sps->getChromaFormatIdc() == 1 || rpcSlice->getIsDepth() );
     2170    assert (sps->getChromaFormatIdc() == 0 || !rpcSlice->getIsDepth() );
     2171#else
    21102172    assert (sps->getChromaFormatIdc() == 1 );
     2173#endif
    21112174    // if( separate_colour_plane_flag  ==  1 )
    21122175    //   colour_plane_id                                      u(2)
     
    24052468      }
    24062469    }
     2470#if HHI_INTER_COMP_PRED_K0052
     2471#if H_3D
     2472    if ( getDecTop()->decProcAnnexI() )
     2473    {   
     2474      rpcSlice->deriveInCmpPredAndCpAvailFlag();
     2475      if ( rpcSlice->getInCmpPredAvailFlag() )
     2476      {
     2477        READ_FLAG(uiCode, "in_comp_pred_flag");  rpcSlice->setInCompPredFlag((Bool)uiCode);     
     2478      }
     2479      rpcSlice->init3dToolParameters();
     2480    }
     2481#endif
     2482#endif
    24072483#endif
    24082484    if(sps->getUseSAO())
    24092485    {
    24102486      READ_FLAG(uiCode, "slice_sao_luma_flag");  rpcSlice->setSaoEnabledFlag((Bool)uiCode);
     2487#if H_3D_DISABLE_CHROMA
     2488      if( rpcSlice->getSPS()->getChromaFormatIdc() != 0 )
     2489      {
    24112490      READ_FLAG(uiCode, "slice_sao_chroma_flag");  rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode);
     2491    }
     2492      else
     2493      {
     2494        rpcSlice->setSaoEnabledFlagChroma( false );
     2495      }
     2496     
     2497#else
     2498      READ_FLAG(uiCode, "slice_sao_chroma_flag");  rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode);
     2499#endif
    24122500    }
    24132501
     
    25742662    }
    25752663#if H_3D_IC
     2664#if H_3D_ANNEX_SELECTION_FIX
     2665    else if(    rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE )
     2666             && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0
     2667             && getDecTop()->decProcAnnexI()
     2668           )
     2669#else
    25762670    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )
     2671#endif
    25772672    {
    25782673      UInt uiCodeTmp = 0;
     
    26712766    rpcSlice->setLFCrossSliceBoundaryFlag( (uiCode==1)?true:false);
    26722767
     2768#if HHI_CAM_PARA_K0052
     2769#if H_3D
     2770    if ( getDecTop()->decProcAnnexI() )
     2771    {
     2772      Int voiInVps = vps->getVoiInVps( rpcSlice->getViewIndex() );
     2773      if( vps->getCpInSliceSegmentHeaderFlag( voiInVps ) && !rpcSlice->getIsDepth() )
     2774      {
     2775        for( Int m = 0; m < vps->getNumCp( voiInVps ); m++ )
     2776        {
     2777          Int jInVps = vps->getVoiInVps( vps->getCpRefVoi( voiInVps, m ));
     2778          READ_SVLC( iCode, "cp_scale" );                rpcSlice->setCpScale   ( jInVps, iCode );
     2779          READ_SVLC( iCode, "cp_off" );                  rpcSlice->setCpOff     ( jInVps, iCode );
     2780          READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); rpcSlice->setCpInvScale( jInVps, iCode - rpcSlice->getCpScale   ( jInVps ));
     2781          READ_SVLC( iCode, "cp_inv_off_plus_off" );     rpcSlice->setCpInvOff  ( jInVps, iCode - rpcSlice->getCpOff     ( jInVps ));
     2782        }
     2783      }
     2784    }
     2785#endif
     2786#endif
    26732787  }
    26742788 
     
    26942808  }
    26952809
     2810#if !HHI_CAM_PARA_K0052
    26962811#if H_3D
    26972812#if H_3D_FCO
     
    27112826    rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset );
    27122827  }
     2828#endif
    27132829#endif
    27142830
     
    29843100  assert(0);
    29853101}
     3102
     3103#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     3104Void TDecCavlc::parseDIS( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
     3105{
     3106  assert(0);
     3107}
     3108#else
    29863109#if H_3D_SINGLE_DEPTH
    29873110Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
     
    29903113}
    29913114#endif
     3115#endif
     3116
    29923117Void TDecCavlc::parseCUTransquantBypassFlag( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
    29933118{
     
    31453270{
    31463271  wpScalingParam  *wp;
     3272#if H_3D_DISABLE_CHROMA
     3273  Bool            bChroma     = ( pcSlice->getSPS()->getChromaFormatIdc() != 0 );
     3274#else
    31473275  Bool            bChroma     = true; // color always present in HEVC ?
     3276#endif
    31483277  SliceType       eSliceType  = pcSlice->getSliceType();
    31493278  Int             iNbRef       = (eSliceType == B_SLICE ) ? (2) : (1);
    31503279  UInt            uiLog2WeightDenomLuma, uiLog2WeightDenomChroma;
    31513280  UInt            uiTotalSignalledWeightFlags = 0;
    3152  
     3281
    31533282  Int iDeltaDenom;
    31543283  // decode delta_luma_log2_weight_denom :
     
    31623291    uiLog2WeightDenomChroma = (UInt)(iDeltaDenom + uiLog2WeightDenomLuma);
    31633292  }
     3293  else
     3294  {
     3295    // For some reasons this is also needed to fix a compiler warning when H_3D_DISABLE_CHROMA is equal to 0.
     3296    uiLog2WeightDenomChroma = 0;
     3297  }
     3298
    31643299
    31653300  for ( Int iNumRef=0 ; iNumRef<iNbRef ; iNumRef++ )
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    5252// Class definition
    5353// ====================================================================================================================
     54#if H_3D_ANNEX_SELECTION_FIX
     55class TDecTop;
     56#endif
    5457
    5558/// CAVLC decoder class
     
    6366  void  parseShortTermRefPicSet            (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx);
    6467 
     68
     69#if !HHI_CAM_PARA_K0052
    6570#if H_3D
    6671  Int**    m_aaiTempScale;
    6772  Int**    m_aaiTempOffset;
    6873#endif
     74#endif
     75#if H_3D_ANNEX_SELECTION_FIX
     76  TDecTop*  m_decTop;
     77#endif
     78
    6979
    7080public:
     
    108118  Void  parsePPS            ( TComPPS* pcPPS);
    109119#endif
    110 
     120#if H_3D_ANNEX_SELECTION_FIX
     121  Void  setDecTop           ( TDecTop* decTop ) { m_decTop = decTop; };
     122#endif
    111123  Void  parseVUI            ( TComVUI* pcVUI, TComSPS* pcSPS );
    112124  Void  parseSEI            ( SEIMessages& );
     
    124136 
    125137  Void  parseSkipFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     138#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     139  Void  parseDIS            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     140#else
    126141#if H_3D_SINGLE_DEPTH
    127142  Void  parseSingleDepthMode        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    128 #endif 
     143#endif
     144#endif
    129145  Void  parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    130146  Void parseMergeFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
     
    166182  Void  parseScalingList               ( TComScalingList* scalingList );
    167183  Void xDecodeScalingList    ( TComScalingList *scalingList, UInt sizeId, UInt listId);
     184
     185#if H_3D_ANNEX_SELECTION_FIX
     186  TDecTop*  getDecTop()      { return m_decTop; };
     187#endif
     188
    168189protected:
    169190  Bool  xMoreRbspData();
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    290290#if H_MV_ENC_DEC_TRAC
    291291  DTRACE_CU_S("=========== coding_unit ===========\n")
     292#if H_MV_ENC_DEC_TRAC
     293#if ENC_DEC_TRACE
     294    stopAtPos  ( pcCU->getSlice()->getPOC(),
     295    pcCU->getSlice()->getLayerId(),
     296    uiLPelX,
     297    uiTPelY,
     298    uiRPelX-uiLPelX+1,
     299    uiBPelY-uiTPelY+1);
     300#endif
     301#endif
     302
    292303#endif
    293304
     
    299310#if H_3D_NBDV
    300311  DisInfo DvInfo;
     312#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    301313  DvInfo.bDV = false;
     314#endif
    302315  DvInfo.m_acNBDV.setZero();
    303316  DvInfo.m_aVIdxCan = 0;
     
    334347      if( pcCU->getSlice()->getIsDepth())
    335348      {
     349#if SEC_ARP_REM_ENC_RESTRICT_K0035
     350        m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);
     351#else
    336352        DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);
     353#endif
    337354      }
    338355      else
     
    342359      if( pcCU->getSlice()->getDepthBasedBlkPartFlag() )  //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done.
    343360      {
     361#if SEC_ARP_REM_ENC_RESTRICT_K0035
     362        m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);
     363#else
    344364        DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);
     365#endif
    345366      }
    346367      else
    347368#endif
    348369      {
     370#if SEC_ARP_REM_ENC_RESTRICT_K0035
     371        m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
     372#else
    349373        DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
     374#endif
    350375      }
    351376#if H_3D_IV_MERGE
     
    520545    return;
    521546  }
     547#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     548  m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth );
     549  if(!pcCU->getDISFlag(uiAbsPartIdx))
     550  {
     551#else
    522552#if H_3D_SINGLE_DEPTH
    523553  m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
     
    525555  {
    526556#endif
     557#endif
    527558  m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
    528559  m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );
    529560
     561#if !HHI_MOVE_SYN_K0052
    530562#if H_3D_DIM_SDC
    531563  m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    532564#endif
     565#endif
    533566  if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
    534567  {
     
    537570    if(pcCU->getIPCMFlag(uiAbsPartIdx))
    538571    {
     572#if HHI_MOVE_SYN_K0052
     573#if H_3D_DIM_SDC
     574      m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
     575#endif
     576#endif
    539577      xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    540578#if H_3D_IV_MERGE
     
    550588  // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
    551589  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
     590
    552591  // Coefficient decoding
    553592  Bool bCodeDQP = getdQPFlag();
    554593  m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP );
    555594  setdQPFlag( bCodeDQP );
     595#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     596  }
     597#else
    556598#if H_3D_SINGLE_DEPTH
    557599  }
     600#endif
    558601#endif
    559602  xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
     
    616659 
    617660  m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth );
    618  
    619 #if H_MV_ENC_DEC_TRAC
    620 #if ENC_DEC_TRACE
    621   stopAtPos  ( m_ppcCU[uiDepth]->getSlice()->getPOC(),
    622     m_ppcCU[uiDepth]->getSlice()->getLayerId(),
    623     m_ppcCU[uiDepth]->getCUPelX(),
    624     m_ppcCU[uiDepth]->getCUPelY(),
    625     m_ppcCU[uiDepth]->getWidth(0),
    626     m_ppcCU[uiDepth]->getHeight(0) );
    627 #endif
    628 #endif
    629661
    630662  switch( m_ppcCU[uiDepth]->getPredictionMode(0) )
     
    656688      break;
    657689    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      }
     695#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
    658703#if H_3D_SINGLE_DEPTH
    659704      if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) )
     
    671716#endif
    672717#endif
     718#endif
    673719      xReconIntraQT( m_ppcCU[uiDepth], uiDepth );
    674720      break;
     
    704750  }
    705751}
     752
     753#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     754Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     755{
     756  UInt uiWidth        = pcCU->getWidth  ( 0 );
     757  UInt uiHeight       = pcCU->getHeight ( 0 );
     758
     759  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
     760
     761  UInt    uiStride    = pcRecoYuv->getStride  ();
     762  Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
     763
     764
     765  AOF( uiWidth == uiHeight );
     766  AOF( uiAbsPartIdx == 0 );
     767
     768  Bool  bAboveAvail = false;
     769  Bool  bLeftAvail  = false;
     770  pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
     771  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0,
     772    m_pcPrediction->getPredicBuf       (),
     773    m_pcPrediction->getPredicBufWidth  (),
     774    m_pcPrediction->getPredicBufHeight (),
     775    bAboveAvail, bLeftAvail
     776    );
     777
     778  if ( pcCU->getDISType(uiAbsPartIdx) == 0 )
     779  {
     780    m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), VER_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     781  }
     782  else if ( pcCU->getDISType(uiAbsPartIdx) == 1 )
     783  {
     784    m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     785  }
     786  else if ( pcCU->getDISType(uiAbsPartIdx) == 2 )
     787  {
     788    Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     789    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 );
     790    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     791    {
     792      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     793      {
     794        piReco[ uiX ] = pSingleDepth;
     795      }
     796      piReco+= uiStride;
     797    }
     798  }
     799  else if ( pcCU->getDISType(uiAbsPartIdx) == 3 )
     800  {
     801    Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     802    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 );
     803    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     804    {
     805      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     806      {
     807        piReco[ uiX ] = pSingleDepth;
     808      }
     809      piReco+= uiStride;
     810    }
     811  }
     812
     813  // clear UV
     814  UInt  uiStrideC     = pcRecoYuv->getCStride();
     815  Pel   *pRecCb       = pcRecoYuv->getCbAddr();
     816  Pel   *pRecCr       = pcRecoYuv->getCrAddr();
     817
     818  for (Int y=0; y<uiHeight/2; y++)
     819  {
     820    for (Int x=0; x<uiWidth/2; x++)
     821    {
     822      pRecCb[x] = 1<<(g_bitDepthC-1);
     823      pRecCr[x] = 1<<(g_bitDepthC-1);
     824    }
     825
     826    pRecCb += uiStrideC;
     827    pRecCr += uiStrideC;
     828  }
     829}
     830#else
    706831#if H_3D_SINGLE_DEPTH
    707832Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    772897}
    773898#endif
     899#endif
     900
    774901#if H_3D_INTER_SDC
    775902Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    835962  // compute mask by segmenting depth block
    836963  Bool pMask[MAX_CU_SIZE*MAX_CU_SIZE];
     964#if HS_DBBP_CLEAN_K0048
     965  Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask, pcCU);
     966#else
    837967  Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask);
     968#endif
    838969  AOF(bValidMask);
    839970 
  • trunk/source/Lib/TLibDecoder/TDecCu.h

    r1084 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    123123  Void setdQPFlag               ( Bool b )                { m_bDecodeDQP = b;           }
    124124  Void xFillPCMBuffer           (TComDataCU* pCU, UInt depth);
     125#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     126  Void xReconDIS               ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     127#else
    125128#if H_3D_SINGLE_DEPTH
    126129  Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     130#endif
    127131#endif
    128132#if H_3D_DIM_SDC
  • trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    5252  m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
    5353}
     54
     55#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     56Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     57{
     58  if( !pcCU->getSlice()->getDepthIntraSkipFlag() )
     59  {
     60    return;
     61  } 
     62
     63  m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth );
     64}
     65#else
    5466#if H_3D_SINGLE_DEPTH
    5567Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    6375}
    6476#endif
     77#endif
     78
    6579Void TDecEntropy::decodeCUTransquantBypassFlag(TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    6680{
     
    147161{
    148162  m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth );
    149  
     163#if !HHI_MOVE_SYN_K0052 
    150164#if H_3D_DBBP
    151165if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
     
    154168  }
    155169#endif
     170#endif
    156171}
    157172
     
    161176  {
    162177    decodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx, uiDepth );
     178#if HHI_MOVE_SYN_K0052
     179    decodeSDCFlag   ( pcCU, uiAbsPartIdx, uiDepth );   
     180#endif
    163181#if H_3D_DIM_SDC
     182#if H_3D_DISABLE_CHROMA
     183#if !HHI_MOVE_SYN_K0052
     184    if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() )
     185#else
     186    if(!pcCU->getSDCFlag(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0  )
     187#endif
     188#else
    164189    if(!pcCU->getSDCFlag(uiAbsPartIdx))
     190#endif
    165191#endif
    166192    decodeIntraDirModeChroma( pcCU, uiAbsPartIdx, uiDepth );
     
    239265  pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx);
    240266#endif
     267#if HHI_MOVE_SYN_K0052
    241268  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
    242269  {
     
    247274    //DTRACE_PU("x1", uiTPelY)
    248275#endif
     276
     277    ////// Parse PUs syntax
    249278    decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
    250279    if ( pcCU->getMergeFlag( uiSubPartIdx ) )
    251280    {
    252       decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
     281      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );     
     282    }
     283    else
     284    {
     285      decodeInterDirPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
     286      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
     287      {       
     288        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
     289        {
     290          decodeRefFrmIdxPU( pcCU,    uiSubPartIdx,              uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
     291          decodeMvdPU      ( pcCU,    uiSubPartIdx,              uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
     292          decodeMVPIdxPU   ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
     293        }
     294      }
     295    }
     296  }
     297
     298  ////// Parse CUs extension syntax
     299  decodeDBBPFlag( pcCU, uiAbsPartIdx, uiDepth );
     300  decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth );
     301
     302#if H_3D_ARP
     303  decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
     304#endif
     305#if H_3D_IC
     306  decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     307#endif
     308
     309  ////// Decode motion vectors
     310  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
     311  {
     312    if ( pcCU->getMergeFlag( uiSubPartIdx ) )
     313    {
    253314      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    254 #if H_3D_ARP
    255       decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    256 #endif
    257 #if H_3D_IC
    258       decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    259 #endif
    260315#if H_3D_DBBP
    261316      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )
     
    390445    else
    391446    {
     447      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
     448      {       
     449        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
     450        {
     451          decodeMvsAMVP   ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
     452        }
     453      }
     454    }
     455
     456    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) )
     457    {
     458      pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMv( TComMv(0,0), ePartSize, uiSubPartIdx, uiDepth, uiPartIdx);
     459      pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllRefIdx( -1, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx);
     460      pcCU->setInterDirSubParts( 1, uiSubPartIdx, uiPartIdx, uiDepth);
     461    }
     462  }
     463#else
     464  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
     465  {
     466#if H_MV_ENC_DEC_TRAC
     467    DTRACE_PU_S("=========== prediction_unit ===========\n")
     468    // ToDo:
     469    //DTRACE_PU("x0", uiLPelX)
     470    //DTRACE_PU("x1", uiTPelY)
     471#endif
     472    decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
     473    if ( pcCU->getMergeFlag( uiSubPartIdx ) )
     474    {
     475      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
     476      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
     486      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 )
     487#endif
     488      {
     489        pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
     490        if ( !isMerged )
     491        {
     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
     519          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
     520#endif
     521#endif
     522          isMerged = true;
     523        }
     524        pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth );
     525      }
     526      else
     527      {
     528        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();
     536        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
     557      }
     558      pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
     559
     560      TComMv cTmpMv( 0, 0 );
     561      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
     562      {       
     563        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
     564        {
     565          pcCU->setMVPIdxSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth);
     566          pcCU->setMVPNumSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth);
     567          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
     568          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
     612    }
     613    else
     614    {
    392615      decodeInterDirPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
    393616      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
     
    414637    }
    415638  }
     639#endif
    416640#if H_3D_SPIVMP
    417641  delete[] pcMvFieldSP;
     
    482706}
    483707
     708#if HHI_MOVE_SYN_K0052
    484709Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
    485710{
    486711  Int iMVPIdx = -1;
    487 
    488   TComMv cZeroMv( 0, 0 );
    489   TComMv cMv     = cZeroMv;
    490   Int    iRefIdx = -1;
    491 
    492   TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList );
    493   AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo();
    494 
    495   iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr);
    496   cMv = cZeroMv;
    497712
    498713  if ( (pcSubCU->getInterDir(uiPartAddr) & ( 1 << eRefList )) )
     
    512727#endif
    513728  }
     729  pcSubCU->setMVPIdxSubParts( iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth );
     730}
     731
     732Void TDecEntropy::decodeMvsAMVP( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
     733{
     734  TComMv cZeroMv( 0, 0 );
     735  TComMv cMv     = cZeroMv;
     736  Int    iRefIdx = -1;
     737
     738  TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList );
     739  AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo();
     740
     741  iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr);
     742  cMv = cZeroMv;
     743
     744  pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo);
     745  pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth);
     746  if ( iRefIdx >= 0 )
     747  {
     748    m_pcPrediction->getMvPredAMVP( pcSubCU, uiPartIdx, uiPartAddr, eRefList, cMv);
     749    cMv += pcSubCUMvField->getMvd( uiPartAddr );
     750  }
     751
     752  PartSize ePartSize = pcSubCU->getPartitionSize( uiPartAddr );
     753  pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx);
     754}
     755
     756#else
     757Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
     758{
     759  Int iMVPIdx = -1;
     760
     761  TComMv cZeroMv( 0, 0 );
     762  TComMv cMv     = cZeroMv;
     763  Int    iRefIdx = -1;
     764
     765  TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList );
     766  AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo();
     767
     768  iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr);
     769  cMv = cZeroMv;
     770
     771  if ( (pcSubCU->getInterDir(uiPartAddr) & ( 1 << eRefList )) )
     772  {
     773    m_pcEntropyDecoderIf->parseMVPIdx( iMVPIdx );
     774#if H_MV_ENC_DEC_TRAC
     775#if ENC_DEC_TRACE
     776    if ( eRefList == REF_PIC_LIST_0 )
     777    {
     778      DTRACE_PU("mvp_l0_flag", iMVPIdx)
     779    }
     780    else
     781    {
     782      DTRACE_PU("mvp_l1_flag", iMVPIdx)
     783    }
     784#endif
     785#endif
     786  }
    514787  pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo);
    515788  pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth);
     
    524797  pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx);
    525798}
    526 
     799#endif
    527800Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU)
    528801{
     802
     803#if H_MV_ENC_DEC_TRAC
     804#if ENC_DEC_TRACE
     805  UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
     806  UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
     807 
     808  DTRACE_TU_S("=========== transform_tree ===========\n")
     809  DTRACE_TU("x0", uiLPelX)
     810  DTRACE_TU("x1", uiTPelY)
     811  DTRACE_TU("log2TrafoSize", g_uiMaxCUWidth>>uiDepth)
     812  DTRACE_TU("trafoDepth"  , uiDepth)
     813#endif
     814#endif
     815
    529816  UInt uiSubdiv;
    530817  const UInt uiLog2TrafoSize = g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()]+2 - uiDepth;
     
    579866    if( bFirstCbfOfCU || uiLog2TrafoSize > 2 )
    580867    {
     868#if H_3D_DISABLE_CHROMA
     869      if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 )     
     870      {
    581871      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
    582872      {
     
    587877        m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );
    588878      }
     879    }
     880    else
     881    {
     882        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
     883        {
     884          pcCU->setCbfSubParts( 0, TEXT_CHROMA_U, uiAbsPartIdx, uiTrDepth - 1 );
     885        }
     886        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )
     887        {
     888          pcCU->setCbfSubParts( 0, TEXT_CHROMA_V, uiAbsPartIdx, uiTrDepth - 1 );
     889        }
     890      }
     891#else
     892      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
     893      {
     894        m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth );
     895      }
     896      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )
     897      {
     898        m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );
     899      }
     900#endif
    589901    }
    590902    else
     
    7481060    assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
    7491061    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
     1062#if H_3D_DISABLE_CHROMA
     1063    if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 )
     1064    {
     1065      assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     1066      assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
     1067    }
     1068#else
    7501069    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
    7511070    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
     1071#endif
    7521072  }
    7531073
     
    8111131{
    8121132  pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth );
     1133#if HHI_MOVE_SYN_K0052
     1134  if ( pcCU->isSkipped( uiAbsPartIdx ) )
     1135  {
     1136    return;
     1137  }
     1138#endif
     1139
    8131140
    8141141  if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getInterSdcFlag() ) ||
     
    8301157Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    8311158{
    832   m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth );
     1159#if HHI_MOVE_SYN_K0052
     1160  if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
     1161  {
     1162#endif
     1163    m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth );
     1164#if HHI_MOVE_SYN_K0052
     1165  }
     1166#endif
    8331167}
    8341168#endif
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    8585public:
    8686  virtual Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     87#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     88  virtual Void parseDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     89#else
    8790#if H_3D_SINGLE_DEPTH
    8891  virtual Void parseSingleDepthMode       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     92#endif
    8993#endif
    9094  virtual Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     
    148152  Void decodeMvdPU        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    149153  Void decodeMVPIdxPU     ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    150  
     154#if HHI_MOVE_SYN_K0052
     155  Void decodeMvsAMVP       ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
     156#endif 
    151157  Void    setEntropyDecoder           ( TDecEntropyIf* p );
    152158  Void    setBitstream                ( TComInputBitstream* p ) { m_pcEntropyDecoderIf->setBitstream(p);                    }
     
    171177  Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    172178  Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     179#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     180  Void decodeDIS               ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;
     181#else
    173182#if H_3D_SINGLE_DEPTH
    174183  Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;
     184#endif
    175185#endif
    176186  Void decodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • trunk/source/Lib/TLibDecoder/TDecGop.cpp

    r1084 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    9292  m_pcSliceDecoder        = pcSliceDecoder;
    9393  m_pcLoopFilter          = pcLoopFilter;
    94   m_pcSAO  = pcSAO;
     94  m_pcSAO  = pcSAO; 
    9595}
    9696
  • trunk/source/Lib/TLibDecoder/TDecGop.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    5656#include "TDecBinCoderCABAC.h"
    5757
     58
    5859//! \ingroup TLibDecoder
    5960//! \{
     
    6263// Class definition
    6364// ====================================================================================================================
     65#if H_3D_ANNEX_SELECTION_FIX
     66class TDecTop;
     67#endif
     68
    6469
    6570/// GOP decoder class
     
    7883  TDecSlice*            m_pcSliceDecoder;
    7984  TComLoopFilter*       m_pcLoopFilter;
     85#if H_3D_ANNEX_SELECTION_FIX
     86  TDecTop*              m_decTop;
     87#endif
    8088 
    8189  TComSampleAdaptiveOffset*     m_pcSAO;
  • trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    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
     55, m_cCUDISFlagSCModel         ( 1,             1,               NUM_DIS_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     56, m_cCUDISTypeSCModel         ( 1,             1,               NUM_DIS_TYPE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     57#else
    5458#if H_3D_SINGLE_DEPTH
    5559, m_cCUSingleDepthFlagSCModel        ( 1,             1,               NUM_SINGLEDEPTH_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    5660, m_cSingleDepthValueSCModel         ( 1,             1,               NUM_SINGLE_DEPTH_VALUE_DATA_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
     61#endif
    5762#endif
    5863, m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        , m_contextModels + m_numContextModels, m_numContextModels)
     
    136141  m_cCUSplitFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    137142  m_cCUSkipFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SKIP_FLAG );
     143#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     144  m_cCUDISFlagSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_DIS_FLAG );
     145  m_cCUDISTypeSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_DIS_TYPE );
     146#else
    138147#if H_3D_SINGLE_DEPTH
    139148  m_cCUSingleDepthFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    140149  m_cSingleDepthValueSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     150#endif
    141151#endif
    142152  m_cCUMergeFlagExtSCModel.initBuffer    ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT );
     
    207217  m_cCUSplitFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG );
    208218  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
     219#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     220  m_cCUDISFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG );
     221  m_cCUDISTypeSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );
     222#else
    209223#if H_3D_SINGLE_DEPTH
    210224  m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    211225  m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     226#endif
    212227#endif
    213228  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT );
     
    486501    }
    487502
     503
     504#if H_3D_DISABLE_CHROMA
     505    if( pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 )
     506    {   
     507#endif
    488508    piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;
    489509    uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
     
    517537      piPCMSample += uiWidth;
    518538    }
     539#if H_3D_DISABLE_CHROMA
     540    }
     541#endif
     542
    519543
    520544    m_pcTDecBinIf->start();
     
    570594#endif
    571595}
     596
     597#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     598Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     599{
     600  pcCU->setDISFlagSubParts( false,        uiAbsPartIdx, uiDepth );
     601  UInt uiSymbol = 0;
     602  m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) );
     603  if( uiSymbol )
     604  {
     605    pcCU->setDISFlagSubParts( true,        uiAbsPartIdx, uiDepth );
     606    pcCU->setSkipFlagSubParts( false,        uiAbsPartIdx, uiDepth );
     607    pcCU->setSDCFlagSubParts( false,        uiAbsPartIdx, uiDepth );
     608    pcCU->setPredModeSubParts( MODE_INTRA,  uiAbsPartIdx, uiDepth );
     609    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
     610    pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth );
     611    pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
     612    pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
     613    pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth);
     614    pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth);
     615
     616    UInt uiUnaryIdx = 0;
     617    UInt uiNumCand  = 4;
     618
     619    if ( uiNumCand > 1 )
     620    {
     621      for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx )
     622      {
     623        UInt uiSymbol2 = 0;
     624        if ( uiUnaryIdx==0 )
     625        {
     626          m_pcTDecBinIf->decodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) );
     627        }
     628        else
     629        {
     630          m_pcTDecBinIf->decodeBinEP( uiSymbol2);
     631        }
     632        if( uiSymbol2 == 0 )
     633        {
     634          break;
     635        }
     636      }
     637    }
     638    pcCU->setDISTypeSubParts(uiUnaryIdx, uiAbsPartIdx, 0, uiDepth);
     639  }
     640}
     641#else
    572642#if H_3D_SINGLE_DEPTH
    573643Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    616686  }
    617687}
    618 
    619 #endif
     688#endif
     689#endif
     690
    620691/** parse merge flag
    621692 * \param pcCU
     
    13041375  DTRACE_CABAC_V( uiLog2TransformBlockSize )
    13051376  DTRACE_CABAC_T( "\n" )
     1377#else
     1378  DTRACE_TU("split_transform_flag", ruiSubdivFlag )
    13061379#endif
    13071380}
     
    13821455  DTRACE_CABAC_V( uiAbsPartIdx )
    13831456  DTRACE_CABAC_T( "\n" )
     1457#else
     1458  if ( eType == TEXT_CHROMA_U )
     1459  {
     1460    DTRACE_TU("cbf_cb", uiSymbol )
     1461  }
     1462  else if ( eType == TEXT_CHROMA_V )
     1463  {
     1464    DTRACE_TU("cbf_cr", uiSymbol )
     1465  }
     1466  else
     1467  {
     1468    DTRACE_TU("cbf_luma", uiSymbol )
     1469  }
    13841470#endif
    13851471 
     
    21052191
    21062192  m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) );
    2107 
     2193  DTRACE_CU("dc_only_flag", uiSymbol)
    21082194  if( uiSymbol )
    21092195  {
     
    21292215 
    21302216  m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) );
    2131  
     2217  DTRACE_CU("dbbp_flag", uiSymbol)
    21322218  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
    21332219  AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    125125 
    126126  Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     127#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     128  Void parseDIS          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     129#else
    127130#if H_3D_SINGLE_DEPTH 
    128131  Void parseSingleDepthMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    129 #endif 
     132#endif
     133#endif
    130134  Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    131135  Void parseSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    178182  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    179183  ContextModel3DBuffer m_cCUSkipFlagSCModel;
     184#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     185  ContextModel3DBuffer m_cCUDISFlagSCModel;
     186  ContextModel3DBuffer m_cCUDISTypeSCModel;
     187#else
    180188#if H_3D_SINGLE_DEPTH
    181189  ContextModel3DBuffer m_cCUSingleDepthFlagSCModel;
    182190  ContextModel3DBuffer m_cSingleDepthValueSCModel;
     191#endif
    183192#endif
    184193  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
  • trunk/source/Lib/TLibDecoder/TDecSlice.cpp

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibDecoder/TDecSlice.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    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
     79  xDeleteArray( m_receivedIdc, m_vps->getNumViews() );
     80#else
    7881  xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 );
     82#endif
    7983}
    8084
     
    9195  m_firstReceivedPoc        = -2;
    9296
     97#if HHI_CAM_PARA_K0052 
     98  for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++)
     99  {
     100    Int curViewIdxInVps = m_vps->getVoiInVps( m_vps->getViewIndex( m_vps->getLayerIdInNuh( i ) ) ) ;
     101    m_bCamParsVaryOverTime = m_bCamParsVaryOverTime || vps->getCpInSliceSegmentHeaderFlag( curViewIdxInVps );   
     102  }
     103
     104  assert( m_receivedIdc == NULL );
     105  m_receivedIdc = new Int*[ m_vps->getNumViews() ];
     106  for (Int i = 0; i < m_vps->getNumViews(); i++)
     107  {
     108    m_receivedIdc[i] = new Int[ m_vps->getNumViews() ];
     109  }
     110
     111  xResetReceivedIdc( true );
     112
     113  for (Int voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ )
     114  {
     115    if( !m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) )
     116    {
     117      for (Int baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ )
     118      {
     119        if( m_vps->getCpPresentFlag( voiInVps, baseVoiInVps ) )
     120        {
     121          m_receivedIdc   [ baseVoiInVps ][ voiInVps ] = -1;
     122          m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] = m_vps->getCodedScale    (voiInVps) [ baseVoiInVps ];
     123          m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] = m_vps->getCodedOffset   (voiInVps) [ baseVoiInVps ];
     124
     125          m_receivedIdc   [ voiInVps ][ baseVoiInVps ] = -1;
     126          m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] = m_vps->getInvCodedScale (voiInVps) [ baseVoiInVps ];
     127          m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] = m_vps->getInvCodedOffset(voiInVps) [ baseVoiInVps ];
     128          xInitLUTs( baseVoiInVps, voiInVps, m_aaiCodedScale[ baseVoiInVps ][ voiInVps ], m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
     129          xInitLUTs( voiInVps, baseVoiInVps, m_aaiCodedScale[ voiInVps ][ baseVoiInVps ], m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
     130        }
     131      }
     132    }
     133  }
     134}
     135
     136#else
    93137  m_uiMaxViewIndex            = -1;
    94138  for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++)
     
    98142    m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, curViewIdx  ) ;
    99143  }
    100 
    101144  assert( m_receivedIdc == NULL );
    102145  m_receivedIdc = new Int*[ m_uiMaxViewIndex + 1];
     
    131174}
    132175
     176#endif
     177
     178
     179
    133180Void
    134181CamParsCollector::xResetReceivedIdc( Bool overWriteFlag )
    135182{
     183#if HHI_CAM_PARA_K0052
     184  for (Int i = 0; i < m_vps->getNumViews(); i++)
     185  { 
     186    for (Int j = 0; j < m_vps->getNumViews(); j++)
     187    {
     188#else
    136189  for (Int i = 0; i <= m_uiMaxViewIndex; i++)
    137190  { 
    138191    for (Int j = 0; j <= m_uiMaxViewIndex; j++)
    139192    {
     193#endif
    140194      if ( overWriteFlag ||  ( m_receivedIdc[i][j] != -1 ) )
    141195      {
     
    178232  CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT)
    179233{
     234#if HHI_CAM_PARA_K0052
     235  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_vps->getCpPrecision() + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
     236#else
    180237  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
     238#endif
    181239  Int     iLog2DivChroma = iLog2DivLuma + 1;
    182240
     
    255313  }
    256314
     315#if HHI_CAM_PARA_K0052
     316  UInt voiInVps          = m_vps->getVoiInVps(pcSlice->getViewIndex()); 
     317  if( m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) // check consistency of slice parameters here
     318  {   
     319    for( Int baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ )
     320    {       
     321      if ( m_vps->getCpPresentFlag( voiInVps, baseVoiInVps ) )
     322      {
     323        if ( m_receivedIdc[ voiInVps ][ baseVoiInVps ] != 0 )
     324        {     
     325          AOF( m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] == pcSlice->getInvCodedScale () [ baseVoiInVps ] );
     326          AOF( m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] == pcSlice->getInvCodedOffset() [ baseVoiInVps ] );
     327        }
     328        else
     329        {         
     330          m_receivedIdc   [ voiInVps ][ baseVoiInVps ]  = 1;
     331          m_aaiCodedScale [ voiInVps ][ baseVoiInVps ]  = pcSlice->getInvCodedScale () [ baseVoiInVps ];
     332          m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ]  = pcSlice->getInvCodedOffset() [ baseVoiInVps ];
     333          xInitLUTs( voiInVps, baseVoiInVps, m_aaiCodedScale[ voiInVps ][ baseVoiInVps ], m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
     334        }
     335        if ( m_receivedIdc[ baseVoiInVps ][ voiInVps ] != 0 )
     336        {     
     337          AOF( m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] == pcSlice->getCodedScale    () [ baseVoiInVps ] );
     338          AOF( m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] == pcSlice->getCodedOffset   () [ baseVoiInVps ] );
     339        }
     340        else
     341        {       
     342          m_receivedIdc   [ baseVoiInVps ][ voiInVps ]  = 1;
     343          m_aaiCodedScale [ baseVoiInVps ][ voiInVps ]  = pcSlice->getCodedScale    () [ baseVoiInVps ];
     344          m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ]  = pcSlice->getCodedOffset   () [ baseVoiInVps ];
     345          xInitLUTs( baseVoiInVps, voiInVps, m_aaiCodedScale[ baseVoiInVps ][ voiInVps ], m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
     346        }
     347      }
     348    }
     349  } 
     350#else
    257351  UInt uiViewIndex          = pcSlice->getViewIndex(); 
    258352  if( m_vps->getCamParPresent( uiViewIndex ) )
     
    289383    }
    290384  }
     385#endif
     386
     387
    291388}
    292389
     
    311408    if( iPOC == m_firstReceivedPoc )
    312409    {
     410#if HHI_CAM_PARA_K0052
     411      fprintf( m_pCodedScaleOffsetFile, "#ViewOrderIdx     ViewIdVal\n" );
     412      fprintf( m_pCodedScaleOffsetFile, "#------------ -------------\n" );
     413     
     414      for( UInt voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ )
     415      {
     416        fprintf( m_pCodedScaleOffsetFile, "%13d %13d\n", m_vps->getViewOIdxList( voiInVps ), m_vps->getViewIdVal( m_vps->getViewOIdxList( voiInVps ) ) );
     417      }
     418      fprintf( m_pCodedScaleOffsetFile, "\n\n");
     419      fprintf( m_pCodedScaleOffsetFile, "# StartFrame     EndFrame    TargetVOI      BaseVOI   CodedScale  CodedOffset    Precision\n" );
     420      fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" );
     421    }
     422    if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime  )
     423    {
     424      Int iS = iPOC;
     425      Int iE = ( m_bCamParsVaryOverTime ? iPOC : ~( 1 << 31 ) );
     426      for( UInt voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ )
     427      {
     428        for( UInt baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ )
     429        {
     430          if( voiInVps != baseVoiInVps )
     431          {
     432            if ( m_receivedIdc[baseVoiInVps][voiInVps] != 0 )
     433            {           
     434              fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",
     435                iS, iE, m_vps->getViewOIdxList( voiInVps ), m_vps->getViewOIdxList( baseVoiInVps ),
     436                m_aaiCodedScale [ baseVoiInVps ][ voiInVps ],
     437                m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_vps->getCpPrecision() );
     438#else
    313439      fprintf( m_pCodedScaleOffsetFile, "#  ViewIndex       ViewId\n" );
    314440      fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" );
     
    325451      Int iS = iPOC;
    326452      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
    327458      for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
    328459      {
    329460        for( UInt uiBaseIndex = 0; uiBaseIndex <= m_uiMaxViewIndex; uiBaseIndex++ )
     461#endif
    330462        {
    331463          if( uiViewIndex != uiBaseIndex )
     
    333465            if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 )
    334466            {           
     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
    335471              fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",
    336472                iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() );
     473#endif
     474#endif
    337475            }           
    338476          }
     
    417555#if !H_MV
    418556  initROM();
     557#endif
     558#if H_3D_ANNEX_SELECTION_FIX
     559  m_cCavlcDecoder.setDecTop( this );
    419560#endif
    420561  m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO );
     
    727868#endif
    728869#if H_3D
     870#if !HHI_INTER_COMP_PRED_K0052
    729871  m_apcSlicePilot->init3dToolParameters();
     872#endif
    730873#endif
    731874  pps->setSPS(sps);
     
    9551098  xActivateParameterSets();
    9561099
     1100#if SONY_MV_V_CONST_C0078
     1101  //Check Multiview Main profile constraint in G.11.1.1
     1102  //  When ViewOrderIdx[ i ] derived according to any active VPS is equal to 1
     1103  //  for the layer with nuh_layer_id equal to i in subBitstream,
     1104  //  inter_view_mv_vert_constraint_flag shall be equal to 1
     1105  //  in the sps_multilayer_extension( ) syntax structure in each active SPS for that layer.
     1106  if( m_apcSlicePilot->getSPS()->getPTL()->getGeneralPTL()->getProfileIdc()==Profile::MULTIVIEWMAIN
     1107      &&
     1108      m_apcSlicePilot->getVPS()->getViewOrderIdx(m_apcSlicePilot->getVPS()->getLayerIdInNuh(getLayerId()))==1
     1109     )
     1110  {
     1111    assert( m_apcSlicePilot->getSPS()->getInterViewMvVertConstraintFlag()==1 );
     1112  }
     1113#endif
     1114
    9571115  if (m_apcSlicePilot->isNextSlice())
    9581116  {
     
    10741232#endif
    10751233#endif
     1234#if HHI_RES_PRED_K0052
     1235  pcSlice->setIvPicLists( m_ivPicLists );         
     1236#endif
     1237
    10761238  if (bNextSlice)
    10771239  {
     
    11091271
    11101272#if H_3D
     1273#if !HHI_RES_PRED_K0052
    11111274    pcSlice->setIvPicLists( m_ivPicLists );         
     1275#endif
     1276
     1277#if HHI_INTER_COMP_PRED_K0052
     1278    pcSlice->checkInCompPredRefLayers();
    11121279#if H_3D_IV_MERGE
    11131280#if H_3D_FCO
     
    11171284#endif
    11181285#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
    11191295#endif
    11201296#if H_MV
  • trunk/source/Lib/TLibDecoder/TDecTop.h

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    9797  TComVPS* m_vps;
    9898  Int**    m_receivedIdc;
     99#if!HHI_CAM_PARA_K0052
    99100  Int      m_uiMaxViewIndex;
     101#endif
    100102  Int      m_lastPoc;
    101103  Int      m_firstReceivedPoc;
     
    243245  CamParsCollector*       m_pcCamParsCollector;
    244246#endif
     247#if H_3D_ANNEX_SELECTION_FIX
     248  Int                     m_profileIdc;
     249#endif
    245250#endif
    246251
     
    301306  Void                    setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
    302307#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  }
     331  Bool                    decProcAnnexI()           { assert( m_profileIdc != -1 ); return ( m_profileIdc == 8); }   
     332#endif
     333
    303334#endif
    304335protected:
Note: See TracChangeset for help on using the changeset viewer.