Changeset 1124 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 10 Nov 2014, 12:22:20 (10 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1084 r1124 721 721 } 722 722 723 #if HHI_TOOL_PARAMETERS_I2_J0107 724 Void TDecCavlc::parseSPS(TComSPS* pcSPS) 725 #else 723 726 #if H_3D 724 727 Void TDecCavlc::parseSPS(TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) 725 728 #else 726 729 Void TDecCavlc::parseSPS(TComSPS* pcSPS) 730 #endif 727 731 #endif 728 732 { … … 993 997 if ( pcSPS->getSps3dExtensionFlag() ) 994 998 { 999 #if HHI_TOOL_PARAMETERS_I2_J0107 1000 parseSPS3dExtension( pcSPS ); 1001 #else 995 1002 parseSPSExtension2( pcSPS, viewIndex, depthFlag ); 1003 #endif 996 1004 } 997 1005 … … 1020 1028 1021 1029 #if H_3D 1030 #if HHI_TOOL_PARAMETERS_I2_J0107 1031 Void TDecCavlc::parseSPS3dExtension( TComSPS* pcSPS ) 1032 { 1033 TComSps3dExtension* sps3dExt = pcSPS->getSps3dExtension(); 1034 UInt uiCode; 1035 for( Int d = 0; d <= 1; d++ ) 1036 { 1037 READ_FLAG( uiCode, "iv_mv_pred_flag" ); sps3dExt->setIvMvPredFlag( d, uiCode == 1 ); 1038 READ_FLAG( uiCode, "iv_mv_scaling_flag" ); sps3dExt->setIvMvScalingFlag( d, uiCode == 1 ); 1039 if( d == 0 ) 1040 { 1041 READ_UVLC( uiCode, "log2_sub_pb_size_minus3" ); sps3dExt->setLog2SubPbSizeMinus3( d, uiCode ); 1042 READ_FLAG( uiCode, "iv_res_pred_flag" ); sps3dExt->setIvResPredFlag( d, uiCode == 1 ); 1043 READ_FLAG( uiCode, "depth_refinement_flag" ); sps3dExt->setDepthRefinementFlag( d, uiCode == 1 ); 1044 READ_FLAG( uiCode, "view_synthesis_pred_flag" ); sps3dExt->setViewSynthesisPredFlag( d, uiCode == 1 ); 1045 READ_FLAG( uiCode, "depth_based_blk_part_flag" ); sps3dExt->setDepthBasedBlkPartFlag( d, uiCode == 1 ); 1046 } 1047 else 1048 { 1049 READ_FLAG( uiCode, "mpi_flag" ); sps3dExt->setMpiFlag( d, uiCode == 1 ); 1050 READ_UVLC( uiCode, "log2_mpi_sub_pb_size_minus3" ); sps3dExt->setLog2MpiSubPbSizeMinus3( d, uiCode ); 1051 READ_FLAG( uiCode, "intra_contour_flag" ); sps3dExt->setIntraContourFlag( d, uiCode == 1 ); 1052 READ_FLAG( uiCode, "intra_sdc_wedge_flag" ); sps3dExt->setIntraSdcWedgeFlag( d, uiCode == 1 ); 1053 READ_FLAG( uiCode, "qt_pred_flag" ); sps3dExt->setQtPredFlag( d, uiCode == 1 ); 1054 READ_FLAG( uiCode, "inter_sdc_flag" ); sps3dExt->setInterSdcFlag( d, uiCode == 1 ); 1055 READ_FLAG( uiCode, "intra_single_flag" ); sps3dExt->setIntraSingleFlag( d, uiCode == 1 ); 1056 } 1057 } 1058 } 1059 #else 1022 1060 Void TDecCavlc::parseSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) 1023 1061 { 1024 1062 1025 1063 } 1064 #endif 1026 1065 #endif 1027 1066 … … 1032 1071 READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 ); 1033 1072 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode ); 1073 #if H_MV_HLS_FIX 1074 1075 UInt numRefLocOffsets;; 1076 READ_UVLC( numRefLocOffsets, "num_ref_loc_offsets" ); 1077 1078 // All of the following stuff is not needed, but allowed to be present. 1079 for (Int i = 0; i < numRefLocOffsets; i++ ) 1080 { 1081 Int iCode = 0; 1082 READ_CODE( 6, uiCode, "ref_loc_offset_layer_id" ); 1083 READ_FLAG( uiCode, "scaled_ref_layer_offset_present_flag" ); 1084 1085 if (uiCode) 1086 { 1087 READ_SVLC( iCode, "scaled_ref_layer_left_offset" ); 1088 READ_SVLC( iCode, "scaled_ref_layer_top_offset" ); 1089 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); 1090 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); 1091 } 1092 1093 READ_FLAG( uiCode, "ref_region_offset_present_flag" ); 1094 if (uiCode) 1095 { 1096 READ_SVLC( iCode, "ref_region_left_offset" ); 1097 READ_SVLC( iCode, "ref_region_top_offset" ); 1098 READ_SVLC( iCode, "ref_region_right_offset" ); 1099 READ_SVLC( iCode, "ref_region_bottom_offset" ); 1100 } 1101 1102 READ_FLAG( uiCode, "resample_phase_set_present_flag" ); 1103 if (uiCode) 1104 { 1105 READ_UVLC( uiCode, "phase_hor_luma" ); 1106 READ_UVLC( uiCode, "phase_ver_luma" ); 1107 READ_UVLC( uiCode, "phase_hor_chroma_plus8" ); 1108 READ_UVLC( uiCode, "phase_ver_chroma_plus8" ); 1109 } 1110 } 1111 READ_FLAG( uiCode, "colour_mapping_enabled_flag" ); 1112 // This is required to equal to 0 for Multiview Main profile. 1113 assert( uiCode == 0 ); 1114 #else 1034 1115 READ_UVLC( uiCode, "num_ref_loc_offsets" ); assert( uiCode == 0 ); 1116 #endif 1035 1117 } 1036 1118 … … 1155 1237 { 1156 1238 #if H_3D 1239 #if HHI_VPS_3D_EXTENSION_I3_J0107 1240 READ_FLAG( uiCode, "vps_3d_extension_flag" ); 1241 if ( uiCode ) 1242 { 1243 m_pcBitstream->readOutTrailingBits(); 1244 pcVPS->createCamPars(pcVPS->getNumViews()); 1245 parseVPS3dExtension( pcVPS ); 1246 } 1247 READ_FLAG( uiCode, "vps_extension3_flag" ); 1248 if (uiCode) 1249 { 1250 #else 1157 1251 m_pcBitstream->readOutTrailingBits(); 1158 1252 pcVPS->createCamPars(pcVPS->getNumViews()); … … 1162 1256 { 1163 1257 #endif 1258 #endif 1164 1259 #endif 1165 1260 while ( xMoreRbspData() ) … … 1234 1329 } 1235 1330 } 1331 1332 #if H_MV_FIX_NUM_VIEWS 1333 pcVPS->initNumViews(); 1334 #endif 1236 1335 1237 1336 READ_CODE( 4, uiCode, "view_id_len" ); pcVPS->setViewIdLen( uiCode ); … … 1342 1441 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1343 1442 { 1443 #if H_MV_HLS_FIX 1444 if( pcVPS->getNumLayerSets() > 2 && i >= pcVPS->getNumLayerSets( ) ) 1445 #else 1344 1446 if( i >= pcVPS->getNumLayerSets( ) ) 1447 #endif 1345 1448 { 1346 1449 READ_CODE( pcVPS->getLayerSetIdxForOlsMinus1Len( i ), uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode ); … … 1413 1516 1414 1517 READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 ); 1415 #if H_MV_HLS7_GEN 1518 1519 #if H_MV_HLS7_GEN || H_MV_HLS_FIX 1416 1520 READ_FLAG( uiCode, "vps_poc_lsb_aligned_flag" ); pcVPS->setVpsPocLsbAlignedFlag( uiCode == 1 ); 1417 1521 #endif … … 1463 1567 parseVPSVUI( pcVPS ); 1464 1568 } 1569 #if H_MV_HLS_FIX 1570 else 1571 #endif 1465 1572 { 1466 1573 TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); … … 1838 1945 1839 1946 #if H_3D 1947 #if HHI_VPS_3D_EXTENSION_I3_J0107 1948 Void TDecCavlc::parseVPS3dExtension( TComVPS* pcVPS ) 1949 #else 1840 1950 Void TDecCavlc::parseVPSExtension2( TComVPS* pcVPS ) 1951 #endif 1841 1952 { 1842 1953 UInt uiCode; 1954 1955 #if !HHI_TOOL_PARAMETERS_I2_J0107 1843 1956 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1844 1957 { … … 1903 2016 READ_FLAG( uiCode, "depth_inter_SDC_flag" ); pcVPS->setInterSDCFlag( i, uiCode ? true : false ); 1904 2017 #endif 1905 } 1906 } 1907 } 2018 #if MTK_SINGLE_DEPTH_VPS_FLAG_J0060 2019 READ_FLAG( uiCode, "single_depth_mode_flag[i]"); pcVPS->setSingleDepthModeFlag( i, uiCode == 1 ? true : false ); 2020 #endif 2021 } 2022 } 2023 } 2024 #endif 1908 2025 1909 2026 UInt uiCamParPrecision = 0; … … 1912 2029 1913 2030 READ_UVLC( uiCamParPrecision, "cp_precision" ); 2031 #if HHI_VIEW_ID_LIST_I5_J0107 2032 for (Int n = 1; n < pcVPS->getNumViews(); n++) 2033 { 2034 Int viewIndex = pcVPS->getViewOIdxList( n ); 2035 #else 1914 2036 for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++) 1915 2037 { 2038 #endif 1916 2039 pcVPS->setCamParPresent ( viewIndex, false ); 1917 2040 pcVPS->setHasCamParInSliceHeader( viewIndex, false ); … … 1922 2045 if ( !bCamParSlice ) 1923 2046 { 1924 for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ ) 1925 { 2047 #if HHI_VIEW_ID_LIST_I5_J0107 2048 for( UInt m = 0; m < n; n++ ) 2049 { 2050 Int uiBaseIndex = pcVPS->getViewOIdxList ( m ); 1926 2051 Int iCode; 1927 2052 READ_SVLC( iCode, "vps_cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode; … … 1932 2057 } 1933 2058 pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 2059 #else 2060 for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ ) 2061 { 2062 Int iCode; 2063 READ_SVLC( iCode, "vps_cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode; 2064 READ_SVLC( iCode, "vps_cp_off" ); m_aaiTempOffset [ uiBaseIndex ][ viewIndex ] = iCode; 2065 READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ]; 2066 READ_SVLC( iCode, "vps_cp_inv_off_plus_off" ); m_aaiTempOffset [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ]; 2067 } 2068 } 2069 pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 2070 #endif 1934 2071 } 1935 2072 } … … 1994 2131 #endif 1995 2132 rpcSlice->setSPS(sps); 2133 #if HHI_TOOL_PARAMETERS_I2_J0107 2134 #if H_3D 2135 rpcSlice->init3dToolParameters(); 2136 #endif 2137 #endif 1996 2138 rpcSlice->setPPS(pps); 1997 2139 if( pps->getDependentSliceSegmentsEnabledFlag() && ( !firstSliceSegmentInPic )) … … 2065 2207 rpcSlice->checkCrossLayerBlaFlag( ); 2066 2208 2067 #if !H_MV_HLS7_GEN 2209 #if !H_MV_HLS7_GEN && !H_MV_HLS_FIX 2068 2210 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 2069 2211 { … … 2350 2492 Bool interLayerPredLayerIdcPresentFlag = false; 2351 2493 Int layerId = rpcSlice->getLayerId(); 2494 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107 2495 #if H_3D 2496 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumRefListLayers( layerId ) > 0 ) 2497 #else 2352 2498 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) 2499 #endif 2500 #else 2501 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) 2502 #endif 2353 2503 { 2354 2504 READ_FLAG( uiCode, "inter_layer_pred_enabled_flag" ); rpcSlice->setInterLayerPredEnabledFlag( uiCode == 1 ); 2505 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107 2506 #if H_3D 2507 if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumRefListLayers( layerId ) > 1 ) 2508 #else 2355 2509 if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 ) 2510 #endif 2511 #else 2512 if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 ) 2513 #endif 2356 2514 { 2357 2515 if( !vps->getMaxOneActiveRefLayerFlag()) … … 2359 2517 READ_CODE( rpcSlice->getNumInterLayerRefPicsMinus1Len( ), uiCode, "num_inter_layer_ref_pics_minus1" ); rpcSlice->setNumInterLayerRefPicsMinus1( uiCode ); 2360 2518 } 2519 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107 2520 #if H_3D 2521 if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumRefListLayers( layerId ) ) 2522 #else 2361 2523 if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) ) 2524 #endif 2525 #else 2526 if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) ) 2527 #endif 2362 2528 { 2363 2529 interLayerPredLayerIdcPresentFlag = true; … … 2545 2711 } 2546 2712 #if H_3D_IC 2713 #if HHI_DEPENDENCY_SIGNALLING_I1_J0107 2714 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 ) 2715 #else 2547 2716 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 ) 2717 #endif 2548 2718 { 2549 2719 UInt uiCodeTmp = 0; … … 2559 2729 } 2560 2730 #endif 2731 #if !MTK_SINGLE_DEPTH_VPS_FLAG_J0060 2561 2732 #if H_3D_SINGLE_DEPTH 2562 2733 if(rpcSlice->getIsDepth()) … … 2567 2738 } 2568 2739 #endif 2740 #endif 2569 2741 if (!rpcSlice->isIntra()) 2570 2742 { 2571 2743 READ_UVLC( uiCode, "five_minus_max_num_merge_cand"); 2572 2744 #if H_3D_IV_MERGE 2745 #if HHI_TOOL_PARAMETERS_I2_J0107 2746 #if ALGIN_J0107_J0059 2747 rpcSlice->setMaxNumMergeCand(( ( rpcSlice->getMpiFlag() || rpcSlice->getIvMvPredFlag() || rpcSlice->getViewSynthesisPredFlag() ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode); 2748 #else 2749 rpcSlice->setMaxNumMergeCand(( ( rpcSlice->getMpiFlag() || rpcSlice->getIvMvPredFlag() ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode); 2750 #endif 2751 #else 2573 2752 if(rpcSlice->getIsDepth()) 2574 2753 { … … 2580 2759 { 2581 2760 Bool ivMvPredFlag = rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ; 2761 #if MTK_MRG_LIST_SIZE_CLEANUP_J0059 2762 Bool vspFlag = rpcSlice->getVPS()->getViewSynthesisPredFlag( rpcSlice->getLayerIdInVps() ) ; 2763 rpcSlice->setMaxNumMergeCand(( ivMvPredFlag || vspFlag? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode); 2764 #else 2582 2765 rpcSlice->setMaxNumMergeCand(( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode); 2583 } 2584 2766 #endif 2767 } 2768 #endif 2585 2769 #else 2586 2770 rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode); … … 2742 2926 2743 2927 // Derive the value of PocMs8bValRequiredFlag 2928 #if !H_MV_HLS_FIX 2744 2929 rpcSlice->setPocMsbValRequiredFlag( rpcSlice->getCraPicFlag() || rpcSlice->getBlaPicFlag() 2745 2930 /* || TODO related to vps_poc_lsb_aligned_flag */ 2746 2931 ); 2747 2932 #endif 2933 2934 #if H_MV_HLS_FIX 2935 if( !rpcSlice->getPocMsbValRequiredFlag() && rpcSlice->getVPS()->getVpsPocLsbAlignedFlag() ) 2936 #else 2748 2937 if( !rpcSlice->getPocMsbValRequiredFlag() /* TODO && rpcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ ) 2938 #endif 2749 2939 { 2750 2940 READ_FLAG( uiCode, "poc_msb_val_present_flag" ); rpcSlice->setPocMsbValPresentFlag( uiCode == 1 ); -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r1084 r1124 90 90 #endif 91 91 #if H_3D 92 #if HHI_VPS_3D_EXTENSION_I3_J0107 93 Void parseVPS3dExtension ( TComVPS* pcVPS ); 94 #else 92 95 Void parseVPSExtension2 ( TComVPS* pcVPS ); 96 #endif 97 #if HHI_TOOL_PARAMETERS_I2_J0107 98 Void parseSPS3dExtension ( TComSPS* pcSPS ); 99 Void parseSPS ( TComSPS* pcSPS ); 100 #else 93 101 Void parseSPSExtension2 ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 94 102 Void parseSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 103 #endif 95 104 #else 96 105 Void parseSPS ( TComSPS* pcSPS ); -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r1084 r1124 291 291 DTRACE_CU_S("=========== coding_unit ===========\n") 292 292 #endif 293 294 293 #if !LGE_DDD_REMOVAL_J0042_J0030 295 294 #if H_3D_DDD 296 295 pcCU->setUseDDD( false, uiAbsPartIdx, uiDepth ); 296 #endif 297 297 #endif 298 298 … … 315 315 { 316 316 #if H_3D_ARP && H_3D_IV_MERGE 317 #if HHI_TOOL_PARAMETERS_I2_J0107 318 if( pcCU->getSlice()->getIvResPredFlag() || pcCU->getSlice()->getIvMvPredFlag() ) 319 #else 317 320 if( pcCU->getSlice()->getVPS()->getUseAdvRP( pcCU->getSlice()->getLayerId() ) || pcCU->getSlice()->getVPS()->getIvMvPredFlag( pcCU->getSlice()->getLayerId() )) 321 #endif 318 322 #else 319 323 #if H_3D_ARP … … 345 349 #endif 346 350 #if H_3D_NBDV_REF 351 #if HHI_TOOL_PARAMETERS_I2_J0107 352 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() ) //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done. 353 #else 347 354 if(pcCU->getSlice()->getVPS()->getDepthRefinementFlag( pcCU->getSlice()->getLayerIdInVps() )) //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done. 355 #endif 348 356 { 349 357 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true); … … 452 460 #endif 453 461 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 454 462 #if !LGE_DDD_REMOVAL_J0042_J0030 455 463 #if H_3D_DDD 456 464 if( uiMergeIndex == m_ppcCU[uiDepth]->getUseDDDCandIdx() ) … … 460 468 pcCU->setDDDepthSubParts( m_ppcCU[uiDepth]->getDDTmpDepth(),uiAbsPartIdx, 0, uiDepth ); 461 469 } 470 #endif 462 471 #endif 463 472 … … 735 744 //construction of depth candidates 736 745 Pel testDepth; 746 #if SINGLE_DEPTH_SIMP_J0115 747 Pel DepthNeighbours[2]; 748 #else 737 749 Pel DepthNeighbours[5]; 750 #endif 738 751 Int index =0; 752 #if SINGLE_DEPTH_SIMP_J0115 753 for( Int i = 0; (i < 2) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ ) 754 #else 739 755 for( Int i = 0; (i < 5) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ ) 756 #endif 740 757 { 741 758 if(!pcCU->getNeighDepth (0, uiAbsPartIdx, &testDepth, i)) … … 745 762 DepthNeighbours[index]=testDepth; 746 763 index++; 764 #if !SINGLE_DEPTH_SIMP_J0115 747 765 for(Int j=0;j<index-1;j++) 748 766 { … … 753 771 } 754 772 } 773 #endif 755 774 } 756 775 … … 1063 1082 } 1064 1083 } 1065 1084 1066 1085 TextType eText = ( uiChromaId > 0 ? TEXT_CHROMA_V : TEXT_CHROMA_U ); 1067 1086 UInt uiWidth = pcCU ->getWidth ( 0 ) >> ( uiTrDepth + 1 ); … … 1071 1090 Pel* piPred = ( uiChromaId > 0 ? pcPredYuv->getCrAddr( uiAbsPartIdx ) : pcPredYuv->getCbAddr( uiAbsPartIdx ) ); 1072 1091 Pel* piResi = ( uiChromaId > 0 ? pcResiYuv->getCrAddr( uiAbsPartIdx ) : pcResiYuv->getCbAddr( uiAbsPartIdx ) ); 1073 1092 1074 1093 UInt uiNumCoeffInc = ( ( pcCU->getSlice()->getSPS()->getMaxCUWidth() * pcCU->getSlice()->getSPS()->getMaxCUHeight() ) >> ( pcCU->getSlice()->getSPS()->getMaxCUDepth() << 1 ) ) >> 2; 1075 1094 TCoeff* pcCoeff = ( uiChromaId > 0 ? pcCU->getCoeffCr() : pcCU->getCoeffCb() ) + ( uiNumCoeffInc * uiAbsPartIdx ); 1076 1095 1077 1096 UInt uiChromaPredMode = pcCU->getChromaIntraDir( 0 ); 1078 1097 1079 1098 UInt uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1080 1099 Pel* piRecIPred = ( uiChromaId > 0 ? pcCU->getPic()->getPicYuvRec()->getCrAddr( pcCU->getAddr(), uiZOrder ) : pcCU->getPic()->getPicYuvRec()->getCbAddr( pcCU->getAddr(), uiZOrder ) ); … … 1087 1106 1088 1107 pcCU->getPattern()->initAdiPatternChroma( pcCU, uiAbsPartIdx, uiTrDepth, 1089 1090 1091 1092 1108 m_pcPrediction->getPredicBuf (), 1109 m_pcPrediction->getPredicBufWidth (), 1110 m_pcPrediction->getPredicBufHeight (), 1111 bAboveAvail, bLeftAvail ); 1093 1112 Int* pPatChroma = ( uiChromaId > 0 ? pcCU->getPattern()->getAdiCrBuf( uiWidth, uiHeight, m_pcPrediction->getPredicBuf() ) : pcCU->getPattern()->getAdiCbBuf( uiWidth, uiHeight, m_pcPrediction->getPredicBuf() ) ); 1094 1113 1095 1114 //===== get prediction signal ===== 1096 1115 { … … 1107 1126 if ( pcCU->getCbf( uiAbsPartIdx, eText, uiTrDepth ) ) 1108 1127 { 1109 //===== inverse transform =====1110 Int curChromaQpOffset;1111 if(eText == TEXT_CHROMA_U)1112 {1113 curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCbQpOffset() + pcCU->getSlice()->getSliceQpDeltaCb();1114 }1115 else1116 {1117 curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr();1118 }1119 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), eText, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset );1120 1121 Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)eText];1128 //===== inverse transform ===== 1129 Int curChromaQpOffset; 1130 if(eText == TEXT_CHROMA_U) 1131 { 1132 curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCbQpOffset() + pcCU->getSlice()->getSliceQpDeltaCb(); 1133 } 1134 else 1135 { 1136 curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr(); 1137 } 1138 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), eText, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset ); 1139 1140 Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)eText]; 1122 1141 assert(scalingListType < SCALING_LIST_NUM); 1123 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eText, REG_DCT, piResi, uiStride, pcCoeff, uiWidth, uiHeight, scalingListType, useTransformSkipChroma );1124 1125 //===== reconstruction =====1126 Pel* pPred = piPred;1127 Pel* pResi = piResi;1128 Pel* pReco = piReco;1129 Pel* pRecIPred = piRecIPred;1130 for( UInt uiY = 0; uiY < uiHeight; uiY++ )1131 {1132 for( UInt uiX = 0; uiX < uiWidth; uiX++ )1133 {1134 pReco [ uiX ] = ClipC( pPred[ uiX ] + pResi[ uiX ] );1135 pRecIPred[ uiX ] = pReco[ uiX ];1136 }1137 pPred += uiStride;1138 pResi += uiStride;1139 pReco += uiStride;1140 pRecIPred += uiRecIPredStride;1141 }1142 }1142 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eText, REG_DCT, piResi, uiStride, pcCoeff, uiWidth, uiHeight, scalingListType, useTransformSkipChroma ); 1143 1144 //===== reconstruction ===== 1145 Pel* pPred = piPred; 1146 Pel* pResi = piResi; 1147 Pel* pReco = piReco; 1148 Pel* pRecIPred = piRecIPred; 1149 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 1150 { 1151 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 1152 { 1153 pReco [ uiX ] = ClipC( pPred[ uiX ] + pResi[ uiX ] ); 1154 pRecIPred[ uiX ] = pReco[ uiX ]; 1155 } 1156 pPred += uiStride; 1157 pResi += uiStride; 1158 pReco += uiStride; 1159 pRecIPred += uiRecIPredStride; 1160 } 1161 } 1143 1162 else 1144 1163 { -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r1084 r1124 55 55 Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 56 56 { 57 if( !pcCU->getSlice()->getIntraSingleFlag() ) 58 { 59 return; 60 } 61 #if ALIGN_J0060_J0107 62 #else 57 63 if ( !pcCU->getSlice()->getIsDepth() ) 58 64 { 59 65 return; 60 66 } 67 #if MTK_SINGLE_DEPTH_VPS_FLAG_J0060 68 if(!pcCU->getSlice()->getVPS()->getSingleDepthModeFlag(pcCU->getSlice()->getLayerIdInVps())) 69 { 70 return; 71 } 72 #else 61 73 if(!pcCU->getSlice()->getApplySingleDepthMode()) 62 74 { 63 75 return; 64 76 } 77 #endif 78 #endif 79 65 80 m_pcEntropyDecoderIf->parseSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth ); 66 81 } … … 152 167 153 168 #if H_3D_DBBP 169 #if SEC_DBBP_VIEW_REF_CHECK_J0037 170 #if HHI_TOOL_PARAMETERS_I2_J0107 171 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) 172 #else 173 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) 174 #endif 175 #else 154 176 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 ) 177 #endif 155 178 { 156 179 decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth); … … 337 360 } 338 361 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 339 362 #if !LGE_DDD_REMOVAL_J0042_J0030 340 363 #if H_3D_DDD 341 364 if( uiMergeIndex == pcSubCU->getUseDDDCandIdx() ) … … 349 372 pcCU->setUseDDD( false, uiSubPartIdx, uiPartIdx, uiDepth ); 350 373 } 374 #endif 351 375 #endif 352 376 … … 828 852 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 829 853 854 #if HHI_TOOL_PARAMETERS_I2_J0107 855 if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getInterSdcFlag() ) || 856 ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getIntraSdcWedgeFlag() ) ) 857 #else 830 858 if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) || 831 859 ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getVpsDepthModesFlag( pcCU->getSlice()->getLayerIdInVps() ) ) ) 860 #endif 832 861 { 833 862 return; -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r1084 r1124 66 66 67 67 virtual Void parseVPS ( TComVPS* pcVPS ) = 0; 68 #if HHI_TOOL_PARAMETERS_I2_J0107 69 virtual Void parseSPS ( TComSPS* pcSPS ) = 0; 70 #else 68 71 #if H_3D 69 72 virtual Void parseSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) = 0; 70 73 #else 71 74 virtual Void parseSPS ( TComSPS* pcSPS ) = 0; 75 #endif 72 76 #endif 73 77 #if H_3D … … 157 161 Void resetEntropy ( TComSlice* p) { m_pcEntropyDecoderIf->resetEntropy(p); } 158 162 Void decodeVPS ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); } 163 #if HHI_TOOL_PARAMETERS_I2_J0107 164 Void decodeSPS ( TComSPS* pcSPS ) { m_pcEntropyDecoderIf->parseSPS(pcSPS); } 165 #else 159 166 #if H_3D 160 167 Void decodeSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) { m_pcEntropyDecoderIf->parseSPS(pcSPS, viewIndex, depthFlag ); } 161 168 #else 162 169 Void decodeSPS ( TComSPS* pcSPS ) { m_pcEntropyDecoderIf->parseSPS(pcSPS); } 170 #endif 163 171 #endif 164 172 #if H_3D -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r1084 r1124 702 702 Bool bParseSplitFlag = true; 703 703 704 705 #if HHI_TOOL_PARAMETERS_I2_J0107 706 Bool bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag(); 707 #else 704 708 TComVPS *vps = pcCU->getPic()->getSlice(0)->getVPS(); 705 709 Bool bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId()); 710 #endif 706 711 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 707 712 Bool bDepthMapDetect = (pcTexture != NULL); … … 756 761 #if H_3D_QTLPC 757 762 Bool bParsePartSize = true; 763 764 #if HHI_TOOL_PARAMETERS_I2_J0107 765 Bool bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag(); 766 #else 758 767 TComVPS *vps = pcCU->getPic()->getSlice(0)->getVPS(); 759 768 Bool bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId()); 769 #endif 760 770 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 761 771 Bool bDepthMapDetect = (pcTexture != NULL); … … 982 992 { 983 993 #if H_3D_DIM 994 #if HHI_TOOL_PARAMETERS_I2_J0107 995 if( pcCU->getSlice()->getIntraSdcWedgeFlag() || pcCU->getSlice()->getIntraContourFlag() ) 996 #else 984 997 if( pcCU->getSlice()->getVpsDepthModesFlag() || pcCU->getSlice()->getIVPFlag() ) 998 #endif 985 999 { 986 1000 parseIntraDepth( pcCU, absPartIdx+partOffset*j, depth ); … … 1096 1110 UInt uiTabIdx = 0; 1097 1111 xParseDmm1WedgeIdx( uiTabIdx, g_dmm1TabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] ); 1112 1113 #if MTK_J0033 1114 assert( uiTabIdx < g_dmmWedgeLists[ g_aucConvertToBit[ pcCU->getDMM1BasePatternWidth( pcCU->getWidth( absPartIdx ) )]].size()); 1115 #endif 1116 1098 1117 pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth ); 1099 1118 } break; … … 1124 1143 if( uiIsDimMode ) 1125 1144 { 1145 #if HHI_TOOL_PARAMETERS_I2_J0107 1146 if( pcCU->getSlice()->getIntraSdcWedgeFlag() && pcCU->getSlice()->getIntraContourFlag() ) 1147 #else 1126 1148 if( pcCU->getSlice()->getVpsDepthModesFlag() && pcCU->getSlice()->getIVPFlag() ) 1149 #endif 1127 1150 { 1128 1151 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) ); … … 1136 1159 } 1137 1160 } 1161 #if HHI_TOOL_PARAMETERS_I2_J0107 1162 else if ( pcCU->getSlice()->getIntraSdcWedgeFlag() ) 1163 #else 1138 1164 else if ( pcCU->getSlice()->getVpsDepthModesFlag() ) 1165 #endif 1139 1166 { 1140 1167 pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth ); 1141 1168 } 1169 #if HHI_TOOL_PARAMETERS_I2_J0107 1170 else if( pcCU->getSlice()->getIntraContourFlag() ) 1171 #else 1142 1172 else if( pcCU->getSlice()->getIVPFlag() ) 1173 #endif 1143 1174 { 1144 1175 pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth ); … … 2120 2151 Void TDecSbac::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2121 2152 { 2153 #if HHI_TOOL_PARAMETERS_I2_J0107 2154 AOF( pcCU->getSlice()->getDepthBasedBlkPartFlag() ); 2155 #else 2122 2156 AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ); 2157 #endif 2123 2158 AOF( !pcCU->getSlice()->getIsDepth() ); 2124 2159 -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r1084 r1124 76 76 Void setBitstream ( TComInputBitstream* p ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); } 77 77 Void parseVPS ( TComVPS* /*pcVPS*/ ) {} 78 #if HHI_TOOL_PARAMETERS_I2_J0107 79 Void parseSPS ( TComSPS* /*pcSPS*/ ) {} 80 #else 78 81 #if H_3D 79 82 Void parseSPS ( TComSPS* /*pcSPS*/ , Int /*viewIndex*/, Bool /*depthFlag*/ ) {} 80 83 #else 81 84 Void parseSPS ( TComSPS* /*pcSPS*/ ) {} 85 #endif 82 86 #endif 83 87 #if H_3D -
trunk/source/Lib/TLibDecoder/TDecSlice.cpp
r976 r1124 280 280 iNumSubstreamsPerTile = 1; 281 281 } 282 #if LGE_DEFAULT_DV_J0046 && !SEC_ARP_VIEW_REF_CHECK_J0037 && !SEC_DBBP_VIEW_REF_CHECK_J0037 283 pcSlice->setDefaultRefViewIdx( -1 ); 284 pcSlice->setDefaultRefViewIdxAvailableFlag( false ); 285 286 Int valid = 0; 287 Int viewIndex = 0; 288 for( UInt uiBId = 0; uiBId < pcSlice->getViewIndex() && valid==0; uiBId++ ) 289 { 290 UInt uiBaseId = uiBId; 291 TComPic* pcBasePic = pcSlice->getIvPic( false, uiBaseId ); 292 for( Int iRefListId = 0; ( iRefListId < (pcSlice->isInterB()? 2:1) ) && !pcSlice->isIntra() && valid==0; iRefListId++ ) 293 { 294 RefPicList eRefPicListTest = RefPicList( iRefListId ); 295 Int iNumRefPics = pcSlice->getNumRefIdx( eRefPicListTest ) ; 296 for( Int iRefIndex = 0; iRefIndex < iNumRefPics; iRefIndex++ ) 297 { 298 if(pcBasePic->getPOC() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getPOC() 299 && pcBasePic->getViewIndex() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getViewIndex()) 300 { 301 valid=1; 302 viewIndex = uiBaseId; 303 break; 304 } 305 } 306 } 307 } 308 if( valid ) 309 { 310 pcSlice->setDefaultRefViewIdx( viewIndex ); 311 pcSlice->setDefaultRefViewIdxAvailableFlag( true ); 312 } 313 #endif 282 314 283 315 if ( (iCUAddr == rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getFirstCUAddr()) && // 1st in tile. -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r1084 r1124 726 726 727 727 #endif 728 #if HHI_TOOL_PARAMETERS_I2_J0107 729 #if H_3D 730 m_apcSlicePilot->init3dToolParameters(); 731 #endif 732 #endif 728 733 pps->setSPS(sps); 729 734 pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumTileColumnsMinus1() + 1) : 1); … … 1082 1087 pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr); 1083 1088 pcSlice->setRefPicList ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 1089 1090 #if SEC_ARP_VIEW_REF_CHECK_J0037 || SEC_DBBP_VIEW_REF_CHECK_J0037 1091 pcSlice->setDefaultRefView(); 1092 #endif 1093 1084 1094 #if H_3D_ARP 1085 1095 pcSlice->setARPStepNum(m_ivPicLists); … … 1234 1244 TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); 1235 1245 assert( vps != 0 ); 1246 #if HHI_TOOL_PARAMETERS_I2_J0107 1247 m_cEntropyDecoder.decodeSPS( sps ); 1248 #else 1236 1249 m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( m_layerId ), ( vps->getDepthId( m_layerId ) == 1 ) ); 1250 #endif 1237 1251 #else 1238 1252 m_cEntropyDecoder.decodeSPS( sps ); -
trunk/source/Lib/TLibDecoder/TDecTop.h
r976 r1124 83 83 #endif 84 84 85 #if !LGE_DDD_REMOVAL_J0042_J0030 85 86 #if H_3D_DDD 86 87 Int getCodedScale( Int iBaseView, Int iCureView){ return m_aaiCodedScale[ iBaseView ][ iCureView ];} 87 88 Int getCodedOffset( Int iBaseView, Int iCureView){ return m_aaiCodedOffset[ iBaseView ][ iCureView ];} 88 89 UInt getCamParsCodedPrecision(){ return m_vps->getCamParPrecision(); } 90 #endif 89 91 #endif 90 92
Note: See TracChangeset for help on using the changeset viewer.