Changeset 976 in 3DVCSoftware for trunk/source/App/TAppDecoder


Ignore:
Timestamp:
7 Jul 2014, 17:27:51 (11 years ago)
Author:
tech
Message:
  • Merged 11.1-dev0@975. (Clean ups)
  • Added coding results.
  • Changed version number.
Location:
trunk/source/App/TAppDecoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/App/TAppDecoder/TAppDecTop.cpp

    r964 r976  
    7171#endif
    7272
    73 #if H_MV_HLS_7_VPS_P0300_27
     73#if H_MV
    7474    m_markedForOutput = false;
    7575#endif
     
    161161  Int  pocLastPic        = -MAX_INT;   
    162162
    163 #if H_MV_HLS_7_VPS_P0300_27
    164163  Int  layerIdLastPic    = -MAX_INT;
    165 #endif
    166164  Int  layerIdCurrPic    = 0;
    167165
     
    216214          || (nalu.m_nalUnitType == NAL_UNIT_VPS && nalu.m_layerId > 0)           
    217215          || (nalu.m_nalUnitType == NAL_UNIT_EOB && nalu.m_layerId > 0)   
    218 #if H_MV_HLS_8_MIS_Q0177_47
    219216          || (nalu.m_nalUnitType == NAL_UNIT_EOS && nalu.m_layerId > 0)   
    220 #endif
    221217         )
    222218      {
     
    237233        // - nalu.isSlice() == true     
    238234
    239 #if H_MV_HLS_7_VPS_P0300_27
    240235        if ( nalu.m_nalUnitType == NAL_UNIT_VPS )
    241236        {
     
    244239          {
    245240            TComVPS* vps = m_vps;
    246 #else
    247         // Update TargetDecLayerIdList only when not specified by layer id file, specification by file might actually out of conformance.
    248         if (nalu.m_nalUnitType == NAL_UNIT_VPS && m_targetDecLayerIdSetFileEmpty )
    249         {
    250           TComVPS* vps = m_tDecTop[decIdx]->getPrefetchedVPS();
    251 #endif
    252241          if ( m_targetOptLayerSetIdx == -1 )
    253242          {
     
    255244            m_targetOptLayerSetIdx = vps->getVpsNumLayerSetsMinus1();
    256245          }
    257 #if H_MV_HLS_8_HRD_Q0102_08
     246
    258247          for (Int dI = 0; dI < m_numDecoders; dI++ )
    259248          {
    260249            m_tDecTop[decIdx]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx );
    261250          }
    262 #endif
    263251
    264252          if ( m_targetOptLayerSetIdx < 0 || m_targetOptLayerSetIdx >= vps->getNumOutputLayerSets() )
     
    269257          m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx );
    270258        }
    271 #if H_MV_HLS_7_VPS_P0300_27
    272       }
    273 #endif
     259      }
    274260#if H_3D
    275261        if (nalu.m_nalUnitType == NAL_UNIT_VPS )
     
    289275        if ( bNewPicture || !bitstreamFile )
    290276        {
    291 #if H_MV_HLS_7_VPS_P0300_27
    292277          layerIdLastPic    = layerIdCurrPic;
    293 #endif
    294278          layerIdCurrPic    = nalu.m_layerId;
    295279          pocLastPic        = pocCurrPic;
     
    340324        assert( decIdxLastPic != -1 );
    341325        m_tDecTop[decIdxLastPic]->endPicDecoding(poc, pcListPic, m_targetDecLayerIdSet );
    342 #if H_MV_HLS_7_VPS_P0300_27
    343326        xMarkForOutput( allLayersDecoded, poc, layerIdLastPic );
    344 #endif
    345327#else
    346328        m_cTDecTop.executeLoopFilters(poc, pcListPic);
     
    664646          const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window();
    665647
     648          const Bool isTff = pcPicTop->isTopField();
     649#if H_MV
     650        assert( conf   .getScaledFlag() );
     651        assert( defDisp.getScaledFlag() );
     652#if ENC_DEC_TRACE
     653        g_bJustDoIt = true; 
     654        writeToTraceFile( "OutputPic Poc"   , pcPic->getPOC    (), g_decTracePicOutput  );
     655        writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput );         
     656        g_bJustDoIt = false; 
     657#endif
     658        m_tVideoIOYuvReconFile[decIdx]->write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
     659#else
     660          m_cTVideoIOYuvReconFile.write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
     661#endif
     662                                        conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
     663                                        conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
     664                                        conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
     665                                        conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), isTff );
     666        }
     667       
     668        // update POC of display order
     669#if H_MV
     670        m_pocLastDisplay[decIdx] = pcPic->getPOC();
     671#else
     672        m_iPOCLastDisplay = pcPicBottom->getPOC();
     673#endif
     674       
     675        // erase non-referenced picture in the reference picture list after display
     676        if ( !pcPicTop->getSlice(0)->isReferenced() && pcPicTop->getReconMark() == true )
     677        {
     678#if !DYN_REF_FREE
     679          pcPicTop->setReconMark(false);
     680         
     681          // mark it should be extended later
     682          pcPicTop->getPicYuvRec()->setBorderExtension( false );
     683         
     684#else
     685          pcPicTop->destroy();
     686          pcListPic->erase( iterPic );
     687          iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
     688          continue;
     689#endif
     690        }
     691        if ( !pcPicBottom->getSlice(0)->isReferenced() && pcPicBottom->getReconMark() == true )
     692        {
     693#if !DYN_REF_FREE
     694          pcPicBottom->setReconMark(false);
     695         
     696          // mark it should be extended later
     697          pcPicBottom->getPicYuvRec()->setBorderExtension( false );
     698         
     699#else
     700          pcPicBottom->destroy();
     701          pcListPic->erase( iterPic );
     702          iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
     703          continue;
     704#endif
     705        }
     706        pcPicTop->setOutputMark(false);
     707        pcPicBottom->setOutputMark(false);
     708      }
     709    }
     710  }
     711  else if (!pcPic->isField()) //Frame Decoding
     712  {
     713    iterPic = pcListPic->begin();
     714    while (iterPic != pcListPic->end())
     715    {
     716      pcPic = *(iterPic);
     717
     718#if H_MV
     719      if(pcPic->getOutputMark() && pcPic->getPOC() > m_pocLastDisplay[decIdx] &&
     720        (numPicsNotYetDisplayed >  numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid))
     721#else     
     722      if(pcPic->getOutputMark() && pcPic->getPOC() > m_iPOCLastDisplay &&
     723        (numPicsNotYetDisplayed >  numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid))
     724#endif
     725      {
     726        // write to file
     727        numPicsNotYetDisplayed--;
     728        if(pcPic->getSlice(0)->isReferenced() == false)
     729        {
     730          dpbFullness--;
     731        }
     732#if H_MV
     733      if ( m_pchReconFiles[decIdx] )
     734#else
     735        if ( m_pchReconFile )
     736#endif
     737        {
     738          const Window &conf = pcPic->getConformanceWindow();
     739          const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
     740#if H_MV
     741        assert( conf   .getScaledFlag() );
     742        assert( defDisp.getScaledFlag() );
     743#if ENC_DEC_TRACE
     744        g_bJustDoIt = true; 
     745        writeToTraceFile( "OutputPic Poc"   , pcPic->getPOC    (), g_decTracePicOutput  );
     746        writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput );         
     747        g_bJustDoIt = false;
     748#endif
     749        m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(),
     750#else
     751          m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(),
     752#endif
     753                                        conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
     754                                        conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
     755                                        conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
     756                                        conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() );
     757        }
     758       
     759        // update POC of display order
     760#if H_MV
     761        m_pocLastDisplay[decIdx] = pcPic->getPOC();
     762#else
     763        m_iPOCLastDisplay = pcPic->getPOC();
     764#endif
     765       
     766        // erase non-referenced picture in the reference picture list after display
     767        if ( !pcPic->getSlice(0)->isReferenced() && pcPic->getReconMark() == true )
     768        {
     769#if !DYN_REF_FREE
     770          pcPic->setReconMark(false);
     771         
     772          // mark it should be extended later
     773          pcPic->getPicYuvRec()->setBorderExtension( false );
     774         
     775#else
     776          pcPic->destroy();
     777          pcListPic->erase( iterPic );
     778          iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
     779          continue;
     780#endif
     781        }
     782        pcPic->setOutputMark(false);
     783#if H_MV
     784        pcPic->setPicOutputFlag(false);
     785#endif
     786      }
     787     
     788      iterPic++;
     789    }
     790  }
     791}
     792/** \param pcListPic list of pictures to be written to file
     793    \todo            DYN_REF_FREE should be revised
     794 */
     795#if H_MV
     796Void TAppDecTop::xFlushOutput( TComList<TComPic*>* pcListPic, Int decIdx )
     797#else
     798Void TAppDecTop::xFlushOutput( TComList<TComPic*>* pcListPic )
     799#endif
     800{
     801  if(!pcListPic || pcListPic->empty())
     802  {
     803    return;
     804  }
     805  TComList<TComPic*>::iterator iterPic   = pcListPic->begin();
     806 
     807  iterPic   = pcListPic->begin();
     808  TComPic* pcPic = *(iterPic);
     809 
     810  if (pcPic->isField()) //Field Decoding
     811  {
     812    TComList<TComPic*>::iterator endPic   = pcListPic->end();
     813    endPic--;
     814    TComPic *pcPicTop, *pcPicBottom = NULL;
     815    while (iterPic != endPic)
     816    {
     817      pcPicTop = *(iterPic);
     818      iterPic++;
     819      pcPicBottom = *(iterPic);
     820     
     821      if ( pcPicTop->getOutputMark() && pcPicBottom->getOutputMark() && !(pcPicTop->getPOC()%2) && (pcPicBottom->getPOC() == pcPicTop->getPOC()+1) )
     822      {
     823        // write to file
     824#if H_MV
     825      if ( m_pchReconFiles[decIdx] )
     826#else
     827        if ( m_pchReconFile )
     828#endif
     829        {
     830          const Window &conf = pcPicTop->getConformanceWindow();
     831          const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window();
    666832          const Bool isTff = pcPicTop->isTopField();
    667833#if H_MV
     
    686852        // update POC of display order
    687853#if H_MV
    688         m_pocLastDisplay[decIdx] = pcPic->getPOC();
    689 #else
    690         m_iPOCLastDisplay = pcPicBottom->getPOC();
    691 #endif
    692        
     854      m_pocLastDisplay[decIdx] = pcPic->getPOC();
     855#else
     856      m_iPOCLastDisplay = pcPicBottom->getPOC();
     857#endif       
    693858        // erase non-referenced picture in the reference picture list after display
    694859        if ( !pcPicTop->getSlice(0)->isReferenced() && pcPicTop->getReconMark() == true )
     
    724889        pcPicTop->setOutputMark(false);
    725890        pcPicBottom->setOutputMark(false);
    726       }
    727     }
    728   }
    729   else if (!pcPic->isField()) //Frame Decoding
    730   {
    731     iterPic = pcListPic->begin();
     891       
     892#if !DYN_REF_FREE
     893        if(pcPicTop)
     894        {
     895          pcPicTop->destroy();
     896          delete pcPicTop;
     897          pcPicTop = NULL;
     898        }
     899#endif
     900      }
     901    }
     902    if(pcPicBottom)
     903    {
     904      pcPicBottom->destroy();
     905      delete pcPicBottom;
     906      pcPicBottom = NULL;
     907    }
     908  }
     909  else //Frame decoding
     910  {
    732911    while (iterPic != pcListPic->end())
    733912    {
    734913      pcPic = *(iterPic);
    735 
    736 #if H_MV
    737       if(pcPic->getOutputMark() && pcPic->getPOC() > m_pocLastDisplay[decIdx] &&
    738         (numPicsNotYetDisplayed >  numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid))
    739 #else     
    740       if(pcPic->getOutputMark() && pcPic->getPOC() > m_iPOCLastDisplay &&
    741         (numPicsNotYetDisplayed >  numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid))
    742 #endif
     914     
     915      if ( pcPic->getOutputMark() )
    743916      {
    744917        // write to file
    745         numPicsNotYetDisplayed--;
    746         if(pcPic->getSlice(0)->isReferenced() == false)
    747         {
    748           dpbFullness--;
    749         }
    750918#if H_MV
    751919      if ( m_pchReconFiles[decIdx] )
     
    756924          const Window &conf = pcPic->getConformanceWindow();
    757925          const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
    758 #if H_MV
    759         assert( conf   .getScaledFlag() );
    760         assert( defDisp.getScaledFlag() );
    761 #if ENC_DEC_TRACE
    762         g_bJustDoIt = true; 
    763         writeToTraceFile( "OutputPic Poc"   , pcPic->getPOC    (), g_decTracePicOutput  );
    764         writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput );         
    765         g_bJustDoIt = false;
    766 #endif
    767         m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(),
    768 #else
    769           m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(),
    770 #endif
    771                                         conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
    772                                         conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
    773                                         conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
    774                                         conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() );
    775         }
    776        
    777         // update POC of display order
    778 #if H_MV
    779         m_pocLastDisplay[decIdx] = pcPic->getPOC();
    780 #else
    781         m_iPOCLastDisplay = pcPic->getPOC();
    782 #endif
    783        
    784         // erase non-referenced picture in the reference picture list after display
    785         if ( !pcPic->getSlice(0)->isReferenced() && pcPic->getReconMark() == true )
    786         {
    787 #if !DYN_REF_FREE
    788           pcPic->setReconMark(false);
    789          
    790           // mark it should be extended later
    791           pcPic->getPicYuvRec()->setBorderExtension( false );
    792          
    793 #else
    794           pcPic->destroy();
    795           pcListPic->erase( iterPic );
    796           iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
    797           continue;
    798 #endif
    799         }
    800         pcPic->setOutputMark(false);
    801 #if H_MV_HLS_7_VPS_P0300_27
    802         pcPic->setPicOutputFlag(false);
    803 #endif
    804       }
    805      
    806       iterPic++;
    807     }
    808   }
    809 }
    810 /** \param pcListPic list of pictures to be written to file
    811     \todo            DYN_REF_FREE should be revised
    812  */
    813 #if H_MV
    814 Void TAppDecTop::xFlushOutput( TComList<TComPic*>* pcListPic, Int decIdx )
    815 #else
    816 Void TAppDecTop::xFlushOutput( TComList<TComPic*>* pcListPic )
    817 #endif
    818 {
    819   if(!pcListPic || pcListPic->empty())
    820   {
    821     return;
    822   }
    823   TComList<TComPic*>::iterator iterPic   = pcListPic->begin();
    824  
    825   iterPic   = pcListPic->begin();
    826   TComPic* pcPic = *(iterPic);
    827  
    828   if (pcPic->isField()) //Field Decoding
    829   {
    830     TComList<TComPic*>::iterator endPic   = pcListPic->end();
    831     endPic--;
    832     TComPic *pcPicTop, *pcPicBottom = NULL;
    833     while (iterPic != endPic)
    834     {
    835       pcPicTop = *(iterPic);
    836       iterPic++;
    837       pcPicBottom = *(iterPic);
    838      
    839       if ( pcPicTop->getOutputMark() && pcPicBottom->getOutputMark() && !(pcPicTop->getPOC()%2) && (pcPicBottom->getPOC() == pcPicTop->getPOC()+1) )
    840       {
    841         // write to file
    842 #if H_MV
    843       if ( m_pchReconFiles[decIdx] )
    844 #else
    845         if ( m_pchReconFile )
    846 #endif
    847         {
    848           const Window &conf = pcPicTop->getConformanceWindow();
    849           const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window();
    850           const Bool isTff = pcPicTop->isTopField();
    851926#if H_MV
    852927        assert( conf   .getScaledFlag() );
     
    858933        g_bJustDoIt = false; 
    859934#endif
    860         m_tVideoIOYuvReconFile[decIdx]->write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
    861 #else
    862           m_cTVideoIOYuvReconFile.write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),
    863 #endif
    864                                         conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
    865                                         conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
    866                                         conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
    867                                         conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), isTff );
    868         }
    869        
    870         // update POC of display order
    871 #if H_MV
    872       m_pocLastDisplay[decIdx] = pcPic->getPOC();
    873 #else
    874       m_iPOCLastDisplay = pcPicBottom->getPOC();
    875 #endif       
    876         // erase non-referenced picture in the reference picture list after display
    877         if ( !pcPicTop->getSlice(0)->isReferenced() && pcPicTop->getReconMark() == true )
    878         {
    879 #if !DYN_REF_FREE
    880           pcPicTop->setReconMark(false);
    881          
    882           // mark it should be extended later
    883           pcPicTop->getPicYuvRec()->setBorderExtension( false );
    884          
    885 #else
    886           pcPicTop->destroy();
    887           pcListPic->erase( iterPic );
    888           iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
    889           continue;
    890 #endif
    891         }
    892         if ( !pcPicBottom->getSlice(0)->isReferenced() && pcPicBottom->getReconMark() == true )
    893         {
    894 #if !DYN_REF_FREE
    895           pcPicBottom->setReconMark(false);
    896          
    897           // mark it should be extended later
    898           pcPicBottom->getPicYuvRec()->setBorderExtension( false );
    899          
    900 #else
    901           pcPicBottom->destroy();
    902           pcListPic->erase( iterPic );
    903           iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
    904           continue;
    905 #endif
    906         }
    907         pcPicTop->setOutputMark(false);
    908         pcPicBottom->setOutputMark(false);
    909        
    910 #if !DYN_REF_FREE
    911         if(pcPicTop)
    912         {
    913           pcPicTop->destroy();
    914           delete pcPicTop;
    915           pcPicTop = NULL;
    916         }
    917 #endif
    918       }
    919     }
    920     if(pcPicBottom)
    921     {
    922       pcPicBottom->destroy();
    923       delete pcPicBottom;
    924       pcPicBottom = NULL;
    925     }
    926   }
    927   else //Frame decoding
    928   {
    929     while (iterPic != pcListPic->end())
    930     {
    931       pcPic = *(iterPic);
    932      
    933       if ( pcPic->getOutputMark() )
    934       {
    935         // write to file
    936 #if H_MV
    937       if ( m_pchReconFiles[decIdx] )
    938 #else
    939         if ( m_pchReconFile )
    940 #endif
    941         {
    942           const Window &conf = pcPic->getConformanceWindow();
    943           const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
    944 #if H_MV
    945         assert( conf   .getScaledFlag() );
    946         assert( defDisp.getScaledFlag() );
    947 #if ENC_DEC_TRACE
    948         g_bJustDoIt = true; 
    949         writeToTraceFile( "OutputPic Poc"   , pcPic->getPOC    (), g_decTracePicOutput  );
    950         writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput );         
    951         g_bJustDoIt = false; 
    952 #endif
    953935        m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(),
    954936#else
     
    985967        }
    986968        pcPic->setOutputMark(false);
    987 #if H_MV_HLS_7_VPS_P0300_27
     969#if H_MV
    988970        pcPic->setPicOutputFlag(false);
    989971#endif
     
    10611043    m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists );
    10621044    m_tDecTop[ decIdx ]->setLayerInitilizedFlags( m_layerInitilizedFlags );
    1063 #if    H_MV_HLS_8_HRD_Q0102_08
    10641045    m_tDecTop[ decIdx ]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx );   
    1065 #endif
    10661046
    10671047#if H_3D
     
    10991079}
    11001080
    1101 
    1102 #if H_MV_HLS_7_VPS_P0300_27
    11031081Void TAppDecTop::xMarkForOutput( Bool allLayersDecoded, Int pocLastPic, Int layerIdLastPic )
    11041082
     
    11521130  }
    11531131}
    1154 #endif
     1132
     1133Void TAppDecTop::xMarkAltOutPic( Int targetOutputLayer, Int pocLastPic )
     1134{
     1135  Int optLayerIdxInVps = m_vps->getLayerIdInNuh( targetOutputLayer );
     1136  Int highestNuhLayerId = -1;
     1137  TComPic* picWithHighestNuhLayerId = NULL;
     1138  for (Int dIdx = 0; dIdx < m_numDecoders; dIdx++)
     1139  {
     1140    Int curLayerId = m_tDecTop[dIdx]->getLayerId();
     1141    Int curLayerIdxInVps = m_vps->getLayerIdInNuh( curLayerId  );
     1142    if ( m_vps->getInDirectDependencyFlag(optLayerIdxInVps, curLayerIdxInVps ) )
     1143    {
     1144      TComPic* curPic = m_ivPicLists.getPic( curLayerId, pocLastPic );
     1145      if (curPic != NULL)
     1146      {
     1147        if (curPic->getReconMark() && curPic->getPicOutputFlag() )
     1148        {
     1149          curPic->setOutputMark   ( false );
     1150          curPic->setPicOutputFlag( false );
     1151          if ( curLayerId > highestNuhLayerId)
     1152          {
     1153            highestNuhLayerId = curLayerId ;
     1154            picWithHighestNuhLayerId = curPic;
     1155          }           
     1156        }
     1157      }
     1158    }
     1159  }
     1160  if ( picWithHighestNuhLayerId != NULL )
     1161  {
     1162    picWithHighestNuhLayerId->setPicOutputFlag(true);
     1163    picWithHighestNuhLayerId->setOutputMark   (true);
     1164  }
     1165}
     1166
    11551167#endif
    11561168//! \}
  • trunk/source/App/TAppDecoder/TAppDecTop.h

    r964 r976  
    6868  TComPicLists                    m_ivPicLists;                                ///< picture buffers of decoder instances
    6969  Bool                            m_layerInitilizedFlags[ MAX_NUM_LAYER_IDS ]; ///< for layerwise startup
    70 #if H_MV_HLS_7_VPS_P0300_27
    7170  TComVPS*                        m_vps;                                ///< active VPS
    72 #endif
    7371#else
    7472  TDecTop                         m_cTDecTop;                     ///< decoder class
     
    7977  Int                             m_pocLastDisplay      [ MAX_NUM_LAYERS ]; ///< last POC in display order
    8078  Bool                            m_reconOpen           [ MAX_NUM_LAYERS ]; ///< reconstruction file opened
     79  Bool                            m_markedForOutput;
    8180#else
    8281  Int                             m_iPOCLastDisplay;              ///< last POC in display order
    8382#endif
    84 #if H_MV_HLS_7_VPS_P0300_27
    85   Bool                            m_markedForOutput;
    86 #endif
    87 
    8883
    8984#if H_3D
     
    107102  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file
    108103
    109 #if H_MV_HLS_7_VPS_P0300_27
    110104  Void  xMarkForOutput   ( Bool allLayersDecoded, Int pocLastPic, Int layerIdLastPic );         
    111   Void  xMarkAltOutPic    ( Int targetOutputLayer, Int pocLastPic )
    112   {
    113     Int optLayerIdxInVps = m_vps->getLayerIdInNuh( targetOutputLayer );
    114     Int highestNuhLayerId = -1;
    115     TComPic* picWithHighestNuhLayerId = NULL;
    116     for (Int dIdx = 0; dIdx < m_numDecoders; dIdx++)
    117     {
    118       Int curLayerId = m_tDecTop[dIdx]->getLayerId();
    119       Int curLayerIdxInVps = m_vps->getLayerIdInNuh( curLayerId  );
    120       if ( m_vps->getInDirectDependencyFlag(optLayerIdxInVps, curLayerIdxInVps ) )
    121       {
    122         TComPic* curPic = m_ivPicLists.getPic( curLayerId, pocLastPic );
    123         if (curPic != NULL)
    124         {
    125           if (curPic->getReconMark() && curPic->getPicOutputFlag() )
    126           {
    127             curPic->setOutputMark   ( false );
    128             curPic->setPicOutputFlag( false );
    129             if ( curLayerId > highestNuhLayerId)
    130             {
    131               highestNuhLayerId = curLayerId ;
    132               picWithHighestNuhLayerId = curPic;
    133             }           
    134           }
    135         }
    136       }
    137     }
    138     if ( picWithHighestNuhLayerId != NULL )
    139     {
    140       picWithHighestNuhLayerId->setPicOutputFlag(true);
    141       picWithHighestNuhLayerId->setOutputMark   (true);
    142     }
    143   }
    144 #endif
     105  Void  xMarkAltOutPic    ( Int targetOutputLayer, Int pocLastPic );
    145106
    146107  Void  xFlushOutput      ( TComList<TComPic*>* pcListPic, Int layerId ); ///< flush all remaining decoded pictures to file
Note: See TracChangeset for help on using the changeset viewer.