Changeset 1179 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 7 Apr 2015, 17:05:30 (10 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/AnnexBread.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/AnnexBread.h
r964 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/NALread.cpp
r976 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/NALread.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/SEIread.cpp
r964 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/SEIread.h
r884 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 54 54 return; 55 55 } 56 #endif 57 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 56 if ( !g_disableNumbering ) 57 { 58 #endif 59 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 60 #if H_MV_ENC_DEC_TRAC 61 } 62 #endif 63 58 64 if (length < 10) 59 65 { … … 75 81 return; 76 82 } 77 #endif 78 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 83 if ( !g_disableNumbering ) 84 { 85 #endif 86 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 87 #if H_MV_ENC_DEC_TRAC 88 } 89 #endif 79 90 fprintf( g_hTrace, "%-50s ue(v) : %u\n", pSymbolName, rValue ); 80 91 fflush ( g_hTrace ); … … 89 100 return; 90 101 } 91 #endif 92 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 102 if ( !g_disableNumbering ) 103 { 104 #endif 105 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 106 #if H_MV_ENC_DEC_TRAC 107 } 108 #endif 109 93 110 fprintf( g_hTrace, "%-50s se(v) : %d\n", pSymbolName, rValue ); 94 111 fflush ( g_hTrace ); … … 103 120 return; 104 121 } 105 #endif 106 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 122 if ( !g_disableNumbering ) 123 { 124 #endif 125 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 126 #if H_MV_ENC_DEC_TRAC 127 } 128 #endif 107 129 fprintf( g_hTrace, "%-50s u(1) : %d\n", pSymbolName, rValue ); 108 130 fflush ( g_hTrace ); -
trunk/source/Lib/TLibDecoder/SyntaxElementParser.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecBinCoder.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 39 39 #include "SEIread.h" 40 40 #include "TDecSlice.h" 41 41 #if H_3D_ANNEX_SELECTION_FIX 42 #include "TDecTop.h" 43 #endif 42 44 //! \ingroup TLibDecoder 43 45 //! \{ … … 91 93 TDecCavlc::TDecCavlc() 92 94 { 95 #if !HHI_CAM_PARA_K0052 93 96 #if H_3D 94 97 m_aaiTempScale = new Int* [ MAX_NUM_LAYERS ]; … … 100 103 } 101 104 #endif 105 #endif 102 106 } 103 107 104 108 TDecCavlc::~TDecCavlc() 105 109 { 110 #if !HHI_CAM_PARA_K0052 106 111 #if H_3D 107 112 for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ ) … … 112 117 delete [] m_aaiTempScale; 113 118 delete [] m_aaiTempOffset; 119 #endif 114 120 #endif 115 121 } … … 777 783 assert(uiCode <= 3); 778 784 // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream 785 #if !H_3D_DISABLE_CHROMA 779 786 assert (uiCode == 1); 787 #endif 780 788 if( uiCode == 3 ) 781 789 { … … 1040 1048 READ_FLAG( uiCode, "qt_pred_flag" ); sps3dExt->setQtPredFlag( d, uiCode == 1 ); 1041 1049 READ_FLAG( uiCode, "inter_sdc_flag" ); sps3dExt->setInterSdcFlag( d, uiCode == 1 ); 1050 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1051 READ_FLAG( uiCode, "intra_skip_flag" ); sps3dExt->setDepthIntraSkipFlag( d, uiCode == 1 ); 1052 #else 1042 1053 READ_FLAG( uiCode, "intra_single_flag" ); sps3dExt->setIntraSingleFlag( d, uiCode == 1 ); 1054 #endif 1043 1055 } 1044 1056 } … … 1051 1063 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 1052 1064 READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 ); 1065 #if FIX_TICKET_95 1066 if (pcPPS->getPpsInferScalingListFlag()) 1067 { 1053 1068 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode ); 1069 } 1070 #else 1071 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode ); 1072 #endif 1054 1073 1055 1074 UInt numRefLocOffsets;; … … 1317 1336 } 1318 1337 1338 #if HHI_INTER_COMP_PRED_K0052 1339 #if H_3D 1340 pcVPS->initViewCompLayer( ); 1341 #endif 1342 #endif 1319 1343 1320 1344 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) … … 1466 1490 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1467 1491 { 1468 1492 READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode ); 1469 1493 } 1470 1494 } … … 1905 1929 Void TDecCavlc::parseVPS3dExtension( TComVPS* pcVPS ) 1906 1930 { 1931 #if HHI_CAM_PARA_K0052 1932 UInt uiCode; 1933 READ_UVLC( uiCode, "cp_precision"); pcVPS->setCpPrecision( uiCode ) ; 1934 1935 for (Int n = 1; n < pcVPS->getNumViews(); n++) 1936 { 1937 Int i = pcVPS->getViewOIdxList( n ); 1938 Int iInVps = pcVPS->getVoiInVps( i ); 1939 READ_CODE( 6, uiCode, "num_cp" ); pcVPS->setNumCp( iInVps, uiCode ); 1940 1941 if( pcVPS->getNumCp( iInVps ) > 0 ) 1942 { 1943 READ_FLAG( uiCode, "cp_in_slice_segment_header_flag" ); pcVPS->setCpInSliceSegmentHeaderFlag( iInVps, uiCode == 1 ); 1944 for( Int m = 0; m < pcVPS->getNumCp( iInVps ); m++ ) 1945 { 1946 READ_UVLC( uiCode, "cp_ref_voi" ); pcVPS->setCpRefVoi( iInVps, m, uiCode ); 1947 if( !pcVPS->getCpInSliceSegmentHeaderFlag( iInVps ) ) 1948 { 1949 Int j = pcVPS->getCpRefVoi( iInVps, m ); 1950 Int jInVps = pcVPS->getVoiInVps( j ); 1951 Int iCode; 1952 READ_SVLC( iCode, "vps_cp_scale" ); pcVPS->setVpsCpScale ( iInVps, jInVps, iCode ); 1953 READ_SVLC( iCode, "vps_cp_off" ); pcVPS->setVpsCpOff ( iInVps, jInVps, iCode ); 1954 READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); pcVPS->setVpsCpInvScale( iInVps, jInVps, iCode - pcVPS->getVpsCpScale( iInVps, jInVps ) ); 1955 READ_SVLC( iCode, "vps_cp_inv_off_plus_off" ); pcVPS->setVpsCpInvOff ( iInVps, jInVps, iCode - pcVPS->getVpsCpOff ( iInVps, jInVps ) ); 1956 } 1957 } 1958 } 1959 } 1960 pcVPS->deriveCpPresentFlag(); 1961 #else 1907 1962 UInt uiCode; 1908 1909 1963 1910 1964 UInt uiCamParPrecision = 0; … … 1955 2009 } 1956 2010 } 2011 #endif 1957 2012 } 1958 2013 #endif … … 2015 2070 #endif 2016 2071 rpcSlice->setSPS(sps); 2072 #if !HHI_INTER_COMP_PRED_K0052 2017 2073 #if H_3D 2018 2074 rpcSlice->init3dToolParameters(); 2075 #endif 2019 2076 #endif 2020 2077 rpcSlice->setPPS(pps); … … 2108 2165 } 2109 2166 // in the first version chroma_format_idc is equal to one, thus colour_plane_id will not be present 2167 2168 #if H_3D_DISABLE_CHROMA 2169 assert (sps->getChromaFormatIdc() == 1 || rpcSlice->getIsDepth() ); 2170 assert (sps->getChromaFormatIdc() == 0 || !rpcSlice->getIsDepth() ); 2171 #else 2110 2172 assert (sps->getChromaFormatIdc() == 1 ); 2173 #endif 2111 2174 // if( separate_colour_plane_flag == 1 ) 2112 2175 // colour_plane_id u(2) … … 2405 2468 } 2406 2469 } 2470 #if HHI_INTER_COMP_PRED_K0052 2471 #if H_3D 2472 if ( getDecTop()->decProcAnnexI() ) 2473 { 2474 rpcSlice->deriveInCmpPredAndCpAvailFlag(); 2475 if ( rpcSlice->getInCmpPredAvailFlag() ) 2476 { 2477 READ_FLAG(uiCode, "in_comp_pred_flag"); rpcSlice->setInCompPredFlag((Bool)uiCode); 2478 } 2479 rpcSlice->init3dToolParameters(); 2480 } 2481 #endif 2482 #endif 2407 2483 #endif 2408 2484 if(sps->getUseSAO()) 2409 2485 { 2410 2486 READ_FLAG(uiCode, "slice_sao_luma_flag"); rpcSlice->setSaoEnabledFlag((Bool)uiCode); 2487 #if H_3D_DISABLE_CHROMA 2488 if( rpcSlice->getSPS()->getChromaFormatIdc() != 0 ) 2489 { 2411 2490 READ_FLAG(uiCode, "slice_sao_chroma_flag"); rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode); 2491 } 2492 else 2493 { 2494 rpcSlice->setSaoEnabledFlagChroma( false ); 2495 } 2496 2497 #else 2498 READ_FLAG(uiCode, "slice_sao_chroma_flag"); rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode); 2499 #endif 2412 2500 } 2413 2501 … … 2574 2662 } 2575 2663 #if H_3D_IC 2664 #if H_3D_ANNEX_SELECTION_FIX 2665 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) 2666 && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 2667 && getDecTop()->decProcAnnexI() 2668 ) 2669 #else 2576 2670 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 ) 2671 #endif 2577 2672 { 2578 2673 UInt uiCodeTmp = 0; … … 2671 2766 rpcSlice->setLFCrossSliceBoundaryFlag( (uiCode==1)?true:false); 2672 2767 2768 #if HHI_CAM_PARA_K0052 2769 #if H_3D 2770 if ( getDecTop()->decProcAnnexI() ) 2771 { 2772 Int voiInVps = vps->getVoiInVps( rpcSlice->getViewIndex() ); 2773 if( vps->getCpInSliceSegmentHeaderFlag( voiInVps ) && !rpcSlice->getIsDepth() ) 2774 { 2775 for( Int m = 0; m < vps->getNumCp( voiInVps ); m++ ) 2776 { 2777 Int jInVps = vps->getVoiInVps( vps->getCpRefVoi( voiInVps, m )); 2778 READ_SVLC( iCode, "cp_scale" ); rpcSlice->setCpScale ( jInVps, iCode ); 2779 READ_SVLC( iCode, "cp_off" ); rpcSlice->setCpOff ( jInVps, iCode ); 2780 READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); rpcSlice->setCpInvScale( jInVps, iCode - rpcSlice->getCpScale ( jInVps )); 2781 READ_SVLC( iCode, "cp_inv_off_plus_off" ); rpcSlice->setCpInvOff ( jInVps, iCode - rpcSlice->getCpOff ( jInVps )); 2782 } 2783 } 2784 } 2785 #endif 2786 #endif 2673 2787 } 2674 2788 … … 2694 2808 } 2695 2809 2810 #if !HHI_CAM_PARA_K0052 2696 2811 #if H_3D 2697 2812 #if H_3D_FCO … … 2711 2826 rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset ); 2712 2827 } 2828 #endif 2713 2829 #endif 2714 2830 … … 2984 3100 assert(0); 2985 3101 } 3102 3103 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 3104 Void TDecCavlc::parseDIS( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 3105 { 3106 assert(0); 3107 } 3108 #else 2986 3109 #if H_3D_SINGLE_DEPTH 2987 3110 Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) … … 2990 3113 } 2991 3114 #endif 3115 #endif 3116 2992 3117 Void TDecCavlc::parseCUTransquantBypassFlag( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 2993 3118 { … … 3145 3270 { 3146 3271 wpScalingParam *wp; 3272 #if H_3D_DISABLE_CHROMA 3273 Bool bChroma = ( pcSlice->getSPS()->getChromaFormatIdc() != 0 ); 3274 #else 3147 3275 Bool bChroma = true; // color always present in HEVC ? 3276 #endif 3148 3277 SliceType eSliceType = pcSlice->getSliceType(); 3149 3278 Int iNbRef = (eSliceType == B_SLICE ) ? (2) : (1); 3150 3279 UInt uiLog2WeightDenomLuma, uiLog2WeightDenomChroma; 3151 3280 UInt uiTotalSignalledWeightFlags = 0; 3152 3281 3153 3282 Int iDeltaDenom; 3154 3283 // decode delta_luma_log2_weight_denom : … … 3162 3291 uiLog2WeightDenomChroma = (UInt)(iDeltaDenom + uiLog2WeightDenomLuma); 3163 3292 } 3293 else 3294 { 3295 // For some reasons this is also needed to fix a compiler warning when H_3D_DISABLE_CHROMA is equal to 0. 3296 uiLog2WeightDenomChroma = 0; 3297 } 3298 3164 3299 3165 3300 for ( Int iNumRef=0 ; iNumRef<iNbRef ; iNumRef++ ) -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 52 52 // Class definition 53 53 // ==================================================================================================================== 54 #if H_3D_ANNEX_SELECTION_FIX 55 class TDecTop; 56 #endif 54 57 55 58 /// CAVLC decoder class … … 63 66 void parseShortTermRefPicSet (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx); 64 67 68 69 #if !HHI_CAM_PARA_K0052 65 70 #if H_3D 66 71 Int** m_aaiTempScale; 67 72 Int** m_aaiTempOffset; 68 73 #endif 74 #endif 75 #if H_3D_ANNEX_SELECTION_FIX 76 TDecTop* m_decTop; 77 #endif 78 69 79 70 80 public: … … 108 118 Void parsePPS ( TComPPS* pcPPS); 109 119 #endif 110 120 #if H_3D_ANNEX_SELECTION_FIX 121 Void setDecTop ( TDecTop* decTop ) { m_decTop = decTop; }; 122 #endif 111 123 Void parseVUI ( TComVUI* pcVUI, TComSPS* pcSPS ); 112 124 Void parseSEI ( SEIMessages& ); … … 124 136 125 137 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 138 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 139 Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 140 #else 126 141 #if H_3D_SINGLE_DEPTH 127 142 Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 128 #endif 143 #endif 144 #endif 129 145 Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 130 146 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); … … 166 182 Void parseScalingList ( TComScalingList* scalingList ); 167 183 Void xDecodeScalingList ( TComScalingList *scalingList, UInt sizeId, UInt listId); 184 185 #if H_3D_ANNEX_SELECTION_FIX 186 TDecTop* getDecTop() { return m_decTop; }; 187 #endif 188 168 189 protected: 169 190 Bool xMoreRbspData(); -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 290 290 #if H_MV_ENC_DEC_TRAC 291 291 DTRACE_CU_S("=========== coding_unit ===========\n") 292 #if H_MV_ENC_DEC_TRAC 293 #if ENC_DEC_TRACE 294 stopAtPos ( pcCU->getSlice()->getPOC(), 295 pcCU->getSlice()->getLayerId(), 296 uiLPelX, 297 uiTPelY, 298 uiRPelX-uiLPelX+1, 299 uiBPelY-uiTPelY+1); 300 #endif 301 #endif 302 292 303 #endif 293 304 … … 299 310 #if H_3D_NBDV 300 311 DisInfo DvInfo; 312 #if !SEC_ARP_REM_ENC_RESTRICT_K0035 301 313 DvInfo.bDV = false; 314 #endif 302 315 DvInfo.m_acNBDV.setZero(); 303 316 DvInfo.m_aVIdxCan = 0; … … 334 347 if( pcCU->getSlice()->getIsDepth()) 335 348 { 349 #if SEC_ARP_REM_ENC_RESTRICT_K0035 350 m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo); 351 #else 336 352 DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo); 353 #endif 337 354 } 338 355 else … … 342 359 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() ) //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done. 343 360 { 361 #if SEC_ARP_REM_ENC_RESTRICT_K0035 362 m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true); 363 #else 344 364 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true); 365 #endif 345 366 } 346 367 else 347 368 #endif 348 369 { 370 #if SEC_ARP_REM_ENC_RESTRICT_K0035 371 m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo); 372 #else 349 373 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo); 374 #endif 350 375 } 351 376 #if H_3D_IV_MERGE … … 520 545 return; 521 546 } 547 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 548 m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth ); 549 if(!pcCU->getDISFlag(uiAbsPartIdx)) 550 { 551 #else 522 552 #if H_3D_SINGLE_DEPTH 523 553 m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth ); … … 525 555 { 526 556 #endif 557 #endif 527 558 m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth ); 528 559 m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth ); 529 560 561 #if !HHI_MOVE_SYN_K0052 530 562 #if H_3D_DIM_SDC 531 563 m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 532 564 #endif 565 #endif 533 566 if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) 534 567 { … … 537 570 if(pcCU->getIPCMFlag(uiAbsPartIdx)) 538 571 { 572 #if HHI_MOVE_SYN_K0052 573 #if H_3D_DIM_SDC 574 m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 575 #endif 576 #endif 539 577 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 540 578 #if H_3D_IV_MERGE … … 550 588 // prediction mode ( Intra : direction mode, Inter : Mv, reference idx ) 551 589 m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]); 590 552 591 // Coefficient decoding 553 592 Bool bCodeDQP = getdQPFlag(); 554 593 m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP ); 555 594 setdQPFlag( bCodeDQP ); 595 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 596 } 597 #else 556 598 #if H_3D_SINGLE_DEPTH 557 599 } 600 #endif 558 601 #endif 559 602 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); … … 616 659 617 660 m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth ); 618 619 #if H_MV_ENC_DEC_TRAC620 #if ENC_DEC_TRACE621 stopAtPos ( m_ppcCU[uiDepth]->getSlice()->getPOC(),622 m_ppcCU[uiDepth]->getSlice()->getLayerId(),623 m_ppcCU[uiDepth]->getCUPelX(),624 m_ppcCU[uiDepth]->getCUPelY(),625 m_ppcCU[uiDepth]->getWidth(0),626 m_ppcCU[uiDepth]->getHeight(0) );627 #endif628 #endif629 661 630 662 switch( m_ppcCU[uiDepth]->getPredictionMode(0) ) … … 656 688 break; 657 689 case MODE_INTRA: 690 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 691 if( m_ppcCU[uiDepth]->getDISFlag(0) ) 692 { 693 xReconDIS( m_ppcCU[uiDepth], 0, uiDepth ); 694 } 695 #if H_3D_DIM_SDC 696 else if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 697 { 698 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 699 } 700 #endif 701 else 702 #else 658 703 #if H_3D_SINGLE_DEPTH 659 704 if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) ) … … 671 716 #endif 672 717 #endif 718 #endif 673 719 xReconIntraQT( m_ppcCU[uiDepth], uiDepth ); 674 720 break; … … 704 750 } 705 751 } 752 753 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 754 Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 755 { 756 UInt uiWidth = pcCU->getWidth ( 0 ); 757 UInt uiHeight = pcCU->getHeight ( 0 ); 758 759 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 760 761 UInt uiStride = pcRecoYuv->getStride (); 762 Pel* piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 763 764 765 AOF( uiWidth == uiHeight ); 766 AOF( uiAbsPartIdx == 0 ); 767 768 Bool bAboveAvail = false; 769 Bool bLeftAvail = false; 770 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 771 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, 772 m_pcPrediction->getPredicBuf (), 773 m_pcPrediction->getPredicBufWidth (), 774 m_pcPrediction->getPredicBufHeight (), 775 bAboveAvail, bLeftAvail 776 ); 777 778 if ( pcCU->getDISType(uiAbsPartIdx) == 0 ) 779 { 780 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), VER_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 781 } 782 else if ( pcCU->getDISType(uiAbsPartIdx) == 1 ) 783 { 784 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 785 } 786 else if ( pcCU->getDISType(uiAbsPartIdx) == 2 ) 787 { 788 Pel pSingleDepth = 1 << ( g_bitDepthY - 1 ); 789 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 ); 790 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 791 { 792 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 793 { 794 piReco[ uiX ] = pSingleDepth; 795 } 796 piReco+= uiStride; 797 } 798 } 799 else if ( pcCU->getDISType(uiAbsPartIdx) == 3 ) 800 { 801 Pel pSingleDepth = 1 << ( g_bitDepthY - 1 ); 802 pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 ); 803 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 804 { 805 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 806 { 807 piReco[ uiX ] = pSingleDepth; 808 } 809 piReco+= uiStride; 810 } 811 } 812 813 // clear UV 814 UInt uiStrideC = pcRecoYuv->getCStride(); 815 Pel *pRecCb = pcRecoYuv->getCbAddr(); 816 Pel *pRecCr = pcRecoYuv->getCrAddr(); 817 818 for (Int y=0; y<uiHeight/2; y++) 819 { 820 for (Int x=0; x<uiWidth/2; x++) 821 { 822 pRecCb[x] = 1<<(g_bitDepthC-1); 823 pRecCr[x] = 1<<(g_bitDepthC-1); 824 } 825 826 pRecCb += uiStrideC; 827 pRecCr += uiStrideC; 828 } 829 } 830 #else 706 831 #if H_3D_SINGLE_DEPTH 707 832 Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 772 897 } 773 898 #endif 899 #endif 900 774 901 #if H_3D_INTER_SDC 775 902 Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 835 962 // compute mask by segmenting depth block 836 963 Bool pMask[MAX_CU_SIZE*MAX_CU_SIZE]; 964 #if HS_DBBP_CLEAN_K0048 965 Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask, pcCU); 966 #else 837 967 Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask); 968 #endif 838 969 AOF(bValidMask); 839 970 -
trunk/source/Lib/TLibDecoder/TDecCu.h
r1084 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 123 123 Void setdQPFlag ( Bool b ) { m_bDecodeDQP = b; } 124 124 Void xFillPCMBuffer (TComDataCU* pCU, UInt depth); 125 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 126 Void xReconDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 127 #else 125 128 #if H_3D_SINGLE_DEPTH 126 129 Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 130 #endif 127 131 #endif 128 132 #if H_3D_DIM_SDC -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 52 52 m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth ); 53 53 } 54 55 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 56 Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 57 { 58 if( !pcCU->getSlice()->getDepthIntraSkipFlag() ) 59 { 60 return; 61 } 62 63 m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth ); 64 } 65 #else 54 66 #if H_3D_SINGLE_DEPTH 55 67 Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 63 75 } 64 76 #endif 77 #endif 78 65 79 Void TDecEntropy::decodeCUTransquantBypassFlag(TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 66 80 { … … 147 161 { 148 162 m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth ); 149 163 #if !HHI_MOVE_SYN_K0052 150 164 #if H_3D_DBBP 151 165 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) … … 154 168 } 155 169 #endif 170 #endif 156 171 } 157 172 … … 161 176 { 162 177 decodeIntraDirModeLuma ( pcCU, uiAbsPartIdx, uiDepth ); 178 #if HHI_MOVE_SYN_K0052 179 decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth ); 180 #endif 163 181 #if H_3D_DIM_SDC 182 #if H_3D_DISABLE_CHROMA 183 #if !HHI_MOVE_SYN_K0052 184 if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() ) 185 #else 186 if(!pcCU->getSDCFlag(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 187 #endif 188 #else 164 189 if(!pcCU->getSDCFlag(uiAbsPartIdx)) 190 #endif 165 191 #endif 166 192 decodeIntraDirModeChroma( pcCU, uiAbsPartIdx, uiDepth ); … … 239 265 pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx); 240 266 #endif 267 #if HHI_MOVE_SYN_K0052 241 268 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 242 269 { … … 247 274 //DTRACE_PU("x1", uiTPelY) 248 275 #endif 276 277 ////// Parse PUs syntax 249 278 decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx ); 250 279 if ( pcCU->getMergeFlag( uiSubPartIdx ) ) 251 280 { 252 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth ); 281 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth ); 282 } 283 else 284 { 285 decodeInterDirPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx ); 286 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 287 { 288 if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 289 { 290 decodeRefFrmIdxPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) ); 291 decodeMvdPU ( pcCU, uiSubPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) ); 292 decodeMVPIdxPU ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) ); 293 } 294 } 295 } 296 } 297 298 ////// Parse CUs extension syntax 299 decodeDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 300 decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth ); 301 302 #if H_3D_ARP 303 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 304 #endif 305 #if H_3D_IC 306 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 307 #endif 308 309 ////// Decode motion vectors 310 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 311 { 312 if ( pcCU->getMergeFlag( uiSubPartIdx ) ) 313 { 253 314 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 254 #if H_3D_ARP255 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth );256 #endif257 #if H_3D_IC258 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );259 #endif260 315 #if H_3D_DBBP 261 316 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false ) … … 390 445 else 391 446 { 447 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 448 { 449 if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 450 { 451 decodeMvsAMVP ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) ); 452 } 453 } 454 } 455 456 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) ) 457 { 458 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMv( TComMv(0,0), ePartSize, uiSubPartIdx, uiDepth, uiPartIdx); 459 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllRefIdx( -1, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx); 460 pcCU->setInterDirSubParts( 1, uiSubPartIdx, uiPartIdx, uiDepth); 461 } 462 } 463 #else 464 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 465 { 466 #if H_MV_ENC_DEC_TRAC 467 DTRACE_PU_S("=========== prediction_unit ===========\n") 468 // ToDo: 469 //DTRACE_PU("x0", uiLPelX) 470 //DTRACE_PU("x1", uiTPelY) 471 #endif 472 decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx ); 473 if ( pcCU->getMergeFlag( uiSubPartIdx ) ) 474 { 475 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth ); 476 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 477 #if H_3D_ARP 478 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 479 #endif 480 #if H_3D_IC 481 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 482 #endif 483 #if H_3D_DBBP 484 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false ) 485 #else 486 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 ) 487 #endif 488 { 489 pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 490 if ( !isMerged ) 491 { 492 #if H_3D_VSP 493 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 494 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 495 #if H_3D_SPIVMP 496 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 497 #endif 498 pcSubCU->initAvailableFlags(); 499 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 500 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 501 #if H_3D_SPIVMP 502 , pcMvFieldSP, puhInterDirSP 503 #endif 504 , numValidMergeCand ); 505 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 506 #if H_3D_SPIVMP 507 , bSPIVMPFlag 508 #endif 509 , numValidMergeCand ); 510 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 511 512 #else 513 #if H_3D 514 pcSubCU->initAvailableFlags(); 515 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 516 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 517 518 #else 519 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 520 #endif 521 #endif 522 isMerged = true; 523 } 524 pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth ); 525 } 526 else 527 { 528 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 529 #if H_3D_VSP 530 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 531 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 532 #if H_3D_SPIVMP 533 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 534 #endif 535 pcSubCU->initAvailableFlags(); 536 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 537 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 538 #if H_3D_SPIVMP 539 , pcMvFieldSP, puhInterDirSP 540 #endif 541 ,numValidMergeCand, uiMergeIndex ); 542 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 543 #if H_3D_SPIVMP 544 , bSPIVMPFlag 545 #endif 546 ,numValidMergeCand ); 547 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 548 #else 549 #if H_3D 550 pcSubCU->initAvailableFlags(); 551 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 552 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 553 #else 554 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 555 #endif 556 #endif 557 } 558 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 559 560 TComMv cTmpMv( 0, 0 ); 561 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 562 { 563 if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 564 { 565 pcCU->setMVPIdxSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth); 566 pcCU->setMVPNumSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth); 567 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 568 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 569 #if H_3D_VSP 570 #if H_3D_DBBP 571 if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) ) 572 #else 573 if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 ) 574 #endif 575 { 576 if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) ) 577 { 578 UInt dummy; 579 Int vspSize; 580 Int width, height; 581 pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 ); 582 pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize ); 583 pcCU->setVSPFlag( uiSubPartIdx, vspSize ); 584 } 585 } 586 #endif 587 } 588 } 589 #if H_3D_SPIVMP 590 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 591 if (bSPIVMPFlag[uiMergeIndex] != 0) 592 { 593 Int iWidth, iHeight; 594 UInt uiIdx; 595 pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true ); 596 597 UInt uiSPAddr; 598 599 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 600 601 pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 602 603 for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++) 604 { 605 pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr); 606 pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight); 607 pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight); 608 pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight); 609 } 610 } 611 #endif 612 } 613 else 614 { 392 615 decodeInterDirPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx ); 393 616 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) … … 414 637 } 415 638 } 639 #endif 416 640 #if H_3D_SPIVMP 417 641 delete[] pcMvFieldSP; … … 482 706 } 483 707 708 #if HHI_MOVE_SYN_K0052 484 709 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) 485 710 { 486 711 Int iMVPIdx = -1; 487 488 TComMv cZeroMv( 0, 0 );489 TComMv cMv = cZeroMv;490 Int iRefIdx = -1;491 492 TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList );493 AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo();494 495 iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr);496 cMv = cZeroMv;497 712 498 713 if ( (pcSubCU->getInterDir(uiPartAddr) & ( 1 << eRefList )) ) … … 512 727 #endif 513 728 } 729 pcSubCU->setMVPIdxSubParts( iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth ); 730 } 731 732 Void TDecEntropy::decodeMvsAMVP( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) 733 { 734 TComMv cZeroMv( 0, 0 ); 735 TComMv cMv = cZeroMv; 736 Int iRefIdx = -1; 737 738 TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList ); 739 AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo(); 740 741 iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr); 742 cMv = cZeroMv; 743 744 pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo); 745 pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth); 746 if ( iRefIdx >= 0 ) 747 { 748 m_pcPrediction->getMvPredAMVP( pcSubCU, uiPartIdx, uiPartAddr, eRefList, cMv); 749 cMv += pcSubCUMvField->getMvd( uiPartAddr ); 750 } 751 752 PartSize ePartSize = pcSubCU->getPartitionSize( uiPartAddr ); 753 pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx); 754 } 755 756 #else 757 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) 758 { 759 Int iMVPIdx = -1; 760 761 TComMv cZeroMv( 0, 0 ); 762 TComMv cMv = cZeroMv; 763 Int iRefIdx = -1; 764 765 TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList ); 766 AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo(); 767 768 iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr); 769 cMv = cZeroMv; 770 771 if ( (pcSubCU->getInterDir(uiPartAddr) & ( 1 << eRefList )) ) 772 { 773 m_pcEntropyDecoderIf->parseMVPIdx( iMVPIdx ); 774 #if H_MV_ENC_DEC_TRAC 775 #if ENC_DEC_TRACE 776 if ( eRefList == REF_PIC_LIST_0 ) 777 { 778 DTRACE_PU("mvp_l0_flag", iMVPIdx) 779 } 780 else 781 { 782 DTRACE_PU("mvp_l1_flag", iMVPIdx) 783 } 784 #endif 785 #endif 786 } 514 787 pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo); 515 788 pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth); … … 524 797 pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx); 525 798 } 526 799 #endif 527 800 Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU) 528 801 { 802 803 #if H_MV_ENC_DEC_TRAC 804 #if ENC_DEC_TRACE 805 UInt uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ]; 806 UInt uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; 807 808 DTRACE_TU_S("=========== transform_tree ===========\n") 809 DTRACE_TU("x0", uiLPelX) 810 DTRACE_TU("x1", uiTPelY) 811 DTRACE_TU("log2TrafoSize", g_uiMaxCUWidth>>uiDepth) 812 DTRACE_TU("trafoDepth" , uiDepth) 813 #endif 814 #endif 815 529 816 UInt uiSubdiv; 530 817 const UInt uiLog2TrafoSize = g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()]+2 - uiDepth; … … 579 866 if( bFirstCbfOfCU || uiLog2TrafoSize > 2 ) 580 867 { 868 #if H_3D_DISABLE_CHROMA 869 if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 870 { 581 871 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) ) 582 872 { … … 587 877 m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth ); 588 878 } 879 } 880 else 881 { 882 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) ) 883 { 884 pcCU->setCbfSubParts( 0, TEXT_CHROMA_U, uiAbsPartIdx, uiTrDepth - 1 ); 885 } 886 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) ) 887 { 888 pcCU->setCbfSubParts( 0, TEXT_CHROMA_V, uiAbsPartIdx, uiTrDepth - 1 ); 889 } 890 } 891 #else 892 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) ) 893 { 894 m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth ); 895 } 896 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) ) 897 { 898 m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth ); 899 } 900 #endif 589 901 } 590 902 else … … 748 1060 assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 ); 749 1061 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 ); 1062 #if H_3D_DISABLE_CHROMA 1063 if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 1064 { 1065 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 1066 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 1067 } 1068 #else 750 1069 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 751 1070 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 1071 #endif 752 1072 } 753 1073 … … 811 1131 { 812 1132 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 1133 #if HHI_MOVE_SYN_K0052 1134 if ( pcCU->isSkipped( uiAbsPartIdx ) ) 1135 { 1136 return; 1137 } 1138 #endif 1139 813 1140 814 1141 if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getInterSdcFlag() ) || … … 830 1157 Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 831 1158 { 832 m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 1159 #if HHI_MOVE_SYN_K0052 1160 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) 1161 { 1162 #endif 1163 m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 1164 #if HHI_MOVE_SYN_K0052 1165 } 1166 #endif 833 1167 } 834 1168 #endif -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 85 85 public: 86 86 virtual Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 87 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 88 virtual Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 89 #else 87 90 #if H_3D_SINGLE_DEPTH 88 91 virtual Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 92 #endif 89 93 #endif 90 94 virtual Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 148 152 Void decodeMvdPU ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 149 153 Void decodeMVPIdxPU ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 150 154 #if HHI_MOVE_SYN_K0052 155 Void decodeMvsAMVP ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 156 #endif 151 157 Void setEntropyDecoder ( TDecEntropyIf* p ); 152 158 Void setBitstream ( TComInputBitstream* p ) { m_pcEntropyDecoderIf->setBitstream(p); } … … 171 177 Void decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 172 178 Void decodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 179 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 180 Void decodeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ; 181 #else 173 182 #if H_3D_SINGLE_DEPTH 174 183 Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ; 184 #endif 175 185 #endif 176 186 Void decodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r1084 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 92 92 m_pcSliceDecoder = pcSliceDecoder; 93 93 m_pcLoopFilter = pcLoopFilter; 94 m_pcSAO = pcSAO; 94 m_pcSAO = pcSAO; 95 95 } 96 96 -
trunk/source/Lib/TLibDecoder/TDecGop.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 56 56 #include "TDecBinCoderCABAC.h" 57 57 58 58 59 //! \ingroup TLibDecoder 59 60 //! \{ … … 62 63 // Class definition 63 64 // ==================================================================================================================== 65 #if H_3D_ANNEX_SELECTION_FIX 66 class TDecTop; 67 #endif 68 64 69 65 70 /// GOP decoder class … … 78 83 TDecSlice* m_pcSliceDecoder; 79 84 TComLoopFilter* m_pcLoopFilter; 85 #if H_3D_ANNEX_SELECTION_FIX 86 TDecTop* m_decTop; 87 #endif 80 88 81 89 TComSampleAdaptiveOffset* m_pcSAO; -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 52 52 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels ) 53 53 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 54 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 55 , m_cCUDISFlagSCModel ( 1, 1, NUM_DIS_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 56 , m_cCUDISTypeSCModel ( 1, 1, NUM_DIS_TYPE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 57 #else 54 58 #if H_3D_SINGLE_DEPTH 55 59 , m_cCUSingleDepthFlagSCModel ( 1, 1, NUM_SINGLEDEPTH_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 56 60 , m_cSingleDepthValueSCModel ( 1, 1, NUM_SINGLE_DEPTH_VALUE_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 61 #endif 57 62 #endif 58 63 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 136 141 m_cCUSplitFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 137 142 m_cCUSkipFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SKIP_FLAG ); 143 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 144 m_cCUDISFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_FLAG ); 145 m_cCUDISTypeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_TYPE ); 146 #else 138 147 #if H_3D_SINGLE_DEPTH 139 148 m_cCUSingleDepthFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 140 149 m_cSingleDepthValueSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); 150 #endif 141 151 #endif 142 152 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); … … 207 217 m_cCUSplitFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG ); 208 218 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 219 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 220 m_cCUDISFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG ); 221 m_cCUDISTypeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE ); 222 #else 209 223 #if H_3D_SINGLE_DEPTH 210 224 m_cCUSingleDepthFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 211 225 m_cSingleDepthValueSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); 226 #endif 212 227 #endif 213 228 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT ); … … 486 501 } 487 502 503 504 #if H_3D_DISABLE_CHROMA 505 if( pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 506 { 507 #endif 488 508 piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset; 489 509 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2; … … 517 537 piPCMSample += uiWidth; 518 538 } 539 #if H_3D_DISABLE_CHROMA 540 } 541 #endif 542 519 543 520 544 m_pcTDecBinIf->start(); … … 570 594 #endif 571 595 } 596 597 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 598 Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 599 { 600 pcCU->setDISFlagSubParts( false, uiAbsPartIdx, uiDepth ); 601 UInt uiSymbol = 0; 602 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) ); 603 if( uiSymbol ) 604 { 605 pcCU->setDISFlagSubParts( true, uiAbsPartIdx, uiDepth ); 606 pcCU->setSkipFlagSubParts( false, uiAbsPartIdx, uiDepth ); 607 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 608 pcCU->setPredModeSubParts( MODE_INTRA, uiAbsPartIdx, uiDepth ); 609 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 610 pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth ); 611 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 612 pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 613 pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth); 614 pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth); 615 616 UInt uiUnaryIdx = 0; 617 UInt uiNumCand = 4; 618 619 if ( uiNumCand > 1 ) 620 { 621 for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx ) 622 { 623 UInt uiSymbol2 = 0; 624 if ( uiUnaryIdx==0 ) 625 { 626 m_pcTDecBinIf->decodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) ); 627 } 628 else 629 { 630 m_pcTDecBinIf->decodeBinEP( uiSymbol2); 631 } 632 if( uiSymbol2 == 0 ) 633 { 634 break; 635 } 636 } 637 } 638 pcCU->setDISTypeSubParts(uiUnaryIdx, uiAbsPartIdx, 0, uiDepth); 639 } 640 } 641 #else 572 642 #if H_3D_SINGLE_DEPTH 573 643 Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 616 686 } 617 687 } 618 619 #endif 688 #endif 689 #endif 690 620 691 /** parse merge flag 621 692 * \param pcCU … … 1304 1375 DTRACE_CABAC_V( uiLog2TransformBlockSize ) 1305 1376 DTRACE_CABAC_T( "\n" ) 1377 #else 1378 DTRACE_TU("split_transform_flag", ruiSubdivFlag ) 1306 1379 #endif 1307 1380 } … … 1382 1455 DTRACE_CABAC_V( uiAbsPartIdx ) 1383 1456 DTRACE_CABAC_T( "\n" ) 1457 #else 1458 if ( eType == TEXT_CHROMA_U ) 1459 { 1460 DTRACE_TU("cbf_cb", uiSymbol ) 1461 } 1462 else if ( eType == TEXT_CHROMA_V ) 1463 { 1464 DTRACE_TU("cbf_cr", uiSymbol ) 1465 } 1466 else 1467 { 1468 DTRACE_TU("cbf_luma", uiSymbol ) 1469 } 1384 1470 #endif 1385 1471 … … 2105 2191 2106 2192 m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) ); 2107 2193 DTRACE_CU("dc_only_flag", uiSymbol) 2108 2194 if( uiSymbol ) 2109 2195 { … … 2129 2215 2130 2216 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) ); 2131 2217 DTRACE_CU("dbbp_flag", uiSymbol) 2132 2218 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx ); 2133 2219 AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N ); -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 125 125 126 126 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 127 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 128 Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 129 #else 127 130 #if H_3D_SINGLE_DEPTH 128 131 Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 129 #endif 132 #endif 133 #endif 130 134 Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 131 135 Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 178 182 ContextModel3DBuffer m_cCUSplitFlagSCModel; 179 183 ContextModel3DBuffer m_cCUSkipFlagSCModel; 184 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 185 ContextModel3DBuffer m_cCUDISFlagSCModel; 186 ContextModel3DBuffer m_cCUDISTypeSCModel; 187 #else 180 188 #if H_3D_SINGLE_DEPTH 181 189 ContextModel3DBuffer m_cCUSingleDepthFlagSCModel; 182 190 ContextModel3DBuffer m_cSingleDepthValueSCModel; 191 #endif 183 192 #endif 184 193 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; -
trunk/source/Lib/TLibDecoder/TDecSlice.cpp
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecSlice.h
r872 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 76 76 xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 77 77 xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 78 #if HHI_CAM_PARA_K0052 79 xDeleteArray( m_receivedIdc, m_vps->getNumViews() ); 80 #else 78 81 xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 ); 82 #endif 79 83 } 80 84 … … 91 95 m_firstReceivedPoc = -2; 92 96 97 #if HHI_CAM_PARA_K0052 98 for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++) 99 { 100 Int curViewIdxInVps = m_vps->getVoiInVps( m_vps->getViewIndex( m_vps->getLayerIdInNuh( i ) ) ) ; 101 m_bCamParsVaryOverTime = m_bCamParsVaryOverTime || vps->getCpInSliceSegmentHeaderFlag( curViewIdxInVps ); 102 } 103 104 assert( m_receivedIdc == NULL ); 105 m_receivedIdc = new Int*[ m_vps->getNumViews() ]; 106 for (Int i = 0; i < m_vps->getNumViews(); i++) 107 { 108 m_receivedIdc[i] = new Int[ m_vps->getNumViews() ]; 109 } 110 111 xResetReceivedIdc( true ); 112 113 for (Int voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ ) 114 { 115 if( !m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) 116 { 117 for (Int baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ ) 118 { 119 if( m_vps->getCpPresentFlag( voiInVps, baseVoiInVps ) ) 120 { 121 m_receivedIdc [ baseVoiInVps ][ voiInVps ] = -1; 122 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] = m_vps->getCodedScale (voiInVps) [ baseVoiInVps ]; 123 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] = m_vps->getCodedOffset (voiInVps) [ baseVoiInVps ]; 124 125 m_receivedIdc [ voiInVps ][ baseVoiInVps ] = -1; 126 m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] = m_vps->getInvCodedScale (voiInVps) [ baseVoiInVps ]; 127 m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] = m_vps->getInvCodedOffset(voiInVps) [ baseVoiInVps ]; 128 xInitLUTs( baseVoiInVps, voiInVps, m_aaiCodedScale[ baseVoiInVps ][ voiInVps ], m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 129 xInitLUTs( voiInVps, baseVoiInVps, m_aaiCodedScale[ voiInVps ][ baseVoiInVps ], m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 130 } 131 } 132 } 133 } 134 } 135 136 #else 93 137 m_uiMaxViewIndex = -1; 94 138 for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++) … … 98 142 m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, curViewIdx ) ; 99 143 } 100 101 144 assert( m_receivedIdc == NULL ); 102 145 m_receivedIdc = new Int*[ m_uiMaxViewIndex + 1]; … … 131 174 } 132 175 176 #endif 177 178 179 133 180 Void 134 181 CamParsCollector::xResetReceivedIdc( Bool overWriteFlag ) 135 182 { 183 #if HHI_CAM_PARA_K0052 184 for (Int i = 0; i < m_vps->getNumViews(); i++) 185 { 186 for (Int j = 0; j < m_vps->getNumViews(); j++) 187 { 188 #else 136 189 for (Int i = 0; i <= m_uiMaxViewIndex; i++) 137 190 { 138 191 for (Int j = 0; j <= m_uiMaxViewIndex; j++) 139 192 { 193 #endif 140 194 if ( overWriteFlag || ( m_receivedIdc[i][j] != -1 ) ) 141 195 { … … 178 232 CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT) 179 233 { 234 #if HHI_CAM_PARA_K0052 235 Int iLog2DivLuma = m_uiBitDepthForLUT + m_vps->getCpPrecision() + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 236 #else 180 237 Int iLog2DivLuma = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 238 #endif 181 239 Int iLog2DivChroma = iLog2DivLuma + 1; 182 240 … … 255 313 } 256 314 315 #if HHI_CAM_PARA_K0052 316 UInt voiInVps = m_vps->getVoiInVps(pcSlice->getViewIndex()); 317 if( m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) // check consistency of slice parameters here 318 { 319 for( Int baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ ) 320 { 321 if ( m_vps->getCpPresentFlag( voiInVps, baseVoiInVps ) ) 322 { 323 if ( m_receivedIdc[ voiInVps ][ baseVoiInVps ] != 0 ) 324 { 325 AOF( m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] == pcSlice->getInvCodedScale () [ baseVoiInVps ] ); 326 AOF( m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] == pcSlice->getInvCodedOffset() [ baseVoiInVps ] ); 327 } 328 else 329 { 330 m_receivedIdc [ voiInVps ][ baseVoiInVps ] = 1; 331 m_aaiCodedScale [ voiInVps ][ baseVoiInVps ] = pcSlice->getInvCodedScale () [ baseVoiInVps ]; 332 m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ] = pcSlice->getInvCodedOffset() [ baseVoiInVps ]; 333 xInitLUTs( voiInVps, baseVoiInVps, m_aaiCodedScale[ voiInVps ][ baseVoiInVps ], m_aaiCodedOffset[ voiInVps ][ baseVoiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT); 334 } 335 if ( m_receivedIdc[ baseVoiInVps ][ voiInVps ] != 0 ) 336 { 337 AOF( m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] == pcSlice->getCodedScale () [ baseVoiInVps ] ); 338 AOF( m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] == pcSlice->getCodedOffset () [ baseVoiInVps ] ); 339 } 340 else 341 { 342 m_receivedIdc [ baseVoiInVps ][ voiInVps ] = 1; 343 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ] = pcSlice->getCodedScale () [ baseVoiInVps ]; 344 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ] = pcSlice->getCodedOffset () [ baseVoiInVps ]; 345 xInitLUTs( baseVoiInVps, voiInVps, m_aaiCodedScale[ baseVoiInVps ][ voiInVps ], m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT); 346 } 347 } 348 } 349 } 350 #else 257 351 UInt uiViewIndex = pcSlice->getViewIndex(); 258 352 if( m_vps->getCamParPresent( uiViewIndex ) ) … … 289 383 } 290 384 } 385 #endif 386 387 291 388 } 292 389 … … 311 408 if( iPOC == m_firstReceivedPoc ) 312 409 { 410 #if HHI_CAM_PARA_K0052 411 fprintf( m_pCodedScaleOffsetFile, "#ViewOrderIdx ViewIdVal\n" ); 412 fprintf( m_pCodedScaleOffsetFile, "#------------ -------------\n" ); 413 414 for( UInt voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ ) 415 { 416 fprintf( m_pCodedScaleOffsetFile, "%13d %13d\n", m_vps->getViewOIdxList( voiInVps ), m_vps->getViewIdVal( m_vps->getViewOIdxList( voiInVps ) ) ); 417 } 418 fprintf( m_pCodedScaleOffsetFile, "\n\n"); 419 fprintf( m_pCodedScaleOffsetFile, "# StartFrame EndFrame TargetVOI BaseVOI CodedScale CodedOffset Precision\n" ); 420 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" ); 421 } 422 if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime ) 423 { 424 Int iS = iPOC; 425 Int iE = ( m_bCamParsVaryOverTime ? iPOC : ~( 1 << 31 ) ); 426 for( UInt voiInVps = 0; voiInVps < m_vps->getNumViews(); voiInVps++ ) 427 { 428 for( UInt baseVoiInVps = 0; baseVoiInVps < m_vps->getNumViews(); baseVoiInVps++ ) 429 { 430 if( voiInVps != baseVoiInVps ) 431 { 432 if ( m_receivedIdc[baseVoiInVps][voiInVps] != 0 ) 433 { 434 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 435 iS, iE, m_vps->getViewOIdxList( voiInVps ), m_vps->getViewOIdxList( baseVoiInVps ), 436 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ], 437 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_vps->getCpPrecision() ); 438 #else 313 439 fprintf( m_pCodedScaleOffsetFile, "# ViewIndex ViewId\n" ); 314 440 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" ); … … 325 451 Int iS = iPOC; 326 452 Int iE = ( m_bCamParsVaryOverTime ? iPOC : ~( 1 << 31 ) ); 453 #if HHI_CAM_PARA_K0052 454 for( UInt uiViewIndex = 0; uiViewIndex < m_vps->getNumViews(); uiViewIndex++ ) 455 { 456 for( UInt uiBaseIndex = 0; uiBaseIndex < m_vps->getNumViews(); uiBaseIndex++ ) 457 #else 327 458 for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ ) 328 459 { 329 460 for( UInt uiBaseIndex = 0; uiBaseIndex <= m_uiMaxViewIndex; uiBaseIndex++ ) 461 #endif 330 462 { 331 463 if( uiViewIndex != uiBaseIndex ) … … 333 465 if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 ) 334 466 { 467 #if HHI_CAM_PARA_K0052 468 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 469 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCpPrecision() ); 470 #else 335 471 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 336 472 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() ); 473 #endif 474 #endif 337 475 } 338 476 } … … 417 555 #if !H_MV 418 556 initROM(); 557 #endif 558 #if H_3D_ANNEX_SELECTION_FIX 559 m_cCavlcDecoder.setDecTop( this ); 419 560 #endif 420 561 m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO ); … … 727 868 #endif 728 869 #if H_3D 870 #if !HHI_INTER_COMP_PRED_K0052 729 871 m_apcSlicePilot->init3dToolParameters(); 872 #endif 730 873 #endif 731 874 pps->setSPS(sps); … … 955 1098 xActivateParameterSets(); 956 1099 1100 #if SONY_MV_V_CONST_C0078 1101 //Check Multiview Main profile constraint in G.11.1.1 1102 // When ViewOrderIdx[ i ] derived according to any active VPS is equal to 1 1103 // for the layer with nuh_layer_id equal to i in subBitstream, 1104 // inter_view_mv_vert_constraint_flag shall be equal to 1 1105 // in the sps_multilayer_extension( ) syntax structure in each active SPS for that layer. 1106 if( m_apcSlicePilot->getSPS()->getPTL()->getGeneralPTL()->getProfileIdc()==Profile::MULTIVIEWMAIN 1107 && 1108 m_apcSlicePilot->getVPS()->getViewOrderIdx(m_apcSlicePilot->getVPS()->getLayerIdInNuh(getLayerId()))==1 1109 ) 1110 { 1111 assert( m_apcSlicePilot->getSPS()->getInterViewMvVertConstraintFlag()==1 ); 1112 } 1113 #endif 1114 957 1115 if (m_apcSlicePilot->isNextSlice()) 958 1116 { … … 1074 1232 #endif 1075 1233 #endif 1234 #if HHI_RES_PRED_K0052 1235 pcSlice->setIvPicLists( m_ivPicLists ); 1236 #endif 1237 1076 1238 if (bNextSlice) 1077 1239 { … … 1109 1271 1110 1272 #if H_3D 1273 #if !HHI_RES_PRED_K0052 1111 1274 pcSlice->setIvPicLists( m_ivPicLists ); 1275 #endif 1276 1277 #if HHI_INTER_COMP_PRED_K0052 1278 pcSlice->checkInCompPredRefLayers(); 1112 1279 #if H_3D_IV_MERGE 1113 1280 #if H_3D_FCO … … 1117 1284 #endif 1118 1285 #endif 1286 #else 1287 #if H_3D_IV_MERGE 1288 #if H_3D_FCO 1289 //assert( !getIsDepth() ); 1290 #else 1291 assert( !getIsDepth() || ( pcSlice->getTexturePic() != 0 ) ); 1292 #endif 1293 #endif 1294 #endif 1119 1295 #endif 1120 1296 #if H_MV -
trunk/source/Lib/TLibDecoder/TDecTop.h
r1133 r1179 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 4, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 97 97 TComVPS* m_vps; 98 98 Int** m_receivedIdc; 99 #if!HHI_CAM_PARA_K0052 99 100 Int m_uiMaxViewIndex; 101 #endif 100 102 Int m_lastPoc; 101 103 Int m_firstReceivedPoc; … … 243 245 CamParsCollector* m_pcCamParsCollector; 244 246 #endif 247 #if H_3D_ANNEX_SELECTION_FIX 248 Int m_profileIdc; 249 #endif 245 250 #endif 246 251 … … 301 306 Void setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; } 302 307 #endif 308 #if H_3D_ANNEX_SELECTION_FIX 309 Void setProfileIdc() 310 { 311 if (m_targetOptLayerSetIdx != -1 ) 312 { 313 TComVPS* vps = getPrefetchedVPS(); 314 Int lsIdx = vps->olsIdxToLsIdx( m_targetOptLayerSetIdx ); 315 Int lIdx = -1; 316 for (Int j = 0; j < vps->getNumLayersInIdList( lsIdx ); j++ ) 317 { 318 if ( vps->getLayerSetLayerIdList( lsIdx, j ) == getLayerId() ) 319 { 320 lIdx = j; 321 break; 322 } 323 } 324 assert( lIdx != -1 ); 325 326 Int profileIdc = vps->getPTL( vps->getProfileTierLevelIdx( m_targetOptLayerSetIdx, lIdx ) )->getGeneralPTL()->getProfileIdc(); 327 assert( profileIdc == 1 || profileIdc == 6 || profileIdc == 8 ); 328 m_profileIdc = profileIdc; 329 }; 330 } 331 Bool decProcAnnexI() { assert( m_profileIdc != -1 ); return ( m_profileIdc == 8); } 332 #endif 333 303 334 #endif 304 335 protected:
Note: See TracChangeset for help on using the changeset viewer.