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


Ignore:
Timestamp:
16 Jan 2014, 09:56:13 (11 years ago)
Author:
tech
Message:

Merged branch/9.2-dev0@722.

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

Legend:

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

    r758 r773  
    215215}
    216216
    217 #if DLT_DIFF_CODING_IN_PPS
     217#if H_3D
    218218Void TDecCavlc::parsePPS(TComPPS* pcPPS, TComVPS* pcVPS )
    219219#else
     
    368368  if (uiCode)
    369369  {
    370 #if DLT_DIFF_CODING_IN_PPS
     370#if H_3D
    371371    parsePPSExtension( pcPPS, pcVPS );
    372372    READ_FLAG( uiCode, "pps_extension2_flag");
     
    378378        READ_FLAG( uiCode, "pps_extension_data_flag");
    379379      }
    380 #if DLT_DIFF_CODING_IN_PPS
    381     }
    382 #endif
    383   }
    384 }
    385 
    386 #if DLT_DIFF_CODING_IN_PPS
     380#if H_3D
     381    }
     382#endif
     383  }
     384}
     385
     386#if H_3D
    387387Void TDecCavlc::parsePPSExtension( TComPPS* pcPPS, TComVPS* pcVPS )
    388388{
     389  //Ed.(GT): pcVPS should not be used here. Needs to be fixed.
    389390  UInt uiCode = 0;
    390391  TComDLT* pcDLT = new TComDLT;
     
    556557
    557558  READ_FLAG(     uiCode, "video_signal_type_present_flag");           pcVUI->setVideoSignalTypePresentFlag(uiCode);
    558 #if H_MV_6_PS_O0118_33
     559#if H_MV
    559560  assert( pcSPS->getLayerId() == 0 || !pcVUI->getVideoSignalTypePresentFlag() );
    560561#endif
    561 
    562562  if (pcVUI->getVideoSignalTypePresentFlag())
    563563  {
     
    746746  {
    747747    READ_FLAG( uiCode, "update_rep_format_flag" );               pcSPS->setUpdateRepFormatFlag( uiCode == 1 );
    748 #if H_MV_6_PS_REP_FORM_18_19_20
    749748    if ( pcSPS->getUpdateRepFormatFlag() )
    750749    {
     
    754753  else
    755754  {
    756 #else
    757   }
    758  
    759   if ( pcSPS->getUpdateRepFormatFlag() )
    760   {
    761 #endif
    762755#endif
    763756  READ_UVLC(     uiCode, "chroma_format_idc" );                  pcSPS->setChromaFormatIdc( uiCode );
     
    795788
    796789#if H_MV
    797 #if H_MV_6_PS_REP_FORM_18_19_20
    798790  if ( pcSPS->getLayerId() == 0 )
    799 #else
    800   if ( pcSPS->getUpdateRepFormatFlag() )
    801 #endif
    802791  {
    803792#endif
     
    948937
    949938  READ_FLAG( uiCode, "sps_extension_flag");
    950 #if H_MV_6_PSEM_O0142_3
     939#if H_MV
    951940  pcSPS->setSpsExtensionFlag( uiCode );
    952 #endif
    953941  if (pcSPS->getSpsExtensionFlag( ) )
    954   {
    955 #if !H_MV_6_PSEM_O0142_3
    956 #if H_MV
    957     parseSPSExtension( pcSPS );
    958     READ_FLAG( uiCode, "sps_extension2_flag");
    959     if ( uiCode )
    960     {
    961 #if H_3D
    962       parseSPSExtension2( pcSPS, viewIndex, depthFlag );
    963       READ_FLAG( uiCode, "sps_extension3_flag");
    964       if ( uiCode )
    965       {
    966 #endif
    967 #endif
    968 #else   
     942#else
     943  if (uiCode)
     944#endif
     945  {
     946#if H_MV
    969947    for (Int i = 0; i < PS_EX_T_MAX_NUM; i++)
    970948    {
     
    996974          READ_FLAG( uiCode, "sps_extension_data_flag");
    997975        }
    998 #if H_MV_6_PSEM_O0142_3
    999     }
    1000 #else
    1001 #if H_MV     
    1002 #if H_3D
    1003       }
    1004 #endif
    1005     }
    1006 #endif
     976#if H_MV
     977    }
    1007978#endif
    1008979  }
     
    1014985  UInt uiCode;
    1015986  READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" );    pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);
    1016 #if !H_MV_6_SHVC_O0098_36
    1017   READ_UVLC( uiCode, "sps_shvc_reserved_zero_idc" );
    1018 #else
    1019987 
    1020988  READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets( uiCode );
     
    1031999    READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode );
    10321000  }
    1033 #endif 
    10341001}
    10351002
     
    10481015  }
    10491016#endif
    1050 
    1051 #if !CAM_HLS_F0136_F0045_F0082
    1052   UInt uiCamParPrecision = 0;
    1053   Bool bCamParSlice      = false;
    1054   if ( !depthFlag )
    1055   {     
    1056     READ_UVLC( uiCamParPrecision, "cp_precision" );
    1057     READ_FLAG( uiCode, "cp_in_slice_header_flag" );    bCamParSlice = ( uiCode == 1 );
    1058     if( !bCamParSlice )
    1059     {       
    1060       for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )
    1061       {
    1062         Int iCode;
    1063         READ_SVLC( iCode, "cp_scale" );                m_aaiTempScale  [ uiBaseIndex ][ viewIndex ]   = iCode;
    1064         READ_SVLC( iCode, "cp_off" );                  m_aaiTempOffset [ uiBaseIndex ][ viewIndex ]   = iCode;
    1065         READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale  [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];
    1066         READ_SVLC( iCode, "cp_inv_off_plus_off" );     m_aaiTempOffset [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];
    1067       }
    1068     }
    1069   }
    1070   pcSPS->initCamParaSPS( viewIndex, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );
    1071 #endif
    10721017}
    10731018#endif
     
    10811026  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
    10821027#if H_MV
    1083 #if H_MV_6_LAYER_ID_32
    10841028  READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayersMinus1( std::min( uiCode, (UInt) ( MAX_NUM_LAYER_IDS-1) )  );
    1085 #else
    1086   READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayersMinus1( uiCode  );
    1087 #endif
    10881029#else
    10891030  READ_CODE( 6,  uiCode,  "vps_reserved_zero_6bits" );            assert(uiCode == 0);
     
    11401081    }
    11411082  }
    1142 #if H_MV_6_HRD_O0217_13
     1083#if H_MV
    11431084  pcVPS->deriveLayerSetLayerIdList();
    11441085#endif
     
    11811122#if H_3D
    11821123      m_pcBitstream->readOutTrailingBits();
    1183 #if CAM_HLS_F0136_F0045_F0082
    11841124      pcVPS->createCamPars(pcVPS->getNumViews());
    1185 #endif
    11861125      parseVPSExtension2( pcVPS );   
    11871126      READ_FLAG( uiCode,  "vps_extension3_flag" );
     
    12091148  UInt uiCode;
    12101149  READ_FLAG( uiCode, "avc_base_layer_flag" );                     pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );
    1211 #if H_MV_6_PS_O0109_24
    12121150  READ_FLAG( uiCode, "vps_vui_present_flag" );                    pcVPS->setVpsVuiPresentFlag( uiCode == 1 );  if ( pcVPS->getVpsVuiPresentFlag() )
    12131151  { 
    1214 #endif
    12151152  READ_CODE( 16, uiCode, "vps_vui_offset" );                      pcVPS->setVpsVuiOffset( uiCode );
    1216 #if H_MV_6_PS_O0109_24
    1217   }
    1218 #endif
     1153  }
    12191154
    12201155  READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
     
    12631198  }
    12641199
    1265 #if H_MV_6_PS_O0109_22
    12661200  READ_CODE( 4, uiCode, "view_id_len" ); pcVPS->setViewIdLen( uiCode );
    12671201
     
    12801214    }
    12811215  }
    1282 #else
    1283   // GT spec says: trac #39
    1284   // if ( pcVPS->getNumViews() > 1 ) 
    1285   //   However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val.
    1286   {
    1287     READ_CODE( 4, uiCode, "view_id_len_minus1" ); pcVPS->setViewIdLenMinus1( uiCode );
    1288   }
    1289 
    1290   for( Int i = 0; i < pcVPS->getNumViews(); i++ )
    1291   {
    1292     READ_CODE( pcVPS->getViewIdLenMinus1( ) + 1, uiCode, "view_id_val[i]" ); pcVPS->setViewIdVal( i, uiCode );
    1293   }
    1294 #endif
    12951216
    12961217
     
    13021223    }
    13031224  }
    1304 #if H_MV_6_MISC_O0062_31
    13051225  pcVPS->setRefLayers();
    1306 #endif
    1307 #if H_MV_6_ILDSD_O0120_26
    13081226  READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 );
    13091227  if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() )
     
    13231241    }
    13241242  }
    1325 #endif
    13261243  READ_FLAG( uiCode, "max_tid_ref_present_flag" ); pcVPS->setMaxTidRefPresentFlag( uiCode == 1 );
    13271244
     
    13301247    for( Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )
    13311248    {
    1332 #if H_MV_6_ILDDS_O0225_30
    13331249      for( Int j = i + 1; j <= pcVPS->getMaxLayersMinus1(); j++ )
    13341250      {
     
    13381254        }
    13391255      }
    1340 #else
    1341       READ_CODE( 3, uiCode,       "max_tid_il_ref_pics_plus1[i]" );      pcVPS->setMaxTidIlRefPicPlus1( i , uiCode );
    1342 #endif
    13431256    }
    13441257  }
     
    13541267    {
    13551268      READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode );
    1356 #if H_MV_6_PS_O0109_23
    13571269      pcVPS->checkProfileRefMinus1( i );     
    1358 #endif
    13591270    }
    13601271    parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
     
    13791290  if( numOutputLayerSets > 1)
    13801291  {
    1381 #if H_MV_6_PS_0109_25
    13821292    READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" ); pcVPS->setDefaultOneTargetOutputLayerIdc( uiCode );
    13831293    pcVPS->checkDefaultOneTargetOutputLayerIdc();
    1384 #else
    1385     READ_FLAG( uiCode, "default_one_target_output_layer_flag" ); pcVPS->setDefaultOneTargetOutputLayerFlag(  uiCode == 1);
    1386 #endif
    13871294  } 
    13881295
    1389 #if H_MV_6_HRD_O0217_13
    13901296  pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 ));
    13911297  pcVPS->setOutputLayerSetIdxMinus1(0, -1);
    1392 #endif
    13931298  for( Int i = 1; i < numOutputLayerSets; i++ )
    13941299  {
     
    14011306      }       
    14021307    }
    1403 #if H_MV_6_HRD_O0217_13
    14041308    else
    14051309    { // These inference rules would also be helpful in spec text
     
    14101314      }
    14111315    }
    1412 #endif
    14131316
    14141317    if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
     
    14171320    }
    14181321  }
    1419 #if H_MV_6_GEN_0153_28
    14201322  if( pcVPS->getMaxLayersMinus1() > 0 )
    14211323  {
    14221324    READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 );
    14231325  }
    1424 #endif
    1425 #if H_MV_6_HRD_O0217_13
    14261326  pcVPS->deriveTargetLayerIdLists();
    1427 #endif
    14281327  READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 );
    14291328  if ( pcVPS->getRepFormatIdxPresentFlag() )
     
    14341333  for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ )
    14351334  {
    1436 #if H_MV_6_PS_REP_FORM_18_19_20
    14371335    assert( pcVPS->getRepFormat(i) == NULL );
    14381336    TComRepFormat* curRepFormat = new TComRepFormat();
     
    14401338    parseRepFormat( i, curRepFormat ,  prevRepFormat);
    14411339    pcVPS->setRepFormat(i, curRepFormat );
    1442 #else
    1443     assert( pcVPS->getRepFormat(i) == NULL );
    1444     TComRepFormat* repFormat = new TComRepFormat();
    1445     parseRepFormat( repFormat );
    1446     pcVPS->setRepFormat(i, repFormat );
    1447 #endif
    14481340  }
    14491341
     
    14541346      if( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
    14551347      {
    1456 #if H_MV_6_PS_REP_FORM_18_19_20
    14571348        READ_CODE( 8, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
    1458 #else
    1459         READ_CODE( 4, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
    1460 #endif
    14611349      }
    14621350    }
     
    14641352
    14651353  READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 );
    1466 #if H_MV_6_MISC_O0062_31
    14671354  for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
    14681355  {
     
    14721359    }
    14731360  }
    1474 #endif
    1475 
    1476 #if H_MV_6_HRD_O0217_13
     1361
    14771362  parseDpbSize( pcVPS );
    1478 #endif
    1479 
    1480 #if !H_MV_6_PS_O0223_29
    1481   READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPS->setCrossLayerIrapAlignedFlag( uiCode == 1 );
    1482 #endif
     1363
    14831364  READ_UVLC( uiCode, "direct_dep_type_len_minus2")    ; pcVPS->setDirectDepTypeLenMinus2   ( uiCode );
    14841365
    1485 #if H_MV_6_PS_O0096_21
    14861366  READ_FLAG( uiCode, "default_direct_dependency_flag" ); pcVPS->setDefaultDirectDependencyFlag( uiCode == 1 );
    14871367  if ( pcVPS->getDefaultDirectDependencyFlag( ) )
     
    15071387    }
    15081388  } 
    1509 #else
    1510   for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
    1511   {
    1512     for( Int j = 0; j < i; j++ )
    1513     {
    1514       if (pcVPS->getDirectDependencyFlag( i, j) )
    1515       {       
    1516         READ_CODE( pcVPS->getDirectDepTypeLenMinus2( ) + 2,  uiCode, "direct_dependency_type[i][j]" ); pcVPS->setDirectDependencyType( i, j , uiCode);
    1517       }
    1518     }
    1519   }
    1520 #endif
    15211389
    15221390  READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" );
    1523 #if !H_MV_6_PS_O0109_24
    1524   READ_FLAG( uiCode, "vps_vui_present_flag" )       ; pcVPS->setVpsVuiPresentFlag( uiCode == 1 );
    1525 #endif
    15261391
    15271392  if( pcVPS->getVpsVuiPresentFlag() )
     
    15321397
    15331398  pcVPS->checkVPSExtensionSyntax();
    1534 #if !H_MV_6_MISC_O0062_31
    1535   pcVPS->setRefLayers();
    1536 #endif
    1537 }
    1538 
    1539 #if H_MV_6_PS_REP_FORM_18_19_20
     1399}
     1400
    15401401Void TDecCavlc::parseRepFormat( Int i, TComRepFormat* pcRepFormat, TComRepFormat* pcPrevRepFormat )
    1541 #else
    1542 Void TDecCavlc::parseRepFormat( TComRepFormat* pcRepFormat )
    1543 #endif
    15441402{
    15451403  assert( pcRepFormat );
     
    15471405  UInt uiCode;
    15481406
    1549 #if H_MV_6_PS_REP_FORM_18_19_20
    15501407  READ_CODE( 16, uiCode, "pic_width_vps_in_luma_samples" );  pcRepFormat->setPicWidthVpsInLumaSamples ( uiCode );
    15511408  READ_CODE( 16, uiCode, "pic_height_vps_in_luma_samples" ); pcRepFormat->setPicHeightVpsInLumaSamples( uiCode );
     
    15561413  if ( pcRepFormat->getChromaAndBitDepthVpsPresentFlag() )
    15571414  { 
    1558 #endif
    15591415  READ_CODE( 2,  uiCode, "chroma_format_vps_idc" );          pcRepFormat->setChromaFormatVpsIdc       ( uiCode );
    15601416  if ( pcRepFormat->getChromaFormatVpsIdc() == 3 )
     
    15621418    READ_FLAG( uiCode, "separate_colour_plane_vps_flag" ); pcRepFormat->setSeparateColourPlaneVpsFlag( uiCode == 1 );
    15631419  }
    1564 #if !H_MV_6_PS_REP_FORM_18_19_20
    1565   READ_CODE( 16, uiCode, "pic_width_vps_in_luma_samples" );  pcRepFormat->setPicWidthVpsInLumaSamples ( uiCode );
    1566   READ_CODE( 16, uiCode, "pic_height_vps_in_luma_samples" ); pcRepFormat->setPicHeightVpsInLumaSamples( uiCode );
    1567 #endif
    15681420  READ_CODE( 4,  uiCode, "bit_depth_vps_luma_minus8" );      pcRepFormat->setBitDepthVpsLumaMinus8    ( uiCode );
    15691421  READ_CODE( 4,  uiCode, "bit_depth_vps_chroma_minus8" );    pcRepFormat->setBitDepthVpsChromaMinus8  ( uiCode );
    1570 #if H_MV_6_PS_REP_FORM_18_19_20
    15711422  }
    15721423  else
     
    15741425    pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, false );
    15751426  }
    1576 #endif
    15771427}
    15781428
     
    15871437
    15881438  UInt uiCode;
    1589 #if H_MV_6_PS_O0223_29
    15901439  READ_FLAG( uiCode, "cross_layer_pic_type_aligned_flag" ); pcVPSVUI->setCrossLayerPicTypeAlignedFlag( uiCode == 1 );
    15911440  if ( !pcVPSVUI->getCrossLayerPicTypeAlignedFlag() )
     
    15931442    READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 );
    15941443  }
    1595 #endif
    15961444  READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 );
    15971445  READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 );
     
    16241472  }
    16251473
    1626 #if H_MV_6_O0226_37
    16271474  READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 );
    16281475  if( !pcVPSVUI->getTilesNotInUseFlag() )
     
    16591506    }
    16601507  }
    1661 #else
    1662   for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
    1663   {
    1664     for( Int  j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ )
    1665     {
    1666       READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVPSVUI->setTileBoundariesAlignedFlag( i, j, uiCode == 1 );
    1667     }
    1668   }
    1669 #endif
    16701508
    16711509  READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 );
     
    16901528  }
    16911529
    1692 #if H_MV_6_PS_O0118_33
    16931530  READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );
    16941531  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
     
    17241561    }
    17251562  }
    1726 #endif
    1727 #if H_MV_6_HRD_O0164_15
    17281563  READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 );
    17291564  if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
     
    17311566    parseVpsVuiBspHrdParameters( pcVPS );
    17321567}
    1733 #endif
    1734 }
    1735 
    1736 #if H_MV_6_HRD_O0164_15
     1568}
     1569
    17371570Void TDecCavlc::parseVpsVuiBspHrdParameters( TComVPS* pcVPS )
    17381571{
     
    17911624  } 
    17921625
    1793 #endif
    1794 
    1795 #if H_MV_6_PS_O0118_33
     1626
    17961627Void TDecCavlc::parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo )
    17971628{
     
    18031634  READ_CODE( 8, uiCode, "matrix_coeffs_vps" );            pcVideoSignalInfo->setMatrixCoeffsVps( uiCode );
    18041635}
    1805 #endif
    1806 
    1807 #if H_MV_6_HRD_O0217_13
     1636
    18081637Void TDecCavlc::parseDpbSize( TComVPS* vps )
    18091638{
     
    18471676}
    18481677#endif
    1849 #endif
    18501678
    18511679#if H_3D
     
    18591687    pcVPS->setARPStepNum( i, 1 );
    18601688#endif 
    1861 #if MTK_SPIVMP_F0110
     1689#if H_3D_SPIVMP
    18621690    pcVPS->setSubPULog2Size(i, 0);
    18631691#endif
     
    18681696#if H_3D_IV_MERGE
    18691697        READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
    1870 #if MTK_SPIVMP_F0110
     1698#if H_3D_SPIVMP
    18711699        READ_UVLC (uiCode, "log2_sub_PU_size_minus2");     pcVPS->setSubPULog2Size(i, uiCode+2);
    18721700#endif
     
    18851713      else
    18861714      {
    1887 #if QC_DEPTH_IV_MRG_F0125 && H_3D_IV_MERGE
     1715#if H_3D_IV_MERGE
    18881716        if(i!=1)
    18891717        {
     
    18911719        }
    18921720#endif
    1893 #if MTK_SPIVMP_F0110
     1721#if H_3D_SPIVMP
    18941722        if (i!=1)
    18951723        {
     
    18971725        }
    18981726#endif
    1899 #if SEC_MPI_ENABLING_MERGE_F0150
     1727#if H_3D_IV_MERGE
    19001728        READ_FLAG( uiCode, "mpi_flag[i]" );             pcVPS->setMPIFlag( i, uiCode == 1 ? true : false );
    19011729#endif
    19021730        READ_FLAG( uiCode, "vps_depth_modes_flag[i]" );             pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false );
    19031731        //          READ_FLAG( uiCode, "lim_qt_pred_flag[i]");                  pcVPS->setLimQtPreFlag     ( i, uiCode == 1 ? true : false );
    1904 #if H_3D_DIM_DLT
    1905 #if !DLT_DIFF_CODING_IN_PPS
    1906         if( pcVPS->getVpsDepthModesFlag( i ) )
    1907         {
    1908           READ_FLAG( uiCode, "dlt_flag[i]" );                       pcVPS->setUseDLTFlag( i, uiCode == 1 ? true : false );
    1909         }
    1910         if( pcVPS->getUseDLTFlag( i ) )
    1911         {
    1912           // decode mapping
    1913           UInt uiNumDepthValues;
    1914           // parse number of values in DLT
    1915           READ_UVLC(uiNumDepthValues, "num_depth_values_in_dlt[i]");
    1916 
    1917           // parse actual DLT values
    1918           Int* aiIdx2DepthValue = (Int*) calloc(uiNumDepthValues, sizeof(Int));
    1919           for(Int d=0; d<uiNumDepthValues; d++)
    1920           {
    1921             READ_UVLC(uiCode, "dlt_depth_value[i][d]");
    1922             aiIdx2DepthValue[d] = (Int)uiCode;
    1923           }
    1924 
    1925           pcVPS->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);
    1926 
    1927           // clean memory
    1928           free(aiIdx2DepthValue);
    1929         }
    1930 #endif
    1931 #endif
    19321732#if H_3D_INTER_SDC
    19331733            READ_FLAG( uiCode, "depth_inter_SDC_flag" );              pcVPS->setInterSDCFlag( i, uiCode ? true : false );
     
    19361736    }
    19371737  }
    1938 #if CAM_HLS_F0136_F0045_F0082
     1738
    19391739  UInt uiCamParPrecision = 0;
    19401740  Bool bCamParSlice      = false;
     
    19621762    }
    19631763  }
    1964 #endif
     1764
    19651765  READ_FLAG( uiCode, "iv_mv_scaling_flag");                       pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );
    19661766}
     
    20001800  sps->inferRepFormat  ( vps , rpcSlice->getLayerId() );
    20011801  sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) );   
    2002 #if H_MV_6_PS_O0118_33
    20031802  if ( sps->getVuiParametersPresentFlag() )
    20041803  {
    20051804    sps->getVuiParameters()->inferVideoSignalInfo( vps, rpcSlice->getLayerId() );
    20061805  }
    2007 #endif
    20081806  rpcSlice->setVPS(vps);     
    20091807  rpcSlice->setViewId   ( vps->getViewId   ( rpcSlice->getLayerId() )      );
     
    20591857#if H_MV   
    20601858    Int esb = 0; //Don't use i, otherwise will shadow something below
    2061 #if !H_MV_6_RALS_O0149_11
     1859
     1860    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
     1861    {
     1862      esb++;
     1863      READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );
     1864    }
     1865
     1866    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
     1867    {
     1868      esb++;
     1869      READ_FLAG( uiCode, "cross_layer_bla_flag" ); rpcSlice->setCrossLayerBlaFlag( uiCode == 1 );
     1870    }
     1871    rpcSlice->checkCrossLayerBlaFlag( );
     1872
    20621873    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
    20631874    {
     
    20651876      READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 );
    20661877    }
    2067 #endif
    2068 
    2069     if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
    2070     {
    2071       esb++;
    2072       READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );
    2073     }
    2074 
    2075 #if H_MV_6_RALS_O0149_11
    2076     if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
    2077     {
    2078       esb++;
    2079       READ_FLAG( uiCode, "cross_layer_bla_flag" ); rpcSlice->setCrossLayerBlaFlag( uiCode == 1 );
    2080     }
    2081     rpcSlice->checkCrossLayerBlaFlag( );
    2082 
    2083     if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
    2084     {
    2085       esb++;
    2086       READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 );
    2087     }
    2088 #endif
    20891878
    20901879    for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++)   
     
    21111900
    21121901
    2113 #if H_MV_6_POC_31_35_38
     1902#if H_MV
    21141903    UInt slicePicOrderCntLsb = 0;
    21151904    Int iPOClsb = slicePicOrderCntLsb;  // Needed later
     
    21621951    if( rpcSlice->getIdrPicFlag() )
    21631952    {
    2164 #if !H_MV_6_POC_31_35_38
     1953#if !H_MV
    21651954      rpcSlice->setPOC(0);
    21661955#endif
     
    21771966    else
    21781967    {
    2179 #if !H_MV_6_POC_31_35_38
     1968#if !H_MV
    21801969      READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb"); 
    21811970      Int iPOClsb = uiCode;
     
    22051994      }
    22061995      rpcSlice->setPOC              (iPOCmsb+iPOClsb);
    2207 #if H_MV
    2208       if ( rpcSlice->getPocResetFlag() ) 
    2209       {
    2210         rpcSlice->setPocBeforeReset   ( rpcSlice->getPOC() );
    2211         rpcSlice->setPOC              ( 0 );
    2212 
    2213       }     
    2214 #endif
    22151996#endif
    22161997      TComReferencePictureSet* rps;
     
    23472128    }
    23482129#if H_MV
    2349 #if H_MV_6_ILDDS_ILREFPICS_27_34
    23502130    Bool interLayerPredLayerIdcPresentFlag = false;
    2351 #endif
    23522131    Int layerId       = rpcSlice->getLayerId();
    23532132    if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )
     
    23622141        if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )
    23632142        {
    2364 #if H_MV_6_ILDDS_ILREFPICS_27_34
    23652143          interLayerPredLayerIdcPresentFlag = true;
    2366 #endif
    23672144          for( Int idx = 0; idx < rpcSlice->getNumActiveRefLayerPics(); idx++ )   
    23682145          {
     
    23722149      } 
    23732150    }
    2374 #if H_MV_6_ILDDS_ILREFPICS_27_34
    23752151    if ( !interLayerPredLayerIdcPresentFlag )
    23762152    {
     
    23802156      }
    23812157    }
    2382 #endif
    23832158#endif
    23842159    if(sps->getUseSAO())
     
    25502325    }
    25512326#if H_3D_IC
    2552 #if SEC_ONLY_TEXTURE_IC_F0151
    25532327    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth())
    2554 #else
    2555     else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) )
    2556 #endif
    25572328    {
    25582329      UInt uiCodeTmp = 0;
     
    25722343      READ_UVLC( uiCode, "five_minus_max_num_merge_cand");
    25732344#if H_3D_IV_MERGE
    2574 #if SEC_MPI_ENABLING_MERGE_F0150
    25752345      if(rpcSlice->getIsDepth())
    25762346      {
     
    25842354        rpcSlice->setMaxNumMergeCand(( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
    25852355      }
    2586 #else
    2587       Bool ivMvPredFlag = rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ;
    2588       rpcSlice->setMaxNumMergeCand(( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
    2589 #endif
     2356
    25902357#else
    25912358      rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode);
     
    26892456  }
    26902457
    2691 #if CAM_HLS_F0044
    2692 #if CAM_HLS_F0136_F0045_F0082
     2458#if H_3D
    26932459  if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && !rpcSlice->getIsDepth() )
    2694 #else
    2695   if( rpcSlice->getSPS()->hasCamParInSliceHeader() )
    2696 #endif
    26972460  {
    26982461    UInt uiViewIndex = rpcSlice->getViewIndex();
     
    27062469    rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset );
    27072470  }
    2708 
    27092471#endif
    27102472
     
    27122474  {
    27132475    READ_UVLC(uiCode,"slice_header_extension_length");
    2714 #if H_3D && !CAM_HLS_F0044
    2715 #if CAM_HLS_F0136_F0045_F0082
    2716     if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && !rpcSlice->getIsDepth() )
    2717 #else
    2718     if( rpcSlice->getSPS()->hasCamParInSliceHeader() )
    2719 #endif
    2720     {
    2721       UInt uiViewIndex = rpcSlice->getViewIndex();
    2722       for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
    2723       {
    2724         READ_SVLC( iCode, "cp_scale" );                m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ] = iCode;
    2725         READ_SVLC( iCode, "cp_off" );                  m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ] = iCode;
    2726         READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ];
    2727         READ_SVLC( iCode, "cp_inv_off_plus_off" );     m_aaiTempOffset[ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ];
    2728       }
    2729       rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset );
    2730     }
    2731 
    2732     READ_FLAG(uiCode,"slice_segment_header_extension2_flag");
    2733     if ( uiCode )
    2734     {   
    2735       READ_UVLC(uiCode,"slice_header_extension2_length");
    2736       for(Int i=0; i<uiCode; i++)
    2737       {
    2738         UInt ignore;
    2739         READ_CODE(8,ignore,"slice_header_extension2_data_byte");
    2740       }
    2741     }
    2742   }
    2743 #else
     2476
    27442477    for(Int i=0; i<uiCode; i++)
    27452478    {
     
    27482481    }
    27492482  }
    2750 #endif
     2483
    27512484  m_pcBitstream->readByteAlignment();
    27522485
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r758 r773  
    7878#if H_MV
    7979  Void  parseVPSExtension   ( TComVPS* pcVPS );
    80 #if H_MV_6_PS_REP_FORM_18_19_20
    8180  Void  parseRepFormat      ( Int i, TComRepFormat* curRepFormat, TComRepFormat* prevRepFormat );
    82 #else
    83   Void  parseRepFormat      ( TComRepFormat* pcRepFormat );
    84 #endif
    8581  Void  parseVPSVUI         ( TComVPS* pcVPS );
    86 #if H_MV_6_PS_O0118_33
    8782  Void parseVideoSignalInfo ( TComVideoSignalInfo* pcVideoSignalInfo );
    88 #endif
    89 #if H_MV_6_HRD_O0217_13
    9083  Void  parseDpbSize        ( TComVPS* pcVPS );
    91 #endif
    92 #if H_MV_6_HRD_O0164_15
    9384  Void parseVpsVuiBspHrdParameters( TComVPS* pcVPS );
    94 #endif
    9585#endif
    9686
     
    10696#endif
    10797
    108 #if H_3D && DLT_DIFF_CODING_IN_PPS
     98#if H_3D
    10999  Void  parsePPS            ( TComPPS* pcPPS, TComVPS* pcVPS );
    110100  Void  parsePPSExtension   ( TComPPS* pcPPS, TComVPS* pcVPS );
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r758 r773  
    135135Void TDecCu::decompressCU( TComDataCU* pcCU )
    136136{
    137 #if !QC_DEPTH_IV_MRG_F0125
     137#if !H_3D_IV_MERGE
    138138  xDecompressCU( pcCU, 0,  0 );
    139139#endif
     
    315315      m_ppcCU[uiDepth]->setHeight ( 0, pcCU->getSlice()->getSPS()->getMaxCUHeight()/(1<<uiDepth)  );
    316316      m_ppcCU[uiDepth]->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );     
    317 #if QC_DEPTH_IV_MRG_F0125
     317#if H_3D_IV_MERGE
    318318      if( pcCU->getSlice()->getIsDepth())
    319319      {
     
    333333        DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
    334334      }
    335 #if QC_DEPTH_IV_MRG_F0125
     335#if H_3D_IV_MERGE
    336336      }
    337337#endif
     
    390390    UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx);
    391391
    392 #if LGE_SHARP_VSP_INHERIT_F0104
    393392#if H_3D_IC
    394393    m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     
    396395#if H_3D_ARP
    397396    m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
    398 #endif
    399397#endif
    400398
     
    403401    memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    404402    InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
    405 #if MTK_SPIVMP_F0110
     403#if H_3D_SPIVMP
    406404    Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
    407405    memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
     
    411409    puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()];
    412410#endif
    413 #if ETRIKHU_MERGE_REUSE_F0093
    414411    m_ppcCU[uiDepth]->initAvailableFlags();
    415412    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    416413    m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo
    417 #if MTK_SPIVMP_F0110
     414#if H_3D_SPIVMP
    418415      , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
    419416#endif
    420417      , numValidMergeCand, uiMergeIndex );
    421 #else
    422     m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand, uiMergeIndex );
    423 #endif
    424418    pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    425419#else
    426 #if ETRIKHU_MERGE_REUSE_F0093
     420#if H_3D
    427421    m_ppcCU[uiDepth]->initAvailableFlags();
    428422    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     
    468462      }
    469463    }
    470 #if MTK_SPIVMP_F0110
     464#if H_3D_SPIVMP
    471465    pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    472466    if (bSPIVMPFlag[uiMergeIndex])
     
    488482      }
    489483    }
    490 #if MTK_F0110_FIX
    491484    delete[] pcMvFieldSP;
    492485    delete[] puhInterDirSP;
    493 #else
    494     delete pcMvFieldSP;
    495     delete puhInterDirSP;
    496 #endif
    497 #endif
    498 #if !LGE_SHARP_VSP_INHERIT_F0104
    499 #if H_3D_IC
    500     m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    501 #endif
    502 #if H_3D_ARP
    503     m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
    504 #endif
    505486#endif
    506487
    507488    xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    508 #if QC_DEPTH_IV_MRG_F0125
     489#if H_3D_IV_MERGE
    509490    xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
    510491#endif
     
    522503    {
    523504      xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    524 #if QC_DEPTH_IV_MRG_F0125
     505#if H_3D_IV_MERGE
    525506      xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
    526507#endif
     
    534515  // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
    535516  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
    536 #if !LGE_SHARP_VSP_INHERIT_F0104
    537 #if H_3D_IC
    538   m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    539 #endif
    540 #if H_3D_ARP
    541   m_pcEntropyDecoder->decodeARPW    ( pcCU , uiAbsPartIdx , uiDepth ); 
    542 #endif 
    543 #endif
    544517#if H_3D_INTER_SDC
    545518  m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
     
    550523  setdQPFlag( bCodeDQP );
    551524  xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    552 #if QC_DEPTH_IV_MRG_F0125
     525#if H_3D_IV_MERGE
    553526  xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
    554527#endif
     
    568541{
    569542  TComPic* pcPic = pcCU->getPic();
    570 #if !QC_DEPTH_IV_MRG_F0125 
     543#if !H_3D_IV_MERGE
    571544  Bool bBoundary = false;
    572545  UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
     
    780753    for( UInt uiX = 0; uiX < uiWidth; uiX++ )
    781754    {
    782 #if LGE_PRED_RES_CODING_DLT_DOMAIN_F0159
    783 #if DLT_DIFF_CODING_IN_PPS
     755#if H_3D
    784756      if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )
    785 #else
    786       if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )
    787 #endif
    788         {
    789 #if DLT_DIFF_CODING_IN_PPS
    790           pReco    [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) );
    791 #else
    792           pReco    [ uiX ] = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) );
    793 #endif
    794         }
    795         else
    796         {
    797       pReco    [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] );
    798         }
     757      {
     758        pReco    [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) );
     759      }
     760      else
     761      {
     762        pReco    [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] );
     763      }
    799764#else
    800765      pReco    [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] );
     
    1008973  {
    1009974#if H_3D_DIM_DLT
    1010 #if DLT_DIFF_CODING_IN_PPS
    1011975    Pel   pPredIdx    = pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] );
    1012976    Pel   pResiIdx    = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx);
    1013977    Pel   pRecoValue  = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pPredIdx + pResiIdx );
    1014 #else
    1015     Pel   pPredIdx    = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] );
    1016     Pel   pResiIdx    = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx);
    1017     Pel   pRecoValue  = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pPredIdx + pResiIdx );
    1018 #endif
    1019978
    1020979    apDCResiValues[uiSegment]  = pRecoValue - apDCPredValues[uiSegment];
  • trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r735 r773  
    111111  pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
    112112
    113 #if SEC_ONLY_TEXTURE_IC_F0151
    114113  if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() )
    115 #else
    116   if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) )
    117 #endif
    118114  {
    119115    return;
     
    213209  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
    214210#endif
    215 #if MTK_SPIVMP_F0110
     211#if H_3D_SPIVMP
    216212  Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
    217213  TComMvField*  pcMvFieldSP;
     
    245241      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
    246242      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    247 #if LGE_SHARP_VSP_INHERIT_F0104
    248243#if H_3D_IC
    249244      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     
    251246#if H_3D_ARP
    252247      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    253 #endif
    254248#endif
    255249      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 )
     
    262256          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    263257          InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
    264 #if MTK_SPIVMP_F0110
     258#if H_3D_SPIVMP
    265259          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    266260#endif
    267 #if ETRIKHU_MERGE_REUSE_F0093
    268261          pcSubCU->initAvailableFlags();
    269262          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    270263          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo
    271 #if MTK_SPIVMP_F0110
     264#if H_3D_SPIVMP
    272265            , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
    273266#endif
    274267            , numValidMergeCand );
    275 #else
    276           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand );
    277 #endif
    278268          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    279269
     
    283273          }
    284274#else
    285 #if ETRIKHU_MERGE_REUSE_F0093
     275#if H_3D
    286276          pcSubCU->initAvailableFlags();
    287277          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
     
    303293        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    304294        InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
    305 #if MTK_SPIVMP_F0110
     295#if H_3D_SPIVMP
    306296        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    307297#endif
    308 #if ETRIKHU_MERGE_REUSE_F0093
    309298        pcSubCU->initAvailableFlags();
    310299        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    311300        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo
    312 #if MTK_SPIVMP_F0110
     301#if H_3D_SPIVMP
    313302          , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
    314303#endif
    315304          ,numValidMergeCand, uiMergeIndex );
    316 #else
    317         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo,numValidMergeCand, uiMergeIndex );
    318 #endif
    319305        pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    320306        if(vspFlag[uiMergeIndex])
     
    323309        }
    324310#else
    325 #if ETRIKHU_MERGE_REUSE_F0093
     311#if H_3D
    326312        pcSubCU->initAvailableFlags();
    327313        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     
    345331        }
    346332      }
    347 #if MTK_SPIVMP_F0110
     333#if H_3D_SPIVMP
    348334      pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 
    349335      if (bSPIVMPFlag[uiMergeIndex] != 0)
     
    381367        }
    382368      }
    383 #if LGE_SHARP_VSP_INHERIT_F0104
    384369#if H_3D_IC
    385370      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     
    387372#if H_3D_ARP
    388373      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    389 #endif
    390374#endif
    391375    }
     
    401385    }
    402386  }
    403 #if MTK_SPIVMP_F0110
    404 #if MTK_F0110_FIX
     387#if H_3D_SPIVMP
    405388  delete[] pcMvFieldSP;
    406389  delete[] puhInterDirSP;
    407 #else
    408   delete pcMvFieldSP;
    409   delete puhInterDirSP;
    410 #endif
    411390#endif
    412391  return;
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r758 r773  
    7171  virtual Void  parseSPS                  ( TComSPS* pcSPS )                                      = 0;
    7272#endif
    73 #if DLT_DIFF_CODING_IN_PPS
     73#if H_3D
    7474  virtual Void  parsePPS                  ( TComPPS* pcPPS, TComVPS* pcVPS )                      = 0;
    7575#else
     
    152152  Void    decodeSPS                   ( TComSPS* pcSPS     )    { m_pcEntropyDecoderIf->parseSPS(pcSPS);                    }
    153153#endif
    154 #if DLT_DIFF_CODING_IN_PPS
     154#if H_3D
    155155  Void    decodePPS                   ( TComPPS* pcPPS, TComVPS* pcVPS )    { m_pcEntropyDecoderIf->parsePPS(pcPPS, pcVPS);                    }
    156156#else
  • trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r758 r773  
    8989#if H_3D_DIM_DMM
    9090, m_cDmm1DataSCModel          ( 1,             1,               NUM_DMM1_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    91 #if !SEC_DMM3_RBC_F0147
    92 , m_cDmm3DataSCModel          ( 1,             1,               NUM_DMM3_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    93 #endif
    94 #endif
    95 #if H_3D_DIM_RBC
    96 , m_cRbcDataSCModel           ( 1,             1,               NUM_RBC_DATA_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    9791#endif
    9892#if H_3D_DIM_SDC
     
    178172#if H_3D_DIM_DMM
    179173  m_cDmm1DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM1_DATA );
    180 #if !SEC_DMM3_RBC_F0147
    181   m_cDmm3DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM3_DATA );
    182 #endif
    183 #endif
    184 #if H_3D_DIM_RBC
    185   m_cRbcDataSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_RBC_DATA );
    186174#endif
    187175#if H_3D_DIM_SDC
     
    253241#if H_3D_DIM_DMM
    254242  m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
    255 #if !SEC_DMM3_RBC_F0147
    256   m_cDmm3DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA );
    257 #endif
    258 #endif
    259 #if H_3D_DIM_RBC
    260   m_cRbcDataSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_RBC_DATA );
    261243#endif
    262244#if H_3D_DIM_SDC
     
    414396}
    415397
    416 #if QC_DIM_DELTADC_UNIFY_F0132
    417398Void TDecSbac::xParseDimDeltaDC( Pel& rValDeltaDC, UInt uiNumSeg )
    418399{
     
    431412  }
    432413}
    433 #else
    434 Void TDecSbac::xParseDimDeltaDC( Pel& rValDeltaDC, UInt dimType )
    435 {
    436   UInt absValDeltaDC = 0;
    437   xReadExGolombLevel( absValDeltaDC, m_cDdcDataSCModel.get(0, 0, (RBC_IDX == dimType) ? 1 : 0) );
    438   rValDeltaDC = (Pel)absValDeltaDC;
    439 
    440   if( rValDeltaDC != 0 )
    441   {
    442     UInt uiSign;
    443     m_pcTDecBinIf->decodeBinEP( uiSign );
    444     if ( uiSign )
    445     {
    446       rValDeltaDC = -rValDeltaDC;
    447     }
    448   }
    449 }
    450 #endif
     414
    451415
    452416#if H_3D_DIM_DMM
     
    461425  ruiTabIdx = uiIdx;
    462426}
    463 #if !SEC_DMM3_RBC_F0147
    464 Void TDecSbac::xParseDmm3WedgeIdx( UInt& ruiIntraIdx, Int iNumBit )
    465 {
    466   UInt uiSymbol, uiIdx = 0;
    467   for( Int i = 0; i < iNumBit; i++ )
    468   {
    469     m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmm3DataSCModel.get(0, 0, 0) );
    470     uiIdx += uiSymbol << i;
    471   }
    472   ruiIntraIdx = uiIdx;
    473 }
    474 #endif
    475 #endif
    476 #if H_3D_DIM_RBC
    477 Void TDecSbac::xParseRbcEdge( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    478 {
    479   UInt uiSymbol = 0;
    480 
    481   // 1. Top(0) or Left(1)
    482   UChar ucLeft;
    483   m_pcTDecBinIf->decodeBinEP( uiSymbol );
    484   ucLeft = uiSymbol;
    485 
    486   // 2. Start position (lowest bit first)
    487   UChar ucStart = 0;
    488   for( UInt ui = 0; ui < 6 - uiDepth; ui++ )
    489   {
    490     m_pcTDecBinIf->decodeBinEP( uiSymbol );
    491     ucStart |= (uiSymbol << ui);
    492   }
    493 
    494   // 3. Number of edges
    495   UChar ucMax = 0;
    496   for( UInt ui = 0; ui < 7 - uiDepth; ui++ )
    497   {
    498     m_pcTDecBinIf->decodeBinEP( uiSymbol );
    499     ucMax |= (uiSymbol << ui);
    500   }
    501   ucMax++; // +1
    502 
    503   // 4. Edges
    504   UChar* pucSymbolList = (UChar*) xMalloc( UChar, 256 * RBC_MAX_EDGE_NUM_PER_4x4 );
    505   for( Int iPtr = 0; iPtr < ucMax; iPtr++ )
    506   {
    507     UChar ucEdge = 0;
    508     UInt  uiReorderEdge = 0;
    509     for( UInt ui = 0; ui < 6; ui++ )
    510     {
    511       m_pcTDecBinIf->decodeBin( uiSymbol, m_cRbcDataSCModel.get( 0, 0, 0 ) );
    512       ucEdge <<= 1;
    513       ucEdge |= uiSymbol;
    514       if( uiSymbol == 0 )
    515         break;
    516     }
    517 
    518     switch( ucEdge )
    519     {
    520     case 0 :  // "0"       
    521       uiReorderEdge = 0;
    522       break;
    523     case 2 :  // "10"
    524       uiReorderEdge = 1;
    525       break;
    526     case 6 :  // "110"
    527       uiReorderEdge = 2;
    528       break;
    529     case 14 : // "1110"
    530       uiReorderEdge = 3;
    531       break;
    532     case 30 : // "11110"
    533       uiReorderEdge = 4;
    534       break;
    535     case 62 : // "111110"
    536       uiReorderEdge = 5;
    537       break;
    538     case 63 : // "111111"
    539       uiReorderEdge = 6;
    540       break;
    541     default :
    542       printf("parseIntraEdgeChain: error (unknown code %d)\n",ucEdge);
    543       assert(false);
    544       break;
    545     }
    546     pucSymbolList[iPtr] = uiReorderEdge;
    547   }
    548   /////////////////////
    549   // Edge Reconstruction
    550   Bool* pbRegion = pcCU->getEdgePartition( uiAbsPartIdx );
    551   pcCU->reconPartition( uiAbsPartIdx, uiDepth, ucLeft == 1, ucStart, ucMax, pucSymbolList, pbRegion );
    552   xFree( pucSymbolList );
    553 }
    554 #endif
     427#endif
     428
    555429#if H_3D_DIM_SDC
    556430Void TDecSbac::xParseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment )
     
    568442 
    569443#if H_3D_DIM_DLT
    570 #if DLT_DIFF_CODING_IN_PPS
    571444  UInt uiMaxResidualBits = pcCU->getSlice()->getPPS()->getDLT()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() );
    572 #else
    573   UInt uiMaxResidualBits = pcCU->getSlice()->getVPS()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() );
    574 #endif
    575445#else
    576446  UInt uiMaxResidualBits = g_bitDepthY;
     
    596466    UInt uiCount = 0;
    597467#if H_3D_DIM_DLT
    598 #if DLT_DIFF_CODING_IN_PPS
    599468    UInt uiNumDepthValues = pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() );
    600 #else
    601     UInt uiNumDepthValues = pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() );
    602 #endif
    603469#else
    604470    UInt uiNumDepthValues = ((1 << g_bitDepthY)-1);
     
    11751041      pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth );
    11761042    } break;
    1177 #if !SEC_DMM3_RBC_F0147
    1178   case( DMM3_IDX ):
    1179     {
    1180       UInt uiIntraIdx = 0;
    1181       xParseDmm3WedgeIdx( uiIntraIdx, g_dmm3IntraTabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] );
    1182       pcCU->setDmm3IntraTabIdxSubParts( uiIntraIdx, absPartIdx, depth );
    1183     } break;
    1184 #endif
    11851043  case( DMM4_IDX ): break;
    11861044#endif
    1187 #if H_3D_DIM_RBC
    1188   case( RBC_IDX ):
    1189     {
    1190       xParseRbcEdge( pcCU, absPartIdx, depth );
    1191     } break;
    1192 #endif
    11931045  default: break;
    11941046  }
    11951047
    1196 #if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132
    1197   if( pcCU->getSDCFlag(absPartIdx) )
    1198   {
    1199     assert(pcCU->getPartitionSize(absPartIdx)==SIZE_2Nx2N);
    1200     pcCU->setTrIdxSubParts(0, absPartIdx, depth);
    1201     pcCU->setCbfSubParts(1, 1, 1, absPartIdx, depth);
    1202 
    1203     UInt uiNumSegments = ( dir == DC_IDX || dir == PLANAR_IDX )? 1 : 2;
    1204     for (UInt uiSeg=0; uiSeg<uiNumSegments; uiSeg++)
    1205     {
    1206       xParseSDCResidualData(pcCU, absPartIdx, depth, uiSeg);
    1207     }
    1208   }
    1209   else
    1210   {
    1211 #endif
    1212 #if QC_DIM_DELTADC_UNIFY_F0132
    1213     if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) )
    1214 #else
    1215     if( dimType < DIM_NUM_TYPE )
    1216 #endif
    1217     {
    1218       UInt symbol;
    1219 #if QC_DIM_DELTADC_UNIFY_F0132
    1220       UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2;
     1048  if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) )
     1049  {
     1050    UInt symbol;
     1051    UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2;
     1052
     1053    if( pcCU->getSDCFlag( absPartIdx ) )
     1054    {
     1055      assert(pcCU->getPartitionSize(absPartIdx)==SIZE_2Nx2N);
     1056      pcCU->setTrIdxSubParts(0, absPartIdx, depth);
     1057      pcCU->setCbfSubParts(1, 1, 1, absPartIdx, depth);
     1058    }
     1059
     1060    m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) );
     1061
     1062    if( symbol )
     1063    {
     1064      if( !pcCU->getSDCFlag( absPartIdx ) )
     1065      {
     1066        dir += symbol;
     1067      }
     1068    }
     1069    for( UInt segment = 0; segment < uiNumSegments; segment++ )
     1070    {
     1071      Pel valDeltaDC = 0;
     1072      if( symbol )
     1073      {
     1074        xParseDimDeltaDC( valDeltaDC, uiNumSegments );
     1075      }
    12211076
    12221077      if( pcCU->getSDCFlag( absPartIdx ) )
    12231078      {
    1224         assert(pcCU->getPartitionSize(absPartIdx)==SIZE_2Nx2N);
    1225         pcCU->setTrIdxSubParts(0, absPartIdx, depth);
    1226         pcCU->setCbfSubParts(1, 1, 1, absPartIdx, depth);
    1227       }
    1228 
    1229       m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) );
    1230 
    1231       if( symbol )
    1232       {
    1233         if( !pcCU->getSDCFlag( absPartIdx ) )
    1234         {
    1235           dir += symbol;
    1236         }
    1237       }
    1238       for( UInt segment = 0; segment < uiNumSegments; segment++ )
    1239       {
    1240         Pel valDeltaDC = 0;
    1241         if( symbol )
    1242         {
    1243           xParseDimDeltaDC( valDeltaDC, uiNumSegments );
    1244         }
    1245 
    1246         if( pcCU->getSDCFlag( absPartIdx ) )
    1247         {
    1248           pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx );
    1249         }
    1250         else
    1251         {
    1252           pcCU->setDimDeltaDC( dimType, segment, absPartIdx, valDeltaDC );
    1253         }
    1254       }
    1255 #else
    1256       m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, (RBC_IDX == dimType) ? 1 : 0) );
    1257       if( symbol )
    1258       {
    1259         dir += symbol;
    1260         for( UInt segment = 0; segment < 2; segment++ )
    1261         {
    1262           Pel valDeltaDC = 0;
    1263           xParseDimDeltaDC( valDeltaDC, dimType );
    1264           pcCU->setDimDeltaDC( dimType, segment, absPartIdx, valDeltaDC );
    1265         }
    1266       }
    1267 #endif
    1268     }
    1269 #if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132
    1270   }
    1271 #endif
     1079        pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx );
     1080      }
     1081      else
     1082      {
     1083        pcCU->setDimDeltaDC( dimType, segment, absPartIdx, valDeltaDC );
     1084      }
     1085    }
     1086  }
    12721087
    12731088  pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth );
     
    12971112  else if( puIdx == 0 )
    12981113  {
    1299 #if SEC_DMM3_RBC_F0147
    13001114    while( binNum < 1 && symbol )
    1301 #else
    1302     while( binNum < 3 && symbol )
    1303 #endif
    13041115    {
    13051116      ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum);
     
    13081119      binNum++;
    13091120    }
    1310 #if SEC_DMM3_RBC_F0147
    1311     if( modeCode == 0 ) { dir = 0;                       sdcFlag = 0;}
    1312     else if( modeCode == 1 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
    1313 #else
    1314          if( modeCode == 0 ) { dir = 0;                       sdcFlag = 0;}
    1315     else if( modeCode == 2 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
    1316     else if( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;}
    1317     else if( modeCode == 7 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
    1318 #endif
     1121    if( modeCode == 0 )
     1122    {
     1123      dir = 0;
     1124      sdcFlag = 0;
     1125    }
     1126    else if ( modeCode == 1 )
     1127    {
     1128      dir = (2*DMM1_IDX+DIM_OFFSET);
     1129      sdcFlag = 0;
     1130    }
    13191131  }
    13201132  else
    13211133  {
    1322 #if SEC_DMM3_RBC_F0147
    13231134    while( binNum < 4 && symbol )
    13241135    {
     
    13331144    else if ( modeCode == 14 )  { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
    13341145    else if ( modeCode == 15 )  { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
    1335 #else
    1336     UInt maxBinNum = 0;
    1337     m_pcTDecBinIf->decodeBinEP(symbol);
    1338     if( symbol == 1 )
    1339     {
    1340       maxBinNum = 3;
    1341     }
    1342     else
    1343     {
    1344       maxBinNum = 2;
    1345       symbol = 1;
    1346     }
    1347     while( binNum<maxBinNum && symbol )
    1348     {
    1349       ctxDepthMode = puIdx*3 + ( binNum >= 2 ? 2 : binNum );
    1350       m_pcTDecBinIf->decodeBin(symbol,m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode));
    1351       modeCode = (modeCode<<1)+symbol;
    1352       binNum++;
    1353     }
    1354     if( maxBinNum == 3 )
    1355     {
    1356       if ( modeCode == 0 )       { dir =  PLANAR_IDX;             sdcFlag = 1;}
    1357       else if ( modeCode == 2 )  { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
    1358       else if ( modeCode == 6 )  { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;}
    1359       else if ( modeCode == 7 )  { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
    1360     }
    1361     else
    1362     {
    1363       if ( modeCode == 0 )       { dir = 5;                       sdcFlag = 0;}
    1364       else if ( modeCode == 2 )  { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;}
    1365       else if ( modeCode == 3 )  { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
    1366     }
    1367 #endif
     1146
    13681147  }
    13691148  pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth );
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r758 r773  
    8181  Void  parseSPS                  ( TComSPS* /*pcSPS*/ ) {}
    8282#endif
    83 #if DLT_DIFF_CODING_IN_PPS
     83#if H_3D
    8484  Void  parsePPS                  ( TComPPS* /*pcPPS*/, TComVPS* /*pcVPS*/ ) {}
    8585#else
     
    103103#if H_3D_DIM
    104104  Void  xReadExGolombLevel   ( UInt& ruiSymbol, ContextModel& rcSCModel  );
    105 #if QC_DIM_DELTADC_UNIFY_F0132
    106105  Void  xParseDimDeltaDC     ( Pel& rValDeltaDC, UInt uiNumSeg );
    107 #else
    108   Void  xParseDimDeltaDC     ( Pel& rValDeltaDC, UInt dimType );
    109 #endif
    110106#if H_3D_DIM_DMM
    111107  Void  xParseDmm1WedgeIdx   ( UInt& ruiTabIdx, Int iNumBit );
    112 #if !SEC_DMM3_RBC_F0147
    113   Void  xParseDmm3WedgeIdx   ( UInt& ruiIntraIdx, Int iNumBit );
    114 #endif
    115 #endif
    116 #if H_3D_DIM_RBC
    117   Void  xParseRbcEdge        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    118108#endif
    119109#if H_3D_DIM_SDC
     
    223213#if H_3D_DIM_DMM
    224214  ContextModel3DBuffer m_cDmm1DataSCModel;
    225 #if !SEC_DMM3_RBC_F0147
    226   ContextModel3DBuffer m_cDmm3DataSCModel;
    227 #endif
    228 #endif
    229 #if H_3D_DIM_RBC
    230   ContextModel3DBuffer m_cRbcDataSCModel;
    231215#endif
    232216#if H_3D_DIM_SDC 
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r758 r773  
    228228    m_uiMaxViewIndex                     = std::max( m_uiMaxViewIndex, uiViewIndex );
    229229    m_aiViewId[ uiViewIndex ]            = pcSlice->getViewId();
    230 #if CAM_HLS_F0136_F0045_F0082
     230
    231231    if( uiViewIndex == 1 )
    232232    {
     
    239239      AOF( m_bCamParsVaryOverTime    == pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex ) );
    240240    }
    241 #else
    242     if( uiViewIndex == 1 )
    243     {
    244       m_uiCamParsCodedPrecision       = pcSlice->getSPS()->getCamParPrecision     ();
    245       m_bCamParsVaryOverTime          = pcSlice->getSPS()->hasCamParInSliceHeader ();
    246     }
    247     else if( uiViewIndex > 1 )
    248     {
    249       AOF( m_uiCamParsCodedPrecision == pcSlice->getSPS()->getCamParPrecision     () );
    250       AOF( m_bCamParsVaryOverTime    == pcSlice->getSPS()->hasCamParInSliceHeader () );
    251     }
    252 #endif
     241
    253242    for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
    254243    {
     
    264253      else
    265254      {
    266 #if CAM_HLS_F0136_F0045_F0082
    267255        m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getVPS()->getCodedScale    (uiViewIndex) [ uiBaseIndex ];
    268256        m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getVPS()->getCodedOffset   (uiViewIndex) [ uiBaseIndex ];
    269257        m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getVPS()->getInvCodedScale (uiViewIndex) [ uiBaseIndex ];
    270258        m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getVPS()->getInvCodedOffset(uiViewIndex) [ uiBaseIndex ];
    271 #else
    272         m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getSPS()->getCodedScale    () [ uiBaseIndex ];
    273         m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getSPS()->getCodedOffset   () [ uiBaseIndex ];
    274         m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getSPS()->getInvCodedScale () [ uiBaseIndex ];
    275         m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getSPS()->getInvCodedOffset() [ uiBaseIndex ];
    276 #endif
    277259        xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
    278260        xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
     
    302284}
    303285
    304 #if QC_DEPTH_IV_MRG_F0125
     286#if H_3D_IV_MERGE
    305287Void
    306288CamParsCollector::copyCamParamForSlice( TComSlice* pcSlice )
    307289{
    308 #if !CAM_HLS_F0136_F0045_F0082
    309   UInt uiViewIndex = pcSlice->getViewIndex();
    310 
    311   pcSlice->getSPS()->initCamParaSPS( uiViewIndex, m_uiCamParsCodedPrecision, m_bCamParsVaryOverTime, m_aaiCodedScale, m_aaiCodedOffset );
    312 #endif
    313290  if( m_bCamParsVaryOverTime )
    314291  {
     
    656633#if H_MV
    657634  m_apcSlicePilot->setVPS(vps); 
    658 #if H_MV_6_PS_0092_17
    659635  // The nuh_layer_id value of the NAL unit containing the PPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA.
    660636  assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, pps->getLayerId() ) );   
    661637  // The nuh_layer_id value of the NAL unit containing the SPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA.
    662638  assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, sps->getLayerId() ) );
    663 #endif
    664639  sps->inferRepFormat  ( vps , m_layerId );
    665640  sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) );
     
    692667
    693668#if H_MV
    694 #if H_MV_FIX_SKIP_PICTURES
    695669Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag  )
    696 #else
    697 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag )
    698 #endif
    699670{
    700671  assert( nalu.m_layerId == m_layerId );
     
    754725#endif
    755726
    756 #if H_MV_LAYER_WISE_STARTUP
     727#if H_MV
    757728    xCeckNoClrasOutput();
    758729#endif
     
    762733    m_prevSliceSkipped = true;
    763734    m_skippedPOC = m_apcSlicePilot->getPOC();
    764 #if H_MV_FIX_SKIP_PICTURES
    765       sliceSkippedFlag = true;
     735#if H_MV
     736    sliceSkippedFlag = true;
    766737#endif
    767738      return false;
     
    772743    m_prevSliceSkipped = true;
    773744    m_skippedPOC = m_apcSlicePilot->getPOC();
    774 #if H_MV_FIX_SKIP_PICTURES
    775       sliceSkippedFlag = true;
     745#if H_MV
     746    sliceSkippedFlag = true;
    776747#endif
    777748      return false;
     
    1007978    pcSlice->setRefPicList     ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true );
    1008979#if H_3D_ARP
    1009 #if SHARP_ARP_REF_CHECK_F0105
    1010980    pcSlice->setARPStepNum(m_ivPicLists);
    1011 #else
    1012     pcSlice->setARPStepNum();
    1013 #endif
    1014981    if( pcSlice->getARPStepNum() > 1 )
    1015982    {
     
    11131080  }
    11141081
    1115 #if QC_DEPTH_IV_MRG_F0125
     1082#if H_3D_IV_MERGE
    11161083  if( pcSlice->getIsDepth() && m_pcCamParsCollector )
    11171084  {
     
    11271094    m_pcCamParsCollector->setSlice( pcSlice );
    11281095  }
    1129 #if QC_DEPTH_IV_MRG_F0125
    1130   if( pcSlice->getIsDepth() )
    1131   {
    1132 #if !CAM_HLS_F0136_F0045_F0082
    1133     pcSlice->getSPS()->setHasCamParInSliceHeader( false );
    1134 #endif
    1135   }
    1136 #endif
    11371096#endif
    11381097  m_bFirstSliceInPicture = false;
     
    11741133  pps->setLayerId( getLayerId() );
    11751134#endif
    1176 #if DLT_DIFF_CODING_IN_PPS
     1135#if H_3D
    11771136  // Assuming that all PPS indirectly refer to the same VPS via different SPS
    11781137  // There is no parsing dependency in decoding DLT in PPS.
     
    11811140  //   Step 1) decoding DLT tables based on the number of depth layers, and
    11821141  //   Step 2) mapping DLT tables to the depth layers
    1183   // as descripted in the 3D-HEVC WD.
     1142  // as described in the 3D-HEVC WD.
    11841143  TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 );
    11851144  m_cEntropyDecoder.decodePPS( pps, vps );
     
    12261185
    12271186#if H_MV
    1228 #if H_MV_FIX_SKIP_PICTURES
    12291187Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag )
    1230 #else
    1231 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayerFlag)
    1232 #endif
    12331188#else
    12341189Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay)
     
    12751230    case NAL_UNIT_CODED_SLICE_RASL_R:
    12761231#if H_MV
    1277 #if H_MV_FIX_SKIP_PICTURES
    12781232      return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag, sliceSkippedFlag );
    1279 #else
    1280       return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag);
    1281 #endif
    12821233#else
    12831234      return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay);
     
    13281279    return true;
    13291280  }
    1330 #if H_MV_LAYER_WISE_STARTUP
     1281#if H_MV
    13311282  else if ( !m_layerInitilizedFlag[ m_layerId ] ) // start of random access point, m_pocRandomAccess has not been set yet.
    13321283#else
     
    13401291    {
    13411292
    1342 #if H_MV_LAYER_WISE_STARTUP
     1293#if H_MV
    13431294      if ( xAllRefLayersInitilized() )
    13441295      {
     
    13571308    else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP )
    13581309    {
    1359 #if H_MV_LAYER_WISE_STARTUP
     1310#if H_MV
    13601311      if ( xAllRefLayersInitilized() )
    13611312      {
    13621313        m_layerInitilizedFlag[ m_layerId ] = true;
     1314        m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable.
     1315      }
     1316      else
     1317      {
     1318        return true;
     1319      }
     1320#else
    13631321      m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable.
     1322#endif
    13641323    }
    13651324    else
    13661325    {
    1367         return true;
    1368       }
    1369 #else
    1370       m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable.
    1371 #endif
    1372     }
    1373     else
    1374     {
    1375 #if H_MV_FIX_SKIP_PICTURES
     1326#if H_MV
    13761327      static Bool warningMessage[MAX_NUM_LAYERS];
    13771328      static Bool warningInitFlag = false;
     
    14081359    return true;
    14091360  }
    1410 #if H_MV_LAYER_WISE_STARTUP
     1361#if H_MV
    14111362  return !m_layerInitilizedFlag[ getLayerId() ];
    14121363#else
     
    14551406}
    14561407
    1457 #if H_MV_LAYER_WISE_STARTUP
     1408#if H_MV
    14581409Void TDecTop::xCeckNoClrasOutput()
    14591410{
  • trunk/source/Lib/TLibDecoder/TDecTop.h

    r738 r773  
    7878  Int**** getBaseViewShiftLUTI()  { return m_aiBaseViewShiftLUT;   }
    7979
    80 #if QC_DEPTH_IV_MRG_F0125
     80#if H_3D_IV_MERGE
    8181  Void  copyCamParamForSlice( TComSlice* pcSlice );
    8282#endif
     
    186186  TComList<TComPic*>      m_cListPic;         //  Dynamic buffer
    187187#if H_MV
    188 #if H_MV_LAYER_WISE_STARTUP
    189188  Bool*                    m_layerInitilizedFlag; // initialization Layers
    190 #endif
    191189  static ParameterSetManagerDecoder m_parameterSetManagerDecoder;  // storage for parameter sets
    192190#else
     
    246244  Void  init();
    247245#if H_MV 
    248 #if H_MV_FIX_SKIP_PICTURES
    249246  Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer, Bool& sliceSkippedFlag );
    250 #else
    251   Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer );
    252 #endif
    253247  Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer );
    254248#else 
     
    268262  TComList<TComPic*>*     getListPic            ()               { return &m_cListPic;  } 
    269263  Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
    270 #if H_MV_LAYER_WISE_STARTUP
    271264  Void                    setLayerInitilizedFlags( Bool* val )    { m_layerInitilizedFlag = val; }
    272 #endif
    273 #if H_MV_6_HRD_O0217_13
    274265  TComVPS*                getPrefetchedVPS      ()               { return m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); }; //Assuming that currently only one VPS is present.
    275 #endif
    276266  Int                     getCurrPoc            ()               { return m_apcSlicePilot->getPOC(); }
    277267  Void                    setLayerId            ( Int layer)     { m_layerId = layer;   }
     
    294284#if H_MV 
    295285  TComPic*  xGetPic( Int layerId, Int poc );
    296 #if H_MV_FIX_SKIP_PICTURES
    297286  Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag ); 
    298 #else
    299   Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag ); 
    300 #endif
    301287  Void      xResetPocInPicBuffer();
    302 #if H_MV_LAYER_WISE_STARTUP
    303288  Void      xCeckNoClrasOutput();
    304289
    305290  Bool      xAllRefLayersInitilized();
    306 #endif
    307291#else
    308292  Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay);
Note: See TracChangeset for help on using the changeset viewer.