Changeset 773 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp


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

Merged branch/9.2-dev0@722.

File:
1 edited

Legend:

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

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