Changeset 773 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
- Timestamp:
- 16 Jan 2014, 09:56:13 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r758 r773 176 176 WRITE_FLAG( pcPPS->getSignHideFlag(), "sign_data_hiding_flag" ); 177 177 WRITE_FLAG( pcPPS->getCabacInitPresentFlag() ? 1 : 0, "cabac_init_present_flag" ); 178 #if PPS_FIX_DEPTH 179 if( pcPPS->getSPS()->getVPS()->getDepthId(pcPPS->getSPS()->getLayerId()) ) 180 { 181 WRITE_UVLC( pcPPS->getNumRefIdxL0DefaultActive(), "num_ref_idx_l0_default_active_minus1"); 182 WRITE_UVLC( pcPPS->getNumRefIdxL1DefaultActive(), "num_ref_idx_l1_default_active_minus1"); 183 } 184 else 185 { 186 #endif 178 187 WRITE_UVLC( pcPPS->getNumRefIdxL0DefaultActive()-1, "num_ref_idx_l0_default_active_minus1"); 179 188 WRITE_UVLC( pcPPS->getNumRefIdxL1DefaultActive()-1, "num_ref_idx_l1_default_active_minus1"); 180 189 #if PPS_FIX_DEPTH 190 } 191 #endif 181 192 WRITE_SVLC( pcPPS->getPicInitQPMinus26(), "init_qp_minus26"); 182 193 WRITE_FLAG( pcPPS->getConstrainedIntraPred() ? 1 : 0, "constrained_intra_pred_flag" ); … … 253 264 } 254 265 #endif 266 #if PPS_FIX_DEPTH 267 if( pcPPS->getSPS()->getVPS()->getDepthId(pcPPS->getSPS()->getLayerId()) ) 268 { 269 WRITE_FLAG( 1, "lists_modification_present_flag" ); 270 } 271 else 272 #endif 255 273 WRITE_FLAG( pcPPS->getListsModificationPresentFlag(), "lists_modification_present_flag"); 256 274 WRITE_UVLC( pcPPS->getLog2ParallelMergeLevelMinus2(), "log2_parallel_merge_level_minus2"); 275 #if PPS_FIX_DEPTH 276 if( pcPPS->getSPS()->getVPS()->getDepthId(pcPPS->getSPS()->getLayerId()) ) 277 { 278 WRITE_FLAG( 1, "slice_segment_header_extension_present_flag" ); 279 } 280 else 281 #endif 257 282 WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag"); 258 283 259 #if ! DLT_DIFF_CODING_IN_PPS284 #if !H_3D 260 285 WRITE_FLAG( 0, "pps_extension_flag" ); 261 286 #else … … 266 291 } 267 292 268 #if DLT_DIFF_CODING_IN_PPS293 #if H_3D 269 294 Void TEncCavlc::codePPSExtension ( TComPPS* pcPPS ) 270 295 { … … 275 300 // Step 1) decoding DLT tables based on the number of depth layers, and 276 301 // Step 2) mapping DLT tables to the depth layers 277 // as descri pted in the 3D-HEVC WD.302 // as described in the 3D-HEVC WD. 278 303 TComVPS* pcVPS = pcPPS->getSPS()->getVPS(); 279 304 … … 470 495 } 471 496 WRITE_FLAG(pcVUI->getVideoSignalTypePresentFlag(), "video_signal_type_present_flag"); 472 #if H_MV _6_PS_O0118_33497 #if H_MV 473 498 assert( pcSPS->getLayerId() == 0 || !pcVUI->getVideoSignalTypePresentFlag() ); 474 499 #endif … … 636 661 { 637 662 WRITE_FLAG( pcSPS->getUpdateRepFormatFlag( ) ? 1 : 0 , "update_rep_format_flag" ); 638 #if H_MV_6_PS_REP_FORM_18_19_20639 663 if ( pcSPS->getUpdateRepFormatFlag() ) 640 664 { … … 644 668 else 645 669 { 646 #else647 }648 649 if ( pcSPS->getUpdateRepFormatFlag() )650 {651 #endif652 670 #endif 653 671 WRITE_UVLC( pcSPS->getChromaFormatIdc (), "chroma_format_idc" ); … … 675 693 } 676 694 #if H_MV 677 #if H_MV_6_PS_REP_FORM_18_19_20678 695 if ( pcSPS->getLayerId() == 0 ) 679 #else680 if ( pcSPS->getUpdateRepFormatFlag() )681 #endif682 696 { 683 697 #endif … … 784 798 WRITE_FLAG( 0, "sps_extension_flag" ); 785 799 #else 786 #if H_MV_6_PSEM_O0142_3787 800 WRITE_FLAG( pcSPS->getSpsExtensionFlag(), "sps_extension_flag" ); 788 801 … … 811 824 #endif 812 825 } 813 #else814 WRITE_FLAG( 1, "sps_extension_flag" );815 codeSPSExtension( pcSPS );816 #if !H_3D817 WRITE_FLAG( 0, "sps_extension2_flag" );818 #else819 WRITE_FLAG( 1, "sps_extension2_flag" );820 codeSPSExtension2( pcSPS, viewIndex, depthFlag );821 WRITE_FLAG( 0, "sps_extension3_flag" );822 #endif823 #endif824 826 #endif 825 827 } … … 830 832 WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" ); 831 833 832 #if !H_MV_6_SHVC_O0098_36833 WRITE_UVLC( 0, "sps_shvc_reserved_zero_idc" );834 #else835 834 WRITE_UVLC( pcSPS->getNumScaledRefLayerOffsets( ), "num_scaled_ref_layer_offsets" ); 836 835 … … 846 845 WRITE_SVLC( pcSPS->getScaledRefLayerBottomOffset( j ), "scaled_ref_layer_bottom_offset" ); 847 846 } 848 #endif849 847 } 850 848 #endif … … 859 857 WRITE_FLAG( pcSPS->getUseQTL() ? 1 : 0, "use_qtl_flag"); 860 858 WRITE_FLAG( pcSPS->getUsePC() ? 1 : 0, "use_pc_flag"); 861 }862 #endif863 #if !CAM_HLS_F0136_F0045_F0082864 if (!depthFlag )865 {866 WRITE_UVLC( pcSPS->getCamParPrecision(), "cp_precision" );867 WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "cp_in_slice_header_flag" );868 if( !pcSPS->hasCamParInSliceHeader() )869 {870 for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ )871 {872 WRITE_SVLC( pcSPS->getCodedScale ()[ uiIndex ], "cp_scale" );873 WRITE_SVLC( pcSPS->getCodedOffset ()[ uiIndex ], "cp_off" );874 WRITE_SVLC( pcSPS->getInvCodedScale ()[ uiIndex ] + pcSPS->getCodedScale ()[ uiIndex ], "cp_inv_scale_plus_scale" );875 WRITE_SVLC( pcSPS->getInvCodedOffset()[ uiIndex ] + pcSPS->getCodedOffset()[ uiIndex ], "cp_inv_off_plus_off" );876 }877 }878 859 } 879 860 #endif … … 995 976 { 996 977 WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0, "avc_base_layer_flag" ); 997 #if H_MV_6_PS_O0109_24998 978 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" ); 999 979 if ( pcVPS->getVpsVuiPresentFlag() ) 1000 980 { 1001 #endif1002 981 WRITE_CODE( pcVPS->getVpsVuiOffset( ), 16, "vps_vui_offset" ); // TBD 1003 #if H_MV_6_PS_O0109_24 1004 } 1005 #endif 982 } 1006 983 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); 1007 984 … … 1050 1027 1051 1028 1052 #if H_MV_6_PS_O0109_221053 1029 WRITE_CODE( pcVPS->getViewIdLen( ), 4, "view_id_len" ); 1054 1030 … … 1067 1043 } 1068 1044 } 1069 #else1070 // GT spec says: trac #391071 // if ( pcVPS->getNumViews() > 1 )1072 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val.1073 {1074 WRITE_CODE( pcVPS->getViewIdLenMinus1( ), 4, "view_id_len_minus1" );1075 }1076 1077 for( Int i = 0; i < pcVPS->getNumViews(); i++ )1078 {1079 WRITE_CODE( pcVPS->getViewIdVal( i ), pcVPS->getViewIdLenMinus1( ) + 1, "view_id_val[i]" );1080 }1081 #endif1082 1045 1083 1046 … … 1089 1052 } 1090 1053 } 1091 #if H_MV_6_ILDSD_O0120_261092 1054 WRITE_FLAG( pcVPS->getVpsSubLayersMaxMinus1PresentFlag( ) ? 1 : 0 , "vps_sub_layers_max_minus1_present_flag" ); 1093 1055 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) … … 1106 1068 } 1107 1069 } 1108 #endif1109 1070 WRITE_FLAG( pcVPS->getMaxTidRefPresentFlag( ) ? 1 : 0 , "max_tid_ref_present_flag" ); 1110 1071 … … 1113 1074 for( Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ ) 1114 1075 { 1115 #if H_MV_6_ILDDS_O0225_301116 1076 for( Int j = i + 1; j <= pcVPS->getMaxLayersMinus1(); j++ ) 1117 1077 { … … 1121 1081 } 1122 1082 } 1123 #else1124 WRITE_CODE( pcVPS->getMaxTidIlRefPicPlus1( i ), 3, "max_tid_il_ref_pics_plus1[i]" );1125 #endif1126 1083 } 1127 1084 } … … 1137 1094 { 1138 1095 WRITE_CODE( pcVPS->getProfileRefMinus1( i ), 6, "profile_ref_minus1[i]" ); 1139 #if H_MV_6_PS_O0109_231140 1096 pcVPS->checkProfileRefMinus1( i ); 1141 #endif1142 1097 } 1143 1098 codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 ); … … 1156 1111 if( numOutputLayerSets > 1) 1157 1112 { 1158 #if H_MV_6_PS_0109_251159 1113 WRITE_CODE( pcVPS->getDefaultOneTargetOutputLayerIdc( ), 2, "default_one_target_output_layer_idc" ); 1160 1114 pcVPS->checkDefaultOneTargetOutputLayerIdc(); 1161 #else1162 WRITE_FLAG( pcVPS->getDefaultOneTargetOutputLayerFlag( ) ? 1 : 0, "default_one_target_output_layer_flag" );1163 #endif1164 1115 } 1165 1116 1166 #if H_MV_6_HRD_O0217_131167 1117 assert( pcVPS->getOutputLayerFlag(0, 0) == pcVPS->inferOutputLayerFlag( 0, 0 )); 1168 1118 assert( pcVPS->getOutputLayerSetIdxMinus1( 0 ) == -1 ); 1169 #endif1170 1119 for( Int i = 1; i < numOutputLayerSets; i++ ) 1171 1120 { … … 1178 1127 } 1179 1128 } 1180 #if H_MV_6_HRD_O0217_131181 1129 else 1182 1130 { // These inference rules would also be helpful in spec text … … 1187 1135 } 1188 1136 } 1189 #endif1190 1137 1191 1138 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) … … 1195 1142 } 1196 1143 1197 #if H_MV_6_GEN_0153_281198 1144 if( pcVPS->getMaxLayersMinus1() > 0 ) 1199 1145 { 1200 1146 WRITE_FLAG( pcVPS->getAltOutputLayerFlag( ) ? 1 : 0 , "alt_output_layer_flag" ); 1201 1147 } 1202 #endif1203 1148 1204 1149 WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" ); … … 1210 1155 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) 1211 1156 { 1212 #if H_MV_6_PS_REP_FORM_18_19_201213 1157 TComRepFormat* curRepFormat = pcVPS->getRepFormat(i); 1214 1158 TComRepFormat* prevRepFormat = i > 0 ? pcVPS->getRepFormat( i - 1) : NULL; 1215 1159 codeRepFormat( i, curRepFormat , prevRepFormat); 1216 #else1217 TComRepFormat* pcRepFormat = pcVPS->getRepFormat(i);1218 codeRepFormat( pcRepFormat );1219 #endif1220 1160 } 1221 1161 … … 1226 1166 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1227 1167 { 1228 #if H_MV_6_PS_REP_FORM_18_19_201229 1168 WRITE_CODE( pcVPS->getVpsRepFormatIdx( i ), 8, "vps_rep_format_idx" ); 1230 #else1231 WRITE_CODE( pcVPS->getVpsRepFormatIdx( i ), 4, "vps_rep_format_idx" );1232 #endif1233 1169 } 1234 1170 } … … 1236 1172 1237 1173 WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" ); 1238 #if H_MV_6_MISC_O0062_311239 1174 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1240 1175 { … … 1244 1179 } 1245 1180 } 1246 #endif1247 #if H_MV_6_HRD_O0217_131248 1181 codeDpbSize( pcVPS ); 1249 #endif 1250 1251 #if !H_MV_6_PS_O0223_29 1252 WRITE_FLAG( pcVPS->getCrossLayerIrapAlignedFlag( ) ? 1 : 0 , "cross_layer_irap_aligned_flag" ); 1253 #endif 1182 1254 1183 WRITE_UVLC( pcVPS->getDirectDepTypeLenMinus2 ( ), "direct_dep_type_len_minus2"); 1255 1184 1256 #if H_MV_6_PS_O0096_211257 1185 WRITE_FLAG( pcVPS->getDefaultDirectDependencyFlag( ) ? 1 : 0 , "default_direct_dependency_flag" ); 1258 1186 … … 1280 1208 } 1281 1209 } 1282 #else1283 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1284 {1285 for( Int j = 0; j < i; j++ )1286 {1287 if (pcVPS->getDirectDependencyFlag( i, j) )1288 {1289 assert ( pcVPS->getDirectDependencyType( i, j ) != -1 );1290 WRITE_CODE( pcVPS->getDirectDependencyType( i, j ),pcVPS->getDirectDepTypeLenMinus2( ) + 2, "direct_dependency_type[i][j]" );1291 }1292 }1293 }1294 #endif1295 1210 WRITE_FLAG ( 0, "vps_shvc_reserved_zero_flag" ); 1296 #if !H_MV_6_PS_O0109_241297 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag( ) ? 1 : 0 , "vps_vui_present_flag" );1298 #endif1299 1211 1300 1212 if( pcVPS->getVpsVuiPresentFlag() ) … … 1304 1216 } 1305 1217 } 1306 #if H_MV_6_PS_O0118_331307 1218 Void TEncCavlc::codeVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ) 1308 1219 { … … 1314 1225 WRITE_CODE( pcVideoSignalInfo->getMatrixCoeffsVps( ), 8, "matrix_coeffs_vps" ); 1315 1226 } 1316 #endif 1317 1318 #if H_MV_6_HRD_O0217_13 1227 1319 1228 Void TEncCavlc::codeDpbSize( TComVPS* vps ) 1320 1229 { … … 1356 1265 } 1357 1266 } 1358 #endif 1359 1360 #if H_MV_6_PS_REP_FORM_18_19_20 1267 1361 1268 Void TEncCavlc::codeRepFormat( Int i, TComRepFormat* pcRepFormat, TComRepFormat* pcPrevRepFormat ) 1362 #else1363 Void TEncCavlc::codeRepFormat( TComRepFormat* pcRepFormat )1364 #endif1365 1269 { 1366 1270 assert( pcRepFormat ); 1367 1271 1368 #if H_MV_6_PS_REP_FORM_18_19_201369 1272 WRITE_CODE( pcRepFormat->getPicWidthVpsInLumaSamples( ), 16, "pic_width_vps_in_luma_samples" ); 1370 1273 WRITE_CODE( pcRepFormat->getPicHeightVpsInLumaSamples( ), 16, "pic_height_vps_in_luma_samples" ); … … 1375 1278 if ( pcRepFormat->getChromaAndBitDepthVpsPresentFlag() ) 1376 1279 { 1377 #endif1378 1280 WRITE_CODE( pcRepFormat->getChromaFormatVpsIdc( ), 2, "chroma_format_vps_idc" ); 1379 1281 … … 1382 1284 WRITE_FLAG( pcRepFormat->getSeparateColourPlaneVpsFlag( ) ? 1 : 0 , "separate_colour_plane_vps_flag" ); 1383 1285 } 1384 #if !H_MV_6_PS_REP_FORM_18_19_201385 WRITE_CODE( pcRepFormat->getPicWidthVpsInLumaSamples( ), 16, "pic_width_vps_in_luma_samples" );1386 WRITE_CODE( pcRepFormat->getPicHeightVpsInLumaSamples( ), 16, "pic_height_vps_in_luma_samples" );1387 #endif1388 1286 WRITE_CODE( pcRepFormat->getBitDepthVpsLumaMinus8( ), 4, "bit_depth_vps_luma_minus8" ); 1389 1287 WRITE_CODE( pcRepFormat->getBitDepthVpsChromaMinus8( ), 4, "bit_depth_vps_chroma_minus8" ); 1390 #if H_MV_6_PS_REP_FORM_18_19_201391 1288 } 1392 1289 else … … 1394 1291 pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, true ); 1395 1292 } 1396 #endif1397 1293 } 1398 1294 … … 1405 1301 assert( pcVPSVUI ); 1406 1302 1407 #if H_MV_6_PS_O0223_291408 1303 WRITE_FLAG( pcVPSVUI->getCrossLayerPicTypeAlignedFlag( ) ? 1 : 0 , "cross_layer_pic_type_aligned_flag" ); 1409 1304 if ( !pcVPSVUI->getCrossLayerPicTypeAlignedFlag() ) … … 1411 1306 WRITE_FLAG( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ? 1 : 0 , "cross_layer_irap_aligned_flag" ); 1412 1307 } 1413 #endif1414 1308 1415 1309 WRITE_FLAG( pcVPSVUI->getBitRatePresentVpsFlag( ) ? 1 : 0 , "bit_rate_present_vps_flag" ); … … 1443 1337 } 1444 1338 1445 #if H_MV_6_O0226_371446 1339 WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" ); 1447 1340 if( !pcVPSVUI->getTilesNotInUseFlag() ) … … 1478 1371 } 1479 1372 } 1480 #else1481 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1482 {1483 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ )1484 {1485 WRITE_FLAG( pcVPSVUI->getTileBoundariesAlignedFlag( i, j ) ? 1 : 0 , "tile_boundaries_aligned_flag" );1486 }1487 }1488 #endif1489 1373 WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" ); 1490 1374 … … 1507 1391 } 1508 1392 } 1509 #if H_MV_6_PS_O0118_331510 1393 WRITE_FLAG( pcVPSVUI->getVideoSignalInfoIdxPresentFlag( ) ? 1 : 0 , "video_signal_info_idx_present_flag" ); 1511 1394 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) … … 1540 1423 } 1541 1424 } 1542 #endif1543 #if H_MV_6_HRD_O0164_151544 1425 WRITE_FLAG( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ? 1 : 0 , "vps_vui_bsp_hrd_present_flag" ); 1545 1426 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) … … 1547 1428 codeVpsVuiBspHrdParameters( pcVPS ); 1548 1429 } 1549 #endif 1550 } 1551 #if H_MV_6_HRD_O0164_15 1430 } 1552 1431 Void TEncCavlc::codeVpsVuiBspHrdParameters( TComVPS* pcVPS ) 1553 1432 { … … 1606 1485 } 1607 1486 } 1608 #endif1609 1487 1610 1488 #endif … … 1621 1499 #if H_3D_IV_MERGE 1622 1500 WRITE_FLAG( pcVPS->getIvMvPredFlag ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]"); 1623 #if MTK_SPIVMP_F01101501 #if H_3D_SPIVMP 1624 1502 WRITE_UVLC( pcVPS->getSubPULog2Size(i)-2, "log2_sub_PU_size_minus2[i]"); 1625 1503 #endif … … 1637 1515 else 1638 1516 { 1639 #if QC_DEPTH_IV_MRG_F01251640 1517 if(i!=1) 1641 1518 { 1642 1519 WRITE_FLAG( pcVPS->getIvMvPredFlag ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]"); 1643 1520 } 1644 #endif 1645 #if MTK_SPIVMP_F0110 1521 #if H_3D_SPIVMP 1646 1522 if (i!=1) 1647 1523 { … … 1649 1525 } 1650 1526 #endif 1651 #if SEC_MPI_ENABLING_MERGE_F01501527 #if H_3D_IV_MERGE 1652 1528 WRITE_FLAG( pcVPS->getMPIFlag( i ) ? 1 : 0 , "mpi_flag[i]" ); 1653 1529 #endif 1654 1530 WRITE_FLAG( pcVPS->getVpsDepthModesFlag( i ) ? 1 : 0 , "vps_depth_modes_flag[i]" ); 1655 1531 //WRITE_FLAG( pcVPS->getLimQtPredFlag ( i ) ? 1 : 0 , "lim_qt_pred_flag[i]" ); 1656 #if H_3D_DIM_DLT1657 #if !DLT_DIFF_CODING_IN_PPS1658 if( pcVPS->getVpsDepthModesFlag( i ) )1659 {1660 WRITE_FLAG( pcVPS->getUseDLTFlag( i ) ? 1 : 0, "dlt_flag[i]" );1661 }1662 if( pcVPS->getUseDLTFlag( i ) )1663 {1664 // code mapping1665 WRITE_UVLC(pcVPS->getNumDepthValues(i), "num_depth_values_in_dlt[i]");1666 for(Int d=0; d<pcVPS->getNumDepthValues(i); d++)1667 {1668 WRITE_UVLC( pcVPS->idx2DepthValue(i, d), "dlt_depth_value[i][d]" );1669 }1670 }1671 #endif1672 #endif1673 1532 #if H_3D_INTER_SDC 1674 1533 WRITE_FLAG( pcVPS->getInterSDCFlag( i ) ? 1 : 0, "depth_inter_SDC_flag" ); … … 1677 1536 } 1678 1537 } 1679 #if CAM_HLS_F0136_F0045_F00821680 1538 WRITE_UVLC( pcVPS->getCamParPrecision(), "cp_precision" ); 1681 1539 for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++) … … 1697 1555 } 1698 1556 } 1699 #endif1700 1557 #if H_3D_TMVP 1701 1558 WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 , "iv_mv_scaling_flag" ); … … 1739 1596 WRITE_FLAG( 0, "no_output_of_prior_pics_flag" ); 1740 1597 } 1598 #if PPS_FIX_DEPTH 1599 if( pcSlice->getIsDepth() ) 1600 { 1601 WRITE_UVLC( 1, "slice_pic_parameter_set_id" ); 1602 } 1603 else 1604 #endif 1741 1605 WRITE_UVLC( pcSlice->getPPS()->getPPSId(), "slice_pic_parameter_set_id" ); 1742 1606 pcSlice->setDependentSliceSegmentFlag(!pcSlice->isNextSlice()); … … 1753 1617 #if H_MV 1754 1618 Int esb = 0; //Don't use i, otherwise will shadow something below 1755 #if !H_MV_6_RALS_O0149_11 1619 1620 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1621 { 1622 esb++; 1623 WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" ); 1624 } 1625 1626 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1627 { 1628 esb++; 1629 WRITE_FLAG( pcSlice->getCrossLayerBlaFlag( ) ? 1 : 0 , "cross_layer_bla_flag" ); 1630 } 1631 pcSlice->checkCrossLayerBlaFlag( ); 1632 1756 1633 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1757 1634 { … … 1759 1636 WRITE_FLAG( pcSlice->getPocResetFlag( ) ? 1 : 0 , "poc_reset_flag" ); 1760 1637 } 1761 #endif1762 1763 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )1764 {1765 esb++;1766 WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" );1767 }1768 1769 #if H_MV_6_RALS_O0149_111770 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )1771 {1772 esb++;1773 WRITE_FLAG( pcSlice->getCrossLayerBlaFlag( ) ? 1 : 0 , "cross_layer_bla_flag" );1774 }1775 pcSlice->checkCrossLayerBlaFlag( );1776 1777 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )1778 {1779 esb++;1780 WRITE_FLAG( pcSlice->getPocResetFlag( ) ? 1 : 0 , "poc_reset_flag" );1781 }1782 #endif1783 1638 1784 1639 … … 1804 1659 // if( separate_colour_plane_flag == 1 ) 1805 1660 // colour_plane_id u(2) 1806 1807 #if H_MV_6_POC_31_35_38 1661 #if H_MV 1808 1662 if ( (pcSlice->getLayerId() > 0 && !vps->getPocLsbNotPresentFlag( pcSlice->getLayerIdInVps())) || !pcSlice->getIdrPicFlag() ) 1809 1663 { … … 1814 1668 if( !pcSlice->getIdrPicFlag() ) 1815 1669 { 1816 #if !H_MV _6_POC_31_35_381670 #if !H_MV 1817 1671 Int picOrderCntLSB = (pcSlice->getPOC()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC())) & ((1<<pcSlice->getSPS()->getBitsForPOC())-1); 1818 1672 WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "pic_order_cnt_lsb"); … … 1931 1785 } 1932 1786 #if H_MV 1933 #if H_MV_6_ILDDS_ILREFPICS_27_341934 1787 Bool interLayerPredLayerIdcPresentFlag = false; 1935 #endif1936 1788 Int layerId = pcSlice->getLayerId(); 1937 1789 if( pcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) … … 1946 1798 if ( pcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) ) 1947 1799 { 1948 #if H_MV_6_ILDDS_ILREFPICS_27_341949 1800 interLayerPredLayerIdcPresentFlag = true; 1950 #endif1951 1801 for( Int idx = 0; idx < pcSlice->getNumActiveRefLayerPics(); idx++ ) 1952 1802 { … … 1956 1806 } 1957 1807 } 1958 #if H_MV_6_ILDDS_ILREFPICS_27_341959 1808 if ( !interLayerPredLayerIdcPresentFlag ) 1960 1809 { … … 1964 1813 } 1965 1814 } 1966 #endif1967 1815 #endif 1968 1816 if(pcSlice->getSPS()->getUseSAO()) … … 1983 1831 { 1984 1832 Bool overrideFlag = (pcSlice->getNumRefIdx( REF_PIC_LIST_0 )!=pcSlice->getPPS()->getNumRefIdxL0DefaultActive()||(pcSlice->isInterB()&&pcSlice->getNumRefIdx( REF_PIC_LIST_1 )!=pcSlice->getPPS()->getNumRefIdxL1DefaultActive())); 1833 #if PPS_FIX_DEPTH 1834 overrideFlag |= (pcSlice->getIsDepth() && !pcSlice->getViewIndex()); 1835 #endif 1985 1836 WRITE_FLAG( overrideFlag ? 1 : 0, "num_ref_idx_active_override_flag"); 1986 1837 if (overrideFlag) … … 2002 1853 pcSlice->setNumRefIdx(REF_PIC_LIST_1, 0); 2003 1854 } 2004 1855 #if PPS_FIX_DEPTH 1856 if( (pcSlice->getPPS()->getListsModificationPresentFlag() || (pcSlice->getIsDepth() && !pcSlice->getViewIndex())) && pcSlice->getNumRpsCurrTempList() > 1) 1857 #else 2005 1858 if( pcSlice->getPPS()->getListsModificationPresentFlag() && pcSlice->getNumRpsCurrTempList() > 1) 1859 #endif 2006 1860 { 2007 1861 TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification(); … … 2086 1940 } 2087 1941 #if H_3D_IC 2088 #if SEC_ONLY_TEXTURE_IC_F01512089 1942 else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth()) 2090 #else2091 else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) )2092 #endif2093 1943 { 2094 1944 WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "slice_ic_enable_flag" ); … … 2108 1958 { 2109 1959 #if H_3D_IV_MERGE 2110 #if SEC_MPI_ENABLING_MERGE_F01502111 1960 if(pcSlice->getIsDepth()) 2112 1961 { … … 2120 1969 WRITE_UVLC( ( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand"); 2121 1970 } 2122 #else2123 Bool ivMvPredFlag = pcSlice->getVPS()->getIvMvPredFlag( pcSlice->getLayerIdInVps() ) ;2124 WRITE_UVLC( ( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");2125 #endif2126 1971 #else 2127 1972 WRITE_UVLC(MRG_MAX_NUM_CANDS - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand"); … … 2162 2007 } 2163 2008 } 2164 #if CAM_HLS_F0044 2165 #if QC_DEPTH_IV_MRG_F0125 2166 #if CAM_HLS_F0136_F0045_F0082 2009 #if H_3D 2167 2010 if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && !pcSlice->getIsDepth() ) 2168 #else2169 if( pcSlice->getSPS()->hasCamParInSliceHeader() && !pcSlice->getIsDepth() )2170 #endif2171 #else2172 if( pcSlice->getSPS()->hasCamParInSliceHeader() )2173 #endif2174 2011 { 2175 2012 for( UInt uiId = 0; uiId < pcSlice->getViewIndex(); uiId++ ) … … 2183 2020 #endif 2184 2021 2022 #if PPS_FIX_DEPTH 2023 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag() || pcSlice->getIsDepth() ) 2024 #else 2185 2025 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag()) 2186 { 2187 #if !H_3D || CAM_HLS_F0044 2026 #endif 2027 { 2188 2028 WRITE_UVLC(0,"slice_header_extension_length"); 2189 #else2190 WRITE_UVLC(0,"slice_header_extension_length"); //<- this element needs to be set to the correct value!!2191 #if QC_DEPTH_IV_MRG_F01252192 #if CAM_HLS_F0136_F0045_F00822193 if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && !pcSlice->getIsDepth() )2194 #else2195 if( pcSlice->getSPS()->hasCamParInSliceHeader() && !pcSlice->getIsDepth() )2196 #endif2197 #else2198 if( pcSlice->getSPS()->hasCamParInSliceHeader() )2199 #endif2200 {2201 for( UInt uiId = 0; uiId < pcSlice->getViewIndex(); uiId++ )2202 {2203 WRITE_SVLC( pcSlice->getCodedScale ()[ uiId ], "cp_scale" );2204 WRITE_SVLC( pcSlice->getCodedOffset ()[ uiId ], "cp_off" );2205 WRITE_SVLC( pcSlice->getInvCodedScale ()[ uiId ] + pcSlice->getCodedScale ()[ uiId ], "cp_inv_scale_plus_scale" );2206 WRITE_SVLC( pcSlice->getInvCodedOffset()[ uiId ] + pcSlice->getCodedOffset()[ uiId ], "cp_inv_off_plus_off" );2207 }2208 }2209 2210 Bool sliceSegmentHeaderExtension2Flag = false;2211 WRITE_FLAG( sliceSegmentHeaderExtension2Flag ? 1 : 0 , "slice_segment_header_extension2_flag" );2212 if ( sliceSegmentHeaderExtension2Flag )2213 {2214 WRITE_UVLC(0,"slice_header_extension2_length");2215 }2216 #endif2217 2029 } 2218 2030 }
Note: See TracChangeset for help on using the changeset viewer.