Changeset 755 in 3DVCSoftware


Ignore:
Timestamp:
27 Dec 2013, 10:54:03 (10 years ago)
Author:
chang
Message:

Integrate

  • JCT3V-F0136/F0045: view order index based camera parameter signaling
  • JCT3V-F0082: the cp_in_slice_segment_layer_flag to be view specific and used as a condition of the presence of slice header level camera parameters
  • JCT3V-F0044: move camera parameter from slice header extension to slice header
Location:
branches/HTM-9.1-dev0-MediaTek
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-9.1-dev0-MediaTek/source/App/TAppEncoder/TAppEncTop.cpp

    r753 r755  
    7676#endif
    7777 
     78#if CAM_HLS_F0136_F0045_F0082
     79  vps.createCamPars(m_iNumberOfViews);
     80#endif
     81
    7882#if DLT_DIFF_CODING_IN_PPS
    7983  TComDLT& dlt = m_dlt;
     
    792796Void TAppEncTop::xInitLib(Bool isFieldCoding)
    793797{
     798#if CAM_HLS_F0136_F0045_F0082
     799  for ( Int viewIndex = 0; viewIndex < m_vps.getNumViews(); viewIndex++ )
     800  {
     801    m_vps.initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(),
     802      m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );
     803  }
     804#endif
     805
    794806#if H_MV
    795807  for(Int layer=0; layer<m_numberOfLayers; layer++)
  • branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TComSlice.cpp

    r753 r755  
    782782Void TComSlice::setCamparaSlice( Int** aaiScale, Int** aaiOffset )
    783783
     784#if CAM_HLS_F0136_F0045_F0082
     785  if( m_pcVPS->hasCamParInSliceHeader( m_viewIndex ) )
     786#else
    784787  if( m_pcSPS->hasCamParInSliceHeader() )
     788#endif
    785789  {   
    786790    for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < m_viewIndex; uiBaseViewIndex++ )
     
    19201924  }
    19211925#endif
     1926#if CAM_HLS_F0136_F0045_F0082
     1927  deleteCamPars();
     1928#endif
    19221929}
    19231930
     
    20722079  return foundLayerIdinNuh;
    20732080}
     2081#if CAM_HLS_F0136_F0045_F0082
     2082Void TComVPS::createCamPars(Int iNumViews)
     2083{
     2084  Int i = 0, j = 0;
     2085
     2086  m_bCamParPresent = new Bool[ iNumViews ];
     2087  m_bCamParInSliceHeader = new Bool[ iNumViews ];
     2088
     2089  m_aaaiCodedScale = new Int**[ iNumViews ];
     2090  m_aaaiCodedOffset = new Int**[ iNumViews ];
     2091  for ( i = 0; i < iNumViews ; i++ )
     2092  {
     2093    m_aaaiCodedScale[i] = new Int*[ 2 ];
     2094    m_aaaiCodedOffset[i] = new Int*[ 2 ];
     2095    for ( j = 0; j < 2; j++ )
     2096    {
     2097      m_aaaiCodedScale[i][j] = new Int[ MAX_NUM_LAYERS ];
     2098      m_aaaiCodedOffset[i][j] = new Int[ MAX_NUM_LAYERS ];
     2099      for ( Int k = 0; k < MAX_NUM_LAYERS; k++ )
     2100      {
     2101        m_aaaiCodedScale[i][j][k] = 0;
     2102        m_aaaiCodedOffset[i][j][k] = 0;
     2103      }
     2104    }
     2105  }
     2106}
     2107
     2108Void TComVPS::deleteCamPars()
     2109{
     2110  Int iNumViews = getNumViews();
     2111  Int i = 0, j = 0;
     2112
     2113  if ( m_bCamParPresent != NULL )
     2114  {
     2115    delete [] m_bCamParPresent;
     2116  }
     2117  if ( m_bCamParInSliceHeader != NULL )
     2118  {
     2119    delete [] m_bCamParInSliceHeader;
     2120  }
     2121
     2122  if ( m_aaaiCodedScale != NULL )
     2123  {
     2124    for ( i = 0; i < iNumViews ; i++ )
     2125    {
     2126      for ( j = 0; j < 2; j++ )
     2127      {
     2128        delete [] m_aaaiCodedScale[i][j];
     2129      }
     2130      delete [] m_aaaiCodedScale[i];
     2131    }
     2132    delete [] m_aaaiCodedScale;
     2133  }
     2134
     2135  if ( m_aaaiCodedOffset != NULL )
     2136  {
     2137    for ( i = 0; i < iNumViews ; i++ )
     2138    {
     2139      for ( j = 0; j < 2; j++ )
     2140      {
     2141        delete [] m_aaaiCodedOffset[i][j];
     2142      }
     2143      delete [] m_aaaiCodedOffset[i];
     2144    }
     2145    delete [] m_aaaiCodedOffset;
     2146  }
     2147}
     2148
     2149
     2150Void
     2151  TComVPS::initCamParaVPS( UInt uiViewIndex, Bool bCamParPresent, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset )
     2152{
     2153  AOT( uiViewIndex != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) ); 
     2154
     2155  m_uiCamParPrecision = ( ( uiViewIndex != 0 )? uiCamParPrecision : 0 );
     2156  m_bCamParPresent[ uiViewIndex ] = (( uiViewIndex != 0 )? bCamParPresent  : false );
     2157  m_bCamParInSliceHeader[ uiViewIndex ]  = ( (uiViewIndex != 0)? bCamParSlice  : false );
     2158
     2159  if( !m_bCamParInSliceHeader[ uiViewIndex ] )
     2160  {
     2161    for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ )
     2162    {
     2163      m_aaaiCodedScale [ uiViewIndex ][ 0 ][ uiBaseViewIndex ] = aaiScale [ uiBaseViewIndex ][     uiViewIndex ];
     2164      m_aaaiCodedScale [ uiViewIndex ][ 1 ][ uiBaseViewIndex ] = aaiScale [     uiViewIndex ][ uiBaseViewIndex ];
     2165      m_aaaiCodedOffset[ uiViewIndex ][ 0 ][ uiBaseViewIndex ] = aaiOffset[ uiBaseViewIndex ][     uiViewIndex ];
     2166      m_aaaiCodedOffset[ uiViewIndex ][ 1 ][ uiBaseViewIndex ] = aaiOffset[     uiViewIndex ][ uiBaseViewIndex ];
     2167    }
     2168  }
     2169}
     2170#endif // CAM_HLS_F0136_F0045_F0082
     2171
    20742172#endif // H_3D
    20752173
     
    27112809#endif
    27122810#if H_3D
     2811#if !CAM_HLS_F0136_F0045_F0082
    27132812Void
    27142813TComSPS::initCamParaSPS( UInt uiViewIndex, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset )
     
    27322831  }
    27332832}
     2833#endif
    27342834#endif
    27352835TComReferencePictureSet::TComReferencePictureSet()
     
    34433543  assert( m_depthToDisparityF != NULL );
    34443544
     3545#if CAM_HLS_F0136_F0045_F0082
     3546  TComVPS* vps = getVPS();
     3547#else
    34453548  TComSPS* sps = getSPS();
    3446 
     3549#endif
     3550
     3551#if CAM_HLS_F0136_F0045_F0082
     3552  Int log2Div = g_bitDepthY - 1 + vps->getCamParPrecision();
     3553  Int viewIndex = getViewIndex();
     3554
     3555  Bool camParaSH = vps->hasCamParInSliceHeader( viewIndex );
     3556
     3557  Int* codScale     = camParaSH ? m_aaiCodedScale [ 0 ] : vps->getCodedScale    ( viewIndex );
     3558  Int* codOffset    = camParaSH ? m_aaiCodedOffset[ 0 ] : vps->getCodedOffset   ( viewIndex );
     3559  Int* invCodScale  = camParaSH ? m_aaiCodedScale [ 1 ] : vps->getInvCodedScale ( viewIndex );
     3560  Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : vps->getInvCodedOffset( viewIndex );
     3561#else
    34473562  Int log2Div = g_bitDepthY - 1 + sps->getCamParPrecision();
    34483563
     
    34533568  Int* invCodScale  = camParaSH ? m_aaiCodedScale [ 1 ] : sps->getInvCodedScale ();
    34543569  Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : sps->getInvCodedOffset();
     3570#endif
    34553571
    34563572  for (Int i = 0; i <= ( getViewIndex() - 1); i++)
  • branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TComSlice.h

    r753 r755  
    862862
    863863#if H_3D
     864#if CAM_HLS_F0136_F0045_F0082
     865  UInt        m_uiCamParPrecision;
     866  Bool*       m_bCamParInSliceHeader;
     867  Bool*       m_bCamParPresent;
     868  Int         ***m_aaaiCodedScale ;
     869  Int         ***m_aaaiCodedOffset;
     870#endif
    864871  Bool        m_ivMvScalingFlag;
    865872#endif
     
    11431150  Void    setARPStepNum( Int layerIdInVps, UInt val )                      { m_uiARPStepNum[layerIdInVps]    = val;     }
    11441151#endif
     1152#if CAM_HLS_F0136_F0045_F0082
     1153  Void createCamPars(Int iNumViews);
     1154  Void deleteCamPars();
     1155  Void initCamParaVPS      (  UInt uiViewIndex, Bool bCamParPresent = false, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 );
     1156  UInt getCamParPrecision    ()  { return m_uiCamParPrecision; }
     1157  Bool getCamParPresent      ( Int viewIndex )  { return m_bCamParPresent[viewIndex]; }
     1158  Bool hasCamParInSliceHeader( Int viewIndex )  { return m_bCamParInSliceHeader[viewIndex]; }
     1159  Void setHasCamParInSliceHeader( Int viewIndex, Bool b )  { m_bCamParInSliceHeader[viewIndex] = b; }
     1160  Int* getCodedScale         ( Int viewIndex )  { return m_aaaiCodedScale [viewIndex][0]; }
     1161  Int* getCodedOffset        ( Int viewIndex )  { return m_aaaiCodedOffset[viewIndex][0]; }
     1162  Int* getInvCodedScale      ( Int viewIndex )  { return m_aaaiCodedScale [viewIndex][1]; }
     1163  Int* getInvCodedOffset     ( Int viewIndex )  { return m_aaaiCodedOffset[viewIndex][1]; }
     1164#endif
     1165
    11451166#if H_3D_IV_MERGE
    11461167  Void    setIvMvPredFlag     ( Int layerIdInVps, Bool val )  { m_ivMvPredFlag[ layerIdInVps ] = val; }
     
    17801801#endif
    17811802#if H_3D
     1803#if !CAM_HLS_F0136_F0045_F0082
    17821804  Void initCamParaSPS      (  UInt uiViewIndex, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 );
    17831805  UInt getCamParPrecision    ()  { return m_uiCamParPrecision; }
     
    17901812  Int* getInvCodedScale      ()  { return m_aaiCodedScale [1]; }
    17911813  Int* getInvCodedOffset     ()  { return m_aaiCodedOffset[1]; }
     1814#endif
    17921815#endif
    17931816#if H_MV
  • branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibCommon/TypeDef.h

    r753 r755  
    174174                                              // SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX
    175175#endif
     176
     177#define CAM_HLS_F0136_F0045_F0082         1   // JCT3V-F0136/F0045: view order index based camera parameter signaling
     178                                              // JCT3V-F0082: the cp_in_slice_segment_layer_flag to be view specific and used as a condition of the presence of slice header level camera parameters
     179#define CAM_HLS_F0044                     1   // JCT3V-F0044: move camera parameter from slice header extension to slice header
     180
    176181
    177182// Rate Control
  • branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r753 r755  
    10491049#endif
    10501050
     1051#if !CAM_HLS_F0136_F0045_F0082
    10511052  UInt uiCamParPrecision = 0;
    10521053  Bool bCamParSlice      = false;
     
    10681069  }
    10691070  pcSPS->initCamParaSPS( viewIndex, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );
     1071#endif
    10701072}
    10711073#endif
     
    11791181#if H_3D
    11801182      m_pcBitstream->readOutTrailingBits();
     1183#if CAM_HLS_F0136_F0045_F0082
     1184      pcVPS->createCamPars(pcVPS->getNumViews());
     1185#endif
    11811186      parseVPSExtension2( pcVPS );   
    11821187      READ_FLAG( uiCode,  "vps_extension3_flag" );
     
    19311936    }
    19321937  }
     1938#if CAM_HLS_F0136_F0045_F0082
     1939  UInt uiCamParPrecision = 0;
     1940  Bool bCamParSlice      = false;
     1941  Bool bCamParPresentFlag = false;
     1942
     1943  READ_UVLC( uiCamParPrecision, "cp_precision" );
     1944  for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
     1945  {
     1946    READ_FLAG( uiCode, "cp_present_flag[i]" );                  bCamParPresentFlag = ( uiCode == 1);
     1947    if ( bCamParPresentFlag )
     1948    {
     1949      READ_FLAG( uiCode, "cp_in_slice_segment_header_flag[i]" );          bCamParSlice = ( uiCode == 1);
     1950      if ( !bCamParSlice )
     1951      {
     1952        for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )
     1953        {
     1954          Int iCode;
     1955          READ_SVLC( iCode, "vps_cp_scale" );                m_aaiTempScale  [ uiBaseIndex ][ viewIndex ]   = iCode;
     1956          READ_SVLC( iCode, "vps_cp_off" );                  m_aaiTempOffset [ uiBaseIndex ][ viewIndex ]   = iCode;
     1957          READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale  [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];
     1958          READ_SVLC( iCode, "vps_cp_inv_off_plus_off" );     m_aaiTempOffset [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];
     1959        }
     1960      }
     1961      pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );
     1962    }
     1963  }
     1964#endif
    19331965  READ_FLAG( uiCode, "iv_mv_scaling_flag");                       pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );
    19341966}
     
    26572689  }
    26582690
     2691#if CAM_HLS_F0044
     2692#if CAM_HLS_F0136_F0045_F0082
     2693  if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && !rpcSlice->getIsDepth() )
     2694#else
     2695  if( rpcSlice->getSPS()->hasCamParInSliceHeader() )
     2696#endif
     2697  {
     2698    UInt uiViewIndex = rpcSlice->getViewIndex();
     2699    for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
     2700    {
     2701      READ_SVLC( iCode, "cp_scale" );                m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ] = iCode;
     2702      READ_SVLC( iCode, "cp_off" );                  m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ] = iCode;
     2703      READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ];
     2704      READ_SVLC( iCode, "cp_inv_off_plus_off" );     m_aaiTempOffset[ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ];
     2705    }
     2706    rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset );
     2707  }
     2708
     2709#endif
     2710
    26592711  if(pps->getSliceHeaderExtensionPresentFlag())
    26602712  {
    26612713    READ_UVLC(uiCode,"slice_header_extension_length");
    2662 #if H_3D
     2714#if H_3D && !CAM_HLS_F0044
     2715#if CAM_HLS_F0136_F0045_F0082
     2716    if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && !rpcSlice->getIsDepth() )
     2717#else
    26632718    if( rpcSlice->getSPS()->hasCamParInSliceHeader() )
     2719#endif
    26642720    {
    26652721      UInt uiViewIndex = rpcSlice->getViewIndex();
  • branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibDecoder/TDecTop.cpp

    r748 r755  
    228228    m_uiMaxViewIndex                     = std::max( m_uiMaxViewIndex, uiViewIndex );
    229229    m_aiViewId[ uiViewIndex ]            = pcSlice->getViewId();
     230#if CAM_HLS_F0136_F0045_F0082
     231    if( uiViewIndex == 1 )
     232    {
     233      m_uiCamParsCodedPrecision       = pcSlice->getVPS()->getCamParPrecision     ();
     234      m_bCamParsVaryOverTime          = pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex );
     235    }
     236    else if( uiViewIndex > 1 )
     237    {
     238      AOF( m_uiCamParsCodedPrecision == pcSlice->getVPS()->getCamParPrecision     () );
     239      AOF( m_bCamParsVaryOverTime    == pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex ) );
     240    }
     241#else
    230242    if( uiViewIndex == 1 )
    231243    {
     
    238250      AOF( m_bCamParsVaryOverTime    == pcSlice->getSPS()->hasCamParInSliceHeader () );
    239251    }
     252#endif
    240253    for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
    241254    {
     
    251264      else
    252265      {
     266#if CAM_HLS_F0136_F0045_F0082
     267        m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getVPS()->getCodedScale    (uiViewIndex) [ uiBaseIndex ];
     268        m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getVPS()->getCodedOffset   (uiViewIndex) [ uiBaseIndex ];
     269        m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getVPS()->getInvCodedScale (uiViewIndex) [ uiBaseIndex ];
     270        m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getVPS()->getInvCodedOffset(uiViewIndex) [ uiBaseIndex ];
     271#else
    253272        m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getSPS()->getCodedScale    () [ uiBaseIndex ];
    254273        m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ]  = pcSlice->getSPS()->getCodedOffset   () [ uiBaseIndex ];
    255274        m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getSPS()->getInvCodedScale () [ uiBaseIndex ];
    256275        m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ]  = pcSlice->getSPS()->getInvCodedOffset() [ uiBaseIndex ];
     276#endif
    257277        xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
    258278        xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );
     
    286306CamParsCollector::copyCamParamForSlice( TComSlice* pcSlice )
    287307{
     308#if !CAM_HLS_F0136_F0045_F0082
    288309  UInt uiViewIndex = pcSlice->getViewIndex();
    289310
    290311  pcSlice->getSPS()->initCamParaSPS( uiViewIndex, m_uiCamParsCodedPrecision, m_bCamParsVaryOverTime, m_aaiCodedScale, m_aaiCodedOffset );
    291 
     312#endif
    292313  if( m_bCamParsVaryOverTime )
    293314  {
     
    11091130  if( pcSlice->getIsDepth() )
    11101131  {
     1132#if !CAM_HLS_F0136_F0045_F0082
    11111133    pcSlice->getSPS()->setHasCamParInSliceHeader( false );
     1134#endif
    11121135  }
    11131136#endif
  • branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibEncoder/TEncCavlc.cpp

    r753 r755  
    861861}
    862862#endif
    863   if (!depthFlag )
    864   {
    865     WRITE_UVLC( pcSPS->getCamParPrecision(), "cp_precision" );
    866     WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "cp_in_slice_header_flag" );
    867     if( !pcSPS->hasCamParInSliceHeader() )
    868     {
    869       for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ )
    870       {
    871         WRITE_SVLC( pcSPS->getCodedScale    ()[ uiIndex ],                                      "cp_scale" );
    872         WRITE_SVLC( pcSPS->getCodedOffset   ()[ uiIndex ],                                      "cp_off" );
    873         WRITE_SVLC( pcSPS->getInvCodedScale ()[ uiIndex ] + pcSPS->getCodedScale ()[ uiIndex ], "cp_inv_scale_plus_scale" );
    874         WRITE_SVLC( pcSPS->getInvCodedOffset()[ uiIndex ] + pcSPS->getCodedOffset()[ uiIndex ], "cp_inv_off_plus_off" );
    875       }
    876     }
    877   }
     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
    878880}
    879881#endif
     
    16751677    } 
    16761678  }
     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
    16771700#if H_3D_TMVP
    16781701  WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 ,          "iv_mv_scaling_flag" );
     
    21392162    }
    21402163  }
     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
    21412185  if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag())
    21422186  {
    2143 #if !H_3D
     2187#if !H_3D || CAM_HLS_F0044
    21442188    WRITE_UVLC(0,"slice_header_extension_length");
    21452189#else
    21462190    WRITE_UVLC(0,"slice_header_extension_length"); //<- this element needs to be set to the correct value!!
    2147 
    21482191#if QC_DEPTH_IV_MRG_F0125
     2192#if CAM_HLS_F0136_F0045_F0082
     2193    if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && !pcSlice->getIsDepth() )
     2194#else
    21492195    if( pcSlice->getSPS()->hasCamParInSliceHeader() && !pcSlice->getIsDepth() )
     2196#endif
    21502197#else
    21512198    if( pcSlice->getSPS()->hasCamParInSliceHeader() )
  • branches/HTM-9.1-dev0-MediaTek/source/Lib/TLibEncoder/TEncTop.cpp

    r748 r755  
    854854  }
    855855#if H_3D
     856#if !CAM_HLS_F0136_F0045_F0082
    856857#if !QC_DEPTH_IV_MRG_F0125
    857858  if ( !m_isDepth )
     
    860861    m_cSPS.initCamParaSPS           ( m_viewIndex, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset );
    861862  }
     863#endif
    862864#endif
    863865}
     
    10101012  }
    10111013#if H_3D
     1014#if CAM_HLS_F0136_F0045_F0082
     1015  if( m_cVPS->hasCamParInSliceHeader( getViewIndex() ) )
     1016#else
    10121017  if( m_cSPS.hasCamParInSliceHeader() )
     1018#endif
    10131019  {
    10141020    m_cPPS.setSliceHeaderExtensionPresentFlag( true );
Note: See TracChangeset for help on using the changeset viewer.