Changeset 655 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 23 Oct 2013, 23:01:30 (11 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/SEIread.cpp
r608 r655 315 315 316 316 /* restore primary bitstream for sei_message */ 317 getBitstream()->deleteFifo(); 317 318 delete getBitstream(); 318 319 setBitstream(bs); -
trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp
r622 r655 58 58 if (length < 10) 59 59 { 60 fprintf( g_hTrace, "%-50s u(%d) : % d\n", pSymbolName, length, rValue );60 fprintf( g_hTrace, "%-50s u(%d) : %u\n", pSymbolName, length, rValue ); 61 61 } 62 62 else 63 63 { 64 fprintf( g_hTrace, "%-50s u(%d) : % d\n", pSymbolName, length, rValue );64 fprintf( g_hTrace, "%-50s u(%d) : %u\n", pSymbolName, length, rValue ); 65 65 } 66 66 fflush ( g_hTrace ); … … 77 77 #endif 78 78 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 79 fprintf( g_hTrace, "%-50s ue(v) : % d\n", pSymbolName, rValue );79 fprintf( g_hTrace, "%-50s ue(v) : %u\n", pSymbolName, rValue ); 80 80 fflush ( g_hTrace ); 81 81 } -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r622 r655 330 330 } 331 331 } 332 #if H_MV5333 332 #if H_MV 334 333 if ( pcPPS->getLayerId() > 0 ) … … 344 343 { 345 344 #endif 346 #endif347 345 READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" ); pcPPS->setScalingListPresentFlag( uiCode ? true : false ); 348 346 if(pcPPS->getScalingListPresentFlag ()) … … 350 348 parseScalingList( pcPPS->getScalingList() ); 351 349 } 352 #if H_MV5 353 #if H_MV 354 } 355 #endif 350 #if H_MV 351 } 356 352 #endif 357 353 … … 430 426 { 431 427 Window &defDisp = pcVUI->getDefaultDisplayWindow(); 432 #if !H_MV5433 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 #else438 428 #if H_MV 439 429 defDisp.setScaledFlag( false ); … … 448 438 READ_UVLC( uiCode, "def_disp_win_bottom_offset" ); defDisp.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) ); 449 439 #endif 450 #endif451 440 } 452 441 TimingInfo *timingInfo = pcVUI->getTimingInfo(); … … 471 460 { 472 461 READ_FLAG( uiCode, "tiles_fixed_structure_flag"); pcVUI->setTilesFixedStructureFlag(uiCode); 473 #if !H_MV5474 #if H_MV475 if ( pcSPS->getLayerId() > 0 )476 {477 READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVUI->setTileBoundariesAlignedFlag( uiCode == 1 );478 }479 #endif480 #endif481 462 READ_FLAG( uiCode, "motion_vectors_over_pic_boundaries_flag"); pcVUI->setMotionVectorsOverPicBoundariesFlag(uiCode); 482 463 READ_FLAG( uiCode, "restricted_ref_pic_lists_flag"); pcVUI->setRestrictedRefPicListsFlag(uiCode); … … 597 578 READ_UVLC( uiCode, "sps_seq_parameter_set_id" ); pcSPS->setSPSId( uiCode ); 598 579 assert(uiCode <= 15); 599 #if H_MV5600 580 #if H_MV 601 581 if ( pcSPS->getLayerId() > 0 ) … … 606 586 if ( pcSPS->getUpdateRepFormatFlag() ) 607 587 { 608 #endif609 588 #endif 610 589 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode ); … … 619 598 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 620 599 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 } 625 602 #endif 626 603 READ_FLAG( uiCode, "conformance_window_flag"); … … 628 605 { 629 606 Window &conf = pcSPS->getConformanceWindow(); 630 #if H_MV5631 607 #if H_MV 632 608 // Needs to be scaled later, when ChromaFormatIdc is known. … … 642 618 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 643 619 #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 653 622 #if H_MV 654 623 if ( pcSPS->getUpdateRepFormatFlag() ) 655 624 { 656 #endif657 625 #endif 658 626 READ_UVLC( uiCode, "bit_depth_luma_minus8" ); … … 665 633 pcSPS->setBitDepthC( uiCode + 8 ); 666 634 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 667 #if H_MV5 668 #if H_MV 669 } 670 #endif 635 #if H_MV 636 } 671 637 #endif 672 638 … … 692 658 pcSPS->setNumReorderPics(uiCode, i); 693 659 #if H_MV 694 #if H_MV5695 660 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]"); 696 #else697 READ_UVLC ( uiCode, "sps_max_latency_increase[i]");698 #endif699 661 #else 700 662 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1"); … … 736 698 if(pcSPS->getScalingListFlag()) 737 699 { 738 #if H_MV5739 700 #if H_MV 740 701 if ( pcSPS->getLayerId() > 0 ) … … 750 711 { 751 712 #endif 752 #endif753 713 READ_FLAG( uiCode, "sps_scaling_list_data_present_flag" ); pcSPS->setScalingListPresentFlag ( uiCode ); 754 714 if(pcSPS->getScalingListPresentFlag ()) … … 756 716 parseScalingList( pcSPS->getScalingList() ); 757 717 } 758 #if H_MV5 759 #if H_MV 760 } 761 #endif 718 #if H_MV 719 } 762 720 #endif 763 721 } … … 814 772 if (uiCode) 815 773 { 816 #if !H_MV5817 #if !H_MV818 while ( xMoreRbspData() )819 {820 READ_FLAG( uiCode, "sps_extension_data_flag");821 }822 #else823 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_QTLPC843 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 #endif851 //// sps_extension_vui_parameters( ) END852 READ_UVLC( uiCode, "sps_shvc_reserved_zero_idc" );853 READ_FLAG( uiCode, "sps_extension2_flag");854 if ( uiCode )855 {856 #if !H_3D857 while ( xMoreRbspData() )858 {859 READ_FLAG( uiCode, "sps_extension_data_flag");860 }861 #else862 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_3D891 }892 #endif // !H_MV893 }894 }895 #else896 774 #if H_MV 897 775 parseSPSExtension( pcSPS ); … … 918 796 } 919 797 } 920 #endif 921 #if H_MV 5798 799 #if H_MV 922 800 Void TDecCavlc::parseSPSExtension( TComSPS* pcSPS ) 923 801 { … … 972 850 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); 973 851 #if H_MV 974 #if H_MV5975 852 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayersMinus1( uiCode ); 976 #else977 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayers( uiCode + 1 );978 #endif979 853 #else 980 854 READ_CODE( 6, uiCode, "vps_reserved_zero_6bits" ); assert(uiCode == 0); … … 1061 935 if (uiCode) 1062 936 { 1063 #if !H_MV51064 #if H_MV1065 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 else1094 {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 else1107 {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_3D1194 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_ARP1203 pcVPS->setUseAdvRP ( i, 0 );1204 pcVPS->setARPStepNum( i, 1 );1205 #endif1206 if ( i != 0 )1207 {1208 if( !( pcVPS->getDepthId( i ) == 1 ) )1209 {1210 #if H_3D_IV_MERGE1211 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false );1212 #endif1213 #if H_3D_ARP1214 READ_FLAG( uiCode, "iv_res_pred_flag[i]" ); pcVPS->setUseAdvRP ( i, uiCode ); pcVPS->setARPStepNum( i, uiCode ? H_3D_ARP_WFNR : 1 );1215 1216 #endif1217 #if H_3D_NBDV_REF1218 READ_FLAG( uiCode, "depth_refinement_flag[i]"); pcVPS->setDepthRefinementFlag ( i, uiCode == 1 ? true : false );1219 #endif1220 #if H_3D_VSP1221 READ_FLAG( uiCode, "view_synthesis_pred_flag[i]"); pcVPS->setViewSynthesisPredFlag( i, uiCode == 1 ? true : false );1222 #endif1223 }1224 else1225 {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_DLT1230 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 mapping1237 UInt uiNumDepthValues;1238 // parse number of values in DLT1239 READ_UVLC(uiNumDepthValues, "num_depth_values_in_dlt[i]");1240 1241 // parse actual DLT values1242 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 memory1252 free(aiIdx2DepthValue);1253 }1254 #endif1255 #if LGE_INTER_SDC_E01561256 READ_FLAG( uiCode, "depth_inter_SDC_flag" ); pcVPS->setInterSDCFlag( i, uiCode ? true : false );1257 #endif1258 }1259 }1260 }1261 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );1262 }1263 #endif1264 pcVPS->checkVPSExtensionSyntax();1265 1266 pcVPS->setRefLayers();1267 1268 #else1269 while ( xMoreRbspData() )1270 {1271 READ_FLAG( uiCode, "vps_extension_data_flag");1272 }1273 #endif1274 }1275 1276 #if H_3D1277 pcVPS->initViewIndex();1278 #endif1279 return;1280 }1281 #else1282 937 #if H_MV 1283 938 m_pcBitstream->readOutTrailingBits(); … … 1305 960 #endif 1306 961 } 1307 } 1308 #endif 1309 1310 #if H_MV5 962 return; 963 } 964 1311 965 #if H_MV 1312 966 Void TDecCavlc::parseVPSExtension( TComVPS* pcVPS ) … … 1640 1294 } 1641 1295 #endif 1642 #if LGE_INTER_SDC_E01561296 #if H_3D_INTER_SDC 1643 1297 READ_FLAG( uiCode, "depth_inter_SDC_flag" ); pcVPS->setInterSDCFlag( i, uiCode ? true : false ); 1644 1298 #endif … … 1648 1302 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false ); 1649 1303 } 1650 #endif1651 1304 #endif 1652 1305 … … 1680 1333 #if H_MV 1681 1334 vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId()); 1682 #if H_MV51683 1335 assert( vps != NULL ); 1684 1336 … … 1692 1344 rpcSlice->setIsDepth ( vps->getDepthId ( rpcSlice->getLayerId() ) == 1 ); 1693 1345 #endif 1694 #else1695 assert(vps!=0);1696 rpcSlice->setVPS(vps);1697 rpcSlice->setViewId ( vps->getViewId ( rpcSlice->getLayerIdInVps() ) );1698 #if H_3D1699 rpcSlice->setViewIndex( vps->getViewIndex( rpcSlice->getLayerIdInVps() ) );1700 rpcSlice->setIsDepth ( vps->getDepthId ( rpcSlice->getLayerIdInVps() ) == 1 );1701 #endif1702 #endif1703 1346 #endif 1704 1347 rpcSlice->setSPS(sps); … … 1747 1390 { 1748 1391 #if H_MV 1749 #if H_MV51750 1392 Int esb = 0; //Don't use i, otherwise will shadow something below 1751 1393 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) … … 1762 1404 1763 1405 for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++) 1764 #else1765 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 #endif1772 1406 #else 1773 1407 for (Int i = 0; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) … … 1808 1442 READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb"); 1809 1443 Int iPOClsb = uiCode; 1810 Int iPrevPOC = rpcSlice->getPrev POC();1444 Int iPrevPOC = rpcSlice->getPrevTid0POC(); 1811 1445 Int iMaxPOClsb = 1<< sps->getBitsForPOC(); 1812 Int iPrevPOClsb = iPrevPOC %iMaxPOClsb;1446 Int iPrevPOClsb = iPrevPOC & (iMaxPOClsb - 1); 1813 1447 Int iPrevPOCmsb = iPrevPOC-iPrevPOClsb; 1814 1448 Int iPOCmsb; … … 1833 1467 } 1834 1468 rpcSlice->setPOC (iPOCmsb+iPOClsb); 1835 #if H_MV51836 1469 #if H_MV 1837 1470 if ( rpcSlice->getPocResetFlag() ) … … 1841 1474 1842 1475 } 1843 #endif1844 1476 #endif 1845 1477 TComReferencePictureSet* rps; … … 1941 1573 rps->setDeltaPOC(j, - rpcSlice->getPOC() + pocLsbLt); 1942 1574 rps->setCheckLTMSBPresent(j,false); 1575 1576 // reset deltaPocMSBCycleLT for first LTRP from slice header if MSB not present 1577 if( j == offset+(numOfLtrp-numLtrpInSPS)-1 ) 1578 { 1579 deltaPocMSBCycleLT = 0; 1580 } 1943 1581 } 1944 1582 prevDeltaMSB = deltaPocMSBCycleLT; … … 1970 1608 } 1971 1609 #if H_MV 1972 #if H_MV51973 1610 Int layerId = rpcSlice->getLayerId(); 1974 1611 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) { … … 1989 1626 } 1990 1627 } 1991 #else1992 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 #endif2016 1628 #endif 2017 1629 if(sps->getUseSAO()) … … 2155 1767 if ( rpcSlice->getEnableTMVPFlag() ) 2156 1768 { 2157 #if !H_MV52158 #if H_MV2159 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 else2169 {2170 #endif2171 #endif2172 1769 if ( rpcSlice->getSliceType() == B_SLICE ) 2173 1770 { … … 2191 1788 rpcSlice->setColRefIdx(0); 2192 1789 } 2193 #if !H_MV52194 #if H_MV2195 }2196 #endif2197 #endif2198 1790 } 2199 1791 if ( (pps->getUseWP() && rpcSlice->getSliceType()==P_SLICE) || (pps->getWPBiPred() && rpcSlice->getSliceType()==B_SLICE) ) … … 2651 2243 } 2652 2244 #endif 2653 #if LGE_INTER_SDC_E01562245 #if H_3D_INTER_SDC 2654 2246 Void TDecCavlc::parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2655 2247 { -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r622 r655 76 76 Void parseQtRootCbf ( UInt uiAbsPartIdx, UInt& uiQtRootCbf ); 77 77 Void parseVPS ( TComVPS* pcVPS ); 78 #if H_MV579 78 #if H_MV 80 79 Void parseVPSExtension ( TComVPS* pcVPS ); … … 86 85 Void parseSPSExtension ( TComSPS* pcSPS ); 87 86 #endif 88 #endif89 87 #if H_3D 90 #if H_MV591 88 Void parseVPSExtension2 ( TComVPS* pcVPS ); 92 89 Void parseSPSExtension2 ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 93 #endif94 90 Void parseSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 95 91 #else … … 117 113 Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 118 114 #endif 119 #if LGE_INTER_SDC_E0156115 #if H_3D_INTER_SDC 120 116 Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 121 117 Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r622 r655 458 458 m_pcEntropyDecoder->decodeARPW ( pcCU , uiAbsPartIdx , uiDepth ); 459 459 #endif 460 #if LGE_INTER_SDC_E0156460 #if H_3D_INTER_SDC 461 461 m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 462 462 #endif … … 525 525 { 526 526 case MODE_INTER: 527 #if LGE_INTER_SDC_E0156527 #if H_3D_INTER_SDC 528 528 if( m_ppcCU[uiDepth]->getInterSDCFlag( 0 ) ) 529 529 { … … 534 534 #endif 535 535 xReconInter( m_ppcCU[uiDepth], uiDepth ); 536 #if LGE_INTER_SDC_E0156536 #if H_3D_INTER_SDC 537 537 } 538 538 #endif … … 578 578 } 579 579 580 #if LGE_INTER_SDC_E0156580 #if H_3D_INTER_SDC 581 581 Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 582 582 { … … 895 895 // get DC prediction for each segment 896 896 Pel apDCPredValues[2]; 897 #if KWU_SDC_SIMPLE_DC_E0117898 897 m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode); 899 #else900 m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride);901 #endif902 898 903 899 // reconstruct residual based on mask + DC residuals -
trunk/source/Lib/TLibDecoder/TDecCu.h
r608 r655 118 118 Void xReconIntraSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 119 119 #endif 120 #if LGE_INTER_SDC_E0156120 #if H_3D_INTER_SDC 121 121 Void xReconInterSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 122 122 #endif -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r622 r655 650 650 #endif 651 651 652 #if LGE_INTER_SDC_E0156652 #if H_3D_INTER_SDC 653 653 if( pcCU->getInterSDCFlag( uiAbsPartIdx ) ) 654 654 { … … 683 683 } 684 684 685 #if LGE_INTER_SDC_E0156685 #if H_3D_INTER_SDC 686 686 Void TDecEntropy::decodeInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 687 687 { -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r608 r655 91 91 virtual Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 92 92 #endif 93 #if LGE_INTER_SDC_E015693 #if H_3D_INTER_SDC 94 94 virtual Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 95 95 virtual Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0; … … 170 170 Void decodeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 171 171 #endif 172 #if LGE_INTER_SDC_E0156172 #if H_3D_INTER_SDC 173 173 Void decodeInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 174 174 Void decodeInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r608 r655 158 158 rpcPic->setNumDdvCandPics(rpcPic->getDisCandRefPictures(iColPoc)); 159 159 } 160 #endif 161 #if MTK_NBDV_TN_FIX_E0172 160 162 161 if(pcSlice->getViewIndex() && !pcSlice->getIsDepth() && !pcSlice->isIntra()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. 163 162 { 164 163 rpcPic->checkTemporalIVRef(); 165 164 } 166 #endif 167 #if MTK_TEXTURE_MRGCAND_BUGFIX_E0182 165 168 166 if(pcSlice->getIsDepth()) 169 167 { … … 226 224 rpcPic->destroyNonDBFilterInfo(); 227 225 } 228 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170226 #if H_3D 229 227 rpcPic->compressMotion(2); 230 228 #endif -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r622 r655 89 89 #if H_3D_DIM_DMM 90 90 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 91 #if !SEC_DMM2_E0146_HHIFIX92 , m_cDmm2DataSCModel ( 1, 1, NUM_DMM2_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels)93 #endif94 91 , m_cDmm3DataSCModel ( 1, 1, NUM_DMM3_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 95 92 #endif … … 102 99 #endif 103 100 #endif 104 #if LGE_INTER_SDC_E0156101 #if H_3D_INTER_SDC 105 102 , m_cInterSDCFlagSCModel ( 1, 1, NUM_INTER_SDC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 106 103 , m_cInterSDCResidualSCModel ( 1, 1, NUM_INTER_SDC_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 179 176 #if H_3D_DIM_DMM 180 177 m_cDmm1DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM1_DATA ); 181 #if !SEC_DMM2_E0146_HHIFIX182 m_cDmm2DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM2_DATA );183 #endif184 178 m_cDmm3DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM3_DATA ); 185 179 #endif … … 192 186 #endif 193 187 #endif 194 #if LGE_INTER_SDC_E0156188 #if H_3D_INTER_SDC 195 189 m_cInterSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_FLAG ); 196 190 m_cInterSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL ); … … 255 249 #if H_3D_DIM_DMM 256 250 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 257 #if !SEC_DMM2_E0146_HHIFIX258 m_cDmm2DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA );259 #endif260 251 m_cDmm3DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA ); 261 252 #endif … … 268 259 #endif 269 260 #endif 270 #if LGE_INTER_SDC_E0156261 #if H_3D_INTER_SDC 271 262 m_cInterSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_FLAG ); 272 263 m_cInterSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_RESIDUAL ); … … 444 435 ruiTabIdx = uiIdx; 445 436 } 446 #if !SEC_DMM2_E0146_HHIFIX 447 Void TDecSbac::xParseDmm2Offset( Int& riOffset ) 448 { 449 Int iDeltaEnd = 0; 450 if( DMM2_DELTAEND_MAX > 0 ) 451 { 452 UInt uiFlag = 0; 453 m_pcTDecBinIf->decodeBin( uiFlag, m_cDmm2DataSCModel.get(0, 0, 0) ); 454 455 if( uiFlag ) 456 { 457 UInt uiAbsValMinus1; 458 UInt uiSymbol; 459 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmm2DataSCModel.get(0, 0, 0) ); uiAbsValMinus1 = uiSymbol; 460 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmm2DataSCModel.get(0, 0, 0) ); uiAbsValMinus1 |= uiSymbol << 1; 461 iDeltaEnd = uiAbsValMinus1 + 1; 462 UInt uiSign; 463 m_pcTDecBinIf->decodeBinEP( uiSign ); 464 if( uiSign ) 465 { 466 iDeltaEnd = -iDeltaEnd; 467 } 468 } 469 } 470 riOffset = iDeltaEnd; 471 } 472 #endif 437 473 438 Void TDecSbac::xParseDmm3WedgeIdx( UInt& ruiIntraIdx, Int iNumBit ) 474 439 { … … 1175 1140 pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth ); 1176 1141 } break; 1177 #if !SEC_DMM2_E0146_HHIFIX1178 case( DMM2_IDX ):1179 {1180 Int iOffset = 0;1181 xParseDmm2Offset( iOffset );1182 pcCU->setDmm2DeltaEndSubParts( iOffset, absPartIdx, depth );1183 } break;1184 #endif1185 1142 case( DMM3_IDX ): 1186 1143 { … … 1250 1207 if( puIdx == 2 ) 1251 1208 { 1252 #if !LGE_SDC_REMOVE_DC_E01581253 while( binNum < 2 && symbol )1254 #endif1255 1209 { 1256 1210 ctxDepthMode = puIdx*3 + binNum; … … 1260 1214 } 1261 1215 if( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;} 1262 #if LGE_SDC_REMOVE_DC_E01581263 1216 else if( modeCode == 1 ) { dir = 0; sdcFlag = 0;} 1264 #else1265 else if( modeCode == 2 ) { dir = 0; sdcFlag = 0;}1266 else if( modeCode == 3 ) { dir = DC_IDX; sdcFlag = 1;}1267 #endif1268 1217 } 1269 1218 else if( puIdx == 0 ) … … 1283 1232 else 1284 1233 { 1285 #if ZJU_DEPTH_INTRA_MODE_E0204 1286 UInt maxBinNum = 0; 1287 m_pcTDecBinIf->decodeBinEP(symbol); 1288 if( symbol == 1 ) 1289 { 1290 maxBinNum = 3; 1291 } 1292 else 1293 { 1294 maxBinNum = 2; 1295 symbol = 1; 1296 } 1297 while( binNum<maxBinNum && symbol ) 1298 { 1299 ctxDepthMode = puIdx*3 + ( binNum >= 2 ? 2 : binNum ); 1300 m_pcTDecBinIf->decodeBin(symbol,m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode)); 1301 modeCode = (modeCode<<1)+symbol; 1302 binNum++; 1303 } 1304 if( maxBinNum == 3 ) 1305 { 1306 if ( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;} 1307 else if ( modeCode == 2 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1308 else if ( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;} 1309 else if ( modeCode == 7 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;} 1310 } 1311 else 1312 { 1313 if ( modeCode == 0 ) { dir = 5; sdcFlag = 0;} 1314 else if ( modeCode == 2 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;} 1315 else if ( modeCode == 3 ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;} 1316 } 1317 #else 1318 ctxDepthMode = puIdx*3 ; 1319 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) ); 1320 modeCode = (modeCode<<1) + symbol; 1321 if( !symbol ) 1322 { 1323 ctxDepthMode = puIdx*3 + 1; 1324 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) ); 1325 modeCode = (modeCode<<1) + symbol; 1326 if( symbol ) 1327 { 1328 ctxDepthMode = puIdx*3 + 2; 1329 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) ); 1330 modeCode = (modeCode<<1) + symbol; 1331 } 1234 UInt maxBinNum = 0; 1235 m_pcTDecBinIf->decodeBinEP(symbol); 1236 if( symbol == 1 ) 1237 { 1238 maxBinNum = 3; 1332 1239 } 1333 1240 else 1334 1241 { 1335 ctxDepthMode = puIdx*3 + 1; 1336 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) ); 1337 modeCode = (modeCode<<1) + symbol; 1338 if( !symbol ) 1339 { 1340 ctxDepthMode = puIdx*3 + 2; 1341 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) ); 1342 modeCode = (modeCode<<1) + symbol; 1343 } 1344 else 1345 { 1346 binNum = 0; 1347 #if LGE_SDC_REMOVE_DC_E0158 1348 #if !SEC_DMM2_E0146_HHIFIX 1349 while( symbol && binNum < 2 ) 1350 #endif 1351 #else 1352 #if SEC_DMM2_E0146_HHIFIX 1353 while( symbol && binNum < 2 ) 1354 #else 1355 while( symbol && binNum < 3 ) 1356 #endif 1357 #endif 1358 { 1359 ctxDepthMode = puIdx*3 + 2; 1360 m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) ); 1361 modeCode = (modeCode<<1) + symbol; 1362 binNum++; 1363 } 1364 } 1365 } 1366 if( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;} 1367 else if( modeCode == 2 ) { dir = 5; sdcFlag = 0;} 1368 else if( modeCode == 3 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;} 1369 else if( modeCode == 4 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;} 1370 else if( modeCode == 5 ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;} 1371 else if( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;} 1372 #if LGE_SDC_REMOVE_DC_E0158 1373 #if SEC_DMM2_E0146_HHIFIX 1374 else if( modeCode == 7 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1375 #else 1376 else if( modeCode == 14 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1377 else if( modeCode == 15 ) { dir = (2*DMM2_IDX+DIM_OFFSET); sdcFlag = 0;} 1378 #endif 1379 #else 1380 else if( modeCode == 14 ) { dir = DC_IDX; sdcFlag = 1;} 1381 #if SEC_DMM2_E0146_HHIFIX 1382 else if( modeCode == 15 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1383 #else 1384 else if( modeCode == 30 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1385 else if( modeCode == 31 ) { dir = (2*DMM2_IDX+DIM_OFFSET); sdcFlag = 0;} 1386 #endif 1387 #endif 1388 #endif 1242 maxBinNum = 2; 1243 symbol = 1; 1244 } 1245 while( binNum<maxBinNum && symbol ) 1246 { 1247 ctxDepthMode = puIdx*3 + ( binNum >= 2 ? 2 : binNum ); 1248 m_pcTDecBinIf->decodeBin(symbol,m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode)); 1249 modeCode = (modeCode<<1)+symbol; 1250 binNum++; 1251 } 1252 if( maxBinNum == 3 ) 1253 { 1254 if ( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;} 1255 else if ( modeCode == 2 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1256 else if ( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;} 1257 else if ( modeCode == 7 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;} 1258 } 1259 else 1260 { 1261 if ( modeCode == 0 ) { dir = 5; sdcFlag = 0;} 1262 else if ( modeCode == 2 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;} 1263 else if ( modeCode == 3 ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;} 1264 } 1389 1265 } 1390 1266 pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth ); … … 2338 2214 #endif 2339 2215 2340 #if LGE_INTER_SDC_E01562216 #if H_3D_INTER_SDC 2341 2217 Void TDecSbac::parseInterSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2342 2218 { -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r622 r655 102 102 #if H_3D_DIM_DMM 103 103 Void xParseDmm1WedgeIdx ( UInt& ruiTabIdx, Int iNumBit ); 104 #if !SEC_DMM2_E0146_HHIFIX105 Void xParseDmm2Offset ( Int& riOffset );106 #endif107 104 Void xParseDmm3WedgeIdx ( UInt& ruiIntraIdx, Int iNumBit ); 108 105 #endif … … 114 111 #endif 115 112 #endif 116 #if LGE_INTER_SDC_E0156113 #if H_3D_INTER_SDC 117 114 Void parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 118 115 Void parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); … … 216 213 #if H_3D_DIM_DMM 217 214 ContextModel3DBuffer m_cDmm1DataSCModel; 218 #if !SEC_DMM2_E0146_HHIFIX219 ContextModel3DBuffer m_cDmm2DataSCModel;220 #endif221 215 ContextModel3DBuffer m_cDmm3DataSCModel; 222 216 #endif … … 229 223 #endif 230 224 #endif 231 #if LGE_INTER_SDC_E0156225 #if H_3D_INTER_SDC 232 226 ContextModel3DBuffer m_cInterSDCFlagSCModel; 233 227 ContextModel3DBuffer m_cInterSDCResidualSCModel; -
trunk/source/Lib/TLibDecoder/TDecSlice.h
r608 r655 65 65 TDecEntropy* m_pcEntropyDecoder; 66 66 TDecCu* m_pcCuDecoder; 67 UInt m_uiCurrSliceIdx;68 67 69 68 TDecSbac* m_pcBufferSbacDecoders; ///< line to store temporary contexts, one per column of tiles. -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r622 r655 347 347 #endif 348 348 #endif 349 m_associatedIRAPType = NAL_UNIT_INVALID; 349 350 m_pocCRA = 0; 350 m_prevRAPisBLA = false;351 351 m_pocRandomAccess = MAX_INT; 352 352 m_prevPOC = MAX_INT; 353 353 m_bFirstSliceInPicture = true; 354 354 m_bFirstSliceInSequence = true; 355 m_prevSliceSkipped = false; 356 m_skippedPOC = 0; 355 357 #if H_MV 356 358 m_layerId = 0; … … 436 438 Window defaultDisplayWindow = pcSlice->getSPS()->getVuiParametersPresentFlag() ? pcSlice->getSPS()->getVuiParameters()->getDefaultDisplayWindow() : Window(); 437 439 438 #if H_MV5439 440 #if H_MV 440 441 assert( conformanceWindow .getScaledFlag() ); 441 442 assert( defaultDisplayWindow.getScaledFlag() ); 442 #endif443 443 #endif 444 444 for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++) … … 518 518 m_cCuDecoder.destroy(); 519 519 #if H_MV 520 #if H_MV5521 520 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 522 #else523 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer );524 #endif525 521 TComSlice::markCurrPic( pcPic ); 526 522 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc ); … … 591 587 assert (sps != 0); 592 588 593 #if H_MV5594 589 #if H_MV 595 590 TComVPS* vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId()); … … 599 594 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP())) 600 595 #endif 601 #else602 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP()))603 #endif604 596 { 605 597 printf ("Parameter set activation failed!"); … … 627 619 m_apcSlicePilot->setSPS(sps); 628 620 #if H_MV 629 #if H_MV5630 621 m_apcSlicePilot->setVPS(vps); 631 622 sps->inferRepFormat ( vps , m_layerId ); 632 623 sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 633 #else634 m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getActiveVPS() );635 #endif636 624 #endif 637 625 pps->setSPS(sps); … … 695 683 696 684 #if H_MV 697 #if H_MV5698 685 m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer0, &m_refPicSetInterLayer1 ); 699 #else700 m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer );701 #endif702 686 m_apcSlicePilot->setLayerId( nalu.m_layerId ); 703 687 #endif 704 688 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder); 689 690 // set POC for dependent slices in skipped pictures 691 if(m_apcSlicePilot->getDependentSliceSegmentFlag() && m_prevSliceSkipped) 692 { 693 m_apcSlicePilot->setPOC(m_skippedPOC); 694 } 695 696 m_apcSlicePilot->setAssociatedIRAPPOC(m_pocCRA); 697 m_apcSlicePilot->setAssociatedIRAPType(m_associatedIRAPType); 705 698 706 699 #if H_MV 707 700 TComVPS* vps = m_apcSlicePilot->getVPS(); 708 #if H_MV5709 701 Int layerId = nalu.m_layerId; 710 702 setViewId ( vps->getViewId ( layerId ) ); … … 714 706 m_ivPicLists->setVPS( vps ); 715 707 #endif 716 #else717 Int layerIdInVps = vps->getLayerIdInVps( nalu.m_layerId );718 setViewId ( vps->getViewId ( layerIdInVps ) );719 #if H_3D720 setViewIndex( vps->getViewIndex( layerIdInVps ) );721 setIsDepth ( vps->getDepthId ( layerIdInVps ) == 1 );722 m_ivPicLists->setVPS( vps );723 #endif724 #endif725 708 #endif 726 709 // Skip pictures due to random access 727 710 if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay)) 728 711 { 712 m_prevSliceSkipped = true; 713 m_skippedPOC = m_apcSlicePilot->getPOC(); 729 714 return false; 730 715 } … … 732 717 if (isSkipPictureForBLA(iPOCLastDisplay)) 733 718 { 719 m_prevSliceSkipped = true; 720 m_skippedPOC = m_apcSlicePilot->getPOC(); 734 721 return false; 735 722 } 723 724 // clear previous slice skipped flag 725 m_prevSliceSkipped = false; 736 726 737 727 //we should only get a different poc for a new picture (with CTU address==0) … … 763 753 #endif 764 754 // actual decoding starts here 765 #if H_MV5766 755 #if H_MV 767 756 // This part needs further testing ! … … 771 760 } 772 761 #endif 773 #endif774 762 xActivateParameterSets(); 775 763 … … 791 779 m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS()); 792 780 #if H_MV 793 #if H_MV5794 781 m_apcSlicePilot->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 795 #else796 m_apcSlicePilot->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer );797 #endif798 782 #endif 799 783 // Get a new picture buffer 800 784 xGetNewPicBuffer (m_apcSlicePilot, pcPic); 801 785 786 Bool isField = false; 787 Bool isTff = false; 788 789 if(!m_SEIs.empty()) 790 { 791 // Check if any new Picture Timing SEI has arrived 792 SEIMessages pictureTimingSEIs = extractSeisByType (m_SEIs, SEI::PICTURE_TIMING); 793 if (pictureTimingSEIs.size()>0) 794 { 795 SEIPictureTiming* pictureTiming = (SEIPictureTiming*) *(pictureTimingSEIs.begin()); 796 isField = (pictureTiming->m_picStruct == 1) || (pictureTiming->m_picStruct == 2); 797 isTff = (pictureTiming->m_picStruct == 1); 798 } 799 } 800 801 //Set Field/Frame coding mode 802 m_pcPic->setField(isField); 803 m_pcPic->setTopField(isTff); 804 802 805 // transfer any SEI messages that have been received to the picture 803 806 pcPic->setSEIs(m_SEIs); … … 938 941 if (bNextSlice) 939 942 { 940 pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_ prevRAPisBLA, m_cListPic );943 pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_associatedIRAPType, m_cListPic ); 941 944 // Set reference list 942 945 #if H_MV 943 #if H_MV5944 946 std::vector< TComPic* > tempRefPicLists[2]; 945 947 std::vector< Bool > usedAsLongTerm [2]; … … 948 950 pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr); 949 951 pcSlice->setRefPicList ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 950 #else951 pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer, true );952 #endif953 952 #if H_3D_ARP 954 953 pcSlice->setARPStepNum(); … … 978 977 #if H_3D 979 978 pcSlice->setIvPicLists( m_ivPicLists ); 980 #if H_3D_IV_MERGE 979 #if H_3D_IV_MERGE 980 #if H_3D_FCO 981 //assert( !getIsDepth() ); 982 #else 981 983 assert( !getIsDepth() || ( pcSlice->getTexturePic() != 0 ) ); 984 #endif 982 985 #endif 983 986 #endif … … 1037 1040 pcSlice->setScalingList ( pcSlice->getPPS()->getScalingList() ); 1038 1041 } 1039 pcSlice->getScalingList()->setUseTransformSkip(pcSlice->getPPS()->getUseTransformSkip());1040 1042 if(!pcSlice->getPPS()->getScalingListPresentFlag() && !pcSlice->getSPS()->getScalingListPresentFlag()) 1041 1043 { … … 1084 1086 TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); 1085 1087 assert( vps != 0 ); 1086 #if H_MV51087 1088 m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( m_layerId ), ( vps->getDepthId( m_layerId ) == 1 ) ); 1088 1089 #else 1089 Int layerIdInVPS = vps->getLayerIdInVps( m_layerId );1090 m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( layerIdInVPS ), ( vps->getDepthId( layerIdInVPS ) == 1 ) );1091 #endif1092 #else1093 1090 m_cEntropyDecoder.decodeSPS( sps ); 1094 1091 #endif … … 1099 1096 { 1100 1097 TComPPS* pps = new TComPPS(); 1101 #if H_MV51102 1098 #if H_MV 1103 1099 pps->setLayerId( getLayerId() ); 1104 #endif1105 1100 #endif 1106 1101 m_cEntropyDecoder.decodePPS( pps ); … … 1112 1107 if(nalUnitType == NAL_UNIT_SUFFIX_SEI) 1113 1108 { 1114 #if H_MV51115 1109 #if H_MV 1116 1110 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) ); … … 1118 1112 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1119 1113 #endif 1120 #else1121 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );1122 #endif1123 1114 } 1124 1115 else 1125 1116 { 1126 #if H_MV51127 1117 #if H_MV 1128 1118 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) ); … … 1130 1120 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1131 1121 #endif 1132 #else1133 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );1134 #endif1135 1122 SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS); 1136 1123 if (activeParamSets.size()>0) … … 1139 1126 m_parameterSetManagerDecoder.applyPrefetchedPS(); 1140 1127 assert(seiAps->activeSeqParamSetId.size()>0); 1141 #if H_MV51142 1128 #if H_MV 1143 1129 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0], m_layerId )) 1144 #else1145 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] ))1146 #endif1147 1130 #else 1148 1131 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] )) … … 1221 1204 Bool TDecTop::isSkipPictureForBLA(Int& iPOCLastDisplay) 1222 1205 { 1223 if (m_prevRAPisBLA && m_apcSlicePilot->getPOC() < m_pocCRA && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N)) 1206 if ((m_associatedIRAPType == NAL_UNIT_CODED_SLICE_BLA_N_LP || m_associatedIRAPType == NAL_UNIT_CODED_SLICE_BLA_W_LP || m_associatedIRAPType == NAL_UNIT_CODED_SLICE_BLA_W_RADL) && 1207 m_apcSlicePilot->getPOC() < m_pocCRA && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N)) 1224 1208 { 1225 1209 iPOCLastDisplay++; … … 1306 1290 } 1307 1291 1308 #if H_MV51309 1292 Void TDecTop::xResetPocInPicBuffer() 1310 1293 { … … 1324 1307 } 1325 1308 #endif 1326 #endif1327 1309 //! \} -
trunk/source/Lib/TLibDecoder/TDecTop.h
r622 r655 176 176 Int m_iMaxRefPicNum; 177 177 178 NalUnitType m_associatedIRAPType; ///< NAL unit type of the associated IRAP picture 178 179 Int m_pocCRA; ///< POC number of the latest CRA picture 179 Bool m_prevRAPisBLA; ///< true if the previous RAP (CRA/CRANT/BLA/BLANT/IDR) picture is a BLA/BLANT picture180 180 Int m_pocRandomAccess; ///< POC number of the random access point (the first IDR or CRA picture) 181 181 … … 211 211 Bool m_bFirstSliceInPicture; 212 212 Bool m_bFirstSliceInSequence; 213 Bool m_prevSliceSkipped; 214 Int m_skippedPOC; 215 213 216 #if H_MV 214 217 // For H_MV m_bFirstSliceInSequence indicates first slice in sequence of the particular layer … … 216 219 Int m_viewId; 217 220 TComPicLists* m_ivPicLists; 218 #if H_MV5219 221 std::vector<TComPic*> m_refPicSetInterLayer0; 220 222 std::vector<TComPic*> m_refPicSetInterLayer1; 221 #else222 std::vector<TComPic*> m_refPicSetInterLayer;223 #endif224 223 #if H_3D 225 224 Int m_viewIndex; … … 279 278 TComPic* xGetPic( Int layerId, Int poc ); 280 279 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag ); 281 #if H_MV5282 280 Void xResetPocInPicBuffer(); 283 #endif284 281 #else 285 282 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay);
Note: See TracChangeset for help on using the changeset viewer.