Changeset 766 in 3DVCSoftware for branches/HTM-9.2-dev0/source/Lib/TLibDecoder


Ignore:
Timestamp:
12 Jan 2014, 03:29:17 (11 years ago)
Author:
tech
Message:

Cleanup part 3

Location:
branches/HTM-9.2-dev0/source/Lib/TLibDecoder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r765 r766  
    556556
    557557  READ_FLAG(     uiCode, "video_signal_type_present_flag");           pcVUI->setVideoSignalTypePresentFlag(uiCode);
    558 #if H_MV_6_PS_O0118_33
    559558  assert( pcSPS->getLayerId() == 0 || !pcVUI->getVideoSignalTypePresentFlag() );
    560 #endif
    561559
    562560  if (pcVUI->getVideoSignalTypePresentFlag())
     
    746744  {
    747745    READ_FLAG( uiCode, "update_rep_format_flag" );               pcSPS->setUpdateRepFormatFlag( uiCode == 1 );
    748 #if H_MV_6_PS_REP_FORM_18_19_20
    749746    if ( pcSPS->getUpdateRepFormatFlag() )
    750747    {
     
    754751  else
    755752  {
    756 #else
    757   }
    758  
    759   if ( pcSPS->getUpdateRepFormatFlag() )
    760   {
    761 #endif
    762753#endif
    763754  READ_UVLC(     uiCode, "chroma_format_idc" );                  pcSPS->setChromaFormatIdc( uiCode );
     
    795786
    796787#if H_MV
    797 #if H_MV_6_PS_REP_FORM_18_19_20
    798788  if ( pcSPS->getLayerId() == 0 )
    799 #else
    800   if ( pcSPS->getUpdateRepFormatFlag() )
    801 #endif
    802789  {
    803790#endif
     
    948935
    949936  READ_FLAG( uiCode, "sps_extension_flag");
    950 #if H_MV_6_PSEM_O0142_3
    951937  pcSPS->setSpsExtensionFlag( uiCode );
    952 #endif
    953938  if (pcSPS->getSpsExtensionFlag( ) )
    954939  {
    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   
    969940    for (Int i = 0; i < PS_EX_T_MAX_NUM; i++)
    970941    {
     
    991962    if ( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_ESC ))
    992963    {   
    993 #endif
    994964        while ( xMoreRbspData() )
    995965        {
    996966          READ_FLAG( uiCode, "sps_extension_data_flag");
    997967        }
    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
    1007 #endif
     968    }
    1008969  }
    1009970}
     
    1014975  UInt uiCode;
    1015976  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
    1019977 
    1020978  READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets( uiCode );
     
    1031989    READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode );
    1032990  }
    1033 #endif 
    1034991}
    1035992
     
    10811038  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
    10821039#if H_MV
    1083 #if H_MV_6_LAYER_ID_32
    10841040  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
    10881041#else
    10891042  READ_CODE( 6,  uiCode,  "vps_reserved_zero_6bits" );            assert(uiCode == 0);
     
    11401093    }
    11411094  }
    1142 #if H_MV_6_HRD_O0217_13
    11431095  pcVPS->deriveLayerSetLayerIdList();
    1144 #endif
    11451096  TimingInfo *timingInfo = pcVPS->getTimingInfo();
    11461097  READ_FLAG(       uiCode, "vps_timing_info_present_flag");         timingInfo->setTimingInfoPresentFlag      (uiCode ? true : false);
     
    12091160  UInt uiCode;
    12101161  READ_FLAG( uiCode, "avc_base_layer_flag" );                     pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );
    1211 #if H_MV_6_PS_O0109_24
    12121162  READ_FLAG( uiCode, "vps_vui_present_flag" );                    pcVPS->setVpsVuiPresentFlag( uiCode == 1 );  if ( pcVPS->getVpsVuiPresentFlag() )
    12131163  { 
    1214 #endif
    12151164  READ_CODE( 16, uiCode, "vps_vui_offset" );                      pcVPS->setVpsVuiOffset( uiCode );
    1216 #if H_MV_6_PS_O0109_24
    1217   }
    1218 #endif
     1165  }
    12191166
    12201167  READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
     
    12631210  }
    12641211
    1265 #if H_MV_6_PS_O0109_22
    12661212  READ_CODE( 4, uiCode, "view_id_len" ); pcVPS->setViewIdLen( uiCode );
    12671213
     
    12801226    }
    12811227  }
    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
    12951228
    12961229
     
    13021235    }
    13031236  }
    1304 #if H_MV_6_MISC_O0062_31
    13051237  pcVPS->setRefLayers();
    1306 #endif
    1307 #if H_MV_6_ILDSD_O0120_26
    13081238  READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 );
    13091239  if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() )
     
    13231253    }
    13241254  }
    1325 #endif
    13261255  READ_FLAG( uiCode, "max_tid_ref_present_flag" ); pcVPS->setMaxTidRefPresentFlag( uiCode == 1 );
    13271256
     
    13301259    for( Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )
    13311260    {
    1332 #if H_MV_6_ILDDS_O0225_30
    13331261      for( Int j = i + 1; j <= pcVPS->getMaxLayersMinus1(); j++ )
    13341262      {
     
    13381266        }
    13391267      }
    1340 #else
    1341       READ_CODE( 3, uiCode,       "max_tid_il_ref_pics_plus1[i]" );      pcVPS->setMaxTidIlRefPicPlus1( i , uiCode );
    1342 #endif
    13431268    }
    13441269  }
     
    13541279    {
    13551280      READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode );
    1356 #if H_MV_6_PS_O0109_23
    13571281      pcVPS->checkProfileRefMinus1( i );     
    1358 #endif
    13591282    }
    13601283    parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
     
    13791302  if( numOutputLayerSets > 1)
    13801303  {
    1381 #if H_MV_6_PS_0109_25
    13821304    READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" ); pcVPS->setDefaultOneTargetOutputLayerIdc( uiCode );
    13831305    pcVPS->checkDefaultOneTargetOutputLayerIdc();
    1384 #else
    1385     READ_FLAG( uiCode, "default_one_target_output_layer_flag" ); pcVPS->setDefaultOneTargetOutputLayerFlag(  uiCode == 1);
    1386 #endif
    13871306  } 
    13881307
    1389 #if H_MV_6_HRD_O0217_13
    13901308  pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 ));
    13911309  pcVPS->setOutputLayerSetIdxMinus1(0, -1);
    1392 #endif
    13931310  for( Int i = 1; i < numOutputLayerSets; i++ )
    13941311  {
     
    14011318      }       
    14021319    }
    1403 #if H_MV_6_HRD_O0217_13
    14041320    else
    14051321    { // These inference rules would also be helpful in spec text
     
    14101326      }
    14111327    }
    1412 #endif
    14131328
    14141329    if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
     
    14171332    }
    14181333  }
    1419 #if H_MV_6_GEN_0153_28
    14201334  if( pcVPS->getMaxLayersMinus1() > 0 )
    14211335  {
    14221336    READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 );
    14231337  }
    1424 #endif
    1425 #if H_MV_6_HRD_O0217_13
    14261338  pcVPS->deriveTargetLayerIdLists();
    1427 #endif
    14281339  READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 );
    14291340  if ( pcVPS->getRepFormatIdxPresentFlag() )
     
    14341345  for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ )
    14351346  {
    1436 #if H_MV_6_PS_REP_FORM_18_19_20
    14371347    assert( pcVPS->getRepFormat(i) == NULL );
    14381348    TComRepFormat* curRepFormat = new TComRepFormat();
     
    14401350    parseRepFormat( i, curRepFormat ,  prevRepFormat);
    14411351    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
    14481352  }
    14491353
     
    14541358      if( pcVPS->getVpsNumRepFormatsMinus1() > 0 )
    14551359      {
    1456 #if H_MV_6_PS_REP_FORM_18_19_20
    14571360        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
    14611361      }
    14621362    }
     
    14641364
    14651365  READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 );
    1466 #if H_MV_6_MISC_O0062_31
    14671366  for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
    14681367  {
     
    14721371    }
    14731372  }
    1474 #endif
    1475 
    1476 #if H_MV_6_HRD_O0217_13
     1373
    14771374  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
     1375
    14831376  READ_UVLC( uiCode, "direct_dep_type_len_minus2")    ; pcVPS->setDirectDepTypeLenMinus2   ( uiCode );
    14841377
    1485 #if H_MV_6_PS_O0096_21
    14861378  READ_FLAG( uiCode, "default_direct_dependency_flag" ); pcVPS->setDefaultDirectDependencyFlag( uiCode == 1 );
    14871379  if ( pcVPS->getDefaultDirectDependencyFlag( ) )
     
    15071399    }
    15081400  } 
    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
    15211401
    15221402  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
    15261403
    15271404  if( pcVPS->getVpsVuiPresentFlag() )
     
    15321409
    15331410  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
     1411}
     1412
    15401413Void TDecCavlc::parseRepFormat( Int i, TComRepFormat* pcRepFormat, TComRepFormat* pcPrevRepFormat )
    1541 #else
    1542 Void TDecCavlc::parseRepFormat( TComRepFormat* pcRepFormat )
    1543 #endif
    15441414{
    15451415  assert( pcRepFormat );
     
    15471417  UInt uiCode;
    15481418
    1549 #if H_MV_6_PS_REP_FORM_18_19_20
    15501419  READ_CODE( 16, uiCode, "pic_width_vps_in_luma_samples" );  pcRepFormat->setPicWidthVpsInLumaSamples ( uiCode );
    15511420  READ_CODE( 16, uiCode, "pic_height_vps_in_luma_samples" ); pcRepFormat->setPicHeightVpsInLumaSamples( uiCode );
     
    15561425  if ( pcRepFormat->getChromaAndBitDepthVpsPresentFlag() )
    15571426  { 
    1558 #endif
    15591427  READ_CODE( 2,  uiCode, "chroma_format_vps_idc" );          pcRepFormat->setChromaFormatVpsIdc       ( uiCode );
    15601428  if ( pcRepFormat->getChromaFormatVpsIdc() == 3 )
     
    15621430    READ_FLAG( uiCode, "separate_colour_plane_vps_flag" ); pcRepFormat->setSeparateColourPlaneVpsFlag( uiCode == 1 );
    15631431  }
    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
    15681432  READ_CODE( 4,  uiCode, "bit_depth_vps_luma_minus8" );      pcRepFormat->setBitDepthVpsLumaMinus8    ( uiCode );
    15691433  READ_CODE( 4,  uiCode, "bit_depth_vps_chroma_minus8" );    pcRepFormat->setBitDepthVpsChromaMinus8  ( uiCode );
    1570 #if H_MV_6_PS_REP_FORM_18_19_20
    15711434  }
    15721435  else
     
    15741437    pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, false );
    15751438  }
    1576 #endif
    15771439}
    15781440
     
    15871449
    15881450  UInt uiCode;
    1589 #if H_MV_6_PS_O0223_29
    15901451  READ_FLAG( uiCode, "cross_layer_pic_type_aligned_flag" ); pcVPSVUI->setCrossLayerPicTypeAlignedFlag( uiCode == 1 );
    15911452  if ( !pcVPSVUI->getCrossLayerPicTypeAlignedFlag() )
     
    15931454    READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 );
    15941455  }
    1595 #endif
    15961456  READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 );
    15971457  READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 );
     
    16241484  }
    16251485
    1626 #if H_MV_6_O0226_37
    16271486  READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 );
    16281487  if( !pcVPSVUI->getTilesNotInUseFlag() )
     
    16591518    }
    16601519  }
    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
    16701520
    16711521  READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 );
     
    16901540  }
    16911541
    1692 #if H_MV_6_PS_O0118_33
    16931542  READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );
    16941543  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
     
    17241573    }
    17251574  }
    1726 #endif
    1727 #if H_MV_6_HRD_O0164_15
    17281575  READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 );
    17291576  if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
     
    17311578    parseVpsVuiBspHrdParameters( pcVPS );
    17321579}
    1733 #endif
    1734 }
    1735 
    1736 #if H_MV_6_HRD_O0164_15
     1580}
     1581
    17371582Void TDecCavlc::parseVpsVuiBspHrdParameters( TComVPS* pcVPS )
    17381583{
     
    17911636  } 
    17921637
    1793 #endif
    1794 
    1795 #if H_MV_6_PS_O0118_33
     1638
    17961639Void TDecCavlc::parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo )
    17971640{
     
    18031646  READ_CODE( 8, uiCode, "matrix_coeffs_vps" );            pcVideoSignalInfo->setMatrixCoeffsVps( uiCode );
    18041647}
    1805 #endif
    1806 
    1807 #if H_MV_6_HRD_O0217_13
     1648
    18081649Void TDecCavlc::parseDpbSize( TComVPS* vps )
    18091650{
     
    18461687  } 
    18471688}
    1848 #endif
    18491689#endif
    18501690
     
    20001840  sps->inferRepFormat  ( vps , rpcSlice->getLayerId() );
    20011841  sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) );   
    2002 #if H_MV_6_PS_O0118_33
    20031842  if ( sps->getVuiParametersPresentFlag() )
    20041843  {
    20051844    sps->getVuiParameters()->inferVideoSignalInfo( vps, rpcSlice->getLayerId() );
    20061845  }
    2007 #endif
    20081846  rpcSlice->setVPS(vps);     
    20091847  rpcSlice->setViewId   ( vps->getViewId   ( rpcSlice->getLayerId() )      );
     
    20591897#if H_MV   
    20601898    Int esb = 0; //Don't use i, otherwise will shadow something below
    2061 #if !H_MV_6_RALS_O0149_11
     1899
     1900    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
     1901    {
     1902      esb++;
     1903      READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );
     1904    }
     1905
     1906    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
     1907    {
     1908      esb++;
     1909      READ_FLAG( uiCode, "cross_layer_bla_flag" ); rpcSlice->setCrossLayerBlaFlag( uiCode == 1 );
     1910    }
     1911    rpcSlice->checkCrossLayerBlaFlag( );
     1912
    20621913    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
    20631914    {
     
    20651916      READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 );
    20661917    }
    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
    20891918
    20901919    for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++)   
     
    21111940
    21121941
    2113 #if H_MV_6_POC_31_35_38
    21141942    UInt slicePicOrderCntLsb = 0;
    21151943    Int iPOClsb = slicePicOrderCntLsb;  // Needed later
     
    21581986      rpcSlice->setPOC              ( 0 );
    21591987    }     
    2160 #endif
    21611988
    21621989    if( rpcSlice->getIdrPicFlag() )
    21631990    {
    2164 #if !H_MV_6_POC_31_35_38
    2165       rpcSlice->setPOC(0);
    2166 #endif
    21671991      TComReferencePictureSet* rps = rpcSlice->getLocalRPS();
    21681992      rps->setNumberOfNegativePictures(0);
     
    21772001    else
    21782002    {
    2179 #if !H_MV_6_POC_31_35_38
    2180       READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb"); 
    2181       Int iPOClsb = uiCode;
    2182       Int iPrevPOC = rpcSlice->getPrevTid0POC();
    2183       Int iMaxPOClsb = 1<< sps->getBitsForPOC();
    2184       Int iPrevPOClsb = iPrevPOC & (iMaxPOClsb - 1);
    2185       Int iPrevPOCmsb = iPrevPOC-iPrevPOClsb;
    2186       Int iPOCmsb;
    2187       if( ( iPOClsb  <  iPrevPOClsb ) && ( ( iPrevPOClsb - iPOClsb )  >=  ( iMaxPOClsb / 2 ) ) )
    2188       {
    2189         iPOCmsb = iPrevPOCmsb + iMaxPOClsb;
    2190       }
    2191       else if( (iPOClsb  >  iPrevPOClsb )  && ( (iPOClsb - iPrevPOClsb )  >  ( iMaxPOClsb / 2 ) ) )
    2192       {
    2193         iPOCmsb = iPrevPOCmsb - iMaxPOClsb;
    2194       }
    2195       else
    2196       {
    2197         iPOCmsb = iPrevPOCmsb;
    2198       }
    2199       if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
    2200         || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
    2201         || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP )
    2202       {
    2203         // For BLA picture types, POCmsb is set to 0.
    2204         iPOCmsb = 0;
    2205       }
    2206       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
    2215 #endif
    22162003      TComReferencePictureSet* rps;
    22172004      rps = rpcSlice->getLocalRPS();
     
    23472134    }
    23482135#if H_MV
    2349 #if H_MV_6_ILDDS_ILREFPICS_27_34
    23502136    Bool interLayerPredLayerIdcPresentFlag = false;
    2351 #endif
    23522137    Int layerId       = rpcSlice->getLayerId();
    23532138    if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )
     
    23622147        if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )
    23632148        {
    2364 #if H_MV_6_ILDDS_ILREFPICS_27_34
    23652149          interLayerPredLayerIdcPresentFlag = true;
    2366 #endif
    23672150          for( Int idx = 0; idx < rpcSlice->getNumActiveRefLayerPics(); idx++ )   
    23682151          {
     
    23722155      } 
    23732156    }
    2374 #if H_MV_6_ILDDS_ILREFPICS_27_34
    23752157    if ( !interLayerPredLayerIdcPresentFlag )
    23762158    {
     
    23802162      }
    23812163    }
    2382 #endif
    23832164#endif
    23842165    if(sps->getUseSAO())
  • branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.h

    r758 r766  
    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
  • branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.cpp

    r765 r766  
    656656#if H_MV
    657657  m_apcSlicePilot->setVPS(vps); 
    658 #if H_MV_6_PS_0092_17
    659658  // 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.
    660659  assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, pps->getLayerId() ) );   
    661660  // 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.
    662661  assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, sps->getLayerId() ) );
    663 #endif
    664662  sps->inferRepFormat  ( vps , m_layerId );
    665663  sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) );
     
    692690
    693691#if H_MV
    694 #if H_MV_FIX_SKIP_PICTURES
    695692Bool 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
    699693{
    700694  assert( nalu.m_layerId == m_layerId );
     
    754748#endif
    755749
    756 #if H_MV_LAYER_WISE_STARTUP
    757750    xCeckNoClrasOutput();
    758 #endif
    759751    // Skip pictures due to random access
    760752    if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
     
    762754    m_prevSliceSkipped = true;
    763755    m_skippedPOC = m_apcSlicePilot->getPOC();
    764 #if H_MV_FIX_SKIP_PICTURES
    765756      sliceSkippedFlag = true;
    766 #endif
    767757      return false;
    768758    }
     
    772762    m_prevSliceSkipped = true;
    773763    m_skippedPOC = m_apcSlicePilot->getPOC();
    774 #if H_MV_FIX_SKIP_PICTURES
    775764      sliceSkippedFlag = true;
    776 #endif
    777765      return false;
    778766    }
     
    12221210
    12231211#if H_MV
    1224 #if H_MV_FIX_SKIP_PICTURES
    12251212Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag )
    1226 #else
    1227 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayerFlag)
    1228 #endif
    12291213#else
    12301214Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay)
     
    12711255    case NAL_UNIT_CODED_SLICE_RASL_R:
    12721256#if H_MV
    1273 #if H_MV_FIX_SKIP_PICTURES
    12741257      return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag, sliceSkippedFlag );
    1275 #else
    1276       return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag);
    1277 #endif
    12781258#else
    12791259      return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay);
     
    13241304    return true;
    13251305  }
    1326 #if H_MV_LAYER_WISE_STARTUP
    13271306  else if ( !m_layerInitilizedFlag[ m_layerId ] ) // start of random access point, m_pocRandomAccess has not been set yet.
    1328 #else
    1329   else if (m_pocRandomAccess == MAX_INT) // start of random access point, m_pocRandomAccess has not been set yet.
    1330 #endif
    13311307  {
    13321308    if (   m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA
     
    13361312    {
    13371313
    1338 #if H_MV_LAYER_WISE_STARTUP
    13391314      if ( xAllRefLayersInitilized() )
    13401315      {
     
    13461321        return true;
    13471322      }
    1348 #else
    1349       // set the POC random access since we need to skip the reordered pictures in the case of CRA/CRANT/BLA/BLANT.
    1350       m_pocRandomAccess = m_apcSlicePilot->getPOC();
    1351 #endif
    13521323    }
    13531324    else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP )
    13541325    {
    1355 #if H_MV_LAYER_WISE_STARTUP
    13561326      if ( xAllRefLayersInitilized() )
    13571327      {
     
    13631333        return true;
    13641334      }
    1365 #else
    1366       m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable.
    1367 #endif
    13681335    }
    13691336    else
    13701337    {
    1371 #if H_MV_FIX_SKIP_PICTURES
    13721338      static Bool warningMessage[MAX_NUM_LAYERS];
    13731339      static Bool warningInitFlag = false;
     
    13871353        warningMessage[m_layerId] = false;
    13881354      }
    1389 #else
    1390       static Bool warningMessage = false;
    1391       if(!warningMessage)
    1392       {
    1393         printf("\nWarning: this is not a valid random access point and the data is discarded until the first CRA picture");
    1394         warningMessage = true;
    1395       }
    1396 #endif
    13971355      return true;
    13981356    }
     
    14041362    return true;
    14051363  }
    1406 #if H_MV_LAYER_WISE_STARTUP
    14071364  return !m_layerInitilizedFlag[ getLayerId() ];
    1408 #else
    1409   // if we reach here, then the picture is not skipped.
    1410   return false;
    1411 #endif
    14121365}
    14131366
     
    14511404}
    14521405
    1453 #if H_MV_LAYER_WISE_STARTUP
    14541406Void TDecTop::xCeckNoClrasOutput()
    14551407{
     
    14861438}
    14871439#endif
    1488 #endif
    14891440//! \}
  • branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.h

    r765 r766  
    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.