Ignore:
Timestamp:
19 Oct 2013, 18:46:09 (11 years ago)
Author:
tech
Message:

Macro removal part H_MV5.

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

Legend:

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

    r646 r648  
    330330    }
    331331  }
    332 #if H_MV5
    333332#if H_MV
    334333  if ( pcPPS->getLayerId() > 0 )
     
    344343  { 
    345344#endif
    346 #endif
    347345  READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" );           pcPPS->setScalingListPresentFlag( uiCode ? true : false );
    348346  if(pcPPS->getScalingListPresentFlag ())
     
    350348    parseScalingList( pcPPS->getScalingList() );
    351349  }
    352 #if H_MV5
    353 #if H_MV
    354   }
    355 #endif
     350#if H_MV
     351  }
    356352#endif
    357353
     
    430426  {
    431427    Window &defDisp = pcVUI->getDefaultDisplayWindow();
    432 #if !H_MV5
    433     READ_UVLC(   uiCode, "def_disp_win_left_offset" );                defDisp.setWindowLeftOffset  ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc()) );
    434     READ_UVLC(   uiCode, "def_disp_win_right_offset" );               defDisp.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc()) );
    435     READ_UVLC(   uiCode, "def_disp_win_top_offset" );                 defDisp.setWindowTopOffset   ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) );
    436     READ_UVLC(   uiCode, "def_disp_win_bottom_offset" );              defDisp.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) );
    437 #else
    438428#if H_MV
    439429    defDisp.setScaledFlag( false );
     
    448438    READ_UVLC(   uiCode, "def_disp_win_bottom_offset" );              defDisp.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) );
    449439#endif
    450 #endif
    451440  }
    452441  TimingInfo *timingInfo = pcVUI->getTimingInfo();
     
    471460  {
    472461    READ_FLAG(   uiCode, "tiles_fixed_structure_flag");               pcVUI->setTilesFixedStructureFlag(uiCode);
    473 #if !H_MV5
    474 #if H_MV
    475     if ( pcSPS->getLayerId() > 0 )
    476     {
    477       READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVUI->setTileBoundariesAlignedFlag( uiCode == 1 );
    478     }
    479 #endif
    480 #endif
    481462    READ_FLAG(   uiCode, "motion_vectors_over_pic_boundaries_flag");  pcVUI->setMotionVectorsOverPicBoundariesFlag(uiCode);
    482463    READ_FLAG(   uiCode, "restricted_ref_pic_lists_flag");            pcVUI->setRestrictedRefPicListsFlag(uiCode);
     
    597578  READ_UVLC(     uiCode, "sps_seq_parameter_set_id" );           pcSPS->setSPSId( uiCode );
    598579  assert(uiCode <= 15);
    599 #if H_MV5
    600580#if H_MV
    601581  if ( pcSPS->getLayerId() > 0 )
     
    606586  if ( pcSPS->getUpdateRepFormatFlag() )
    607587  {
    608 #endif
    609588#endif
    610589  READ_UVLC(     uiCode, "chroma_format_idc" );                  pcSPS->setChromaFormatIdc( uiCode );
     
    619598  READ_UVLC (    uiCode, "pic_width_in_luma_samples" );          pcSPS->setPicWidthInLumaSamples ( uiCode    );
    620599  READ_UVLC (    uiCode, "pic_height_in_luma_samples" );         pcSPS->setPicHeightInLumaSamples( uiCode    );
    621 #if H_MV5
    622 #if H_MV
    623   }
    624 #endif
     600#if H_MV
     601  }
    625602#endif
    626603  READ_FLAG(     uiCode, "conformance_window_flag");
     
    628605  {
    629606    Window &conf = pcSPS->getConformanceWindow();
    630 #if H_MV5
    631607#if H_MV
    632608    // Needs to be scaled later, when ChromaFormatIdc is known.
     
    642618    READ_UVLC(   uiCode, "conf_win_bottom_offset" );             conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) );
    643619#endif
    644 #else
    645     READ_UVLC(   uiCode, "conf_win_left_offset" );               conf.setWindowLeftOffset  ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) );
    646     READ_UVLC(   uiCode, "conf_win_right_offset" );              conf.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) );
    647     READ_UVLC(   uiCode, "conf_win_top_offset" );                conf.setWindowTopOffset   ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) );
    648     READ_UVLC(   uiCode, "conf_win_bottom_offset" );             conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) );
    649 #endif
    650   }
    651 
    652 #if H_MV5
     620  }
     621
    653622#if H_MV
    654623  if ( pcSPS->getUpdateRepFormatFlag() )
    655624  {
    656 #endif
    657625#endif
    658626  READ_UVLC(     uiCode, "bit_depth_luma_minus8" );
     
    665633  pcSPS->setBitDepthC( uiCode + 8 );
    666634  pcSPS->setQpBDOffsetC( (Int) (6*uiCode) );
    667 #if H_MV5
    668 #if H_MV
    669   }
    670 #endif
     635#if H_MV
     636  }
    671637#endif
    672638
     
    692658    pcSPS->setNumReorderPics(uiCode, i);
    693659#if H_MV
    694 #if H_MV5
    695660    READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]");
    696 #else
    697     READ_UVLC ( uiCode, "sps_max_latency_increase[i]");
    698 #endif
    699661#else
    700662    READ_UVLC ( uiCode, "sps_max_latency_increase_plus1");
     
    736698  if(pcSPS->getScalingListFlag())
    737699  {
    738 #if H_MV5
    739700#if H_MV
    740701    if ( pcSPS->getLayerId() > 0 )
     
    750711    {   
    751712#endif
    752 #endif
    753713    READ_FLAG( uiCode, "sps_scaling_list_data_present_flag" );                 pcSPS->setScalingListPresentFlag ( uiCode );
    754714    if(pcSPS->getScalingListPresentFlag ())
     
    756716      parseScalingList( pcSPS->getScalingList() );
    757717    }
    758 #if H_MV5
    759 #if H_MV
    760     }
    761 #endif
     718#if H_MV
     719    }
    762720#endif
    763721  }
     
    814772  if (uiCode)
    815773  {
    816 #if !H_MV5
    817 #if !H_MV
    818     while ( xMoreRbspData() )
    819     {
    820       READ_FLAG( uiCode, "sps_extension_data_flag");
    821     }
    822 #else
    823     READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" );    pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);
    824     ////   sps_extension_vui_parameters( )
    825     if( pcSPS->getVuiParameters()->getBitstreamRestrictionFlag() )
    826     { 
    827       READ_UVLC( uiCode, "num_ilp_restricted_ref_layers" ); pcSPS->setNumIlpRestrictedRefLayers( uiCode );
    828       for( Int i = 0; i < pcSPS->getNumIlpRestrictedRefLayers( ); i++ )
    829       { 
    830         READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcSPS->setMinSpatialSegmentOffsetPlus1( i, uiCode );
    831         if( pcSPS->getMinSpatialSegmentOffsetPlus1( i ) > 0 )
    832         { 
    833           READ_FLAG( uiCode, "ctu_based_offset_enabled_flag[ i ]"); pcSPS->setCtuBasedOffsetEnabledFlag(i, uiCode == 1 );
    834           if( pcSPS->getCtuBasedOffsetEnabledFlag( i ) ) 
    835           {
    836             READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1[ i ]"); pcSPS->setMinHorizontalCtuOffsetPlus1( i, uiCode );
    837           }
    838         } 
    839       } 
    840     }
    841 
    842 #if H_3D_QTLPC
    843     if( depthFlag )
    844     {
    845       READ_FLAG( uiCode, "use_qtl_flag" );
    846       pcSPS->setUseQTL( uiCode );
    847       READ_FLAG( uiCode, "use_pc_flag" );
    848       pcSPS->setUsePC( uiCode );
    849     }
    850 #endif
    851     ////   sps_extension_vui_parameters( ) END
    852     READ_UVLC( uiCode, "sps_shvc_reserved_zero_idc" );
    853     READ_FLAG( uiCode, "sps_extension2_flag");
    854     if ( uiCode )
    855     {
    856 #if !H_3D
    857       while ( xMoreRbspData() )
    858       {
    859         READ_FLAG( uiCode, "sps_extension_data_flag");
    860       }
    861 #else
    862      
    863       UInt uiCamParPrecision = 0;
    864       Bool bCamParSlice      = false;
    865       if ( !depthFlag )
    866       {     
    867         READ_UVLC( uiCamParPrecision, "cp_precision" );
    868         READ_FLAG( uiCode, "cp_in_slice_header_flag" );    bCamParSlice = ( uiCode == 1 );
    869         if( !bCamParSlice )
    870         {       
    871           for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )
    872           {
    873             Int iCode;
    874             READ_SVLC( iCode, "cp_scale" );                m_aaiTempScale  [ uiBaseIndex ][ viewIndex ]   = iCode;
    875             READ_SVLC( iCode, "cp_off" );                  m_aaiTempOffset [ uiBaseIndex ][ viewIndex ]   = iCode;
    876             READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale  [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];
    877             READ_SVLC( iCode, "cp_inv_off_plus_off" );     m_aaiTempOffset [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];
    878           }
    879         }
    880       }
    881       pcSPS->initCamParaSPS( viewIndex, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );
    882       READ_FLAG( uiCode, "sps_extension3_flag");
    883       if ( uiCode )
    884       {
    885         while ( xMoreRbspData() )
    886         {
    887           READ_FLAG( uiCode, "sps_extension_data_flag");
    888         }
    889       }
    890 #endif // !H_3D
    891     }
    892 #endif // !H_MV
    893   }
    894 }
    895 #else
    896774#if H_MV
    897775    parseSPSExtension( pcSPS );
     
    918796  }
    919797}
    920 #endif
    921 #if H_MV5
    922798Void TDecCavlc::parseSPSExtension( TComSPS* pcSPS )
    923799{
     
    963839}
    964840#endif
    965 #endif
    966841
    967842Void TDecCavlc::parseVPS(TComVPS* pcVPS)
     
    972847  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
    973848#if H_MV
    974 #if H_MV5
    975849  READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayersMinus1( uiCode  );
    976 #else
    977   READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayers( uiCode + 1 );
    978 #endif
    979850#else
    980851  READ_CODE( 6,  uiCode,  "vps_reserved_zero_6bits" );            assert(uiCode == 0);
     
    1061932  if (uiCode)
    1062933  {
    1063 #if !H_MV5
    1064 #if H_MV
    1065     m_pcBitstream->readOutTrailingBits();
    1066 
    1067     READ_FLAG( uiCode, "avc_base_layer_flag" );                     pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );
    1068     READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
    1069 
    1070     for( Int sIdx = 0; sIdx < MAX_NUM_SCALABILITY_TYPES; sIdx++ )
    1071     {
    1072       READ_FLAG( uiCode,  "scalability_mask[i]" );                  pcVPS->setScalabilityMask( sIdx, uiCode == 1 ? true : false );     
    1073     }
    1074 
    1075     for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ) - ( pcVPS->getSplittingFlag() ? 1 : 0 ); sIdx++ )
    1076     {
    1077         READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" );       pcVPS->setDimensionIdLen( sIdx, uiCode + 1 );
    1078     }
    1079 
    1080     if ( pcVPS->getSplittingFlag() )
    1081       {
    1082       pcVPS->setDimensionIdLen( pcVPS->getNumScalabilityTypes( ) - 1, pcVPS->inferLastDimsionIdLenMinus1() );       
    1083       }
    1084 
    1085     READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" );           pcVPS->setVpsNuhLayerIdPresentFlag( uiCode == 1 ? true : false );
    1086 
    1087     for( Int i = 0; i <= pcVPS->getMaxLayers() - 1; i++ )
    1088     {
    1089       if ( pcVPS->getVpsNuhLayerIdPresentFlag() && ( i > 0 ) )
    1090       {
    1091         READ_CODE( 6, uiCode, "layer_id_in_nuh[i]" );                pcVPS->setLayerIdInNuh( i, uiCode );
    1092       }
    1093       else
    1094       {
    1095         pcVPS->setLayerIdInNuh( i, i );;
    1096     }
    1097 
    1098       pcVPS->setLayerIdInVps( pcVPS->getLayerIdInNuh( i ), i );
    1099    
    1100       for( Int j = 0; j < pcVPS->getNumScalabilityTypes() ; j++ )
    1101     {
    1102         if ( !pcVPS->getSplittingFlag() )
    1103       {
    1104           READ_CODE( pcVPS->getDimensionIdLen( j ), uiCode, "dimension_id[i][j]" );  pcVPS->setDimensionId( i, j, uiCode );
    1105         }
    1106         else
    1107         {
    1108           pcVPS->setDimensionId( i, j, pcVPS->inferDimensionId( i, j)  );
    1109         }
    1110       }
    1111     }
    1112 
    1113 
    1114     for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )
    1115     {
    1116       for( Int j = 0; j < i; j++ )
    1117       {
    1118         READ_FLAG( uiCode, "direct_dependency_flag[i][j]" );             pcVPS->setDirectDependencyFlag( i, j, uiCode );
    1119       }
    1120     }
    1121 
    1122     for( Int i = 0; i < pcVPS->getMaxLayers() - 1; i++ )
    1123     {
    1124       READ_CODE( 3, uiCode,       "max_tid_il_ref_pics_plus1[i]" );      pcVPS->setMaxTidIlRefPicPlus1( i , uiCode );
    1125     }
    1126 
    1127     READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1"      );  pcVPS->setVpsNumberLayerSetsMinus1    ( uiCode );
    1128     READ_CODE( 6,  uiCode, "vps_num_profile_tier_level_minus1" );  pcVPS->setVpsNumProfileTierLevelMinus1( uiCode );
    1129 
    1130     for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
    1131     {
    1132       READ_FLAG(  uiCode, "vps_profile_present_flag[i]" );    pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );
    1133       if( !pcVPS->getVpsProfilePresentFlag( i ) )
    1134       {
    1135         READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode );
    1136       }
    1137       parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
    1138       if( !pcVPS->getVpsProfilePresentFlag( i ) )
    1139       {
    1140         TComPTL temp = *pcVPS->getPTL( i );
    1141         *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 );
    1142         pcVPS->getPTL( i )->copyLevelFrom( &temp );
    1143       }
    1144     }
    1145 
    1146     Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;
    1147 
    1148     READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); pcVPS->setMoreOutputLayerSetsThanDefaultFlag( uiCode == 1 );
    1149 
    1150     if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )
    1151     {
    1152       READ_CODE( 10, uiCode, "num_add_output_layer_sets_minus1"      ); pcVPS->setNumAddOutputLayerSetsMinus1( uiCode );
    1153       numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1);
    1154     }
    1155 
    1156     if( numOutputLayerSets > 1)
    1157     {
    1158       READ_FLAG( uiCode, "default_one_target_output_layer_flag" ); pcVPS->setDefaultOneTargetOutputLayerFlag(  uiCode == 1);
    1159     } 
    1160 
    1161     for( Int i = 1; i < numOutputLayerSets; i++ )
    1162     {
    1163       if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )
    1164       {       
    1165         READ_UVLC( uiCode,      "output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode );
    1166         for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )
    1167         {
    1168           READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 );
    1169         }       
    1170       }
    1171       if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
    1172       {     
    1173         READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" );   pcVPS->setProfileLevelTierIdx( i , uiCode );
    1174       }
    1175     }
    1176 
    1177     READ_FLAG( uiCode , "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag( uiCode == 1 );
    1178     READ_UVLC( uiCode,  "direct_dep_type_len_minus2"); pcVPS->setDirectDepTypeLenMinus2 ( uiCode );
    1179 
    1180     for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )
    1181     {
    1182       for( Int j = 0; j < i; j++ )
    1183       {
    1184         if (pcVPS->getDirectDependencyFlag( i, j) )
    1185         {       
    1186           READ_CODE( pcVPS->getDirectDepTypeLenMinus2( ) + 2,  uiCode, "direct_dependency_type[i][j]" ); pcVPS->setDirectDependencyType( i, j , uiCode);
    1187         }
    1188       }
    1189     }
    1190 
    1191     READ_FLAG ( uiCode,                    "vps_shvc_reserved_zero_flag" );
    1192 
    1193 #if H_3D   
    1194     READ_FLAG( uiCode,  "vps_extension2_flag" );
    1195     if (uiCode)
    1196     {
    1197       m_pcBitstream->readOutTrailingBits();
    1198 
    1199       for( Int i = 0; i <= pcVPS->getMaxLayers() - 1; i++ )
    1200       {
    1201 
    1202 #if H_3D_ARP
    1203         pcVPS->setUseAdvRP  ( i, 0 );
    1204         pcVPS->setARPStepNum( i, 1 );
    1205 #endif 
    1206         if ( i != 0 )
    1207         {
    1208           if( !( pcVPS->getDepthId( i ) == 1 ) )
    1209           {
    1210 #if H_3D_IV_MERGE
    1211                 READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
    1212 #endif
    1213 #if H_3D_ARP
    1214                 READ_FLAG( uiCode, "iv_res_pred_flag[i]"  );  pcVPS->setUseAdvRP  ( i, uiCode ); pcVPS->setARPStepNum( i, uiCode ? H_3D_ARP_WFNR : 1 );
    1215 
    1216 #endif
    1217 #if H_3D_NBDV_REF
    1218                 READ_FLAG( uiCode, "depth_refinement_flag[i]");    pcVPS->setDepthRefinementFlag  ( i, uiCode == 1 ? true : false );
    1219 #endif
    1220 #if H_3D_VSP
    1221                 READ_FLAG( uiCode, "view_synthesis_pred_flag[i]"); pcVPS->setViewSynthesisPredFlag( i, uiCode == 1 ? true : false );
    1222 #endif
    1223           }
    1224           else
    1225           {
    1226 
    1227             READ_FLAG( uiCode, "vps_depth_modes_flag[i]" );             pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false );
    1228             //          READ_FLAG( uiCode, "lim_qt_pred_flag[i]");                  pcVPS->setLimQtPreFlag     ( i, uiCode == 1 ? true : false );
    1229 #if H_3D_DIM_DLT
    1230             if( pcVPS->getVpsDepthModesFlag( i ) )
    1231             {
    1232               READ_FLAG( uiCode, "dlt_flag[i]" );                       pcVPS->setUseDLTFlag( i, uiCode == 1 ? true : false );
    1233             }
    1234             if( pcVPS->getUseDLTFlag( i ) )
    1235             {
    1236               // decode mapping
    1237               UInt uiNumDepthValues;
    1238               // parse number of values in DLT
    1239               READ_UVLC(uiNumDepthValues, "num_depth_values_in_dlt[i]");
    1240 
    1241               // parse actual DLT values
    1242               Int* aiIdx2DepthValue = (Int*) calloc(uiNumDepthValues, sizeof(Int));
    1243               for(Int d=0; d<uiNumDepthValues; d++)
    1244               {
    1245                 READ_UVLC(uiCode, "dlt_depth_value[i][d]");
    1246                 aiIdx2DepthValue[d] = (Int)uiCode;
    1247               }
    1248 
    1249               pcVPS->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);
    1250 
    1251               // clean memory
    1252               free(aiIdx2DepthValue);
    1253             }
    1254 #endif
    1255 #if H_3D_INTER_SDC
    1256             READ_FLAG( uiCode, "depth_inter_SDC_flag" );              pcVPS->setInterSDCFlag( i, uiCode ? true : false );
    1257 #endif
    1258           }
    1259         }
    1260       }
    1261       READ_FLAG( uiCode, "iv_mv_scaling_flag");                       pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );
    1262     }
    1263 #endif
    1264     pcVPS->checkVPSExtensionSyntax();
    1265 
    1266     pcVPS->setRefLayers();
    1267 
    1268 #else
    1269     while ( xMoreRbspData() )
    1270     {
    1271       READ_FLAG( uiCode, "vps_extension_data_flag");
    1272     }
    1273 #endif   
    1274   }
    1275 
    1276 #if H_3D
    1277   pcVPS->initViewIndex();
    1278 #endif
    1279   return;
    1280 }
    1281 #else
    1282934#if H_MV
    1283935    m_pcBitstream->readOutTrailingBits();
     
    1306958  }
    1307959}
    1308 #endif
    1309 
    1310 #if H_MV5
     960
    1311961#if H_MV
    1312962Void TDecCavlc::parseVPSExtension( TComVPS* pcVPS )
     
    16491299}
    16501300#endif
    1651 #endif
    16521301
    16531302Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager)
     
    16801329#if H_MV
    16811330  vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId());
    1682 #if H_MV5
    16831331  assert( vps != NULL );
    16841332 
     
    16921340  rpcSlice->setIsDepth  ( vps->getDepthId  ( rpcSlice->getLayerId() ) == 1 );
    16931341#endif
    1694 #else
    1695   assert(vps!=0);
    1696   rpcSlice->setVPS(vps);     
    1697   rpcSlice->setViewId   ( vps->getViewId   ( rpcSlice->getLayerIdInVps() )      );
    1698 #if H_3D 
    1699   rpcSlice->setViewIndex( vps->getViewIndex( rpcSlice->getLayerIdInVps() )      ); 
    1700   rpcSlice->setIsDepth  ( vps->getDepthId  ( rpcSlice->getLayerIdInVps() ) == 1 );
    1701 #endif
    1702 #endif
    17031342#endif
    17041343  rpcSlice->setSPS(sps);
     
    17471386  {
    17481387#if H_MV   
    1749 #if H_MV5
    17501388    Int esb = 0; //Don't use i, otherwise will shadow something below
    17511389    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
     
    17621400
    17631401    for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++)   
    1764 #else
    1765     if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 )
    1766     {
    1767       READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );
    1768     }
    1769 
    1770     for (Int i = 1; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)   
    1771 #endif
    17721402#else
    17731403    for (Int i = 0; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
     
    18331463      }
    18341464      rpcSlice->setPOC              (iPOCmsb+iPOClsb);
    1835 #if H_MV5
    18361465#if H_MV
    18371466      if ( rpcSlice->getPocResetFlag() ) 
     
    18411470
    18421471      }     
    1843 #endif
    18441472#endif
    18451473      TComReferencePictureSet* rps;
     
    19701598    }
    19711599#if H_MV
    1972 #if H_MV5
    19731600    Int layerId       = rpcSlice->getLayerId();
    19741601    if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )    {   
     
    19891616      } 
    19901617    }
    1991 #else
    1992     Int layerIdInVps       = rpcSlice->getLayerIdInVps();
    1993     if( rpcSlice->getLayerId() > 0 && vps->getNumDirectRefLayers( layerIdInVps ) > 0 )
    1994     {   
    1995       READ_FLAG( uiCode, "inter_layer_pred_enabled_flag" ); rpcSlice->setInterLayerPredEnabledFlag( uiCode == 1 );
    1996       if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerIdInVps ) > 1 )
    1997       {           
    1998         if( !vps->getMaxOneActiveRefLayerFlag()) 
    1999         {
    2000           READ_CODE( rpcSlice->getNumInterLayerRefPicsMinus1Len( ), uiCode, "num_inter_layer_ref_pics_minus1" ); rpcSlice->setNumInterLayerRefPicsMinus1( uiCode );
    2001         }
    2002         for( Int i = 0; i < rpcSlice->getNumActiveRefLayerPics(); i++ )   
    2003         {
    2004           READ_CODE( rpcSlice->getInterLayerPredLayerIdcLen( ), uiCode, "inter_layer_pred_layer_idc" ); rpcSlice->setInterLayerPredLayerIdc( i, uiCode );
    2005         }
    2006       } 
    2007     }
    2008 
    2009     rpcSlice->setActiveMotionPredRefLayers( );
    2010 
    2011     if( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0  &&  rpcSlice->getNumActiveRefLayerPics() > 0 )
    2012     {
    2013       READ_FLAG( uiCode, "inter_layer_sample_pred_only_flag" ); rpcSlice->setInterLayerSamplePredOnlyFlag( uiCode == 1 );
    2014     }
    2015 #endif
    20161618#endif
    20171619    if(sps->getUseSAO())
     
    21551757    if ( rpcSlice->getEnableTMVPFlag() )
    21561758    {
    2157 #if !H_MV5
    2158 #if H_MV
    2159       if( rpcSlice->getLayerId() > 0 && rpcSlice->getNumActiveMotionPredRefLayers() > 0 )
    2160       {
    2161         READ_FLAG( uiCode, "alt_collocated_indication_flag" ); rpcSlice->setAltCollocatedIndicationFlag( uiCode == 1 );
    2162       }
    2163 
    2164       if( rpcSlice->getAltCollocatedIndicationFlag() && rpcSlice->getNumActiveMotionPredRefLayers() > 1 )
    2165       {         
    2166         READ_UVLC( uiCode, "collocated_ref_layer_idx" ); rpcSlice->setCollocatedRefLayerIdx( uiCode );
    2167       }     
    2168       else
    2169       {
    2170 #endif
    2171 #endif
    21721759      if ( rpcSlice->getSliceType() == B_SLICE )
    21731760      {
     
    21911778        rpcSlice->setColRefIdx(0);
    21921779      }
    2193 #if !H_MV5
    2194 #if H_MV
    2195       }
    2196 #endif
    2197 #endif
    21981780    }
    21991781    if ( (pps->getUseWP() && rpcSlice->getSliceType()==P_SLICE) || (pps->getWPBiPred() && rpcSlice->getSliceType()==B_SLICE) )
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecCAVLC.h

    r646 r648  
    7676  Void  parseQtRootCbf      ( UInt uiAbsPartIdx, UInt& uiQtRootCbf );
    7777  Void  parseVPS            ( TComVPS* pcVPS );
    78 #if H_MV5
    7978#if H_MV
    8079  Void  parseVPSExtension   ( TComVPS* pcVPS );
     
    8685  Void  parseSPSExtension   ( TComSPS* pcSPS ); 
    8786#endif
    88 #endif
    8987#if H_3D
    90 #if H_MV5
    9188  Void  parseVPSExtension2  ( TComVPS* pcVPS );
    9289  Void  parseSPSExtension2  ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag );
    93 #endif
    9490  Void  parseSPS            ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag );
    9591#else
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecTop.cpp

    r647 r648  
    436436  Window defaultDisplayWindow = pcSlice->getSPS()->getVuiParametersPresentFlag() ? pcSlice->getSPS()->getVuiParameters()->getDefaultDisplayWindow() : Window();
    437437
    438 #if H_MV5
    439438#if H_MV
    440439    assert( conformanceWindow   .getScaledFlag() );
    441440    assert( defaultDisplayWindow.getScaledFlag() );
    442 #endif
    443441#endif
    444442  for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++)
     
    518516  m_cCuDecoder.destroy();       
    519517#if H_MV
    520 #if H_MV5
    521518  TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 
    522 #else
    523   TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer ); 
    524 #endif
    525519  TComSlice::markCurrPic( pcPic );
    526520  TComSlice::markIvRefPicsAsUnused   ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc );
     
    591585  assert (sps != 0);
    592586
    593 #if H_MV5
    594587#if H_MV
    595588  TComVPS* vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId());
     
    599592  if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP()))
    600593#endif
    601 #else
    602   if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP()))
    603 #endif
    604594  {
    605595    printf ("Parameter set activation failed!");
     
    627617  m_apcSlicePilot->setSPS(sps);
    628618#if H_MV
    629 #if H_MV5
    630619  m_apcSlicePilot->setVPS(vps); 
    631620  sps->inferRepFormat  ( vps , m_layerId );
    632621  sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) );
    633 #else
    634   m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getActiveVPS() );
    635 #endif
    636622#endif
    637623  pps->setSPS(sps);
     
    695681
    696682#if H_MV
    697 #if H_MV5
    698683  m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer0, &m_refPicSetInterLayer1 );
    699 #else
    700   m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer );
    701 #endif
    702684  m_apcSlicePilot->setLayerId( nalu.m_layerId );
    703685#endif
     
    706688#if H_MV 
    707689  TComVPS* vps     = m_apcSlicePilot->getVPS();
    708 #if H_MV5
    709690  Int layerId  = nalu.m_layerId;   
    710691  setViewId   ( vps->getViewId   ( layerId )      ); 
     
    714695  m_ivPicLists->setVPS( vps );
    715696#endif
    716 #else
    717   Int layerIdInVps = vps->getLayerIdInVps( nalu.m_layerId ); 
    718   setViewId   ( vps->getViewId   ( layerIdInVps )      ); 
    719 #if H_3D
    720   setViewIndex( vps->getViewIndex( layerIdInVps )      ); 
    721   setIsDepth  ( vps->getDepthId  ( layerIdInVps ) == 1 ); 
    722   m_ivPicLists->setVPS( vps );
    723 #endif
    724 #endif
    725697#endif
    726698    // Skip pictures due to random access
     
    763735#endif
    764736  // actual decoding starts here
    765 #if H_MV5
    766737#if H_MV
    767738   // This part needs further testing !
     
    771742   }
    772743#endif
    773 #endif
    774744  xActivateParameterSets();
    775745
     
    791761    m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS());
    792762#if H_MV
    793 #if H_MV5
    794763    m_apcSlicePilot->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 );
    795 #else
    796     m_apcSlicePilot->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer );
    797 #endif
    798764#endif
    799765    //  Get a new picture buffer
     
    941907    // Set reference list
    942908#if H_MV   
    943 #if H_MV5
    944909    std::vector< TComPic* > tempRefPicLists[2];
    945910    std::vector< Bool     > usedAsLongTerm [2];
     
    948913    pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr);
    949914    pcSlice->setRefPicList     ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true );
    950 #else
    951     pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer, true );   
    952 #endif
    953915#if H_3D_ARP
    954916    pcSlice->setARPStepNum();
     
    10881050  TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 );
    10891051  assert( vps != 0 );
    1090 #if H_MV5
    10911052  m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( m_layerId ), ( vps->getDepthId( m_layerId ) == 1 ) );
    10921053#else
    1093   Int layerIdInVPS = vps->getLayerIdInVps( m_layerId );
    1094   m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( layerIdInVPS ), ( vps->getDepthId( layerIdInVPS ) == 1 ) );
    1095 #endif
    1096 #else
    10971054  m_cEntropyDecoder.decodeSPS( sps );
    10981055#endif
     
    11031060{
    11041061  TComPPS* pps = new TComPPS();
    1105 #if H_MV5
    11061062#if H_MV
    11071063  pps->setLayerId( getLayerId() );
    1108 #endif
    11091064#endif
    11101065  m_cEntropyDecoder.decodePPS( pps );
     
    11161071  if(nalUnitType == NAL_UNIT_SUFFIX_SEI)
    11171072  {
    1118 #if H_MV5
    11191073#if H_MV
    11201074    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) );
     
    11221076    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );
    11231077#endif
    1124 #else
    1125     m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 
    1126 #endif
    11271078  }
    11281079  else
    11291080  {
    1130 #if H_MV5
    11311081#if H_MV
    11321082    m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) );
     
    11341084    m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );
    11351085#endif
    1136 #else
    1137     m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );
    1138 #endif
    11391086    SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS);
    11401087    if (activeParamSets.size()>0)
     
    11431090      m_parameterSetManagerDecoder.applyPrefetchedPS();
    11441091      assert(seiAps->activeSeqParamSetId.size()>0);
    1145 #if H_MV5
    11461092#if H_MV
    11471093      if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0], m_layerId ))
    1148 #else
    1149       if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] ))
    1150 #endif
    11511094#else
    11521095      if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] ))
     
    13101253}
    13111254
    1312 #if H_MV5
    13131255Void TDecTop::xResetPocInPicBuffer()
    13141256{
     
    13281270}
    13291271#endif
    1330 #endif
    13311272//! \}
  • branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecTop.h

    r622 r648  
    216216  Int                     m_viewId;
    217217  TComPicLists*           m_ivPicLists;
    218 #if H_MV5
    219218  std::vector<TComPic*>   m_refPicSetInterLayer0;
    220219  std::vector<TComPic*>   m_refPicSetInterLayer1;
    221 #else
    222   std::vector<TComPic*>   m_refPicSetInterLayer;
    223 #endif
    224220#if H_3D
    225221  Int                     m_viewIndex;
     
    279275  TComPic*  xGetPic( Int layerId, Int poc );
    280276  Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag ); 
    281 #if H_MV5
    282277  Void      xResetPocInPicBuffer();
    283 #endif
    284278#else
    285279  Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay);
Note: See TracChangeset for help on using the changeset viewer.