Ignore:
Timestamp:
18 Dec 2013, 09:00:24 (11 years ago)
Author:
zte
Message:

JCT3V-F0131, JCT3V-F0139

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  
    506506    {
    507507#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
    508512      segDC1 = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC1 ) + deltaDC1 );
    509513      segDC2 = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC2 ) + deltaDC2 );
     514#endif
    510515#else
    511516      segDC1 = ClipY( predDC1 + deltaDC1 );
  • branches/HTM-9.1-dev0-ZTE/source/Lib/TLibCommon/TComSlice.cpp

    r738 r748  
    18161816    m_vpsDepthModesFlag [i] = false;
    18171817#if H_3D_DIM_DLT
     1818#if !DLT_DIFF_CODING_IN_PPS
    18181819    m_bUseDLTFlag         [i] = false;
    18191820   
     
    18321833    }
    18331834#endif
     1835#endif
    18341836#if H_3D
    18351837    m_ivMvScalingFlag = true;
     
    19021904    if (m_repFormat[ i ] != NULL )      delete m_repFormat[ i ];   
    19031905#if H_3D_DIM_DLT
     1906#if !DLT_DIFF_CODING_IN_PPS
    19041907    if ( m_iDepthValue2Idx[i] != 0 )
    19051908    {
     
    19141917    }
    19151918#endif
     1919#endif
    19161920  }
    19171921#endif
     
    19191923
    19201924#if H_3D_DIM_DLT
     1925#if !DLT_DIFF_CODING_IN_PPS
    19211926  Void TComVPS::setDepthLUTs(Int layerIdInVps, Int* idxToDepthValueTable, Int iNumDepthValues)
    19221927  {
     
    19791984    m_iBitsPerDepthValue[layerIdInVps] = numBitsForValue(m_iNumDepthmapValues[layerIdInVps]);
    19801985  }
     1986#endif
    19811987#endif
    19821988
     
    24442450, m_ppsInferScalingListFlag(false)
    24452451, m_ppsScalingListRefLayerId(0)
     2452#if DLT_DIFF_CODING_IN_PPS
     2453, m_pcDLT(NULL)
     2454#endif
    24462455#endif
    24472456{
     
    24632472  delete m_scalingList;
    24642473}
     2474
     2475#if DLT_DIFF_CODING_IN_PPS
     2476TComDLT::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
     2504TComDLT::~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
     2522Void 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
    24652583
    24662584#if H_MV
     
    37073825  // It is a requirement of bitstream conformance that bitstream partition with index j shall not include
    37083826  // 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.
    37103828
    37113829  for ( Int partJ = 0; partJ < getNumBitstreamPartitions( h ); partJ++ )
  • branches/HTM-9.1-dev0-ZTE/source/Lib/TLibCommon/TComSlice.h

    r738 r748  
    849849#endif
    850850  Bool        m_vpsDepthModesFlag        [MAX_NUM_LAYERS   ];
     851
    851852#if H_3D_DIM_DLT
     853#if !DLT_DIFF_CODING_IN_PPS
    852854  Bool        m_bUseDLTFlag              [MAX_NUM_LAYERS   ];
    853855 
     
    857859  Int*        m_iIdx2DepthValue          [MAX_NUM_LAYERS   ];
    858860#endif
     861#endif
     862
    859863#if H_3D
    860864  Bool        m_ivMvScalingFlag;
     
    11571161  Void    setVpsDepthModesFlag( Int layerIdInVps, Bool val )               { m_vpsDepthModesFlag[ layerIdInVps ] = val; }
    11581162  Bool    getVpsDepthModesFlag( Int layerIdInVps )                         { return m_vpsDepthModesFlag[ layerIdInVps ]; }
     1163
    11591164#if H_3D_DIM_DLT
     1165#if !DLT_DIFF_CODING_IN_PPS
    11601166  Bool    getUseDLTFlag      ( Int layerIdInVps )                         { return m_bUseDLTFlag[ layerIdInVps ]; }
    11611167  Void    setUseDLTFlag      ( Int layerIdInVps, Bool b ) { m_bUseDLTFlag[ layerIdInVps ]  = b;          }
     
    11671173  Void    setDepthLUTs( Int layerIdInVps, Int* idx2DepthValue = NULL, Int iNumDepthValues = 0 );
    11681174#endif
     1175#endif
    11691176
    11701177  Bool    getIvMvScalingFlag   (  )                       { return m_ivMvScalingFlag; }
     
    11811188#endif
    11821189};
     1190
     1191#if DLT_DIFF_CODING_IN_PPS
     1192class TComDLT
     1193{
     1194private:
     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
     1207public:
     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
    11831234
    11841235class Window
     
    18401891  Int  m_ppsScalingListRefLayerId;
    18411892#endif
     1893
     1894#if DLT_DIFF_CODING_IN_PPS
     1895  TComDLT*  m_pcDLT;
     1896#endif
     1897
    18421898public:
    18431899  TComPPS();
     
    18641920  Void      setMinCuDQPSize     ( UInt u ) { m_uiMinCuDQPSize = u;    }
    18651921  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
    18661927
    18671928  Void      setChromaCbQpOffset( Int i ) { m_chromaCbQpOffset = i;    }
  • branches/HTM-9.1-dev0-ZTE/source/Lib/TLibCommon/TypeDef.h

    r738 r748  
    215215#define H_3D_DIM_SDC                      1   // Simplified Depth Coding method
    216216#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
    217226#define H_3D_DIM_ENC                      1   // Depth Intra encoder optimizations, includes:
    218227                                              // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
     
    262271#define H_MV_FIX_SKIP_PICTURES                  1  // Fix related to skipping pictures.
    263272#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.
    265274#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
    266275#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.
     
    291300#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
    292301#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-O0109
     302#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
    294303#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
    295304/////////////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.