Changeset 854 in 3DVCSoftware for branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
- Timestamp:
- 13 Feb 2014, 22:58:51 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r852 r854 279 279 WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag"); 280 280 281 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION 282 #if !H_MV 283 WRITE_FLAG( 0, "pps_extension_flag" ); 284 #else 285 WRITE_FLAG( 1, "pps_extension_flag" ); 286 287 for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ ) 288 { 289 WRITE_FLAG( pcPPS->getPpsExtensionTypeFlag( i ) ? 1 : 0 , "pps_extension_type_flag" ); 290 #if H_3D 291 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_3D || i == PPS_EX_T_ESC ); 292 #else 293 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_ESC ); 294 #endif 295 } 296 297 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) ) 298 { 299 #if H_MV_HLS7_GEN 300 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" ); 301 #endif 302 } 303 304 #if H_3D 305 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_3D ) ) // This probably needs to be aligned with Rext and SHVC 306 { 307 codePPSExtension( pcPPS ); 308 } 309 #endif 310 311 #endif 312 #else 281 313 #if !H_3D 282 314 WRITE_FLAG( 0, "pps_extension_flag" ); … … 285 317 codePPSExtension( pcPPS ); 286 318 WRITE_FLAG( 0, "pps_extension2_flag" ); 319 #endif 287 320 #endif 288 321 } … … 433 466 else 434 467 { 435 WRITE_CODE(uiNumDepthValues_coded, 8, "num_depth_values_in_dlt[ layerId]"); // num_entry468 WRITE_CODE(uiNumDepthValues_coded, 8, "num_depth_values_in_dlt[i]"); // num_entry 436 469 437 470 #if !H_3D_DELTA_DLT … … 699 732 #endif 700 733 WRITE_UVLC( pcSPS->getBitsForPOC()-4, "log2_max_pic_order_cnt_lsb_minus4" ); 701 734 #if H_MV_HLS_7_SPS_P0155_16_32 735 if ( pcSPS->getLayerId() == 0 ) 736 { 737 #endif 702 738 const Bool subLayerOrderingInfoPresentFlag = 1; 703 739 WRITE_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag"); … … 712 748 } 713 749 } 750 #if H_MV_HLS_7_SPS_P0155_16_32 751 } 752 #endif 753 714 754 assert( pcSPS->getMaxCUWidth() == pcSPS->getMaxCUHeight() ); 715 755 … … 838 878 WRITE_SVLC( pcSPS->getScaledRefLayerRightOffset( j ), "scaled_ref_layer_right_offset" ); 839 879 WRITE_SVLC( pcSPS->getScaledRefLayerBottomOffset( j ), "scaled_ref_layer_bottom_offset" ); 880 #if H_MV_HLS_7_RESERVED_FLAGS 881 WRITE_FLAG( 0, "sps_multilayer_ext_reserved_zero_flag[ j ]" ); 882 #endif 840 883 } 841 884 } … … 868 911 WRITE_FLAG( pcVPS->getTemporalNestingFlag(), "vps_temporal_id_nesting_flag" ); 869 912 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); 870 #if H_MV 913 #if H_MV && !H_MV_HLS7_GEN 871 914 WRITE_CODE( 0xffff, 16, "vps_extension_offset" ); 872 915 #else … … 970 1013 { 971 1014 WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0, "avc_base_layer_flag" ); 1015 #if !H_MV_HLS7_GEN 972 1016 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" ); 973 1017 if ( pcVPS->getVpsVuiPresentFlag() ) … … 975 1019 WRITE_CODE( pcVPS->getVpsVuiOffset( ), 16, "vps_vui_offset" ); // TBD 976 1020 } 1021 #endif 1022 977 1023 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); 978 1024 … … 1049 1095 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) 1050 1096 { 1051 for (Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )1097 for (Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1052 1098 { 1053 1099 WRITE_CODE( pcVPS->getSubLayersVpsMaxMinus1( i ), 3, "sub_layers_vps_max_minus1" ); … … 1057 1103 else 1058 1104 { 1059 for (Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )1105 for (Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1060 1106 { 1061 1107 assert( pcVPS->getSubLayersVpsMaxMinus1( i ) + 1 == pcVPS->getMaxTLayers( ) ); … … 1079 1125 1080 1126 WRITE_FLAG( pcVPS->getAllRefLayersActiveFlag( ) ? 1 : 0 , "all_ref_layers_active_flag" ); 1127 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1081 1128 WRITE_CODE( pcVPS->getVpsNumberLayerSetsMinus1( ) , 10, "vps_number_layer_sets_minus1" ); 1129 #endif 1130 1131 #if !H_MV_HLS7_GEN 1082 1132 WRITE_CODE( pcVPS->getVpsNumProfileTierLevelMinus1( ), 6, "vps_num_profile_tier_level_minus1" ); 1133 #else 1134 WRITE_UVLC( pcVPS->getVpsNumProfileTierLevelMinus1( ), "vps_num_profile_tier_level_minus1" ); 1135 #endif 1083 1136 1084 1137 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1085 1138 { 1086 1139 WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" ); 1140 #if !H_MV_HLS_7_VPS_P0048_14 1087 1141 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1088 1142 { … … 1090 1144 pcVPS->checkProfileRefMinus1( i ); 1091 1145 } 1146 #endif 1092 1147 codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 ); 1093 1148 } 1094 1149 1150 1151 1152 1153 1154 1155 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1156 WRITE_UVLC( pcVPS->getNumAddOutputLayerSets( ), "num_add_output_layer_sets" ); 1157 1158 if( pcVPS->getNumOutputLayerSets() > 1) 1159 { 1160 WRITE_CODE( pcVPS->getDefaultTargetOutputLayerIdc( ), 2, "default_target_output_layer_idc" ); 1161 } 1162 #else 1095 1163 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1; 1096 1164 … … 1108 1176 pcVPS->checkDefaultOneTargetOutputLayerIdc(); 1109 1177 } 1178 #endif 1110 1179 1111 1180 assert( pcVPS->getOutputLayerFlag(0, 0) == pcVPS->inferOutputLayerFlag( 0, 0 )); 1112 1181 assert( pcVPS->getOutputLayerSetIdxMinus1( 0 ) == -1 ); 1182 1183 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1184 1185 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1186 { 1187 if( i > pcVPS->getVpsNumLayerSetsMinus1( ) ) 1188 #else 1113 1189 for( Int i = 1; i < numOutputLayerSets; i++ ) 1114 1190 { 1115 1191 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) ) 1192 #endif 1116 1193 { 1117 1194 WRITE_UVLC( pcVPS->getOutputLayerSetIdxMinus1( i ), "output_layer_set_idx_minus1[i]" ); 1195 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1196 } 1197 1198 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultTargetOutputLayerIdc() == 2 ) 1199 { 1200 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->getLayerSetIdxForOutputLayerSet( i ) ); j++ ) 1201 { 1202 WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" ); 1203 } 1204 } 1205 else 1206 { 1207 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->getLayerSetIdxForOutputLayerSet( i ) ) - 1; j++ ) 1208 { 1209 assert( pcVPS->getOutputLayerFlag( i , j ) == pcVPS->inferOutputLayerFlag( i, j )); 1210 } 1211 } 1212 1213 #else 1118 1214 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1 ; j++ ) 1119 1215 { … … 1129 1225 } 1130 1226 } 1131 1227 #endif 1132 1228 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1133 1229 { 1134 1230 WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" ); 1135 1231 } 1232 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1233 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1234 { 1235 WRITE_FLAG( pcVPS->getAltOutputLayerFlag( i ) ? 1 : 0 , "alt_output_layer_flag[ i ]" ); 1236 } 1237 } 1238 #else 1136 1239 } 1137 1240 … … 1140 1243 WRITE_FLAG( pcVPS->getAltOutputLayerFlag( ) ? 1 : 0 , "alt_output_layer_flag" ); 1141 1244 } 1245 #endif 1246 1247 1248 1249 1142 1250 1143 1251 WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" ); 1144 1252 if ( pcVPS->getRepFormatIdxPresentFlag() ) 1145 1253 { 1254 #if H_MV_HLS7_GEN 1255 WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" ); 1256 #else 1146 1257 WRITE_CODE( pcVPS->getVpsNumRepFormatsMinus1( ), 4, "vps_num_rep_formats_minus1" ); 1258 #endif 1147 1259 } 1148 1260 … … 1166 1278 1167 1279 WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" ); 1280 #if H_MV_HLS7_GEN 1281 WRITE_FLAG( pcVPS->getVpsPocLsbAlignedFlag( ) ? 1 : 0 , "vps_poc_lsb_aligned_flag" ); 1282 #endif 1168 1283 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1169 1284 { … … 1173 1288 } 1174 1289 } 1290 #if H_MV_HLS_7_RESERVED_FLAGS 1291 WRITE_FLAG( 0, "vps_reserved_zero_flag" ); 1292 #endif 1175 1293 codeDpbSize( pcVPS ); 1176 1294 … … 1202 1320 } 1203 1321 } 1322 #if H_MV_HLS7_GEN 1323 WRITE_UVLC( 0, "vps_non_vui_extension_length" ); 1324 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" ); 1325 #endif 1326 #if !H_MV_HLS_7_RESERVED_FLAGS 1204 1327 WRITE_FLAG ( 0, "vps_shvc_reserved_zero_flag" ); 1205 1328 #endif 1206 1329 if( pcVPS->getVpsVuiPresentFlag() ) 1207 1330 { … … 1209 1332 codeVPSVUI( pcVPS ); 1210 1333 } 1334 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 1335 { 1336 TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 1337 assert( pcVPSVUI ); 1338 pcVPSVUI->inferVpsVui( true ); 1339 } 1340 #endif 1211 1341 } 1212 1342 Void TEncCavlc::codeVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ) … … 1228 1358 { 1229 1359 WRITE_FLAG( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ? 1 : 0 , "sub_layer_flag_info_present_flag" ); 1230 1360 #if H_MV_HLS_7_HRD_P0156_7 1361 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1362 #else 1231 1363 for( Int j = 0; j <= vps->getMaxTLayers() - 1 ; j++ ) 1364 #endif 1232 1365 { 1233 1366 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) … … 1237 1370 if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1238 1371 { 1372 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1373 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ ) 1374 #else 1239 1375 for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) // Preliminary fix does not match with spec 1376 #endif 1240 1377 { 1241 1378 WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" ); 1242 1379 } 1243 1380 WRITE_UVLC( dpbSize->getMaxVpsNumReorderPics( i, j ), "max_vps_num_reorder_pics" ); 1381 #if H_MV_HLS7_GEN 1382 if( vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ) != vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ) ) 1383 { 1384 for( Int k = 0; k < vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ ) 1385 { 1386 WRITE_UVLC( dpbSize->getMaxVpsLayerDecPicBuffMinus1( i, k, j ), "max_vps_layer_dec_pic_buff_minus1" ); 1387 } 1388 } 1389 #endif 1244 1390 WRITE_UVLC( dpbSize->getMaxVpsLatencyIncreasePlus1( i, j ), "max_vps_latency_increase_plus1" ); 1245 1391 } … … 1248 1394 if ( j > 0 ) 1249 1395 { 1396 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1397 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ ) 1398 #else 1250 1399 for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) 1400 #endif 1251 1401 { 1252 1402 assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); … … 1300 1450 WRITE_FLAG( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ? 1 : 0 , "cross_layer_irap_aligned_flag" ); 1301 1451 } 1302 1452 #if H_MV_HLS_7_MISC_P0068_21 1453 if( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ) 1454 { 1455 WRITE_FLAG( pcVPSVUI->getAllLayersIdrAlignedFlag( ) ? 1 : 0 , "all_layers_idr_aligned_flag" ); 1456 } 1457 #endif 1303 1458 WRITE_FLAG( pcVPSVUI->getBitRatePresentVpsFlag( ) ? 1 : 0 , "bit_rate_present_vps_flag" ); 1304 1459 WRITE_FLAG( pcVPSVUI->getPicRatePresentVpsFlag( ) ? 1 : 0 , "pic_rate_present_vps_flag" ); 1305 1460 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1306 1461 { 1462 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1463 for( Int i = 0; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1464 #else 1307 1465 for( Int i = 0; i <= pcVPS->getVpsNumberLayerSetsMinus1(); i++ ) 1466 #endif 1308 1467 { 1309 1468 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) … … 1331 1490 } 1332 1491 1492 #if H_MV_HLS_7_VPS_P0076_15 1493 WRITE_FLAG( pcVPSVUI->getVideoSignalInfoIdxPresentFlag( ) ? 1 : 0 , "video_signal_info_idx_present_flag" ); 1494 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) 1495 { 1496 WRITE_CODE( pcVPSVUI->getVpsNumVideoSignalInfoMinus1( ), 4, "vps_num_video_signal_info_minus1" ); 1497 } 1498 else 1499 { 1500 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() ); 1501 } 1502 1503 for( Int i = 0; i <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1(); i++ ) 1504 { 1505 assert( pcVPSVUI->getVideoSignalInfo( i ) != NULL ); 1506 TComVideoSignalInfo* curVideoSignalInfo = pcVPSVUI->getVideoSignalInfo( i ); 1507 codeVideoSignalInfo( curVideoSignalInfo ); 1508 1509 } 1510 1511 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1512 { 1513 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1514 { 1515 WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" ); 1516 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() ); 1517 } 1518 } 1519 else 1520 { 1521 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1522 { 1523 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) == ( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ) ); 1524 } 1525 } 1526 #endif 1333 1527 WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" ); 1334 1528 if( !pcVPSVUI->getTilesNotInUseFlag() ) … … 1365 1559 } 1366 1560 } 1561 #if H_MV_HLS_7_RESERVED_FLAGS 1562 WRITE_CODE( 0, 3, "vps_vui_reserved_zero_3bits" ); 1563 #endif 1367 1564 WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" ); 1368 1565 … … 1385 1582 } 1386 1583 } 1584 1585 #if !H_MV_HLS_7_VPS_P0076_15 1387 1586 WRITE_FLAG( pcVPSVUI->getVideoSignalInfoIdxPresentFlag( ) ? 1 : 0 , "video_signal_info_idx_present_flag" ); 1388 1587 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) … … 1417 1616 } 1418 1617 } 1618 #endif 1419 1619 WRITE_FLAG( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ? 1 : 0 , "vps_vui_bsp_hrd_present_flag" ); 1420 1620 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) … … 1422 1622 codeVpsVuiBspHrdParameters( pcVPS ); 1423 1623 } 1424 } 1624 #if H_MV_HLS_7_MISC_P0182_13 1625 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1626 { 1627 if( pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i )) == 0 ) 1628 { 1629 WRITE_FLAG( pcVPSVUI->getBaseLayerParameterSetCompatibilityFlag( i ) ? 1 : 0 , "base_layer_parameter_set_compatibility_flag" ); 1630 } 1631 } 1632 #endif 1633 } 1634 1425 1635 Void TEncCavlc::codeVpsVuiBspHrdParameters( TComVPS* pcVPS ) 1426 1636 { … … 1638 1848 } 1639 1849 pcSlice->checkCrossLayerBlaFlag( ); 1640 1850 #if !H_MV_HLS7_GEN 1641 1851 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1642 1852 { … … 1644 1854 WRITE_FLAG( pcSlice->getPocResetFlag( ) ? 1 : 0 , "poc_reset_flag" ); 1645 1855 } 1856 #endif 1646 1857 1647 1858 … … 2023 2234 #endif 2024 2235 2236 #if !H_MV_HLS7_GEN 2025 2237 #if PPS_FIX_DEPTH 2026 2238 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag() || pcSlice->getIsDepth() ) … … 2031 2243 WRITE_UVLC(0,"slice_header_extension_length"); 2032 2244 } 2245 #endif 2246 2247 #if H_MV_HLS7_GEN 2248 #if !H_MV 2249 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag()) 2250 { 2251 WRITE_UVLC(0,"slice_header_extension_length"); 2252 } 2253 #else 2254 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag()) 2255 { 2256 WRITE_UVLC( pcSlice->getSliceSegmentHeaderExtensionLength( ), "slice_segment_header_extension_length" ); 2257 UInt posFollSliceSegHeaderExtLen = m_pcBitIf->getNumberOfWrittenBits(); 2258 if( pcSlice->getPPS()->getPocResetInfoPresentFlag() ) 2259 { 2260 WRITE_CODE( pcSlice->getPocResetIdc( ), 2, "poc_reset_idc" ); 2261 } 2262 2263 if( pcSlice->getPocResetIdc() != 0 ) 2264 { 2265 WRITE_CODE( pcSlice->getPocResetPeriodId( ), 6, "poc_reset_period_id" ); 2266 } 2267 2268 if( pcSlice->getPocResetIdc() == 3 ) 2269 { 2270 WRITE_FLAG( pcSlice->getFullPocResetFlag( ) ? 1 : 0 , "full_poc_reset_flag" ); 2271 WRITE_CODE( pcSlice->getPocLsbVal( ), getPocLsbValLen ), "poc_lsb_val" ); 2272 } 2273 2274 if( !pcSlice->getPocMsbValRequiredFlag() && pcSlice->getVPS()->getVpsPocLsbAlignedFlag() ) 2275 { 2276 WRITE_FLAG( pcSlice->getPocMsbValPresentFlag( ) ? 1 : 0 , "poc_msb_val_present_flag" ); 2277 } 2278 2279 if( pcSlice->getPocMsbValPresentFlag() ) 2280 { 2281 WRITE_UVLC( pcSlice->getPocMsbVal( ), "poc_msb_val" ); 2282 } 2283 2284 while( ( m_pcBitIf->getNumberOfWrittenBits() - posFollSliceSegHeaderExtLen ) < pcSlice->getSliceSegmentHeaderExtensionLength() * 8 ); 2285 { 2286 WRITE_FLAG( 0, "slice_segment_header_extension_data_bit" ); 2287 } 2288 2289 assert( m_pcBitIf->getNumberOfWrittenBits() - posFollSliceSegHeaderExtLen ) == pcSlice->getSliceSegmentHeaderExtensionLength() * 8 ); 2290 #endif 2291 2292 #endif 2033 2293 } 2034 2294
Note: See TracChangeset for help on using the changeset viewer.