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