Changeset 758 in 3DVCSoftware for trunk/source/Lib/TLibEncoder


Ignore:
Timestamp:
3 Jan 2014, 17:43:40 (11 years ago)
Author:
tech
Message:

Merged HTM-9.1-dev0-MediaTek@757. (3D-HEVC HLS)

Location:
trunk/source/Lib/TLibEncoder
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/source/Lib/TLibEncoder/TEncCavlc.cpp

    r738 r758  
    256256  WRITE_UVLC( pcPPS->getLog2ParallelMergeLevelMinus2(), "log2_parallel_merge_level_minus2");
    257257  WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag");
     258
     259#if !DLT_DIFF_CODING_IN_PPS
    258260  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
     269Void  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            Int aiIdx2DepthValue_coded[256];
     314            UInt uiNumDepthValues_coded = 0;
     315           
     316            uiNumDepthValues_coded = pcDLT->getNumDepthValues(i);
     317            for( UInt ui = 0; ui<uiNumDepthValues_coded; ui++ )
     318            {
     319              aiIdx2DepthValue_coded[ui] = pcDLT->idx2DepthValue(i, ui);
     320            }
     321           
     322#if H_3D_DELTA_DLT
     323            if( pcDLT->getInterViewDltPredEnableFlag( i ) )
     324            {
     325              AOF( pcVPS->getDepthId( 1 ) == 1 );
     326              AOF( i > 1 );
     327              // assumes ref layer id to be 1
     328              Int* piRefDLT = pcDLT->idx2DepthValue( 1 );
     329              UInt uiRefNum = pcDLT->getNumDepthValues( 1 );
     330              pcDLT->getDeltaDLT(i, piRefDLT, uiRefNum, aiIdx2DepthValue_coded, &uiNumDepthValues_coded);
     331            }
     332#endif
     333
     334            if ( NULL == (puiDltDiffValues = (UInt *)calloc(uiNumDepthValues_coded, sizeof(UInt))) )
     335            {
     336              exit(-1);
     337            }
     338
     339            for (UInt d = 1; d < uiNumDepthValues_coded; d++)
     340            {
     341              puiDltDiffValues[d] = aiIdx2DepthValue_coded[d] - aiIdx2DepthValue_coded[d-1];
     342
     343              if ( uiMaxDiff < puiDltDiffValues[d] )
     344              {
     345                uiMaxDiff = puiDltDiffValues[d];
     346              }
     347
     348              if ( uiMinDiff > puiDltDiffValues[d] )
     349              {
     350                uiMinDiff = puiDltDiffValues[d];
     351              }
     352            }
     353
     354            // counting bits
     355            // diff coding branch
     356            uiNumBitsNonBitMap += 8;                          // u(v) bits for num_depth_values_in_dlt[layerId] (i.e. num_entry[ layerId ])
     357
     358            if ( uiNumDepthValues_coded > 1 )
     359            {
     360              uiNumBitsNonBitMap += 8;                        // u(v) bits for max_diff[ layerId ]
     361            }
     362
     363            if ( uiNumDepthValues_coded > 2 )
     364            {
     365              uiLengthMinDiff    = (UInt) ceil(Log2(uiMaxDiff + 1));
     366              uiNumBitsNonBitMap += uiLengthMinDiff;          // u(v)  bits for min_diff[ layerId ]
     367            }
     368
     369            uiNumBitsNonBitMap += 8;                          // u(v) bits for dlt_depth_value0[ layerId ]
     370
     371            if (uiMaxDiff > uiMinDiff)
     372            {
     373              uiLengthDltDiffMinusMin = (UInt) ceil(Log2(uiMaxDiff - uiMinDiff + 1));
     374              uiNumBitsNonBitMap += uiLengthDltDiffMinusMin * (uiNumDepthValues_coded - 1);  // u(v) bits for dlt_depth_value_diff_minus_min[ layerId ][ j ]
     375            }
     376
     377            // bit map branch
     378            uiNumBitsBitMap = 256;   // uiNumBitsBitMap = 1 << pcDLT->getDepthViewBitDepth();
     379
     380            // determine bDltBitMapFlag
     381            bDltBitMapRepFlag = (uiNumBitsBitMap > uiNumBitsNonBitMap) ? false : true;
     382
     383            // ----------------------------- Actual coding -----------------------------
     384            if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false )
     385            {
     386              WRITE_FLAG( bDltBitMapRepFlag ? 1 : 0, "dlt_bit_map_rep_flag[ layerId ]" );
     387            }
     388            else
     389            {
     390              bDltBitMapRepFlag = false;
     391            }
     392
     393            // bit map coding
     394            if ( bDltBitMapRepFlag )
     395            {
     396              UInt uiDltArrayIndex = 0;
     397              for (UInt d=0; d < 256; d++)
     398              {
     399                if ( d == aiIdx2DepthValue_coded[uiDltArrayIndex] )
     400                {                 
     401                  WRITE_FLAG(1, "dlt_bit_map_flag[ layerId ][ j ]");
     402                  uiDltArrayIndex++;
     403                }
     404                else
     405                {
     406                  WRITE_FLAG(0, "dlt_bit_map_flag[ layerId ][ j ]");
     407                }
     408              }
     409            }
     410            // Diff Coding
     411            else
     412            {
     413              WRITE_CODE(uiNumDepthValues_coded, 8, "num_depth_values_in_dlt[layerId]");    // num_entry
     414
     415#if !H_3D_DELTA_DLT
     416              if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false )   // Single-view DLT Diff Coding
     417#endif
     418              {
     419                // The condition if( uiNumDepthValues_coded > 0 ) is always true since for Single-view Diff Coding, there is at least one depth value in depth component.
     420                if ( uiNumDepthValues_coded > 1 )
     421                {
     422                  WRITE_CODE(uiMaxDiff, 8, "max_diff[ layerId ]");        // max_diff
     423                }
     424
     425                if ( uiNumDepthValues_coded > 2 )
     426                {
     427                  WRITE_CODE((uiMinDiff - 1), uiLengthMinDiff, "min_diff_minus1[ layerId ]");     // min_diff_minus1
     428                }
     429
     430                WRITE_CODE(aiIdx2DepthValue_coded[0], 8, "dlt_depth_value0[layerId]");          // entry0
     431
     432                if (uiMaxDiff > uiMinDiff)
     433                {
     434                  for (UInt d=1; d < uiNumDepthValues_coded; d++)
     435                  {
     436                    WRITE_CODE( (puiDltDiffValues[d] - uiMinDiff), uiLengthDltDiffMinusMin, "dlt_depth_value_diff_minus_min[ layerId ][ j ]");    // entry_value_diff_minus_min[ k ]
     437                  }
     438                }
     439              }
     440            }
     441
     442            free(puiDltDiffValues);
     443          }
     444        }
     445      }
     446    }
     447  }
     448}
     449#endif
    260450
    261451Void TEncCavlc::codeVUI( TComVUI *pcVUI, TComSPS* pcSPS )
     
    671861}
    672862#endif
    673   if (!depthFlag )
    674   {
    675     WRITE_UVLC( pcSPS->getCamParPrecision(), "cp_precision" );
    676     WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "cp_in_slice_header_flag" );
    677     if( !pcSPS->hasCamParInSliceHeader() )
    678     {
    679       for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ )
    680       {
    681         WRITE_SVLC( pcSPS->getCodedScale    ()[ uiIndex ],                                      "cp_scale" );
    682         WRITE_SVLC( pcSPS->getCodedOffset   ()[ uiIndex ],                                      "cp_off" );
    683         WRITE_SVLC( pcSPS->getInvCodedScale ()[ uiIndex ] + pcSPS->getCodedScale ()[ uiIndex ], "cp_inv_scale_plus_scale" );
    684         WRITE_SVLC( pcSPS->getInvCodedOffset()[ uiIndex ] + pcSPS->getCodedOffset()[ uiIndex ], "cp_inv_off_plus_off" );
    685       }
    686     }
    687   }
     863#if !CAM_HLS_F0136_F0045_F0082
     864if (!depthFlag )
     865{
     866  WRITE_UVLC( pcSPS->getCamParPrecision(), "cp_precision" );
     867  WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "cp_in_slice_header_flag" );
     868  if( !pcSPS->hasCamParInSliceHeader() )
     869  {
     870    for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ )
     871    {
     872      WRITE_SVLC( pcSPS->getCodedScale    ()[ uiIndex ],                                      "cp_scale" );
     873      WRITE_SVLC( pcSPS->getCodedOffset   ()[ uiIndex ],                                      "cp_off" );
     874      WRITE_SVLC( pcSPS->getInvCodedScale ()[ uiIndex ] + pcSPS->getCodedScale ()[ uiIndex ], "cp_inv_scale_plus_scale" );
     875      WRITE_SVLC( pcSPS->getInvCodedOffset()[ uiIndex ] + pcSPS->getCodedOffset()[ uiIndex ], "cp_inv_off_plus_off" );
     876    }
     877  }
     878}
     879#endif
    688880}
    689881#endif
     
    14631655        //WRITE_FLAG( pcVPS->getLimQtPredFlag    ( i ) ? 1 : 0 ,          "lim_qt_pred_flag[i]"     );
    14641656#if H_3D_DIM_DLT
     1657#if !DLT_DIFF_CODING_IN_PPS
    14651658        if( pcVPS->getVpsDepthModesFlag( i ) )
    14661659        {
     
    14751668            WRITE_UVLC( pcVPS->idx2DepthValue(i, d), "dlt_depth_value[i][d]" );
    14761669          }
    1477         }       
     1670        }
     1671#endif
    14781672#endif
    14791673#if H_3D_INTER_SDC
     
    14831677    } 
    14841678  }
     1679#if CAM_HLS_F0136_F0045_F0082
     1680  WRITE_UVLC( pcVPS->getCamParPrecision(), "cp_precision" );
     1681  for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
     1682  {
     1683    WRITE_FLAG( pcVPS->getCamParPresent(viewIndex) ? 1 : 0, "cp_present_flag[i]" );
     1684    if ( pcVPS->getCamParPresent(viewIndex) )
     1685    {
     1686      WRITE_FLAG( pcVPS->hasCamParInSliceHeader(viewIndex) ? 1 : 0, "cp_in_slice_segment_header_flag[i]" );
     1687      if ( !pcVPS->hasCamParInSliceHeader(viewIndex) )
     1688      {
     1689        for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ )
     1690        {
     1691          WRITE_SVLC( pcVPS->getCodedScale    (viewIndex)[ uiIndex ],                                               "vps_cp_scale" );
     1692          WRITE_SVLC( pcVPS->getCodedOffset   (viewIndex)[ uiIndex ],                                               "vps_cp_off" );
     1693          WRITE_SVLC( pcVPS->getInvCodedScale (viewIndex)[ uiIndex ] + pcVPS->getCodedScale (viewIndex)[ uiIndex ], "vps_cp_inv_scale_plus_scale" );
     1694          WRITE_SVLC( pcVPS->getInvCodedOffset(viewIndex)[ uiIndex ] + pcVPS->getCodedOffset(viewIndex)[ uiIndex ], "vps_cp_inv_off_plus_off" );
     1695        }
     1696      }
     1697    }
     1698  }
     1699#endif
    14851700#if H_3D_TMVP
    14861701  WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 ,          "iv_mv_scaling_flag" );
     
    19472162    }
    19482163  }
     2164#if CAM_HLS_F0044
     2165#if QC_DEPTH_IV_MRG_F0125
     2166#if CAM_HLS_F0136_F0045_F0082
     2167  if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && !pcSlice->getIsDepth() )
     2168#else
     2169  if( pcSlice->getSPS()->hasCamParInSliceHeader() && !pcSlice->getIsDepth() )
     2170#endif
     2171#else
     2172  if( pcSlice->getSPS()->hasCamParInSliceHeader() )
     2173#endif
     2174  {
     2175    for( UInt uiId = 0; uiId < pcSlice->getViewIndex(); uiId++ )
     2176    {
     2177      WRITE_SVLC( pcSlice->getCodedScale    ()[ uiId ],                                     "cp_scale" );
     2178      WRITE_SVLC( pcSlice->getCodedOffset   ()[ uiId ],                                     "cp_off" );
     2179      WRITE_SVLC( pcSlice->getInvCodedScale ()[ uiId ] + pcSlice->getCodedScale ()[ uiId ], "cp_inv_scale_plus_scale" );
     2180      WRITE_SVLC( pcSlice->getInvCodedOffset()[ uiId ] + pcSlice->getCodedOffset()[ uiId ], "cp_inv_off_plus_off" );
     2181    }
     2182  }
     2183#endif
     2184
    19492185  if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag())
    19502186  {
    1951 #if !H_3D
     2187#if !H_3D || CAM_HLS_F0044
    19522188    WRITE_UVLC(0,"slice_header_extension_length");
    19532189#else
    19542190    WRITE_UVLC(0,"slice_header_extension_length"); //<- this element needs to be set to the correct value!!
    1955 
    19562191#if QC_DEPTH_IV_MRG_F0125
     2192#if CAM_HLS_F0136_F0045_F0082
     2193    if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && !pcSlice->getIsDepth() )
     2194#else
    19572195    if( pcSlice->getSPS()->hasCamParInSliceHeader() && !pcSlice->getIsDepth() )
     2196#endif
    19582197#else
    19592198    if( pcSlice->getSPS()->hasCamParInSliceHeader() )
  • TabularUnified trunk/source/Lib/TLibEncoder/TEncCavlc.h

    r738 r758  
    116116#endif
    117117  Void  codePPS                 ( TComPPS* pcPPS );
     118
     119#if DLT_DIFF_CODING_IN_PPS
     120  Void  codePPSExtension        ( TComPPS* pcPPS );
     121#endif
     122
    118123  Void  codeSliceHeader         ( TComSlice* pcSlice );
    119124  Void  codePTL                 ( TComPTL* pcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1);
  • TabularUnified trunk/source/Lib/TLibEncoder/TEncCfg.h

    r724 r758  
    330330  TComVPS                    m_cVPS;
    331331#endif
     332
     333#if DLT_DIFF_CODING_IN_PPS
     334  TComDLT*  m_cDLT;
     335#endif
     336
    332337  Bool      m_recalculateQPAccordingToLambda;                 ///< recalculate QP value according to the lambda value
    333338  Int       m_activeParameterSetsSEIEnabled;                  ///< enable active parameter set SEI message
     
    867872  TComVPS *getVPS() { return &m_cVPS; }
    868873#endif
     874
     875#if DLT_DIFF_CODING_IN_PPS
     876  Void      setDLT           ( TComDLT *p ) { m_cDLT = p; }
     877  TComDLT*  getDLT           ()             { return m_cDLT; }
     878#endif
     879
    869880  Void      setUseRecalculateQPAccordingToLambda ( Bool b ) { m_recalculateQPAccordingToLambda = b;    }
    870881  Bool      getUseRecalculateQPAccordingToLambda ()         { return m_recalculateQPAccordingToLambda; }
  • TabularUnified trunk/source/Lib/TLibEncoder/TEncSbac.cpp

    r724 r758  
    632632
    633633#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
    634637  UInt uiMaxResidualBits = pcCU->getSlice()->getVPS()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() );
     638#endif
    635639#else
    636640  UInt uiMaxResidualBits = g_bitDepthY;
     
    653657   
    654658#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
    656664#else
    657665    UInt uiNumDepthValues = ((1 << g_bitDepthY)-1);
  • TabularUnified trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r735 r758  
    11271127      {
    11281128#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
    11301134          {
    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
    11321140          }
    11331141          else
     
    12021210      {
    12031211#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
    12051217          {
    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
    12071223          }
    12081224          else
     
    19351951    // get residual (idx)
    19361952#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
    19371956    Pel pResidualIdx = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pDCRec ) - pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] );
     1957#endif
    19381958#else
    19391959    Pel pResidualIdx = pDCRec - apDCPredValues[uiSegment];
     
    19491969  {
    19501970#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
    19511976    Pel   pPredIdx    = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] );
    19521977    Pel   pResiIdx    = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx);
    19531978    Pel   pRecoValue  = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pPredIdx + pResiIdx );
    1954    
     1979#endif
     1980
    19551981    apDCResiValues[uiSegment]  = pRecoValue - apDCPredValues[uiSegment];
    19561982#else
     
    73467372
    73477373#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
    73487378  rDeltaDC1 = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), ClipY(predDC1 + rDeltaDC1) ) - pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC1 );
    73497379  rDeltaDC2 = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), ClipY(predDC2 + rDeltaDC2) ) - pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC2 );
     7380#endif
    73507381#endif
    73517382}
  • TabularUnified trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r738 r758  
    299299{
    300300  // 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
    301305  xInitSPS();
    302306 
     
    850854  }
    851855#if H_3D
     856#if !CAM_HLS_F0136_F0045_F0082
    852857#if !QC_DEPTH_IV_MRG_F0125
    853858  if ( !m_isDepth )
     
    857862  }
    858863#endif
     864#endif
    859865}
    860866
     
    870876  m_cPPS.setSPSId( getLayerIdInVps() );
    871877#endif
     878
     879#if DLT_DIFF_CODING_IN_PPS
     880  m_cPPS.setDLT( getDLT() );
     881#endif
     882
    872883  m_cPPS.setConstrainedIntraPred( m_bUseConstrainedIntraPred );
    873884  Bool bUseDQP = (getMaxCuDQPDepth() > 0)? true : false;
     
    10011012  }
    10021013#if H_3D
     1014#if CAM_HLS_F0136_F0045_F0082
     1015  if( m_cVPS->hasCamParInSliceHeader( getViewIndex() ) )
     1016#else
    10031017  if( m_cSPS.hasCamParInSliceHeader() )
     1018#endif
    10041019  {
    10051020    m_cPPS.setSliceHeaderExtensionPresentFlag( true );
Note: See TracChangeset for help on using the changeset viewer.