Changeset 1131 in 3DVCSoftware for branches/HTM-13.0-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 18 Feb 2015, 17:39:40 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-13.0-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1124 r1131 721 721 } 722 722 723 #if HHI_TOOL_PARAMETERS_I2_J0107724 723 Void TDecCavlc::parseSPS(TComSPS* pcSPS) 725 #else726 #if H_3D727 Void TDecCavlc::parseSPS(TComSPS* pcSPS, Int viewIndex, Bool depthFlag )728 #else729 Void TDecCavlc::parseSPS(TComSPS* pcSPS)730 #endif731 #endif732 724 { 733 725 #if ENC_DEC_TRACE … … 997 989 if ( pcSPS->getSps3dExtensionFlag() ) 998 990 { 999 #if HHI_TOOL_PARAMETERS_I2_J01071000 991 parseSPS3dExtension( pcSPS ); 1001 #else1002 parseSPSExtension2( pcSPS, viewIndex, depthFlag );1003 #endif1004 992 } 1005 993 … … 1028 1016 1029 1017 #if H_3D 1030 #if HHI_TOOL_PARAMETERS_I2_J01071031 1018 Void TDecCavlc::parseSPS3dExtension( TComSPS* pcSPS ) 1032 1019 { … … 1057 1044 } 1058 1045 } 1059 #else1060 Void TDecCavlc::parseSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )1061 {1062 1063 }1064 #endif1065 1046 #endif 1066 1047 … … 1071 1052 READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 ); 1072 1053 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode ); 1073 #if H_MV_HLS_FIX1074 1054 1075 1055 UInt numRefLocOffsets;; … … 1112 1092 // This is required to equal to 0 for Multiview Main profile. 1113 1093 assert( uiCode == 0 ); 1114 #else1115 READ_UVLC( uiCode, "num_ref_loc_offsets" ); assert( uiCode == 0 );1116 #endif1117 1094 } 1118 1095 … … 1237 1214 { 1238 1215 #if H_3D 1239 #if HHI_VPS_3D_EXTENSION_I3_J01071240 1216 READ_FLAG( uiCode, "vps_3d_extension_flag" ); 1241 1217 if ( uiCode ) … … 1248 1224 if (uiCode) 1249 1225 { 1250 #else1251 m_pcBitstream->readOutTrailingBits();1252 pcVPS->createCamPars(pcVPS->getNumViews());1253 parseVPSExtension2( pcVPS );1254 READ_FLAG( uiCode, "vps_extension3_flag" );1255 if (uiCode)1256 {1257 #endif1258 1226 #endif 1259 1227 #endif … … 1330 1298 } 1331 1299 1332 #if H_MV_FIX_NUM_VIEWS1333 1300 pcVPS->initNumViews(); 1334 #endif1335 1301 1336 1302 READ_CODE( 4, uiCode, "view_id_len" ); pcVPS->setViewIdLen( uiCode ); … … 1441 1407 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1442 1408 { 1443 #if H_MV_HLS_FIX1444 1409 if( pcVPS->getNumLayerSets() > 2 && i >= pcVPS->getNumLayerSets( ) ) 1445 #else1446 if( i >= pcVPS->getNumLayerSets( ) )1447 #endif1448 1410 { 1449 1411 READ_CODE( pcVPS->getLayerSetIdxForOlsMinus1Len( i ), uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode ); … … 1517 1479 READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 ); 1518 1480 1519 #if H_MV_HLS7_GEN || H_MV_HLS_FIX1520 1481 READ_FLAG( uiCode, "vps_poc_lsb_aligned_flag" ); pcVPS->setVpsPocLsbAlignedFlag( uiCode == 1 ); 1521 #endif1522 1482 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1523 1483 { … … 1567 1527 parseVPSVUI( pcVPS ); 1568 1528 } 1569 #if H_MV_HLS_FIX1570 1529 else 1571 #endif1572 1530 { 1573 1531 TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); … … 1945 1903 1946 1904 #if H_3D 1947 #if HHI_VPS_3D_EXTENSION_I3_J01071948 1905 Void TDecCavlc::parseVPS3dExtension( TComVPS* pcVPS ) 1949 #else1950 Void TDecCavlc::parseVPSExtension2( TComVPS* pcVPS )1951 #endif1952 1906 { 1953 1907 UInt uiCode; 1954 1908 1955 #if !HHI_TOOL_PARAMETERS_I2_J01071956 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1957 {1958 #if H_3D_ARP1959 pcVPS->setUseAdvRP ( i, 0 );1960 pcVPS->setARPStepNum( i, 1 );1961 #endif1962 #if H_3D_SPIVMP1963 pcVPS->setSubPULog2Size(i, 0);1964 #endif1965 {1966 #if H_3D_IV_MERGE1967 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false );1968 READ_FLAG( uiCode, "iv_mv_scaling_flag[i]"); pcVPS->setIvMvScalingFlag ( i, uiCode == 1 ? true : false );1969 #endif1970 if( !( pcVPS->getDepthId( i ) == 1 ) )1971 {1972 #if H_3D_IV_MERGE1973 if( !pcVPS->getNumDirectRefLayers(i) )1974 {1975 assert( !uiCode );1976 }1977 #if H_3D_SPIVMP1978 READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]"); pcVPS->setSubPULog2Size(i, uiCode+3);1979 #endif1980 #endif1981 #if H_3D_ARP1982 READ_FLAG( uiCode, "iv_res_pred_flag[i]" ); pcVPS->setUseAdvRP ( i, uiCode ); pcVPS->setARPStepNum( i, uiCode ? H_3D_ARP_WFNR : 1 );1983 if( !pcVPS->getNumDirectRefLayers(i) )1984 {1985 assert( !uiCode );1986 }1987 #endif1988 #if H_3D_NBDV_REF1989 READ_FLAG( uiCode, "depth_refinement_flag[i]"); pcVPS->setDepthRefinementFlag ( i, uiCode == 1 ? true : false );1990 #endif1991 #if H_3D_VSP1992 READ_FLAG( uiCode, "view_synthesis_pred_flag[i]"); pcVPS->setViewSynthesisPredFlag( i, uiCode == 1 ? true : false );1993 if( !pcVPS->getNumDirectRefLayers(i) )1994 {1995 assert( !uiCode );1996 }1997 #endif1998 #if H_3D_DBBP1999 READ_FLAG( uiCode, "use_dbbp_flag[i]" ); pcVPS->setUseDBBP( i, uiCode == 1 ? true : false );2000 #endif2001 }2002 else2003 {2004 #if H_3D_IV_MERGE2005 READ_FLAG( uiCode, "mpi_flag[i]" ); pcVPS->setMPIFlag( i, uiCode == 1 ? true : false );2006 READ_UVLC (uiCode, "log2_mpi_sub_PU_size_minus3[i]"); pcVPS->setSubPUMPILog2Size(i, uiCode+3);2007 #endif2008 READ_FLAG( uiCode, "vps_depth_modes_flag[i]" ); pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false );2009 #if H_3D2010 READ_FLAG( uiCode, "ivp_flag[i]" ); pcVPS->setIVPFlag( i, uiCode == 1 ? true : false );2011 #endif2012 #if H_3D_QTLPC2013 READ_FLAG( uiCode, "lim_qt_pred_flag[i]"); pcVPS->setLimQtPredFlag ( i, uiCode == 1 ? true : false );2014 #endif2015 #if H_3D_INTER_SDC2016 READ_FLAG( uiCode, "depth_inter_SDC_flag" ); pcVPS->setInterSDCFlag( i, uiCode ? true : false );2017 #endif2018 #if MTK_SINGLE_DEPTH_VPS_FLAG_J00602019 READ_FLAG( uiCode, "single_depth_mode_flag[i]"); pcVPS->setSingleDepthModeFlag( i, uiCode == 1 ? true : false );2020 #endif2021 }2022 }2023 }2024 #endif2025 1909 2026 1910 UInt uiCamParPrecision = 0; … … 2131 2015 #endif 2132 2016 rpcSlice->setSPS(sps); 2133 #if HHI_TOOL_PARAMETERS_I2_J01072134 2017 #if H_3D 2135 2018 rpcSlice->init3dToolParameters(); 2136 #endif2137 2019 #endif 2138 2020 rpcSlice->setPPS(pps); … … 2207 2089 rpcSlice->checkCrossLayerBlaFlag( ); 2208 2090 2209 #if !H_MV_HLS7_GEN && !H_MV_HLS_FIX2210 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )2211 {2212 esb++;2213 READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 );2214 }2215 #endif2216 2091 2217 2092 for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++) … … 2492 2367 Bool interLayerPredLayerIdcPresentFlag = false; 2493 2368 Int layerId = rpcSlice->getLayerId(); 2494 #if HHI_DEPENDENCY_SIGNALLING_I1_J01072495 2369 #if H_3D 2496 2370 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumRefListLayers( layerId ) > 0 ) … … 2498 2372 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) 2499 2373 #endif 2500 #else2501 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )2502 #endif2503 2374 { 2504 2375 READ_FLAG( uiCode, "inter_layer_pred_enabled_flag" ); rpcSlice->setInterLayerPredEnabledFlag( uiCode == 1 ); 2505 #if HHI_DEPENDENCY_SIGNALLING_I1_J01072506 2376 #if H_3D 2507 2377 if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumRefListLayers( layerId ) > 1 ) … … 2509 2379 if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 ) 2510 2380 #endif 2511 #else2512 if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 )2513 #endif2514 2381 { 2515 2382 if( !vps->getMaxOneActiveRefLayerFlag()) … … 2517 2384 READ_CODE( rpcSlice->getNumInterLayerRefPicsMinus1Len( ), uiCode, "num_inter_layer_ref_pics_minus1" ); rpcSlice->setNumInterLayerRefPicsMinus1( uiCode ); 2518 2385 } 2519 #if HHI_DEPENDENCY_SIGNALLING_I1_J01072520 2386 #if H_3D 2521 2387 if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumRefListLayers( layerId ) ) 2522 #else2523 if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )2524 #endif2525 2388 #else 2526 2389 if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) ) … … 2711 2574 } 2712 2575 #if H_3D_IC 2713 #if HHI_DEPENDENCY_SIGNALLING_I1_J01072714 2576 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 ) 2715 #else2716 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 )2717 #endif2718 2577 { 2719 2578 UInt uiCodeTmp = 0; … … 2729 2588 } 2730 2589 #endif 2731 #if !MTK_SINGLE_DEPTH_VPS_FLAG_J00602732 #if H_3D_SINGLE_DEPTH2733 if(rpcSlice->getIsDepth())2734 {2735 UInt uiCodeTmp = 0;2736 READ_FLAG( uiCodeTmp, "slice_enable_single_depth_mode" );2737 rpcSlice->setApplySingleDepthMode(uiCodeTmp);2738 }2739 #endif2740 #endif2741 2590 if (!rpcSlice->isIntra()) 2742 2591 { 2743 2592 READ_UVLC( uiCode, "five_minus_max_num_merge_cand"); 2744 2593 #if H_3D_IV_MERGE 2745 #if HHI_TOOL_PARAMETERS_I2_J01072746 #if ALGIN_J0107_J00592747 2594 rpcSlice->setMaxNumMergeCand(( ( rpcSlice->getMpiFlag() || rpcSlice->getIvMvPredFlag() || rpcSlice->getViewSynthesisPredFlag() ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode); 2748 #else2749 rpcSlice->setMaxNumMergeCand(( ( rpcSlice->getMpiFlag() || rpcSlice->getIvMvPredFlag() ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);2750 #endif2751 #else2752 if(rpcSlice->getIsDepth())2753 {2754 Bool bMPIFlag = rpcSlice->getVPS()->getMPIFlag( rpcSlice->getLayerIdInVps() ) ;2755 Bool ivMvPredFlag = rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ;2756 rpcSlice->setMaxNumMergeCand(( ( bMPIFlag || ivMvPredFlag ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);2757 }2758 else2759 {2760 Bool ivMvPredFlag = rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ;2761 #if MTK_MRG_LIST_SIZE_CLEANUP_J00592762 Bool vspFlag = rpcSlice->getVPS()->getViewSynthesisPredFlag( rpcSlice->getLayerIdInVps() ) ;2763 rpcSlice->setMaxNumMergeCand(( ivMvPredFlag || vspFlag? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);2764 #else2765 rpcSlice->setMaxNumMergeCand(( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);2766 #endif2767 }2768 #endif2769 2595 #else 2770 2596 rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode); … … 2926 2752 2927 2753 // Derive the value of PocMs8bValRequiredFlag 2928 #if !H_MV_HLS_FIX 2929 rpcSlice->setPocMsbValRequiredFlag( rpcSlice->getCraPicFlag() || rpcSlice->getBlaPicFlag() 2930 /* || TODO related to vps_poc_lsb_aligned_flag */ 2931 ); 2932 #endif 2933 2934 #if H_MV_HLS_FIX 2754 2935 2755 if( !rpcSlice->getPocMsbValRequiredFlag() && rpcSlice->getVPS()->getVpsPocLsbAlignedFlag() ) 2936 #else2937 if( !rpcSlice->getPocMsbValRequiredFlag() /* TODO && rpcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ )2938 #endif2939 2756 { 2940 2757 READ_FLAG( uiCode, "poc_msb_val_present_flag" ); rpcSlice->setPocMsbValPresentFlag( uiCode == 1 );
Note: See TracChangeset for help on using the changeset viewer.