Ignore:
Timestamp:
26 Nov 2012, 18:35:20 (12 years ago)
Author:
qualcomm
Message:

JCT3V-B0046, MVHEVC codec;
Two bugs fixed for HTM:
1) encoder crash, see the macro 'BUG_FIX_HTM'
2) wrong place for '#endif' in TComPrediction.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.0-Qualcomm/source/App/TAppDecoder/TAppDecTop.cpp

    r189 r194  
    8282Void TAppDecTop::decode()
    8383{
    84 #if VIDYO_VPS_INTEGRATION
     84#if VIDYO_VPS_INTEGRATION|MVHEVC
    8585  increaseNumberOfViews( 0, 0, 0 );
    8686#else
     
    145145    {
    146146      read(nalu, nalUnit);
     147#if MVHEVC
     148    viewDepthId = nalu.m_layerId;
     149    Int depth = 0;
     150    Int viewId = viewDepthId;
     151#else
    147152#if VIDYO_VPS_INTEGRATION
    148153      Int viewId = 0;
     
    162167      viewDepthId = viewId * 2 + depth;   // coding order T0D0T1D1T2D2
    163168#endif
    164       
     169#endif     
    165170      newPicture[viewDepthId] = false;
    166171      if( viewDepthId >= m_tDecTop.size() )     
    167172      {
    168 #if VIDYO_VPS_INTEGRATION
     173#if VIDYO_VPS_INTEGRATION|MVHEVC
    169174        increaseNumberOfViews( viewDepthId, viewId, depth );
    170175#else
     
    195200      if( !(m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) )
    196201      {
     202#if MVHEVC
     203        if(viewDepthId && m_tDecTop[viewDepthId]->m_bFirstNal== false)
     204        {
     205          m_tDecTop[viewDepthId]->m_bFirstNal = true;
     206          ParameterSetManagerDecoder* pDecV0 = m_tDecTop[0]->xGetParaSetDec();
     207          m_tDecTop[viewDepthId]->xCopyVPS(pDecV0->getPrefetchedVPS(0));
     208          m_tDecTop[viewDepthId]->xCopySPS(pDecV0->getPrefetchedSPS(0));
     209          m_tDecTop[viewDepthId]->xCopyPPS(pDecV0->getPrefetchedPPS(0));
     210        }
     211#endif
    197212        newPicture[viewDepthId] = m_tDecTop[viewDepthId]->decode(nalu, m_iSkipFrame, m_pocLastDisplay[viewDepthId]);
    198213        if (newPicture[viewDepthId])
     
    218233    if( pcListPic[viewDepthId] )
    219234    {
     235#if QC_REM_IDV
     236      Int iviewId = m_tDecTop[viewDepthId]->getViewId();
     237      if( newPicture[viewDepthId] && (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR || ((nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR && iviewId) && m_tDecTop[viewDepthId]->getNalUnitTypeBaseView() == NAL_UNIT_CODED_SLICE_IDR)) )
     238#else
    220239      if( newPicture[viewDepthId] && (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR || (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDV && m_tDecTop[viewDepthId]->getNalUnitTypeBaseView() == NAL_UNIT_CODED_SLICE_IDR)) )
     240#endif
    221241      {
    222242        xFlushOutput( pcListPic[viewDepthId], viewDepthId );
     
    275295        m_tDecTop[viewDepthIdx]->destroy() ;
    276296      }
     297#if MVHEVC
     298      if(viewDepthIdx)
     299      {
     300         //Call clear function to remove the record, which has been freed during viewDepthIdx = 0 case.
     301        m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearSPS();
     302        m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearVPS();
     303        m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearPPS();
     304      }
     305#endif
    277306      delete m_tDecTop[viewDepthIdx] ;
    278307      m_tDecTop[viewDepthIdx] = NULL ;
     
    416445  m_pocLastDisplay[viewDepthId] = -MAX_INT;
    417446}
    418 #if VIDYO_VPS_INTEGRATION
     447#if VIDYO_VPS_INTEGRATION|MVHEVC
    419448Void  TAppDecTop::increaseNumberOfViews  ( UInt layerId, UInt viewId, UInt isDepth )
    420449#else
     
    422451#endif
    423452{
    424 #if VIDYO_VPS_INTEGRATION
     453#if VIDYO_VPS_INTEGRATION|MVHEVC
    425454  Int newNumberOfViewDepth = layerId + 1;
    426455#endif
     
    429458    m_outputBitDepth = g_uiBitDepth + g_uiBitIncrement;
    430459  }
    431 #if !VIDYO_VPS_INTEGRATION
     460#if !VIDYO_VPS_INTEGRATION&!MVHEVC
    432461  Int viewId = (newNumberOfViewDepth-1)>>1;   // coding order T0D0T1D1T2D2
    433462  Bool isDepth = ((newNumberOfViewDepth % 2) == 0);  // coding order T0D0T1D1T2D2
     
    442471      m_tVideoIOYuvReconFile.push_back(new TVideoIOYuv);
    443472      Char buffer[4];
    444 #if VIDYO_VPS_INTEGRATION
     473#if VIDYO_VPS_INTEGRATION|MVHEVC
    445474      sprintf(buffer,"_%i", viewId );
    446475#else
     
    448477#endif
    449478      Char* nextFilename = NULL;
    450 #if VIDYO_VPS_INTEGRATION
     479#if VIDYO_VPS_INTEGRATION|MVHEVC
    451480      if( isDepth)
    452481#else
     
    463492        xAppendToFileNameEnd( m_pchReconFile, buffer, nextFilename);
    464493      }
    465 #if !VIDYO_VPS_INTEGRATION
     494#if !VIDYO_VPS_INTEGRATION&!MVHEVC
    466495      if( isDepth || ( !isDepth && (m_tVideoIOYuvReconFile.size() % 2) == 1 ) )
    467496#endif
     
    480509  {
    481510    m_tDecTop.push_back(new TDecTop);
    482 #if !VIDYO_VPS_INTEGRATION
     511#if !VIDYO_VPS_INTEGRATION&!MVHEVC
    483512    if( isDepth || ( !isDepth && (m_tVideoIOYuvReconFile.size() % 2) == 1 ) )
    484513    {
     
    490519      m_tDecTop.back()->setPictureDigestEnabled(m_pictureDigestEnabled);
    491520      m_tDecTop.back()->setCamParsCollector( &m_cCamParsCollector );
    492 #if !VIDYO_VPS_INTEGRATION
     521#if !VIDYO_VPS_INTEGRATION&!MVHEVC
    493522    }
    494523#endif
Note: See TracChangeset for help on using the changeset viewer.