Ignore:
Timestamp:
19 Dec 2013, 14:29:43 (10 years ago)
Author:
rwth
Message:
  • added functions for Delta-DLT (not used yet)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-9.1-dev0-RWTH/source/Lib/TLibCommon/TComSlice.cpp

    r748 r751  
    25802580  m_iBitsPerDepthValue[layerIdInVps] = numBitsForValue(m_iNumDepthmapValues[layerIdInVps]);
    25812581}
     2582
     2583#if RWTH_DELTA_DLT
     2584Void TComDLT::getDeltaDLT( Int layerIdInVps, Int* piDLTInRef, Int iDLTInRefNum, Int* piDeltaDLTOut, Int *piDeltaDLTOutNum )
     2585{
     2586  Bool abBM0[ 256 ];
     2587  Bool abBM1[ 256 ];
     2588 
     2589  memset( abBM0, 0, sizeof( abBM0 ));
     2590  memset( abBM1, 0, sizeof( abBM1 ));
     2591 
     2592  // convert reference DLT to bit string
     2593  for( Int i = 0; i < iDLTInRefNum; i++ )
     2594  {
     2595    abBM0[ piDLTInRef[ i ] ] = true;
     2596  }
     2597  // convert internal DLT to bit string
     2598  for( Int i = 0; i < m_iNumDepthmapValues[ layerIdInVps ]; i++ )
     2599  {
     2600    abBM1[ m_iIdx2DepthValue[ layerIdInVps ][ i ] ] = true;
     2601  }
     2602 
     2603  *piDeltaDLTOutNum = 0;
     2604  for( Int i = 0; i < 256; i++ )
     2605  {
     2606    if( abBM0[ i ] ^ abBM1[ i ] )
     2607    {
     2608      piDeltaDLTOut[ *piDeltaDLTOutNum ] = i;
     2609      *piDeltaDLTOutNum = *piDeltaDLTOutNum + 1;
     2610    }
     2611  }
     2612}
     2613
     2614Void TComDLT::setDeltaDLT( Int layerIdInVps, Int* piDLTInRef, Int iDLTInRefNum, Int* piDeltaDLTIn, Int piDeltaDLTInNum )
     2615{
     2616  Bool abBM0[ 256 ];
     2617  Bool abBM1[ 256 ];
     2618 
     2619  memset( abBM0, 0, sizeof( abBM0 ));
     2620  memset( abBM1, 0, sizeof( abBM1 ));
     2621 
     2622  // convert reference DLT to bit string
     2623  for( Int i = 0; i < iDLTInRefNum; i++ )
     2624  {
     2625    abBM0[ piDLTInRef[ i ] ] = true;
     2626  }
     2627  // convert delta DLT to bit string
     2628  for( Int i = 0; i < piDeltaDLTInNum; i++ )
     2629  {
     2630    abBM1[ piDeltaDLTIn[ i ] ] = true;
     2631  }
     2632 
     2633  Int aiIdx2DepthValue[256];
     2634  UInt uiNumDepthValues = 0;
     2635  memset( aiIdx2DepthValue, 0, sizeof( aiIdx2DepthValue ));
     2636 
     2637  for( Int i = 0; i < 256; i++ )
     2638  {
     2639    if( abBM0[ i ] ^ abBM1[ i ] )
     2640    {
     2641      aiIdx2DepthValue[ uiNumDepthValues++ ] = i;
     2642    }
     2643  }
     2644 
     2645  // update internal tables
     2646  setDepthLUTs(layerIdInVps, aiIdx2DepthValue, uiNumDepthValues);
     2647}
     2648#endif
     2649
    25822650#endif
    25832651
Note: See TracChangeset for help on using the changeset viewer.