Changeset 748 in 3DVCSoftware for branches/HTM-9.1-dev0-ZTE/source/Lib/TLibCommon
- Timestamp:
- 18 Dec 2013, 09:00:24 (11 years ago)
- Location:
- branches/HTM-9.1-dev0-ZTE/source/Lib/TLibCommon
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
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 /////////////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.