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


Ignore:
Timestamp:
29 Mar 2014, 18:55:16 (11 years ago)
Author:
tech
Message:

Merged HTM-10.1-dev0@883. (MV-HEVC 7 HLS)

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

Legend:

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

    r872 r884  
    9999    fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
    100100    break;
    101 #if H_MV_HLS_7_SEI_P0204_26
     101#if H_MV
    102102  case SEI::SUB_BITSTREAM_PROPERTY:
    103103    fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n");
     
    245245      xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps);
    246246      break;
    247 #if H_MV_HLS_7_SEI_P0204_26
     247#if H_MV
    248248     case SEI::SUB_BITSTREAM_PROPERTY:
    249249       sei = new SEISubBitstreamProperty;
     
    777777
    778778}
    779 #if H_MV_HLS_7_SEI_P0204_26
     779#if H_MV
    780780Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei)
    781781{
  • trunk/source/Lib/TLibDecoder/SEIread.h

    r872 r884  
    7373  Void xParseSEISOPDescription        (SEISOPDescription &sei, UInt payloadSize);
    7474  Void xParseSEIScalableNesting       (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps);
    75 #if H_MV_HLS_7_SEI_P0204_26
     75#if H_MV
    7676  Void  xParseSEISubBitstreamProperty   (SEISubBitstreamProperty &sei);
    7777  Void  xResizeSubBitstreamPropertySeiArrays(SEISubBitstreamProperty &sei);
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r872 r884  
    366366
    367367  READ_FLAG( uiCode, "pps_extension_flag");
    368 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
    369368  if (uiCode)
    370369  {
     
    383382    if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) )
    384383    {
    385 #if H_MV_HLS_7_POC_P0041
    386384      READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );
    387 #endif
    388385    }
    389386
     
    406403#endif
    407404  }
    408 #else
    409   if (uiCode)
    410   {
    411 #if H_3D
    412     parsePPSExtension( pcPPS, pcVPS );
    413     READ_FLAG( uiCode, "pps_extension2_flag");
    414     if ( uiCode )
    415     {
    416 #endif
    417       while ( xMoreRbspData() )
    418       {
    419         READ_FLAG( uiCode, "pps_extension_data_flag");
    420       }
    421 #if H_3D
    422     }
    423 #endif
    424   }
    425 #endif
    426405}
    427406
     
    849828  assert(uiCode <= 12);
    850829
    851 #if H_MV_HLS_7_SPS_P0155_16_32
     830#if H_MV
    852831  if ( pcSPS->getLayerId() == 0 )
    853832  { 
     
    888867    }
    889868  }
    890 #if H_MV_HLS_7_SPS_P0155_16_32
     869#if H_MV
    891870  }
    892871#endif
     
    10531032    READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); pcSPS->setScaledRefLayerRightOffset( j, iCode );
    10541033    READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode );
    1055 #if H_MV_HLS_7_RESERVED_FLAGS
    10561034    READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" );
    1057 #endif
    10581035  }
    10591036}
     
    10921069  assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
    10931070
    1094 #if H_MV_HLS_7_VPS_P0125_24
    10951071  READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
    1096 #else
    1097 #if H_MV && !H_MV_HLS7_GEN
    1098   READ_CODE( 16, uiCode,  "vps_extension_offset" );               
    1099 #else
    1100   READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
    1101 #endif
    1102 #endif
    11031072  parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1);
    11041073  UInt subLayerOrderingInfoPresentFlag;
     
    12121181  READ_FLAG( uiCode, "avc_base_layer_flag" );                     pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );
    12131182
    1214 #if !H_MV_HLS_7_VPS_P0307_23
    1215   READ_FLAG( uiCode, "vps_vui_present_flag" );                    pcVPS->setVpsVuiPresentFlag( uiCode == 1 );
    1216   if ( pcVPS->getVpsVuiPresentFlag() )
    1217   { 
    1218   READ_CODE( 16, uiCode, "vps_vui_offset" );                      pcVPS->setVpsVuiOffset( uiCode );
    1219   }
    1220 #endif
    1221 
    12221183  READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
    12231184
     
    13251286
    13261287  READ_FLAG( uiCode, "all_ref_layers_active_flag" );             pcVPS->setAllRefLayersActiveFlag( uiCode == 1 );
    1327 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1328   READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1"      );  pcVPS->setVpsNumberLayerSetsMinus1    ( uiCode );
    1329 #endif
    1330 
    1331 #if !H_MV_HLS_7_VPS_P0306_22
    1332   READ_CODE( 6,  uiCode, "vps_num_profile_tier_level_minus1" );  pcVPS->setVpsNumProfileTierLevelMinus1( uiCode );
    1333 #else
     1288
    13341289  READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" );  pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 
    1335 #endif
     1290
    13361291  for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
    13371292  {
    13381293    READ_FLAG(  uiCode, "vps_profile_present_flag[i]" );    pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );
    1339 #if !H_MV_HLS_7_VPS_P0048_14
    1340     if( !pcVPS->getVpsProfilePresentFlag( i ) )
    1341     {
    1342       READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode );
    1343       pcVPS->checkProfileRefMinus1( i );     
    1344     }
    1345 #endif
    13461294    parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
    13471295    if( !pcVPS->getVpsProfilePresentFlag( i ) )
    13481296    {
    13491297      TComPTL temp = *pcVPS->getPTL( i );
    1350 #if H_MV_HLS_7_VPS_P0048_14
    13511298      *pcVPS->getPTL( i ) = *pcVPS->getPTL( i - 1 );
    1352 #else
    1353       *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 );
    1354 #endif
    13551299      pcVPS->getPTL( i )->copyLevelFrom( &temp );
    13561300    }
    13571301  }
    13581302
    1359 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    13601303  READ_UVLC( uiCode, "num_add_output_layer_sets"      ); pcVPS->setNumAddOutputLayerSets( uiCode );
    13611304  pcVPS->initTargetLayerIdLists( );
     
    13651308  } 
    13661309
    1367 #else
    1368   Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;
    1369 
    1370   READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); pcVPS->setMoreOutputLayerSetsThanDefaultFlag( uiCode == 1 );
    1371 
    1372   if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )
    1373   {
    1374     READ_CODE( 10, uiCode, "num_add_output_layer_sets_minus1"      ); pcVPS->setNumAddOutputLayerSetsMinus1( uiCode );
    1375     numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1);
    1376   }
    1377 
    1378   if( numOutputLayerSets > 1)
    1379   {
    1380     READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" ); pcVPS->setDefaultOneTargetOutputLayerIdc( uiCode );
    1381     pcVPS->checkDefaultOneTargetOutputLayerIdc();
    1382   } 
    1383 #endif
    1384 
    13851310  pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 ));
    13861311  pcVPS->setOutputLayerSetIdxMinus1(0, -1);
    13871312
    1388 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    13891313  pcVPS->deriveTargetLayerIdList( 0 );
    13901314  for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
    13911315  {
    13921316    if( i > pcVPS->getVpsNumLayerSetsMinus1( ) )   
    1393 #else
    1394   for( Int i = 1; i < numOutputLayerSets; i++ )
    1395   {
    1396     if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )
    1397 #endif
    13981317    {       
    13991318      READ_UVLC( uiCode,      "output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode );
    1400 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    14011319    }
    14021320
     
    14161334    }
    14171335    pcVPS->deriveTargetLayerIdList( i );
    1418 #else
    1419       for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )
    1420       {
    1421         READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 );
    1422       }       
    1423     }
    1424     else
    1425     { // These inference rules would also be helpful in spec text
    1426       pcVPS->setOutputLayerSetIdxMinus1(i, i - 1 );
    1427       for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )
    1428       {             
    1429         pcVPS->setOutputLayerFlag(i,j, pcVPS->inferOutputLayerFlag( i, j ));
    1430       }
    1431     }
    1432 #endif
     1336
    14331337    if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
    14341338    {     
     
    14361340    }
    14371341
    1438 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    14391342    if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 )
    14401343    {
     
    14421345    }
    14431346  }
    1444 #else
    1445   }
    1446   if( pcVPS->getMaxLayersMinus1() > 0 )
    1447   {
    1448     READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 );
    1449   }
    1450 #endif
    1451 
    1452 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    1453   pcVPS->deriveTargetLayerIdLists();
    1454 #endif
    14551347
    14561348  READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 );
    14571349  if ( pcVPS->getRepFormatIdxPresentFlag() )
    14581350  {
    1459 #if H_MV_HLS_7_VPS_P0306_22
    14601351    READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );
    1461 #else
    1462     READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );
    1463 #endif
    14641352  }
    14651353
     
    14791367      if( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
    14801368      {
    1481 #if H_MV_HLS_7_VPS_P0306_22
    14821369        READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
    1483 #else
    1484         READ_CODE( 8, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode );
    1485 #endif
    14861370      }
    14871371    }
     
    15001384  }
    15011385
    1502 #if H_MV_HLS_7_RESERVED_FLAGS
    15031386  READ_FLAG( uiCode, "vps_reserved_zero_flag" );
    1504 #endif
    15051387  parseDpbSize( pcVPS );
    15061388
     
    15311413  } 
    15321414
    1533 #if H_MV_HLS_7_VPS_P0307_23
    15341415  READ_UVLC( uiCode, "vps_non_vui_extension_length" ); pcVPS->setVpsNonVuiExtensionLength( uiCode );
    15351416  for ( Int i = 1; i <= pcVPS->getVpsNonVuiExtensionLength(); i++ )
     
    15381419  }
    15391420  READ_FLAG( uiCode, "vps_vui_present_flag" );  pcVPS->setVpsVuiPresentFlag( uiCode == 1 );
    1540 #endif
    1541 #if !H_MV_HLS_7_RESERVED_FLAGS
    1542   READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" );
    1543 #endif
    15441421  if( pcVPS->getVpsVuiPresentFlag() )
    15451422  {
     
    15471424    parseVPSVUI( pcVPS );
    15481425  }     
    1549 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    15501426  {
    15511427    TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( );
     
    15531429    pcVPSVUI->inferVpsVui( false );
    15541430  }
    1555 #endif
    15561431
    15571432  pcVPS->checkVPSExtensionSyntax();
     
    16011476    READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 );
    16021477  }
    1603 #if H_MV_HLS_7_MISC_P0068_21
    16041478  if( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) )
    16051479  {
    16061480    READ_FLAG( uiCode, "all_layers_idr_aligned_flag" ); pcVPSVUI->setAllLayersIdrAlignedFlag( uiCode == 1 );
    16071481  }
    1608 #endif
    16091482  READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 );
    16101483  READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 );
    16111484  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    16121485  {
    1613 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    16141486    for( Int i = 0; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
    1615 #else
    1616     for( Int i = 0; i  <=  pcVPS->getVpsNumberLayerSetsMinus1(); i++ )
    1617 #endif
    16181487    {
    16191488      for( Int j = 0; j  <=  pcVPS->getMaxTLayers(); j++ )
     
    16411510  }
    16421511
    1643 #if H_MV_HLS_7_VPS_P0076_15
    16441512  READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );
    16451513  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
     
    16751543    }
    16761544  }
    1677 #endif
    16781545
    16791546  READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 );
     
    17121579  }
    17131580
    1714 #if H_MV_HLS_7_RESERVED_FLAGS
    17151581  READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" );
    1716 #endif
    1717 
    17181582  READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 );
    17191583
     
    17371601  }
    17381602
    1739 #if !H_MV_HLS_7_VPS_P0076_15
    1740   READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );
    1741   if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
    1742   {
    1743     READ_CODE( 4, uiCode, "vps_num_video_signal_info_minus1" ); pcVPSVUI->setVpsNumVideoSignalInfoMinus1( uiCode );
    1744   }
    1745   else
    1746   {
    1747     pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );
    1748   }
    1749 
    1750   for( Int i = 0; i <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1(); i++ )
    1751   {
    1752     assert( pcVPSVUI->getVideoSignalInfo( i ) == NULL );
    1753     TComVideoSignalInfo* curVideoSignalInfo = new TComVideoSignalInfo();     
    1754     parseVideoSignalInfo( curVideoSignalInfo );
    1755     pcVPSVUI->setVideoSignalInfo(i, curVideoSignalInfo );
    1756   }
    1757  
    1758   if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )
    1759   {
    1760     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1761     {
    1762       READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode );
    1763       assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() );
    1764     }
    1765   }
    1766   else
    1767   {
    1768     for( Int i = 1; i <=  pcVPS->getMaxLayersMinus1(); i++ )
    1769     {
    1770       pcVPSVUI->setVpsVideoSignalInfoIdx( i, pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i );
    1771     }
    1772   }
    1773 #endif
    17741603  READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 );
    17751604  if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
     
    17771606    parseVpsVuiBspHrdParameters( pcVPS );
    17781607}
    1779 #if H_MV_HLS_7_MISC_P0182_13
    17801608  for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
    17811609  {
     
    17851613    }
    17861614  }
    1787 #endif
    17881615}
    17891616
     
    18641691  { 
    18651692    READ_FLAG( uiCode, "sub_layer_flag_info_present_flag" ); dpbSize->setSubLayerFlagInfoPresentFlag( i, uiCode == 1 );
    1866 #if H_MV_HLS_7_HRD_P0156_7
    18671693    for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( i ); j++ )
    1868 #else
    1869     for( Int j = 0; j  <=  vps->getMaxTLayers() - 1 ; j++ )
    1870 #endif
    18711694    { 
    18721695      if( j > 0  &&  dpbSize->getSubLayerDpbInfoPresentFlag( i, j )  ) 
     
    18761699      if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) )
    18771700      { 
    1878 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    18791701        for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ )   
    1880 #else
    1881         for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
    1882 #endif
    18831702        {
    18841703          READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode );
     
    19331752        READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
    19341753#if H_3D_SPIVMP
    1935 #if SEC_SPIVMP_MCP_SIZE_G0077
    19361754        READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]");     pcVPS->setSubPULog2Size(i, uiCode+3);
    1937 #else
    1938         READ_UVLC (uiCode, "log2_sub_PU_size_minus2");     pcVPS->setSubPULog2Size(i, uiCode+2);
    1939 #endif
    19401755#endif
    19411756#endif
     
    19651780        if (i!=1)
    19661781        {
    1967 #if SEC_SPIVMP_MCP_SIZE_G0077
    19681782          READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]");     pcVPS->setSubPULog2Size(i, uiCode+3);
    1969 #else
    1970           READ_UVLC (uiCode, "log2_sub_PU_size_minus2[i]");     pcVPS->setSubPULog2Size(i, uiCode+2);
    1971 #endif
    19721783        }
    19731784#endif
     
    19911802  for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
    19921803  {
    1993 #if FIX_CAM_PARS_COLLECTOR
    19941804    pcVPS->setCamParPresent         ( viewIndex, false );
    19951805    pcVPS->setHasCamParInSliceHeader( viewIndex, false );
    1996 #endif
    19971806    READ_FLAG( uiCode, "cp_present_flag[i]" );                  bCamParPresentFlag = ( uiCode == 1);
    19981807    if ( bCamParPresentFlag )
     
    20131822    }
    20141823  }
    2015 #if QC_SPIVMP_MPI_G0119
    20161824  READ_UVLC (uiCode, "log2_sub_PU_MPI_size_minus3");              pcVPS->setSubPUMPILog2Size( uiCode + 3 );
    2017 #endif
    20181825  READ_FLAG( uiCode, "iv_mv_scaling_flag");                       pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );
    20191826}
     
    27282535  if(pps->getSliceHeaderExtensionPresentFlag())
    27292536  {
    2730 #if !H_MV_HLS_7_POC_P0041   
    2731     READ_UVLC(uiCode,"slice_header_extension_length");
    2732     for(Int i=0; i<uiCode; i++)
    2733     {
    2734       UInt ignore;
    2735       READ_CODE(8,ignore,"slice_header_extension_data_byte");
    2736     }
    2737   }
    2738 #else
    27392537#if H_MV
    27402538    READ_UVLC( uiCode, "slice_segment_header_extension_length" ); rpcSlice->setSliceSegmentHeaderExtensionLength( uiCode );
     
    28062604    }
    28072605  }
    2808 #endif
    28092606#endif
    28102607  }
     
    31032900#endif
    31042901#if H_3D_INTER_SDC
    3105 #if QC_SDC_UNIFY_G0130
    31062902Void TDecCavlc::parseDeltaDC( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
    31072903{
     
    31132909  assert(0);
    31142910}
    3115 #else
    3116 Void TDecCavlc::parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    3117 {
    3118   assert(0);
    3119 }
    3120 
    3121 Void TDecCavlc::parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart )
    3122 {
    3123   assert(0);
    3124 }
    3125 #endif
     2911
    31262912#endif
    31272913#if H_3D_DBBP
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r872 r884  
    124124#endif
    125125#if H_3D_INTER_SDC
    126 #if QC_SDC_UNIFY_G0130
    127126  Void  parseDeltaDC        ( TComDataCU* pcCU, UInt absPartIdx, UInt depth );
    128127  Void  parseSDCFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    129 #else
    130   Void  parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    131   Void  parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
    132 #endif
    133128#endif
    134129#if H_3D_DBBP
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r872 r884  
    293293
    294294
    295 #if MTK_DDD_G0063
     295#if H_3D_DDD
    296296      pcCU->setUseDDD( false, uiAbsPartIdx, uiDepth );
    297297#endif
     
    339339      if( pcCU->getSlice()->getIsDepth())
    340340      {
    341 #if SEC_DEPTH_DV_DERIVAITON_G0074
    342341        DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);
    343 #else
    344         DvInfo.bDV = m_ppcCU[uiDepth]->getDispNeighBlocks(0, 0, &DvInfo);
    345 #endif
    346342      }
    347343      else
     
    414410    m_pcEntropyDecoder->decodeMergeIndex( pcCU, 0, uiAbsPartIdx, uiDepth );
    415411    UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx);
    416 
    417 #if !SEC_IC_ARP_SIG_G0072
     412#if H_3D_ARP
     413    m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
     414#endif
    418415#if H_3D_IC
    419416    m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    420 #endif
    421 #endif
    422 #if H_3D_ARP
    423     m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
    424 #endif
    425 #if SEC_IC_ARP_SIG_G0072
    426 #if H_3D_IC
    427     m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    428 #endif
    429417#endif
    430418
     
    466454    pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    467455
    468 #if MTK_DDD_G0063
     456#if H_3D_DDD
    469457    if( uiMergeIndex == m_ppcCU[uiDepth]->getUseDDDCandIdx() )
    470458    {
     
    484472        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    485473        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    486 #if NTT_STORE_SPDV_VSP_G0148
     474#if H_3D_VSP
    487475        if( pcCU->getVSPFlag( uiAbsPartIdx ) != 0 )
    488476        {
     
    551539  m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );
    552540
    553 #if QC_SDC_UNIFY_G0130
     541#if H_3D_DIM_SDC
    554542  m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    555543#endif
     
    573561  // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
    574562  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
    575 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    576   m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    577 #endif
    578563  // Coefficient decoding
    579564  Bool bCodeDQP = getdQPFlag();
     
    663648#endif
    664649#if H_3D_INTER_SDC
    665 #if QC_SDC_UNIFY_G0130
    666650      if( m_ppcCU[uiDepth]->getSDCFlag( 0 ) )
    667 #else
    668       if( m_ppcCU[uiDepth]->getInterSDCFlag( 0 ) )
    669 #endif
    670651      {
    671652        xReconInterSDC( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
     
    730711  UInt  uiWidth      = pcCU->getWidth ( 0 );
    731712  UInt  uiHeight     = pcCU->getHeight( 0 );
    732 #if !SEC_INTER_SDC_G0101
    733   UChar* pMask       = pcCU->getInterSDCMask();
    734 
    735   memset( pMask, 0, uiWidth*uiHeight );
    736   pcCU->xSetInterSDCCUMask( pcCU, pMask );
    737 #endif
    738713
    739714  Pel  *pResi;
     
    746721    for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ )
    747722    {
    748 #if SEC_INTER_SDC_G0101
    749723      pResi[ uiPelX ] = pcCU->getSDCSegmentDCOffset( 0, 0 );
    750 #else
    751       UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ];
    752 #if QC_SDC_UNIFY_G0130
    753       pResi[ uiPelX ] = pcCU->getSDCSegmentDCOffset( uiSeg, 0 );
    754 #else
    755       pResi[ uiPelX ] = pcCU->getInterSDCSegmentDCOffset( uiSeg, 0 );
    756 #endif
    757 #endif
    758724    }
    759725    pResi += uiResiStride;
     
    929895#endif
    930896 
    931 #if H_3D && UPDATE_HM13
     897#if H_3D
    932898  Bool useDltFlag = (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps());
    933899
     
    955921    {
    956922#if H_3D
    957 #if UPDATE_HM13
    958923      if ( useDltFlag )
    959 #else
    960       if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )
    961 #endif
    962924      {
    963925        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 ] ) );
     
    11511113  UInt uiWidth        = pcCU->getWidth  ( 0 );
    11521114  UInt uiHeight       = pcCU->getHeight ( 0 );
    1153 #if QC_PKU_SDC_SPLIT_G0123
    1154 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1155 #if QC_GENERIC_SDC_G0122
    11561115  TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight );
    1157 #endif
    1158 #else
    1159 #if QC_GENERIC_SDC_G0122
    1160   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1161 #endif
    1162 #endif
    1163 #endif
    1164 #if QC_PKU_SDC_SPLIT_G0123
    11651116  UInt numParts = 1;
    1166   UInt i = 0;
    11671117  UInt sdcDepth    = 0;
    11681118  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
     
    11811131  UInt    uiLumaPredMode = 0; 
    11821132
    1183 #if HS_TSINGHUA_SDC_SPLIT_G0111
    11841133  if ((uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()) > 1)
    11851134  {
     
    11881137    uiWidth = uiHeight = (1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize());
    11891138  }
    1190 #else
    1191   if (uiWidth == 64)
    1192   {
    1193     numParts = 4;
    1194     sdcDepth = 1;
    1195     uiWidth = uiHeight = 32;
    1196   }
    1197 #endif
    1198 
    1199   for ( i = 0; i < numParts; i++ )
     1139
     1140  for ( Int i = 0; i < numParts; i++ )
    12001141  {
    12011142    uiStride    = pcRecoYuv->getStride  ();
     
    12031144    piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    12041145    piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
    1205  
     1146
    12061147    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    12071148    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
     
    12111152
    12121153    AOF( uiWidth == uiHeight );
    1213 #else
    1214   TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
    1215   TComYuv* pcPredYuv  = m_ppcYuvReco[uiDepth];
    1216   TComYuv* pcResiYuv  = m_ppcYuvResi[uiDepth];
    1217  
    1218   UInt    uiStride    = pcRecoYuv->getStride  ();
    1219   Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
    1220   Pel*    piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    1221   Pel*    piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
    1222  
    1223   UInt    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    1224   Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    1225   UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    1226  
    1227   UInt    uiLumaPredMode    = pcCU->getLumaIntraDir     ( uiAbsPartIdx );
    1228  
    1229   AOF( uiWidth == uiHeight );
    1230   AOF( uiAbsPartIdx == 0 );
    1231   AOF( pcCU->getSDCAvailable(uiAbsPartIdx) );
    1232   AOF( pcCU->getSDCFlag(uiAbsPartIdx) );
    1233 #endif
    1234  
    1235   //===== init availability pattern =====
    1236   Bool  bAboveAvail = false;
    1237   Bool  bLeftAvail  = false;
    1238 #if QC_PKU_SDC_SPLIT_G0123
    1239   pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
    1240   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
    1241 #else
    1242   pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
    1243   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
    1244 #endif
    1245 #if !QC_PKU_SDC_SPLIT_G0123
    1246 #if QC_GENERIC_SDC_G0122
    1247   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1248 #endif
    1249 #endif
    1250 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1251   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
    1252 #endif
    1253   //===== get prediction signal =====
    1254 #if H_3D_DIM
    1255   if( isDimMode( uiLumaPredMode ) )
    1256   {
    1257     m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight
    1258 #if QC_GENERIC_SDC_G0122
    1259       , false, dmm4Segmentation
    1260 #endif
    1261       );
    1262 #if HS_TSINGHUA_SDC_SPLIT_G0111
    1263     Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
    1264     Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
    1265     for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
    1266     {
    1267       dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
    1268     }
    1269 #endif
    1270   }
    1271   else
    1272   {
    1273 #endif
    1274     m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
    1275 #if H_3D_DIM
    1276   }
    1277 #endif
    1278 #if QC_PKU_SDC_SPLIT_G0123
     1154
     1155    //===== init availability pattern =====
     1156    Bool  bAboveAvail = false;
     1157    Bool  bLeftAvail  = false;
     1158
     1159    pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
     1160    pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
     1161
     1162    TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
     1163    //===== get prediction signal =====
     1164    if( isDimMode( uiLumaPredMode ) )
     1165    {
     1166      m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, false, dmm4Segmentation  );
     1167      Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
     1168      Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
     1169      for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
     1170      {
     1171        dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
     1172      }
     1173    }
     1174    else
     1175    {
     1176      m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     1177    }
     1178
    12791179    if ( numParts > 1 )
    12801180    {
     
    12921192    }
    12931193    uiAbsPartIdx += ( (uiWidth * uiWidth) >> 4 );
    1294 #if HS_TSINGHUA_SDC_SPLIT_G0111
    12951194    dmm4Segmentation->destroy(); delete dmm4Segmentation;
    1296 #endif
    12971195  }
    12981196  uiAbsPartIdx = 0;
     
    13091207  piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    13101208  uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    1311 #endif
    13121209  // number of segments depends on prediction mode
    13131210  UInt uiNumSegments = 1;
     
    13261223    uiMaskStride = pcWedgelet->getStride();
    13271224  }
    1328 #if QC_GENERIC_SDC_G0122
    13291225  if( getDimType( uiLumaPredMode ) == DMM4_IDX )
    13301226  {
    13311227    uiNumSegments = 2;
    1332 #if HS_TSINGHUA_SDC_SPLIT_G0111
    13331228    pbMask  = dmm4SegmentationOrg->getPattern();
    13341229    uiMaskStride = dmm4SegmentationOrg->getStride();
    1335 #else
    1336     pbMask  = dmm4Segmentation->getPattern();
    1337     uiMaskStride = dmm4Segmentation->getStride();
    1338 #endif
    1339   }
    1340 #endif
     1230  }
    13411231  // get DC prediction for each segment
    13421232  Pel apDCPredValues[2];
     
    14001290    pRecCr += uiStrideC;
    14011291  }
    1402 #if QC_GENERIC_SDC_G0122
    1403 #if HS_TSINGHUA_SDC_SPLIT_G0111
    14041292  dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;
    1405 #else
    1406   dmm4Segmentation->destroy(); delete dmm4Segmentation;
    1407 #endif
    1408 #endif
    14091293}
    14101294#endif
  • trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r872 r884  
    111111  pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
    112112
    113 #if SEC_IC_ARP_SIG_G0072
    114113  if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 )
    115 #else
    116   if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() )
    117 #endif
    118114  {
    119115    return;
     
    272268      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
    273269      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    274 #if !SEC_IC_ARP_SIG_G0072
     270#if H_3D_ARP
     271      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
     272#endif
    275273#if H_3D_IC
    276274      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    277 #endif
    278 #endif
    279 #if H_3D_ARP
    280       decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    281 #endif
    282 #if SEC_IC_ARP_SIG_G0072
    283 #if H_3D_IC
    284       decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    285 #endif
    286275#endif
    287276#if H_3D_DBBP
     
    362351      pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    363352
    364 #if MTK_DDD_G0063
     353#if H_3D_DDD
    365354      if( uiMergeIndex == pcSubCU->getUseDDDCandIdx() )
    366355      {
     
    384373          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    385374          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    386 #if NTT_STORE_SPDV_VSP_G0148
     375#if H_3D_VSP
    387376#if H_3D_DBBP
    388377          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) )
     
    440429        }
    441430      }
    442 #if !SEC_IC_ARP_SIG_G0072
     431#if H_3D_ARP
     432      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
     433#endif
    443434#if H_3D_IC
    444435      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    445436#endif
    446 #endif
    447 #if H_3D_ARP
    448       decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    449 #endif
    450 #if SEC_IC_ARP_SIG_G0072
    451 #if H_3D_IC
    452       decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    453 #endif
    454 #endif
    455437    }
    456438#if H_3D_VSP
    457 #if NTT_STORE_SPDV_VSP_G0148
    458439    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == 0))
    459 #else
    460     if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == false))
    461 #endif
    462440#else
    463441    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) )
     
    797775  UInt uiLumaOffset   = uiMinCoeffSize*uiAbsPartIdx;
    798776  UInt uiChromaOffset = uiLumaOffset>>2;
    799 #if QC_SDC_UNIFY_G0130
    800777#if H_3D_DIM_SDC
    801778  if( pcCU->getSDCFlag( uiAbsPartIdx ) && pcCU->isIntra( uiAbsPartIdx) )
     
    807784    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
    808785  }
    809 #endif
    810786
    811787#if H_3D_INTER_SDC
     
    817793  }
    818794#endif
    819 #if QC_SDC_UNIFY_G0130_FIX
    820795  if( pcCU->getSlice()->getIsDepth() && ( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) ) )
    821 #else
    822   if( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) )
    823 #endif
    824796  {
    825797    Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1;
     
    842814    }
    843815  }
    844 #else
    845 #if H_3D_DIM_SDC
    846   if( pcCU->getSDCFlag( uiAbsPartIdx ) )
    847   {
    848     assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
    849     assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
    850     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
    851     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
    852     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
    853     return;
    854   }
    855 #endif
    856  
    857 #if H_3D_INTER_SDC
    858   if( pcCU->getInterSDCFlag( uiAbsPartIdx ) )
    859   {
    860     assert( !pcCU->isSkipped( uiAbsPartIdx ) );
    861     assert( !pcCU->isIntra( uiAbsPartIdx) );
    862     assert( pcCU->getSlice()->getIsDepth() );
    863 
    864     decodeInterSDCResidualData( pcCU, uiAbsPartIdx, uiDepth );
    865     return;
    866   }
    867 #endif
    868816#endif
    869817
     
    893841
    894842#if H_3D_INTER_SDC
    895 #if QC_SDC_UNIFY_G0130
    896843Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    897844{
     
    904851  }
    905852
    906 #if SEC_INTER_SDC_G0101
    907853  if( !pcCU->getSlice()->getIsDepth() || pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N || pcCU->isSkipped( uiAbsPartIdx ) )
    908 #else
    909   if( !pcCU->getSlice()->getIsDepth() || ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N ) || pcCU->isSkipped( uiAbsPartIdx ) )
    910 #endif
    911854  {
    912855    return;
    913856  }
    914857
    915 #if SEC_INTER_SDC_G0101
    916858  assert( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );
    917 #else
    918   assert( ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );
    919 #endif
    920 
    921859  m_pcEntropyDecoderIf->parseSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    922860}
    923 
    924 #else
    925 Void TDecEntropy::decodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    926 {
    927   pcCU->setInterSDCFlagSubParts( false, uiAbsPartIdx, 0, uiDepth);
    928 
    929   if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) )
    930   {
    931     return;
    932   }
    933 
    934   if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || pcCU->isSkipped( uiAbsPartIdx ) )
    935   {
    936     return;
    937   }
    938 
    939   m_pcEntropyDecoderIf->parseInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
    940 }
    941 
    942 Void TDecEntropy::decodeInterSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    943 {
    944   if( !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) )
    945   {
    946     return;
    947   }
    948 
    949   if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || !pcCU->getInterSDCFlag( uiAbsPartIdx ) )
    950   {
    951     return;
    952   }
    953 
    954   UInt uiNumSegments = ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ? 1 : ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ? 4 : 2 );
    955 
    956   // decode residual data for each segment
    957   for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ )
    958   {
    959     m_pcEntropyDecoderIf->parseInterSDCResidualData( pcCU, uiAbsPartIdx, uiDepth, uiSeg );
    960   }
    961 }
    962 #endif
    963861#endif
    964862#if H_3D_DBBP
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r872 r884  
    9696#endif
    9797#if H_3D_INTER_SDC
    98 #if QC_SDC_UNIFY_G0130
    9998  virtual Void parseDeltaDC       ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) = 0;
    10099  virtual Void parseSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    101 #else
    102   virtual Void parseInterSDCFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    103   virtual Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0;
    104 #endif
    105100#endif
    106101#if H_3D_DBBP
     
    187182#endif
    188183#if H_3D_INTER_SDC
    189 #if QC_SDC_UNIFY_G0130
    190184  Void decodeSDCFlag           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    191 #else
    192   Void decodeInterSDCFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    193   Void decodeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    194 #endif
    195185#endif
    196186#if H_3D_DBBP
  • trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r872 r884  
    8686, m_cDdcFlagSCModel           ( 1,             1,               NUM_DDC_FLAG_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    8787, m_cDdcDataSCModel           ( 1,             1,               NUM_DDC_DATA_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    88 #if QC_GENERIC_SDC_G0122
    8988, m_cAngleFlagSCModel         ( 1,             1,               NUM_ANGLE_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels)
    90 #if !QC_SDC_UNIFY_G0130
    91 , m_cIntraSdcFlagSCModel      ( 1,             1,               NUM_INTRASDC_FLAG_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
    92 #endif
    93 #endif
    9489#if H_3D_DIM_DMM
    9590, m_cDmm1DataSCModel          ( 1,             1,               NUM_DMM1_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     
    10095#endif
    10196#endif
    102 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    103 , m_cInterSDCFlagSCModel             ( 1,             1,  NUM_INTER_SDC_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
    104 , m_cInterSDCResidualSCModel         ( 1,             1,  NUM_INTER_SDC_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
    105 , m_cInterSDCResidualSignFlagSCModel ( 1,             1,  NUM_INTER_SDC_SIGN_FLAG_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
    106 #endif
    107 #if QC_SDC_UNIFY_G0130
     97#if H_3D_DIM_SDC
    10898, m_cSDCFlagSCModel                  ( 1,             1,  NUM_SDC_FLAG_CTX                 , m_contextModels + m_numContextModels, m_numContextModels)
    10999#endif
     
    180170  m_cDdcFlagSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_DDC_FLAG );
    181171  m_cDdcDataSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_DDC_DATA );
    182 #if QC_GENERIC_SDC_G0122
    183172  m_cAngleFlagSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_ANGLE_FLAG );
    184 #if !QC_SDC_UNIFY_G0130
    185   m_cIntraSdcFlagSCModel.initBuffer      ( sliceType, qp, (UChar*)INIT_INTRASDC_FLAG );
    186 #endif
    187 #endif
    188173#if H_3D_DIM_DMM
    189174  m_cDmm1DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM1_DATA );
     
    194179#endif
    195180#endif
    196 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    197   m_cInterSDCFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_INTER_SDC_FLAG );
    198   m_cInterSDCResidualSCModel.initBuffer   ( sliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL );
    199   m_cInterSDCResidualSignFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
    200 #endif
    201 #if QC_SDC_UNIFY_G0130
     181#if H_3D_DIM_SDC
    202182  m_cSDCFlagSCModel.initBuffer            ( sliceType, qp, (UChar*)INIT_SDC_FLAG );
    203183#endif
     
    260240  m_cDdcFlagSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DDC_FLAG );
    261241  m_cDdcDataSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DDC_DATA );
    262 #if QC_GENERIC_SDC_G0122
    263242  m_cAngleFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG );
    264 #if !QC_SDC_UNIFY_G0130
    265   m_cIntraSdcFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_INTRASDC_FLAG );
    266 #endif
    267 #endif
    268243#if H_3D_DIM_DMM
    269244  m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
     
    274249#endif
    275250#endif
    276 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    277   m_cInterSDCFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG );
    278   m_cInterSDCResidualSCModel.initBuffer   ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL );
    279   m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
    280 #endif
    281 #if QC_SDC_UNIFY_G0130
     251#if H_3D_DIM_SDC
    282252  m_cSDCFlagSCModel.initBuffer            ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
    283253#endif
     
    817787  Bool rapPic     = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
    818788
    819 #if MTK_TEX_DEP_PAR_G0055
    820789  Bool depthDependent = false;
    821790  UInt uiTexturePart = uiMode;
    822 #endif
    823791  if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC())
    824792  {
    825793    TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
    826794    assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth);
    827 #if !MTK_TEX_DEP_PAR_G0055
    828     if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN)
    829 #else
    830795    if(pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth )
    831796    {
     
    834799    }
    835800    if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N)
    836 #endif
    837801    {
    838802      bParsePartSize = false;
     
    879843    if(bParsePartSize)
    880844    {
    881 #endif
    882 #if MTK_TEX_DEP_PAR_G0055
    883845      if (depthDependent==false || uiTexturePart == SIZE_NxN|| uiTexturePart == SIZE_2Nx2N)
    884846      {
     
    920882        }
    921883      }
    922 #if MTK_TEX_DEP_PAR_G0055
     884#if H_3D_QTLPC
    923885      }
    924886      else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD)
     
    985947      }
    986948      else
     949      {
    987950        assert(0);
    988 #endif
     951      }
    989952#if H_MV_ENC_DEC_TRAC         
    990953      DTRACE_CU("part_mode", eMode )
    991954#endif
    992 #if H_3D_QTLPC
    993955    }
    994956#endif
     
    10411003    }
    10421004    if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE )
    1043 #if H_3D_DIM_SDC
    1044 #if QC_GENERIC_SDC_G0122
    1045       if( 1 ) // This should be cleaned up.
    1046 #else
    1047       if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) )
    1048 #endif
    1049 #endif
    10501005    {
    10511006#endif
     
    10631018#if H_3D_DIM
    10641019    if( pcCU->getLumaIntraDir( absPartIdx+partOffset*j ) < NUM_INTRA_MODE )
    1065 #if H_3D_DIM_SDC
    1066 #if QC_GENERIC_SDC_G0122
    1067       if( 1 )  // This should be cleaned up.
    1068 #else
    1069       if( !pcCU->getSDCFlag( absPartIdx+partOffset*j ) )
    1070 #endif
    1071 #endif
    10721020    {
    10731021#endif
     
    11711119  }
    11721120
    1173 #if !QC_SDC_UNIFY_G0130
    1174   if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) )
    1175   {
    1176     UInt symbol;
    1177 #if QC_GENERIC_SDC_G0122
    1178     UInt uiNumSegments = isDimMode( dir ) ? 2 : 1;
    1179 #else
    1180     UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2;
    1181 #endif
    1182 
    1183     if( pcCU->getSDCFlag( absPartIdx ) )
    1184     {
    1185       assert(pcCU->getPartitionSize(absPartIdx)==SIZE_2Nx2N);
    1186       pcCU->setTrIdxSubParts(0, absPartIdx, depth);
    1187       pcCU->setCbfSubParts(1, 1, 1, absPartIdx, depth);
    1188     }
    1189 
    1190     m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) );
    1191 
    1192     if( symbol )
    1193     {
    1194       if( !pcCU->getSDCFlag( absPartIdx ) )
    1195       {
    1196         dir += symbol;
    1197       }
    1198     }
    1199     for( UInt segment = 0; segment < uiNumSegments; segment++ )
    1200     {
    1201       Pel valDeltaDC = 0;
    1202       if( symbol )
    1203       {
    1204         xParseDimDeltaDC( valDeltaDC, uiNumSegments );
    1205       }
    1206 
    1207       if( pcCU->getSDCFlag( absPartIdx ) )
    1208       {
    1209         pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx );
    1210       }
    1211       else
    1212       {
    1213         pcCU->setDimDeltaDC( dimType, segment, absPartIdx, valDeltaDC );
    1214       }
    1215     }
    1216   }
    1217 #endif
    12181121  pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth );
    12191122}
    12201123
    1221 #if QC_GENERIC_SDC_G0122
    12221124Void TDecSbac::parseIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx, UInt depth )
    12231125{
     
    12341136  uiIsDimMode = uiSymbol ? 0 : 1;
    12351137  pcCU->setLumaIntraDirSubParts( 0, absPartIdx, depth );
    1236 #if !QC_SDC_UNIFY_G0130
    1237   if( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N ) //SDC is allowed only in this case
    1238   {
    1239     m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraSdcFlagSCModel.get( 0, 0, pcCU->getCtxSDCFlag( absPartIdx ) ) );
    1240   }
    1241   else
    1242   {
    1243     uiSymbol = 0;
    1244   }
    1245 
    1246   pcCU->setSDCFlagSubParts( uiSymbol, absPartIdx, depth );
    1247 #endif
     1138
    12481139  //decode DMM index
    12491140  if( uiIsDimMode )
     
    12601151  }
    12611152}
    1262 #else
    1263 Void TDecSbac::parseIntraDepthMode( TComDataCU* pcCU, UInt absPartIdx, UInt depth )
    1264 {
    1265   UInt puIdx = (pcCU->getWidth(absPartIdx) == 64) ? 2 : ( (pcCU->getPartitionSize(absPartIdx) == SIZE_NxN && pcCU->getWidth(absPartIdx) == 8) ? 0 : 1 );
    1266   UInt dir = 0;
    1267   Bool sdcFlag = 0;
    1268   UInt symbol = 1;
    1269   UInt modeCode = 0 ;
    1270   UInt binNum = 0;
    1271   UInt ctxDepthMode = 0;
    1272 
    1273   if( puIdx == 2 )
    1274   {
    1275     {
    1276       ctxDepthMode = puIdx*3 + binNum;
    1277       m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
    1278       modeCode = (modeCode<<1) + symbol;
    1279       binNum++;
    1280     }
    1281          if( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;}
    1282     else if( modeCode == 1 ) { dir = 0;          sdcFlag = 0;}
    1283   }
    1284   else if( puIdx == 0 )
    1285   {
    1286     while( binNum < 1 && symbol )
    1287     {
    1288       ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum);
    1289       m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
    1290       modeCode = (modeCode<<1) + symbol;
    1291       binNum++;
    1292     }
    1293     if( modeCode == 0 )
    1294     {
    1295       dir = 0;
    1296       sdcFlag = 0;
    1297     }
    1298     else if ( modeCode == 1 )
    1299     {
    1300       dir = (2*DMM1_IDX+DIM_OFFSET);
    1301       sdcFlag = 0;
    1302     }
    1303   }
    1304   else
    1305   {
    1306     while( binNum < 4 && symbol )
    1307     {
    1308       ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum);
    1309       m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
    1310       modeCode = (modeCode<<1) + symbol;
    1311       binNum++;
    1312     }
    1313     if ( modeCode == 0 )        { dir =  PLANAR_IDX;             sdcFlag = 1;}
    1314     else if ( modeCode == 2 )   { dir = 5;                       sdcFlag = 0;}
    1315     else if ( modeCode == 6 )   { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;}
    1316     else if ( modeCode == 14 )  { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
    1317     else if ( modeCode == 15 )  { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
    1318 
    1319   }
    1320   pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth );
    1321 #if H_3D_DIM_SDC
    1322   pcCU->setSDCFlagSubParts( sdcFlag, absPartIdx, depth );
    1323 #endif
    1324 }
    1325 #endif
    13261153#endif
    13271154
     
    21892016  if( 1 == uiW )   
    21902017  {
    2191 #if MTK_ARP_FLAG_CABAC_SIMP_G0061
    21922018    m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) );
    2193 #else
    2194     m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 3 ) );
    2195 #endif
    21962019    uiW += ( 1 == uiCode ? 1 : 0 );
    21972020  }
     
    22132036{
    22142037  UInt uiSymbol = 0;
    2215 #if MTK_IC_FLAG_CABAC_SIMP_G0061
    22162038  m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) );
    2217 #else
    2218   UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx );
    2219   m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) );
    2220 #endif
    22212039#if !H_MV_ENC_DEC_TRAC
    22222040  DTRACE_CABAC_VL( g_nSymbolCounter++ );
     
    22362054
    22372055#if H_3D_INTER_SDC
    2238 #if QC_SDC_UNIFY_G0130
    22392056Void TDecSbac::parseDeltaDC( TComDataCU* pcCU, UInt absPartIdx, UInt depth )
    22402057{
     
    22672084  else
    22682085  {
    2269 #if SEC_INTER_SDC_G0101
    22702086    uiNumSegments = 1;
    2271 #else
    2272     PartSize cPartSize = pcCU->getPartitionSize( absPartIdx );
    2273     uiNumSegments = ( cPartSize == SIZE_2Nx2N ) ? 1 : ( cPartSize == SIZE_NxN ? 4 : 2 );
    2274 #endif
    22752087    symbol = 1;
    22762088  }
     
    23232135  }
    23242136}
    2325 #else
    2326 Void TDecSbac::parseInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    2327 {
    2328   UInt uiSymbol = 0;
    2329   UInt uiCtxInterSDCFlag = pcCU->getCtxInterSDCFlag( uiAbsPartIdx );
    2330 
    2331   m_pcTDecBinIf->decodeBin( uiSymbol, m_cInterSDCFlagSCModel.get( 0, 0, uiCtxInterSDCFlag ) );
    2332 
    2333   if( uiSymbol )
    2334   {
    2335     pcCU->setInterSDCFlagSubParts( true, uiAbsPartIdx, 0, uiDepth );
    2336     pcCU->setTrIdxSubParts( 0, uiAbsPartIdx, uiDepth );
    2337     pcCU->setCbfSubParts( 1, 1, 1, uiAbsPartIdx, uiDepth );
    2338   }
    2339   else
    2340   {
    2341     pcCU->setInterSDCFlagSubParts( false, uiAbsPartIdx, 0, uiDepth);
    2342   }
    2343 }
    2344 
    2345 Void TDecSbac::parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment )
    2346 {
    2347   UInt uiAbsIdx   = 0;
    2348   UInt uiSign     = 0;
    2349   Int  iIdx       = 0;
    2350 
    2351   xReadExGolombLevel( uiAbsIdx, m_cInterSDCResidualSCModel.get( 0, 0, 0 ) );
    2352 
    2353   uiAbsIdx++;
    2354   m_pcTDecBinIf->decodeBin( uiSign, m_cInterSDCResidualSignFlagSCModel.get( 0, 0, 0 ) );
    2355   iIdx = (Int)( uiSign ? -1 : 1 ) * uiAbsIdx;
    2356 
    2357   pcCU->setInterSDCSegmentDCOffset( iIdx, uiSegment, uiAbsPartIdx );
    2358 }
    2359 #endif
     2137
    23602138#endif
    23612139
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r872 r884  
    112112#endif
    113113#if H_3D_INTER_SDC
    114 #if QC_SDC_UNIFY_G0130
    115114  Void  parseDeltaDC         ( TComDataCU* pcCU, UInt absPartIdx, UInt depth );
    116115  Void  parseSDCFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    117 #else
    118   Void  parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    119   Void  parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
    120 #endif
    121116#endif
    122117#if H_3D_DBBP
     
    218213  ContextModel3DBuffer m_cDdcFlagSCModel;
    219214  ContextModel3DBuffer m_cDdcDataSCModel;
    220 #if QC_GENERIC_SDC_G0122
    221215  ContextModel3DBuffer m_cAngleFlagSCModel;
    222 #if !QC_SDC_UNIFY_G0130
    223   ContextModel3DBuffer m_cIntraSdcFlagSCModel;
    224 #endif
    225 #endif
    226216#if H_3D_DIM_DMM
    227217  ContextModel3DBuffer m_cDmm1DataSCModel;
     
    232222#endif
    233223#endif
    234 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
    235   ContextModel3DBuffer m_cInterSDCFlagSCModel;
    236   ContextModel3DBuffer m_cInterSDCResidualSCModel;
    237   ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel;
    238 #endif
    239 #if QC_SDC_UNIFY_G0130
     224#if H_3D_DIM_SDC 
    240225  ContextModel3DBuffer m_cSDCFlagSCModel;
    241226#endif
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r872 r884  
    5151  m_aaiCodedOffset         = new Int* [ MAX_NUM_LAYERS ];
    5252  m_aaiCodedScale          = new Int* [ MAX_NUM_LAYERS ];
    53 #if !FIX_CAM_PARS_COLLECTOR
    54   m_aiViewId               = new Int  [ MAX_NUM_LAYERS ];
    55 
    56   m_bViewReceived          = new Bool [ MAX_NUM_LAYERS ];
    57 #endif
    5853  for( UInt uiId = 0; uiId < MAX_NUM_LAYERS; uiId++ )
    5954  {
     
    6560  m_iLog2Precision   = LOG2_DISP_PREC_LUT;
    6661  m_uiBitDepthForLUT = 8; // fixed
    67 #if FIX_CAM_PARS_COLLECTOR
    6862  m_receivedIdc = NULL;
    6963  m_vps         = NULL;
    70 #endif
    7164}
    7265
     
    8073  delete [] m_aaiCodedOffset;
    8174  delete [] m_aaiCodedScale;
    82 #if !FIX_CAM_PARS_COLLECTOR
    83   delete [] m_aiViewId; 
    84   delete [] m_bViewReceived;
    85 #endif
    8675
    8776  xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 );
    8877  xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 );
    89 #if FIX_CAM_PARS_COLLECTOR
    9078  xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 );
    91 #endif
    92 }
    93 
    94 
    95 #if FIX_CAM_PARS_COLLECTOR
     79}
     80
     81
    9682Void
    9783CamParsCollector::init( FILE* pCodedScaleOffsetFile, TComVPS* vps)
     
    159145  }
    160146}
    161 #else
    162 Void
    163 CamParsCollector::init( FILE* pCodedScaleOffsetFile )
    164 {
    165   m_bInitialized            = true;
    166   m_pCodedScaleOffsetFile   = pCodedScaleOffsetFile;
    167   m_uiCamParsCodedPrecision = 0;
    168   m_bCamParsVaryOverTime    = false;
    169   m_iLastViewIndex             = -1;
    170   m_iLastPOC                = -1;
    171   m_uiMaxViewIndex             = 0;
    172 }
    173 #endif
    174 
    175147
    176148
     
    206178  CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT)
    207179{
    208 #if FIX_CAM_PARS_COLLECTOR
    209180  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
    210 #else
    211   Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
    212 #endif
    213181  Int     iLog2DivChroma = iLog2DivLuma + 1;
    214182
     
    252220}
    253221
    254 #if !FIX_CAM_PARS_COLLECTOR
    255 Void
    256 CamParsCollector::setSlice( TComSlice* pcSlice )
    257 {
    258 
    259   if( pcSlice == 0 )
    260   {
    261     AOF( xIsComplete() );
    262     if( m_bCamParsVaryOverTime || m_iLastPOC == 0 )
    263     {
    264       xOutput( m_iLastPOC );
    265     }
    266     return;
    267   }
    268  
    269   if ( pcSlice->getIsDepth())
    270   {
    271     return;
    272   }
    273 
    274   Bool  bFirstAU          = ( pcSlice->getPOC()     == 0 );
    275   Bool  bFirstSliceInAU   = ( pcSlice->getPOC()     != Int ( m_iLastPOC ) );
    276   Bool  bFirstSliceInView = ( pcSlice->getViewIndex()  != UInt( m_iLastViewIndex ) || bFirstSliceInAU );
    277 
    278   AOT(  bFirstSliceInAU  &&   pcSlice->getViewIndex()  != 0 );
    279   AOT( !bFirstSliceInAU  &&   pcSlice->getViewIndex()   < UInt( m_iLastViewIndex ) );
    280  
    281   AOT( !bFirstSliceInAU  &&   pcSlice->getViewIndex()   > UInt( m_iLastViewIndex + 1 ) );
    282  
    283   AOT( !bFirstAU         &&   pcSlice->getViewIndex()   > m_uiMaxViewIndex );
    284 
    285   if ( !bFirstSliceInView )
    286   {
    287     if( m_bCamParsVaryOverTime ) // check consistency of slice parameters here
    288     {
    289       UInt uiViewIndex = pcSlice->getViewIndex();
    290       for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ )
    291       {
    292         AOF( m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedScale    () [ uiBaseViewIndex ] );
    293         AOF( m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedOffset   () [ uiBaseViewIndex ] );
    294         AOF( m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedScale () [ uiBaseViewIndex ] );
    295         AOF( m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedOffset() [ uiBaseViewIndex ] );
    296       }
    297     }
    298     return;
    299   }
    300 
    301   if( bFirstSliceInAU )
    302   {
    303     if( !bFirstAU )
    304     {
    305       AOF( xIsComplete() );
    306       xOutput( m_iLastPOC );
    307     }
    308     ::memset( m_bViewReceived, false, MAX_NUM_LAYERS * sizeof( Bool ) );
    309   }
    310 
    311   UInt uiViewIndex                       = pcSlice->getViewIndex();
    312   m_bViewReceived[ uiViewIndex ]         = true;
    313   if( bFirstAU )
    314   {
    315     m_uiMaxViewIndex                     = std::max( m_uiMaxViewIndex, uiViewIndex );
    316     m_aiViewId[ uiViewIndex ]            = pcSlice->getViewId();
    317 
    318     if( uiViewIndex == 1 )
    319     {
    320       m_uiCamParsCodedPrecision       = pcSlice->getVPS()->getCamParPrecision     ();
    321       m_bCamParsVaryOverTime          = pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex );
    322     }
    323     else if( uiViewIndex > 1 )
    324     {
    325       AOF( m_uiCamParsCodedPrecision == pcSlice->getVPS()->getCamParPrecision     () );
    326       AOF( m_bCamParsVaryOverTime    == pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex ) );
    327     }
    328 
    329     for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
    330     {
    331       if( m_bCamParsVaryOverTime )
    332       {
    333         m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getCodedScale    () [ uiBaseIndex ];
    334         m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getCodedOffset   () [ uiBaseIndex ];
    335         m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getInvCodedScale () [ uiBaseIndex ];
    336         m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getInvCodedOffset() [ uiBaseIndex ];
    337         xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
    338         xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);
    339       }
    340       else
    341       {
    342         m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getVPS()->getCodedScale    (uiViewIndex) [ uiBaseIndex ];
    343         m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getVPS()->getCodedOffset   (uiViewIndex) [ uiBaseIndex ];
    344         m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getVPS()->getInvCodedScale (uiViewIndex) [ uiBaseIndex ];
    345         m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getVPS()->getInvCodedOffset(uiViewIndex) [ uiBaseIndex ];
    346         xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
    347         xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
    348       }
    349     }
    350   }
    351   else
    352   {
    353     AOF( m_aiViewId[ uiViewIndex ] == pcSlice->getViewId() );
    354     if( m_bCamParsVaryOverTime )
    355     {
    356       for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
    357       {
    358         m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getCodedScale    () [ uiBaseIndex ];
    359         m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getCodedOffset   () [ uiBaseIndex ];
    360         m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getInvCodedScale () [ uiBaseIndex ];
    361         m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getInvCodedOffset() [ uiBaseIndex ];
    362 
    363         xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
    364         xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
    365       }
    366     }
    367   }
    368  
    369   m_iLastViewIndex = (Int)pcSlice->getViewIndex(); 
    370   m_iLastPOC       = (Int)pcSlice->getPOC();
    371 }
    372 
    373 #else
    374222Void
    375223CamParsCollector::setSlice( TComSlice* pcSlice )
     
    440288  }
    441289}
    442 #endif
    443290
    444291
     
    454301#endif
    455302
    456 #if !FIX_CAM_PARS_COLLECTOR
    457 Bool
    458 CamParsCollector::xIsComplete()
    459 {
    460   for( UInt uiView = 0; uiView <= m_uiMaxViewIndex; uiView++ )
    461   {
    462     if( m_bViewReceived[ uiView ] == 0 )
    463     {
    464       return false;
    465     }
    466   }
    467   return true;
    468 }
    469 #endif
    470303
    471304Void
     
    474307  if( m_pCodedScaleOffsetFile )
    475308  {
    476 #if FIX_CAM_PARS_COLLECTOR
    477309    if( iPOC == m_firstReceivedPoc )
    478 #else
    479     if( iPOC == 0 )
    480 #endif
    481310    {
    482311      fprintf( m_pCodedScaleOffsetFile, "#  ViewIndex       ViewId\n" );
    483312      fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" );
    484 #if FIX_CAM_PARS_COLLECTOR
    485313      for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
    486314      {
    487315        fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_vps->getViewIdVal( uiViewIndex ) );
    488 #else       
    489       for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
    490       {
    491         fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_aiViewId[ uiViewIndex ] );
    492 #endif
    493316      }
    494317      fprintf( m_pCodedScaleOffsetFile, "\n\n");
     
    496319      fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" );
    497320    }
    498 #if FIX_CAM_PARS_COLLECTOR
    499321    if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime  )
    500 #else
    501     if( iPOC == 0 || m_bCamParsVaryOverTime )
    502 #endif
    503322    {
    504323      Int iS = iPOC;
     
    510329          if( uiViewIndex != uiBaseIndex )
    511330          {
    512 #if FIX_CAM_PARS_COLLECTOR
    513331            if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 )
    514332            {           
     
    516334                iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() );
    517335            }           
    518 #else
    519             fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",
    520               iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_uiCamParsCodedPrecision );
    521 #endif
    522 
    523336          }
    524337        }
     
    641454  for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++)
    642455  {
    643 #if H_MV_HLS_7_SPS_P0155_16_32
     456#if H_MV
    644457    numReorderPics[temporalLayer] = ( getLayerId() == 0 ) ? pcSlice->getSPS()->getNumReorderPics(temporalLayer) : pcSlice->getVPS()->getNumReorderPics(temporalLayer);
    645458#else
     
    647460#endif
    648461  }
    649 #if H_MV_HLS_7_SPS_P0155_16_32
     462#if H_MV
    650463  if ( getLayerId() == 0 )
    651464  { 
  • trunk/source/Lib/TLibDecoder/TDecTop.h

    r872 r884  
    7171  ~CamParsCollector ();
    7272
    73 #if FIX_CAM_PARS_COLLECTOR
    7473  Void  init        ( FILE* pCodedScaleOffsetFile, TComVPS* vps );
    75 #else
    76   Void  init        ( FILE* pCodedScaleOffsetFile );
    77 #endif
    7874
    7975  Void  uninit      ();
     
    8783#endif
    8884
    89 #if MTK_DDD_G0063
     85#if H_3D_DDD
    9086  Int getCodedScale( Int iBaseView, Int iCureView){ return m_aaiCodedScale[ iBaseView ][ iCureView ];}
    9187  Int getCodedOffset( Int iBaseView, Int iCureView){ return m_aaiCodedOffset[ iBaseView ][ iCureView ];}
     
    9490
    9591private:
    96 #if FIX_CAM_PARS_COLLECTOR
    9792  Void xResetReceivedIdc( Bool overWriteFlag );
    98 #else
    99   Bool  xIsComplete ();
    100 #endif
    10193  Void  xOutput     ( Int iPOC );
    10294
     
    108100  Int**   m_aaiCodedScale;
    109101 
    110 #if !FIX_CAM_PARS_COLLECTOR
    111   Int*    m_aiViewId; 
    112 #else
    113102  TComVPS* m_vps;
    114103  Int**    m_receivedIdc;
     
    116105  Int      m_lastPoc;
    117106  Int      m_firstReceivedPoc;
    118 #endif
    119 
    120  
    121 #if !FIX_CAM_PARS_COLLECTOR
    122   Bool*   m_bViewReceived;
    123   UInt    m_uiCamParsCodedPrecision;
    124 #endif
     107
     108 
    125109  Bool    m_bCamParsVaryOverTime;
    126 #if !FIX_CAM_PARS_COLLECTOR
    127   Int     m_iLastViewIndex;
    128   Int     m_iLastPOC;
    129   UInt    m_uiMaxViewIndex;
    130 #endif
    131 
    132110
    133111  UInt    m_uiBitDepthForLUT;
Note: See TracChangeset for help on using the changeset viewer.