Changeset 748 in 3DVCSoftware for branches/HTM-9.1-dev0-ZTE
- Timestamp:
- 18 Dec 2013, 09:00:24 (11 years ago)
- Location:
- branches/HTM-9.1-dev0-ZTE
- Files:
-
- 1 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.1-dev0-ZTE/source/App/TAppEncoder/TAppEncTop.cpp
r738 r748 76 76 #endif 77 77 78 #if DLT_DIFF_CODING_IN_PPS 79 TComDLT& dlt = m_dlt; 80 #endif 81 78 82 #if H_MV 79 83 Int maxTempLayer = -1; … … 125 129 #if H_3D 126 130 xSetVPSExtension2 ( vps ); 127 m_ivPicLists.setVPS ( &vps ); 131 m_ivPicLists.setVPS ( &vps ); 132 #if DLT_DIFF_CODING_IN_PPS 133 xDeriveDltArray ( vps, dlt ); 134 #endif 128 135 #endif 129 136 … … 218 225 // H_MV 219 226 m_cTEncTop.setVPS(&vps); 227 228 #if DLT_DIFF_CODING_IN_PPS 229 m_cTEncTop.setDLT(&dlt); 230 #endif 220 231 221 232 m_cTEncTop.setProfile(m_profile); … … 1247 1258 1248 1259 #if H_3D_DIM_DLT 1260 #if DLT_DIFF_CODING_IN_PPS 1261 Void TAppEncTop::xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps, TComDLT* dlt) 1262 #else 1249 1263 Void TAppEncTop::xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps) 1264 #endif 1250 1265 { 1251 1266 TComPicYuv* pcDepthPicYuvOrg = new TComPicYuv; … … 1307 1322 if( uiNumFrames == 0 || numBitsForValue(iNumDepthValues) == g_bitDepthY ) 1308 1323 { 1324 #if DLT_DIFF_CODING_IN_PPS 1325 dlt->setUseDLTFlag(layer, false); 1326 #else 1309 1327 // don't use DLT 1310 1328 vps->setUseDLTFlag(layer, false); 1329 #endif 1311 1330 } 1312 1331 1313 1332 // assign LUT 1333 #if DLT_DIFF_CODING_IN_PPS 1334 if( dlt->getUseDLTFlag(layer) ) 1335 dlt->setDepthLUTs(layer, aiIdx2DepthValue, iNumDepthValues); 1336 #else 1314 1337 if( vps->getUseDLTFlag(layer) ) 1315 1338 vps->setDepthLUTs(layer, aiIdx2DepthValue, iNumDepthValues); 1339 #endif 1316 1340 1317 1341 // free temporary memory … … 1967 1991 #endif 1968 1992 #if H_3D_DIM_DLT 1993 #if !DLT_DIFF_CODING_IN_PPS 1969 1994 vps.setUseDLTFlag( layer , isDepth && m_useDLT ); 1970 1995 if( vps.getUseDLTFlag( layer ) ) … … 1976 2001 #endif 1977 2002 } 2003 #endif 1978 2004 #endif 1979 2005 #endif … … 2011 2037 } 2012 2038 #endif 2039 2040 #if DLT_DIFF_CODING_IN_PPS 2041 Void TAppEncTop::xDeriveDltArray( TComVPS& vps, TComDLT& dlt ) 2042 { 2043 Int iNumDepthViews = 0; 2044 Bool bDltPresentFlag = false; 2045 2046 for ( Int layer = 0; layer <= vps.getMaxLayersMinus1(); layer++ ) 2047 { 2048 Bool isDepth = ( vps.getDepthId( layer ) == 1 ); 2049 2050 if ( isDepth ) 2051 { 2052 iNumDepthViews++; 2053 } 2054 2055 dlt.setUseDLTFlag( layer , isDepth && m_useDLT ); 2056 if( dlt.getUseDLTFlag( layer ) ) 2057 { 2058 xAnalyzeInputBaseDepth(layer, max(m_iIntraPeriod[layer], 24), &vps, &dlt); 2059 bDltPresentFlag = bDltPresentFlag || dlt.getUseDLTFlag(layer); 2060 } 2061 } 2062 2063 dlt.setDltPresentFlag( bDltPresentFlag ); 2064 dlt.setNumDepthViews ( iNumDepthViews ); 2065 } 2066 #endif 2013 2067 #endif 2014 2068 //! \} -
branches/HTM-9.1-dev0-ZTE/source/App/TAppEncoder/TAppEncTop.h
r738 r748 86 86 #endif 87 87 88 #if DLT_DIFF_CODING_IN_PPS 89 TComDLT m_dlt; ///< dlt 90 #endif 91 88 92 UInt m_essentialBytes; 89 93 UInt m_totalBytes; … … 135 139 Void xSetVPSExtension2( TComVPS& vps ); 136 140 #endif 141 #if DLT_DIFF_CODING_IN_PPS 142 Void xDeriveDltArray( TComVPS& vps, TComDLT& dlt ); 143 #endif 137 144 #if H_3D_DIM_DLT 145 #if DLT_DIFF_CODING_IN_PPS 146 Void xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps, TComDLT* dlt); 147 #else 138 148 Void xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps); 149 #endif 139 150 #endif 140 151 public: -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibCommon/TComPrediction.cpp
r724 r748 506 506 { 507 507 #if H_3D_DIM_DLT 508 #if DLT_DIFF_CODING_IN_PPS 509 segDC1 = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC1 ) + deltaDC1 ); 510 segDC2 = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC2 ) + deltaDC2 ); 511 #else 508 512 segDC1 = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC1 ) + deltaDC1 ); 509 513 segDC2 = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC2 ) + deltaDC2 ); 514 #endif 510 515 #else 511 516 segDC1 = ClipY( predDC1 + deltaDC1 ); -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibCommon/TComSlice.cpp
r738 r748 1816 1816 m_vpsDepthModesFlag [i] = false; 1817 1817 #if H_3D_DIM_DLT 1818 #if !DLT_DIFF_CODING_IN_PPS 1818 1819 m_bUseDLTFlag [i] = false; 1819 1820 … … 1832 1833 } 1833 1834 #endif 1835 #endif 1834 1836 #if H_3D 1835 1837 m_ivMvScalingFlag = true; … … 1902 1904 if (m_repFormat[ i ] != NULL ) delete m_repFormat[ i ]; 1903 1905 #if H_3D_DIM_DLT 1906 #if !DLT_DIFF_CODING_IN_PPS 1904 1907 if ( m_iDepthValue2Idx[i] != 0 ) 1905 1908 { … … 1914 1917 } 1915 1918 #endif 1919 #endif 1916 1920 } 1917 1921 #endif … … 1919 1923 1920 1924 #if H_3D_DIM_DLT 1925 #if !DLT_DIFF_CODING_IN_PPS 1921 1926 Void TComVPS::setDepthLUTs(Int layerIdInVps, Int* idxToDepthValueTable, Int iNumDepthValues) 1922 1927 { … … 1979 1984 m_iBitsPerDepthValue[layerIdInVps] = numBitsForValue(m_iNumDepthmapValues[layerIdInVps]); 1980 1985 } 1986 #endif 1981 1987 #endif 1982 1988 … … 2444 2450 , m_ppsInferScalingListFlag(false) 2445 2451 , m_ppsScalingListRefLayerId(0) 2452 #if DLT_DIFF_CODING_IN_PPS 2453 , m_pcDLT(NULL) 2454 #endif 2446 2455 #endif 2447 2456 { … … 2463 2472 delete m_scalingList; 2464 2473 } 2474 2475 #if DLT_DIFF_CODING_IN_PPS 2476 TComDLT::TComDLT() 2477 : m_bDltPresentFlag(false) 2478 , m_iNumDepthViews(0) 2479 , m_uiDepthViewBitDepth(8) 2480 { 2481 m_uiDepthViewBitDepth = g_bitDepthY; 2482 2483 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) 2484 { 2485 m_bUseDLTFlag [i] = false; 2486 m_bInterViewDltPredEnableFlag [i] = false; 2487 2488 // allocate some memory and initialize with default mapping 2489 m_iNumDepthmapValues[i] = ((1 << m_uiDepthViewBitDepth)-1)+1; 2490 m_iBitsPerDepthValue[i] = numBitsForValue(m_iNumDepthmapValues[i]); 2491 2492 m_iDepthValue2Idx[i] = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]); 2493 m_iIdx2DepthValue[i] = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]); 2494 2495 //default mapping 2496 for (Int d=0; d<m_iNumDepthmapValues[i]; d++) 2497 { 2498 m_iDepthValue2Idx[i][d] = d; 2499 m_iIdx2DepthValue[i][d] = d; 2500 } 2501 } 2502 } 2503 2504 TComDLT::~TComDLT() 2505 { 2506 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) 2507 { 2508 if ( m_iDepthValue2Idx[i] != NULL ) 2509 { 2510 xFree( m_iDepthValue2Idx[i] ); 2511 m_iDepthValue2Idx[i] = NULL; 2512 } 2513 2514 if ( m_iIdx2DepthValue[i] != NULL ) 2515 { 2516 xFree( m_iIdx2DepthValue[i] ); 2517 m_iIdx2DepthValue[i] = NULL; 2518 } 2519 } 2520 } 2521 2522 Void TComDLT::setDepthLUTs(Int layerIdInVps, Int* idxToDepthValueTable, Int iNumDepthValues) 2523 { 2524 if( idxToDepthValueTable == NULL || iNumDepthValues == 0 ) // default mapping only 2525 return; 2526 2527 // copy idx2DepthValue to internal array 2528 memcpy(m_iIdx2DepthValue[layerIdInVps], idxToDepthValueTable, iNumDepthValues*sizeof(UInt)); 2529 2530 UInt uiMaxDepthValue = ((1 << g_bitDepthY)-1); 2531 for(Int p=0; p<=uiMaxDepthValue; p++) 2532 { 2533 Int iIdxDown = 0; 2534 Int iIdxUp = iNumDepthValues-1; 2535 Bool bFound = false; 2536 2537 // iterate over indices to find lower closest depth 2538 Int i = 1; 2539 while(!bFound && i<iNumDepthValues) 2540 { 2541 if( m_iIdx2DepthValue[layerIdInVps][i] > p ) 2542 { 2543 iIdxDown = i-1; 2544 bFound = true; 2545 } 2546 2547 i++; 2548 } 2549 // iterate over indices to find upper closest depth 2550 i = iNumDepthValues-2; 2551 bFound = false; 2552 while(!bFound && i>=0) 2553 { 2554 if( m_iIdx2DepthValue[layerIdInVps][i] < p ) 2555 { 2556 iIdxUp = i+1; 2557 bFound = true; 2558 } 2559 2560 i--; 2561 } 2562 2563 // assert monotony 2564 assert(iIdxDown<=iIdxUp); 2565 2566 // assign closer depth value/idx 2567 if( abs(p-m_iIdx2DepthValue[layerIdInVps][iIdxDown]) < abs(p-m_iIdx2DepthValue[layerIdInVps][iIdxUp]) ) 2568 { 2569 m_iDepthValue2Idx[layerIdInVps][p] = iIdxDown; 2570 } 2571 else 2572 { 2573 m_iDepthValue2Idx[layerIdInVps][p] = iIdxUp; 2574 } 2575 2576 } 2577 2578 // update DLT variables 2579 m_iNumDepthmapValues[layerIdInVps] = iNumDepthValues; 2580 m_iBitsPerDepthValue[layerIdInVps] = numBitsForValue(m_iNumDepthmapValues[layerIdInVps]); 2581 } 2582 #endif 2465 2583 2466 2584 #if H_MV … … 3707 3825 // It is a requirement of bitstream conformance that bitstream partition with index j shall not include 3708 3826 // direct or indirect reference layers of any layers in bitstream partition i for any values of i and j 3709 // in the range of 0 to num_bitstream_partitions[ h ] 1, inclusive, such that i is less than j.3827 // in the range of 0 to num_bitstream_partitions[ h ] ?1, inclusive, such that i is less than j. 3710 3828 3711 3829 for ( Int partJ = 0; partJ < getNumBitstreamPartitions( h ); partJ++ ) -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibCommon/TComSlice.h
r738 r748 849 849 #endif 850 850 Bool m_vpsDepthModesFlag [MAX_NUM_LAYERS ]; 851 851 852 #if H_3D_DIM_DLT 853 #if !DLT_DIFF_CODING_IN_PPS 852 854 Bool m_bUseDLTFlag [MAX_NUM_LAYERS ]; 853 855 … … 857 859 Int* m_iIdx2DepthValue [MAX_NUM_LAYERS ]; 858 860 #endif 861 #endif 862 859 863 #if H_3D 860 864 Bool m_ivMvScalingFlag; … … 1157 1161 Void setVpsDepthModesFlag( Int layerIdInVps, Bool val ) { m_vpsDepthModesFlag[ layerIdInVps ] = val; } 1158 1162 Bool getVpsDepthModesFlag( Int layerIdInVps ) { return m_vpsDepthModesFlag[ layerIdInVps ]; } 1163 1159 1164 #if H_3D_DIM_DLT 1165 #if !DLT_DIFF_CODING_IN_PPS 1160 1166 Bool getUseDLTFlag ( Int layerIdInVps ) { return m_bUseDLTFlag[ layerIdInVps ]; } 1161 1167 Void setUseDLTFlag ( Int layerIdInVps, Bool b ) { m_bUseDLTFlag[ layerIdInVps ] = b; } … … 1167 1173 Void setDepthLUTs( Int layerIdInVps, Int* idx2DepthValue = NULL, Int iNumDepthValues = 0 ); 1168 1174 #endif 1175 #endif 1169 1176 1170 1177 Bool getIvMvScalingFlag ( ) { return m_ivMvScalingFlag; } … … 1181 1188 #endif 1182 1189 }; 1190 1191 #if DLT_DIFF_CODING_IN_PPS 1192 class TComDLT 1193 { 1194 private: 1195 Bool m_bDltPresentFlag; 1196 Bool m_bUseDLTFlag [ MAX_NUM_LAYERS ]; 1197 Bool m_bInterViewDltPredEnableFlag[ MAX_NUM_LAYERS ]; 1198 1199 Int m_iBitsPerDepthValue [ MAX_NUM_LAYERS ]; 1200 Int m_iNumDepthmapValues [ MAX_NUM_LAYERS ]; 1201 Int* m_iDepthValue2Idx [ MAX_NUM_LAYERS ]; 1202 Int* m_iIdx2DepthValue [ MAX_NUM_LAYERS ]; 1203 1204 Int m_iNumDepthViews; 1205 UInt m_uiDepthViewBitDepth; 1206 1207 public: 1208 TComDLT(); 1209 ~TComDLT(); 1210 1211 Bool getDltPresentFlag () { return m_bDltPresentFlag; } 1212 Void setDltPresentFlag ( Bool b ) { m_bDltPresentFlag = b; } 1213 1214 Bool getUseDLTFlag ( Int layerIdInVps ) { return m_bUseDLTFlag[ layerIdInVps ]; } 1215 Void setUseDLTFlag ( Int layerIdInVps, Bool b ) { m_bUseDLTFlag[ layerIdInVps ] = b; } 1216 1217 Bool getInterViewDltPredEnableFlag( Int layerIdInVps ) { return m_bInterViewDltPredEnableFlag[ layerIdInVps ]; } 1218 Void setInterViewDltPredEnableFlag( Int layerIdInVps, Bool b ) { m_bInterViewDltPredEnableFlag[ layerIdInVps ] = b; } 1219 1220 1221 Void setNumDepthViews ( Int n ) { m_iNumDepthViews = n; } 1222 Int getNumDepthViews () { return m_iNumDepthViews; } 1223 1224 Void setDepthViewBitDepth( UInt n ) { m_uiDepthViewBitDepth = n; } 1225 UInt getDepthViewBitDepth() { return m_uiDepthViewBitDepth; } 1226 1227 Int getBitsPerDepthValue( Int layerIdInVps ) { return getUseDLTFlag(layerIdInVps)?m_iBitsPerDepthValue[layerIdInVps]:g_bitDepthY; } 1228 Int getNumDepthValues( Int layerIdInVps ) { return getUseDLTFlag(layerIdInVps)?m_iNumDepthmapValues[layerIdInVps]:((1 << g_bitDepthY)-1); } 1229 Int depthValue2idx( Int layerIdInVps, Pel value ) { return getUseDLTFlag(layerIdInVps)?m_iDepthValue2Idx[layerIdInVps][value]:value; } 1230 Pel idx2DepthValue( Int layerIdInVps, UInt uiIdx ) { return getUseDLTFlag(layerIdInVps)?m_iIdx2DepthValue[layerIdInVps][uiIdx]:uiIdx; } 1231 Void setDepthLUTs( Int layerIdInVps, Int* idx2DepthValue = NULL, Int iNumDepthValues = 0 ); 1232 }; 1233 #endif 1183 1234 1184 1235 class Window … … 1840 1891 Int m_ppsScalingListRefLayerId; 1841 1892 #endif 1893 1894 #if DLT_DIFF_CODING_IN_PPS 1895 TComDLT* m_pcDLT; 1896 #endif 1897 1842 1898 public: 1843 1899 TComPPS(); … … 1864 1920 Void setMinCuDQPSize ( UInt u ) { m_uiMinCuDQPSize = u; } 1865 1921 UInt getMinCuDQPSize () { return m_uiMinCuDQPSize; } 1922 1923 #if DLT_DIFF_CODING_IN_PPS 1924 Void setDLT ( TComDLT* pcDLT ) { m_pcDLT = pcDLT; } 1925 TComDLT* getDLT () { return m_pcDLT; } 1926 #endif 1866 1927 1867 1928 Void setChromaCbQpOffset( Int i ) { m_chromaCbQpOffset = i; } -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibCommon/TypeDef.h
r738 r748 215 215 #define H_3D_DIM_SDC 1 // Simplified Depth Coding method 216 216 #define H_3D_DIM_DLT 1 // Depth Lookup Table 217 218 #if H_3D_DIM_DLT 219 #define DLT_DIFF_CODING_IN_PPS 1 // moving DLT syntax elements from VPS to PPS and differential coding of DLT values 220 // JCT3V-F0131, JCT3V-F0139 221 #if DLT_DIFF_CODING_IN_PPS 222 #define Log2( n ) ( log((double)n) / log(2.0) ) 223 #endif 224 #endif 225 217 226 #define H_3D_DIM_ENC 1 // Depth Intra encoder optimizations, includes: 218 227 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160 … … 262 271 #define H_MV_FIX_SKIP_PICTURES 1 // Fix related to skipping pictures. 263 272 #define H_MV_6_HRD_O0164_15 1 // (HRD/O0164/Multilayer HRD) #15 Decision: Adopt, modified as follows: It was suggested to constrain the stalling based on the relative cpb removal times, which must be in decoding order. The "du_based_bpb_sync_flag" is not needed, in view of this. SEI in the highest layer of the layer set or (inclusive "or") VPS VUI is used to carry the parameters (at encoder discretion). SEI in higher layer and SEI in VUI do not need to repeat information available in some lower layer. Shall be after APS SEI and buffering period SEI and before all other SEI of all layers except other HRD related SEI. 264 #define H_MV_6_HRD_O0217_13 1 // (HRD/O0217/Sub-DPB based DPB operations) #13 Decision: Adopt Specify a separate DPB capacity for each layer no sharing of capacity across layers each layer has its own parameters (max pictures, max latency, max reordering). This proposal would specify distinct parameters for each "output layer set" and to change the definition of an operation point to be specific to an output layer set instead of a 'layer set". Decision: Adopted this aspect as well.273 #define H_MV_6_HRD_O0217_13 1 // (HRD/O0217/Sub-DPB based DPB operations) #13 Decision: Adopt ?Specify a separate DPB capacity for each layer ?no sharing of capacity across layers ?each layer has its own parameters (max pictures, max latency, max reordering). This proposal would specify distinct parameters for each "output layer set" and to change the definition of an operation point to be specific to an output layer set instead of a 'layer set". Decision: Adopted this aspect as well. 265 274 #define H_MV_6_SHVC_O0098_36 1 // (SHVC/O0098/Scaled ref layer offset) #36 Modify signalling of scaled reference layer offsets to allow signalling of any lower layer, rather than just a direct reference layer, in order to enable alignment of auxiliary pictures. In further JCT-VC and JCT-3V discussion, it was also agreed to use the same offset signalling for MV-HEVC as well as SHVC 266 275 #define H_MV_6_GEN_0153_28 1 //(Gen/O0153/output highest layer) #28 Add a flag in the VPS to indicate if startup process should output the highest available layer if the target output layer is not available. … … 291 300 #define H_MV_6_PS_O0096_21 1 // (PS/O0096/direct_dependency_type gating flag) #21 Add a gating flag in VPS extension to condition the presence of direct dependency type, with a default type signalled, from JCTVC-O0096 292 301 #define H_MV_6_PS_O0109_22 1 // (PS/O0109/view_id_len) #22 Modify the VPS extension syntax and semantics to replace view_id_len_minus1 with view_id_len, always signal that syntax element, add a constraint that (1<<view_id_len) >= NumViews, and modify view_id_val semantics to infer value of 0 when not present, from discussion of JCTVC-O0109 293 #define H_MV_6_PS_O0109_23 1 // (PS/O0109/profile_ref_minus1 constraint) #23 Modify the semantics of profile_ref_minus1[ i ] to replace shall be less than i with shall be less than or equal to i,from discussion of JCTVC-O0109302 #define H_MV_6_PS_O0109_23 1 // (PS/O0109/profile_ref_minus1 constraint) #23 Modify the semantics of profile_ref_minus1[ i ] to replace shall be less than i?with shall be less than or equal to i? from discussion of JCTVC-O0109 294 303 #define H_MV_6_PS_O0109_24 1 // (PS/O0109/vps_vui_present_flag move) #24 Move the vps_vui_present_flag to precede vps_vui_offset, and make vps_vui_offset conditional on that flag, from JCTVC-O0109 295 304 ///////////////////////////////////////////////////////////////////////////////////////// -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibDecoder/TDecCAVLC.cpp
r738 r748 215 215 } 216 216 217 #if DLT_DIFF_CODING_IN_PPS 218 Void TDecCavlc::parsePPS(TComPPS* pcPPS, TComVPS* pcVPS ) 219 #else 217 220 Void TDecCavlc::parsePPS(TComPPS* pcPPS) 221 #endif 218 222 { 219 223 #if ENC_DEC_TRACE … … 364 368 if (uiCode) 365 369 { 366 while ( xMoreRbspData() ) 367 { 368 READ_FLAG( uiCode, "pps_extension_data_flag"); 369 } 370 } 371 } 370 #if DLT_DIFF_CODING_IN_PPS 371 parsePPSExtension( pcPPS, pcVPS ); 372 READ_FLAG( uiCode, "pps_extension2_flag"); 373 if ( uiCode ) 374 { 375 #endif 376 while ( xMoreRbspData() ) 377 { 378 READ_FLAG( uiCode, "pps_extension_data_flag"); 379 } 380 #if DLT_DIFF_CODING_IN_PPS 381 } 382 #endif 383 } 384 } 385 386 #if DLT_DIFF_CODING_IN_PPS 387 Void TDecCavlc::parsePPSExtension( TComPPS* pcPPS, TComVPS* pcVPS ) 388 { 389 UInt uiCode = 0; 390 TComDLT* pcDLT = new TComDLT; 391 392 READ_FLAG(uiCode, "dlt_present_flag"); 393 pcDLT->setDltPresentFlag( (uiCode == 1) ? true : false ); 394 395 if ( pcDLT->getDltPresentFlag() ) 396 { 397 READ_CODE(6, uiCode, "pps_depth_layers_minus1"); 398 pcDLT->setNumDepthViews( uiCode ); 399 400 READ_CODE(4, uiCode, "pps_bit_depth_for_depth_views_minus8"); 401 pcDLT->setDepthViewBitDepth( (uiCode+8) ); 402 403 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 404 { 405 if ( i != 0 ) 406 { 407 if( pcVPS->getDepthId( i ) == 1 ) 408 { 409 READ_FLAG(uiCode, "dlt_flag[i]"); 410 pcDLT->setUseDLTFlag(i, (uiCode == 1) ? true : false); 411 412 if ( pcDLT->getUseDLTFlag( i ) ) 413 { 414 UInt uiNumDepthValues = 0; 415 Bool bDltBitMapRepFlag = false; 416 UInt uiMaxDiff = 0xffffffff; 417 UInt uiMinDiff = 0; 418 UInt uiCodeLength = 0; 419 UInt uiDiffMaxMinDltValue = 0; 420 421 READ_FLAG(uiCode, "inter_view_dlt_pred_enable_flag[ i ]"); 422 pcDLT->setInterViewDltPredEnableFlag( i, (uiCode == 1) ? true : false ); 423 424 if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false ) 425 { 426 READ_FLAG(uiCode, "dlt_bit_map_rep_flag[ layerId ]"); 427 bDltBitMapRepFlag = (uiCode == 1) ? true : false; 428 } 429 else 430 { 431 bDltBitMapRepFlag = false; 432 } 433 434 // Bit map 435 if ( bDltBitMapRepFlag ) 436 { 437 UInt uiNumDepthValues = 0; 438 Int aiIdx2DepthValue[256]; 439 440 for (UInt d=0; d<256; d++) 441 { 442 READ_FLAG(uiCode, "dlt_bit_map_flag[ layerId ][ j ]"); 443 if (uiCode == 1) 444 { 445 aiIdx2DepthValue[uiNumDepthValues] = d; 446 uiNumDepthValues++; 447 } 448 } 449 450 pcDLT->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues); 451 } 452 // Diff Coding 453 else 454 { 455 READ_CODE(8, uiNumDepthValues, "num_depth_values_in_dlt[i]"); // num_entry 456 457 if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false ) // Single-view DLT Diff Coding 458 { 459 // The condition if( pcVPS->getNumDepthValues(i) > 0 ) is always true since for Single-view Diff Coding, there is at least one depth value in depth component. 460 461 Int* aiIdx2DepthValue = (Int*) calloc(uiNumDepthValues, sizeof(Int)); 462 463 if (uiNumDepthValues > 1) 464 { 465 READ_CODE(8, uiCode, "max_diff[ layerId ]"); 466 uiMaxDiff = uiCode; 467 } 468 else 469 { 470 uiMaxDiff = 0; // when there is only one value in DLT 471 } 472 473 if (uiNumDepthValues > 2) 474 { 475 uiCodeLength = (UInt) ceil(Log2(uiMaxDiff + 1)); 476 READ_CODE(uiCodeLength, uiCode, "min_diff_minus1[ layerId ]"); 477 uiMinDiff = uiCode + 1; 478 } 479 else 480 { 481 uiMinDiff = uiMaxDiff; // when there are only one or two values in DLT 482 } 483 484 READ_CODE(8, uiCode, "dlt_depth_value0[layerId]"); // entry0 485 aiIdx2DepthValue[0] = uiCode; 486 487 if (uiMaxDiff == uiMinDiff) 488 { 489 for (UInt d=1; d<uiNumDepthValues; d++) 490 { 491 aiIdx2DepthValue[d] = aiIdx2DepthValue[d-1] + uiMinDiff + 0; 492 } 493 } 494 else 495 { 496 uiCodeLength = (UInt) ceil(Log2(uiMaxDiff - uiMinDiff + 1)); 497 for (UInt d=1; d<uiNumDepthValues; d++) 498 { 499 READ_CODE(uiCodeLength, uiCode, "dlt_depth_value_diff_minus_min[ layerId ][ j ]"); 500 aiIdx2DepthValue[d] = aiIdx2DepthValue[d-1] + uiMinDiff + uiCode; 501 } 502 } 503 504 pcDLT->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues); 505 506 free(aiIdx2DepthValue); 507 } 508 } 509 } 510 } 511 } 512 } 513 } 514 515 pcPPS->setDLT( pcDLT ); 516 } 517 #endif 372 518 373 519 Void TDecCavlc::parseVUI(TComVUI* pcVUI, TComSPS *pcSPS) … … 1738 1884 // READ_FLAG( uiCode, "lim_qt_pred_flag[i]"); pcVPS->setLimQtPreFlag ( i, uiCode == 1 ? true : false ); 1739 1885 #if H_3D_DIM_DLT 1886 #if !DLT_DIFF_CODING_IN_PPS 1740 1887 if( pcVPS->getVpsDepthModesFlag( i ) ) 1741 1888 { … … 1762 1909 free(aiIdx2DepthValue); 1763 1910 } 1911 #endif 1764 1912 #endif 1765 1913 #if H_3D_INTER_SDC -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibDecoder/TDecCAVLC.h
r738 r748 105 105 Void parseSPS ( TComSPS* pcSPS ); 106 106 #endif 107 108 #if DLT_DIFF_CODING_IN_PPS 109 Void parsePPS ( TComPPS* pcPPS, TComVPS* pcVPS ); 110 Void parsePPSExtension ( TComPPS* pcPPS, TComVPS* pcVPS ); 111 #else 112 Void parsePPS ( TComPPS* pcPPS); 113 #endif 114 107 115 Void parsePPS ( TComPPS* pcPPS); 108 116 Void parseVUI ( TComVUI* pcVUI, TComSPS* pcSPS ); -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibDecoder/TDecCu.cpp
r735 r748 781 781 { 782 782 #if LGE_PRED_RES_CODING_DLT_DOMAIN_F0159 783 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 783 #if DLT_DIFF_CODING_IN_PPS 784 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 785 #else 786 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 787 #endif 784 788 { 785 pReco [ uiX ] = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); 789 #if DLT_DIFF_CODING_IN_PPS 790 pReco [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); 791 #else 792 pReco [ uiX ] = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); 793 #endif 786 794 } 787 795 else … … 1000 1008 { 1001 1009 #if H_3D_DIM_DLT 1010 #if DLT_DIFF_CODING_IN_PPS 1011 Pel pPredIdx = pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] ); 1012 Pel pResiIdx = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx); 1013 Pel pRecoValue = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pPredIdx + pResiIdx ); 1014 #else 1002 1015 Pel pPredIdx = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] ); 1003 1016 Pel pResiIdx = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx); 1004 1017 Pel pRecoValue = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pPredIdx + pResiIdx ); 1005 1018 #endif 1019 1006 1020 apDCResiValues[uiSegment] = pRecoValue - apDCPredValues[uiSegment]; 1007 1021 #else -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibDecoder/TDecEntropy.h
r655 r748 71 71 virtual Void parseSPS ( TComSPS* pcSPS ) = 0; 72 72 #endif 73 #if DLT_DIFF_CODING_IN_PPS 74 virtual Void parsePPS ( TComPPS* pcPPS, TComVPS* pcVPS ) = 0; 75 #else 73 76 virtual Void parsePPS ( TComPPS* pcPPS ) = 0; 77 #endif 74 78 75 79 virtual Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) = 0; … … 148 152 Void decodeSPS ( TComSPS* pcSPS ) { m_pcEntropyDecoderIf->parseSPS(pcSPS); } 149 153 #endif 154 #if DLT_DIFF_CODING_IN_PPS 155 Void decodePPS ( TComPPS* pcPPS, TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parsePPS(pcPPS, pcVPS); } 156 #else 150 157 Void decodePPS ( TComPPS* pcPPS ) { m_pcEntropyDecoderIf->parsePPS(pcPPS); } 158 #endif 151 159 Void decodeSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager); } 152 160 -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibDecoder/TDecSbac.cpp
r724 r748 568 568 569 569 #if H_3D_DIM_DLT 570 #if DLT_DIFF_CODING_IN_PPS 571 UInt uiMaxResidualBits = pcCU->getSlice()->getPPS()->getDLT()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() ); 572 #else 570 573 UInt uiMaxResidualBits = pcCU->getSlice()->getVPS()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() ); 574 #endif 571 575 #else 572 576 UInt uiMaxResidualBits = g_bitDepthY; … … 592 596 UInt uiCount = 0; 593 597 #if H_3D_DIM_DLT 598 #if DLT_DIFF_CODING_IN_PPS 599 UInt uiNumDepthValues = pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ); 600 #else 594 601 UInt uiNumDepthValues = pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ); 602 #endif 595 603 #else 596 604 UInt uiNumDepthValues = ((1 << g_bitDepthY)-1); -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibDecoder/TDecSbac.h
r724 r748 81 81 Void parseSPS ( TComSPS* /*pcSPS*/ ) {} 82 82 #endif 83 #if DLT_DIFF_CODING_IN_PPS 84 Void parsePPS ( TComPPS* /*pcPPS*/, TComVPS* /*pcVPS*/ ) {} 85 #else 83 86 Void parsePPS ( TComPPS* /*pcPPS*/ ) {} 87 #endif 84 88 85 89 Void parseSliceHeader ( TComSlice*& /*rpcSlice*/, ParameterSetManagerDecoder* /*parameterSetManager*/) {} -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibDecoder/TDecTop.cpp
r738 r748 1151 1151 pps->setLayerId( getLayerId() ); 1152 1152 #endif 1153 #if DLT_DIFF_CODING_IN_PPS 1154 // Assuming that all PPS indirectly refer to the same VPS via different SPS 1155 // There is no parsing dependency in decoding DLT in PPS. 1156 // The VPS information passed to decodePPS() is used to arrange the decoded DLT tables to their corresponding layers. 1157 // This is equivalent to the process of 1158 // Step 1) decoding DLT tables based on the number of depth layers, and 1159 // Step 2) mapping DLT tables to the depth layers 1160 // as descripted in the 3D-HEVC WD. 1161 TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); 1162 m_cEntropyDecoder.decodePPS( pps, vps ); 1163 #else 1153 1164 m_cEntropyDecoder.decodePPS( pps ); 1165 #endif 1154 1166 m_parameterSetManagerDecoder.storePrefetchedPPS( pps ); 1155 1167 } -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibEncoder/TEncCavlc.cpp
r738 r748 256 256 WRITE_UVLC( pcPPS->getLog2ParallelMergeLevelMinus2(), "log2_parallel_merge_level_minus2"); 257 257 WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag"); 258 259 #if !DLT_DIFF_CODING_IN_PPS 258 260 WRITE_FLAG( 0, "pps_extension_flag" ); 259 } 261 #else 262 WRITE_FLAG( 1, "pps_extension_flag" ); 263 codePPSExtension( pcPPS ); 264 WRITE_FLAG( 0, "pps_extension2_flag" ); 265 #endif 266 } 267 268 #if DLT_DIFF_CODING_IN_PPS 269 Void TEncCavlc::codePPSExtension ( TComPPS* pcPPS ) 270 { 271 // Assuming that all PPS indirectly refer to the same VPS via different SPS 272 // There is no parsing dependency in decoding DLT in PPS. 273 // The VPS information passed to decodePPS() is used to arrange the decoded DLT tables to their corresponding layers. 274 // This is equivalent to the process of 275 // Step 1) decoding DLT tables based on the number of depth layers, and 276 // Step 2) mapping DLT tables to the depth layers 277 // as descripted in the 3D-HEVC WD. 278 TComVPS* pcVPS = pcPPS->getSPS()->getVPS(); 279 280 TComDLT* pcDLT = pcPPS->getDLT(); 281 282 WRITE_FLAG( pcDLT->getDltPresentFlag() ? 1 : 0, "dlt_present_flag" ); 283 284 if ( pcDLT->getDltPresentFlag() ) 285 { 286 WRITE_CODE(pcDLT->getNumDepthViews(), 6, "pps_depth_layers_minus1"); 287 WRITE_CODE((pcDLT->getDepthViewBitDepth() - 8), 4, "pps_bit_depth_for_depth_views_minus8"); 288 289 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 290 { 291 if ( i != 0 ) 292 { 293 if ( pcVPS->getDepthId( i ) == 1 ) 294 { 295 WRITE_FLAG( pcDLT->getUseDLTFlag( i ) ? 1 : 0, "dlt_flag[i]" ); 296 297 if ( pcDLT->getUseDLTFlag( i ) ) 298 { 299 WRITE_FLAG( pcDLT->getInterViewDltPredEnableFlag( i ) ? 1 : 0, "inter_view_dlt_pred_enable_flag[ i ]"); 300 301 // determine whether to use bit-map 302 Bool bDltBitMapRepFlag = false; 303 UInt uiNumBitsNonBitMap = 0; 304 UInt uiNumBitsBitMap = 0; 305 306 UInt uiMaxDiff = 0; 307 UInt uiMinDiff = 0xffffffff; 308 UInt uiLengthMinDiff = 0; 309 UInt uiLengthDltDiffMinusMin = 0; 310 311 UInt* puiDltDiffValues = NULL; 312 313 if ( NULL == (puiDltDiffValues = (UInt *)calloc(pcDLT->getNumDepthValues(i), sizeof(UInt))) ) 314 { 315 exit(-1); 316 } 317 318 for (UInt d = 1; d < pcDLT->getNumDepthValues(i); d++) 319 { 320 puiDltDiffValues[d] = pcDLT->idx2DepthValue(i, d) - pcDLT->idx2DepthValue(i, (d-1)); 321 322 if ( uiMaxDiff < puiDltDiffValues[d] ) 323 { 324 uiMaxDiff = puiDltDiffValues[d]; 325 } 326 327 if ( uiMinDiff > puiDltDiffValues[d] ) 328 { 329 uiMinDiff = puiDltDiffValues[d]; 330 } 331 } 332 333 // counting bits 334 // diff coding branch 335 uiNumBitsNonBitMap += 8; // u(v) bits for num_depth_values_in_dlt[layerId] (i.e. num_entry[ layerId ]) 336 337 if ( pcDLT->getNumDepthValues(i) > 1 ) 338 { 339 uiNumBitsNonBitMap += 8; // u(v) bits for max_diff[ layerId ] 340 } 341 342 if ( pcDLT->getNumDepthValues(i) > 2 ) 343 { 344 uiLengthMinDiff = (UInt) ceil(Log2(uiMaxDiff + 1)); 345 uiNumBitsNonBitMap += uiLengthMinDiff; // u(v) bits for min_diff[ layerId ] 346 } 347 348 uiNumBitsNonBitMap += 8; // u(v) bits for dlt_depth_value0[ layerId ] 349 350 if (uiMaxDiff > uiMinDiff) 351 { 352 uiLengthDltDiffMinusMin = (UInt) ceil(Log2(uiMaxDiff - uiMinDiff + 1)); 353 uiNumBitsNonBitMap += uiLengthDltDiffMinusMin * (pcDLT->getNumDepthValues(i) - 1); // u(v) bits for dlt_depth_value_diff_minus_min[ layerId ][ j ] 354 } 355 356 // bit map branch 357 uiNumBitsBitMap = 256; // uiNumBitsBitMap = 1 << pcDLT->getDepthViewBitDepth(); 358 359 // determine bDltBitMapFlag 360 bDltBitMapRepFlag = (uiNumBitsBitMap > uiNumBitsNonBitMap) ? false : true; 361 362 // Actual coding 363 if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false ) 364 { 365 WRITE_FLAG( bDltBitMapRepFlag ? 1 : 0, "dlt_bit_map_rep_flag[ layerId ]" ); 366 } 367 else 368 { 369 bDltBitMapRepFlag = false; 370 } 371 372 // bit map coding 373 if ( bDltBitMapRepFlag ) 374 { 375 UInt uiDltArrayIndex = 0; 376 for (UInt d=0; d < 256; d++) 377 { 378 if ( d == pcDLT->idx2DepthValue(i, uiDltArrayIndex) ) 379 { 380 WRITE_FLAG(1, "dlt_bit_map_flag[ layerId ][ j ]"); 381 uiDltArrayIndex++; 382 } 383 else 384 { 385 WRITE_FLAG(0, "dlt_bit_map_flag[ layerId ][ j ]"); 386 } 387 } 388 } 389 // Diff Coding 390 else 391 { 392 WRITE_CODE(pcDLT->getNumDepthValues(i), 8, "num_depth_values_in_dlt[layerId]"); // num_entry 393 394 if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false ) // Single-view DLT Diff Coding 395 { 396 // The condition if( pcVPS->getNumDepthValues(i) > 0 ) is always true since for Single-view Diff Coding, there is at least one depth value in depth component. 397 if ( pcDLT->getNumDepthValues(i) > 1 ) 398 { 399 WRITE_CODE(uiMaxDiff, 8, "max_diff[ layerId ]"); // max_diff 400 } 401 402 if ( pcDLT->getNumDepthValues(i) > 2 ) 403 { 404 WRITE_CODE((uiMinDiff - 1), uiLengthMinDiff, "min_diff_minus1[ layerId ]"); // min_diff_minus1 405 } 406 407 WRITE_CODE(pcDLT->idx2DepthValue(i, 0), 8, "dlt_depth_value0[layerId]"); // entry0 408 409 if (uiMaxDiff > uiMinDiff) 410 { 411 for (UInt d=1; d < pcDLT->getNumDepthValues(i); d++) 412 { 413 WRITE_CODE( (puiDltDiffValues[d] - uiMinDiff), uiLengthDltDiffMinusMin, "dlt_depth_value_diff_minus_min[ layerId ][ j ]"); // entry_value_diff_minus_min[ k ] 414 } 415 } 416 } 417 } 418 419 free(puiDltDiffValues); 420 } 421 } 422 } 423 } 424 } 425 } 426 #endif 260 427 261 428 Void TEncCavlc::codeVUI( TComVUI *pcVUI, TComSPS* pcSPS ) … … 1463 1630 //WRITE_FLAG( pcVPS->getLimQtPredFlag ( i ) ? 1 : 0 , "lim_qt_pred_flag[i]" ); 1464 1631 #if H_3D_DIM_DLT 1632 #if !DLT_DIFF_CODING_IN_PPS 1465 1633 if( pcVPS->getVpsDepthModesFlag( i ) ) 1466 1634 { … … 1475 1643 WRITE_UVLC( pcVPS->idx2DepthValue(i, d), "dlt_depth_value[i][d]" ); 1476 1644 } 1477 } 1645 } 1646 #endif 1478 1647 #endif 1479 1648 #if H_3D_INTER_SDC -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibEncoder/TEncCavlc.h
r738 r748 116 116 #endif 117 117 Void codePPS ( TComPPS* pcPPS ); 118 119 #if DLT_DIFF_CODING_IN_PPS 120 Void codePPSExtension ( TComPPS* pcPPS ); 121 #endif 122 118 123 Void codeSliceHeader ( TComSlice* pcSlice ); 119 124 Void codePTL ( TComPTL* pcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1); -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibEncoder/TEncCfg.h
r724 r748 330 330 TComVPS m_cVPS; 331 331 #endif 332 333 #if DLT_DIFF_CODING_IN_PPS 334 TComDLT* m_cDLT; 335 #endif 336 332 337 Bool m_recalculateQPAccordingToLambda; ///< recalculate QP value according to the lambda value 333 338 Int m_activeParameterSetsSEIEnabled; ///< enable active parameter set SEI message … … 441 446 , m_isDepth(false) 442 447 , m_bUseVSO(false) 448 #endif 449 #if DLT_DIFF_CODING_IN_PPS 450 , m_cDLT(NULL) 443 451 #endif 444 452 #endif … … 867 875 TComVPS *getVPS() { return &m_cVPS; } 868 876 #endif 877 878 #if DLT_DIFF_CODING_IN_PPS 879 Void setDLT ( TComDLT *p ) { m_cDLT = p; } 880 TComDLT* getDLT () { return m_cDLT; } 881 #endif 882 869 883 Void setUseRecalculateQPAccordingToLambda ( Bool b ) { m_recalculateQPAccordingToLambda = b; } 870 884 Bool getUseRecalculateQPAccordingToLambda () { return m_recalculateQPAccordingToLambda; } -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibEncoder/TEncSbac.cpp
r724 r748 632 632 633 633 #if H_3D_DIM_DLT 634 #if DLT_DIFF_CODING_IN_PPS 635 UInt uiMaxResidualBits = pcCU->getSlice()->getPPS()->getDLT()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() ); 636 #else 634 637 UInt uiMaxResidualBits = pcCU->getSlice()->getVPS()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() ); 638 #endif 635 639 #else 636 640 UInt uiMaxResidualBits = g_bitDepthY; … … 653 657 654 658 #if H_3D_DIM_DLT 655 UInt uiNumDepthValues = pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ); 659 #if DLT_DIFF_CODING_IN_PPS 660 UInt uiNumDepthValues = pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ); 661 #else 662 UInt uiNumDepthValues = pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ); 663 #endif 656 664 #else 657 665 UInt uiNumDepthValues = ((1 << g_bitDepthY)-1); -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibEncoder/TEncSearch.cpp
r735 r748 1127 1127 { 1128 1128 #if LGE_PRED_RES_CODING_DLT_DOMAIN_F0159 1129 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 1129 #if DLT_DIFF_CODING_IN_PPS 1130 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 1131 #else 1132 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 1133 #endif 1130 1134 { 1131 pResi[ uiX ] = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pOrg[ uiX ] ) - pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ); 1135 #if DLT_DIFF_CODING_IN_PPS 1136 pResi[ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pOrg[ uiX ] ) - pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ); 1137 #else 1138 pResi[ uiX ] = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pOrg[ uiX ] ) - pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ); 1139 #endif 1132 1140 } 1133 1141 else … … 1202 1210 { 1203 1211 #if LGE_PRED_RES_CODING_DLT_DOMAIN_F0159 1204 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 1212 #if DLT_DIFF_CODING_IN_PPS 1213 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 1214 #else 1215 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 1216 #endif 1205 1217 { 1206 pReco [ uiX ] = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); 1218 #if DLT_DIFF_CODING_IN_PPS 1219 pReco [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); 1220 #else 1221 pReco [ uiX ] = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); 1222 #endif 1207 1223 } 1208 1224 else … … 1935 1951 // get residual (idx) 1936 1952 #if H_3D_DIM_DLT 1953 #if DLT_DIFF_CODING_IN_PPS 1954 Pel pResidualIdx = pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pDCRec ) - pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] ); 1955 #else 1937 1956 Pel pResidualIdx = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pDCRec ) - pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] ); 1957 #endif 1938 1958 #else 1939 1959 Pel pResidualIdx = pDCRec - apDCPredValues[uiSegment]; … … 1949 1969 { 1950 1970 #if H_3D_DIM_DLT 1971 #if DLT_DIFF_CODING_IN_PPS 1972 Pel pPredIdx = pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] ); 1973 Pel pResiIdx = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx); 1974 Pel pRecoValue = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pPredIdx + pResiIdx ); 1975 #else 1951 1976 Pel pPredIdx = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] ); 1952 1977 Pel pResiIdx = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx); 1953 1978 Pel pRecoValue = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pPredIdx + pResiIdx ); 1954 1979 #endif 1980 1955 1981 apDCResiValues[uiSegment] = pRecoValue - apDCPredValues[uiSegment]; 1956 1982 #else … … 7346 7372 7347 7373 #if H_3D_DIM_DLT 7374 #if DLT_DIFF_CODING_IN_PPS 7375 rDeltaDC1 = pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), ClipY(predDC1 + rDeltaDC1) ) - pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC1 ); 7376 rDeltaDC2 = pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), ClipY(predDC2 + rDeltaDC2) ) - pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC2 ); 7377 #else 7348 7378 rDeltaDC1 = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), ClipY(predDC1 + rDeltaDC1) ) - pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC1 ); 7349 7379 rDeltaDC2 = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), ClipY(predDC2 + rDeltaDC2) ) - pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC2 ); 7380 #endif 7350 7381 #endif 7351 7382 } -
branches/HTM-9.1-dev0-ZTE/source/Lib/TLibEncoder/TEncTop.cpp
r738 r748 299 299 { 300 300 // initialize SPS 301 #if DLT_DIFF_CODING_IN_PPS 302 // Assuming that all PPS indirectly refer to the same VPS via different SPS 303 m_cSPS.setVPS(m_cVPS); 304 #endif 301 305 xInitSPS(); 302 306 … … 870 874 m_cPPS.setSPSId( getLayerIdInVps() ); 871 875 #endif 876 877 #if DLT_DIFF_CODING_IN_PPS 878 m_cPPS.setDLT( getDLT() ); 879 #endif 880 872 881 m_cPPS.setConstrainedIntraPred( m_bUseConstrainedIntraPred ); 873 882 Bool bUseDQP = (getMaxCuDQPDepth() > 0)? true : false;
Note: See TracChangeset for help on using the changeset viewer.