Changeset 976 in 3DVCSoftware for trunk/source/App


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
Files:
6 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
  • trunk/source/App/TAppEncoder/TAppEncCfg.cpp

    r964 r976  
    393393  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set") 
    394394  ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set") 
    395 #if H_MV_HLS_7_VPS_P0300_27
    396395  ("AltOutputLayerFlag",    m_altOutputLayerFlag , std::vector<Bool>(1,0), "Alt output layer flag")
    397 #endif
    398396  ("ProfileLevelTierIdx",   m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")
    399397 
     
    523521#if H_3D_IC
    524522  ("IlluCompEnable",           m_abUseIC, true, "Enable illumination compensation")
    525 #if MTK_LOW_LATENCY_IC_ENCODING_H0086
    526523  ("IlluCompLowLatencyEnc",    m_bUseLowLatencyICEnc, false, "Enable low-latency illumination compensation encoding")
    527 #endif
    528524#endif
    529525#if H_3D_INTER_SDC
     
    10581054  xResizeVector( m_wppInUseFlag );
    10591055
    1060 #if H_MV_HLS_7_VPS_P0300_27
    10611056  for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++)
    10621057  {   
    10631058    m_altOutputLayerFlag.push_back( false );     
    10641059  }
    1065 #endif
    10661060#else
    10671061  m_aidQP = new Int[ m_framesToBeEncoded + m_iGOPSize + 1 ];
     
    14651459  }
    14661460
    1467 #if H_MV_HLS_7_VPS_P0300_27
    14681461  xConfirmPara( m_altOutputLayerFlag.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );
    1469 #endif
    14701462  xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );
    14711463
     
    25152507#if H_3D_IC
    25162508  printf( "IlluCompEnable:%d ", m_abUseIC);
    2517 #if MTK_LOW_LATENCY_IC_ENCODING_H0086
    25182509  printf ("IlluCompLowLatencyEnc:%d ",  m_bUseLowLatencyICEnc);
    2519 #endif
    25202510#endif
    25212511#if H_3D_NBDV_REF
  • trunk/source/App/TAppEncoder/TAppEncCfg.h

    r964 r976  
    9494  std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets
    9595  std::vector<Int>       m_profileLevelTierIdx;               ///< Indices of of profile level tier
    96   #if H_MV_HLS_7_VPS_P0300_27
    9796  std::vector<Bool>      m_altOutputLayerFlag;                ///< Alt output layer flag
    98 #endif
    9997
    10098  // Dependencies
     
    140138#if H_3D_IC
    141139  Bool   m_abUseIC;
    142 #if MTK_LOW_LATENCY_IC_ENCODING_H0086
    143   Bool  m_bUseLowLatencyICEnc;
    144 #endif
     140  Bool   m_bUseLowLatencyICEnc;
    145141#endif
    146142#if H_3D_NBDV_REF
  • trunk/source/App/TAppEncoder/TAppEncTop.cpp

    r964 r976  
    5858{
    5959
    60 #if H_MV_HLS_8
     60#if H_MV
    6161  m_vps = new TComVPS;
    62 #endif
    63 #if !H_MV
     62#else
    6463  m_iFrameRcvd = 0;
    6564#endif
     
    7069TAppEncTop::~TAppEncTop()
    7170{
    72 #if H_MV_HLS_8
     71#if H_MV
    7372  if (m_vps)
    7473  {
     
    8281{
    8382#if H_MV
    84 #if H_MV_HLS_8
    8583  TComVPS& vps = (*m_vps);   
    86 #else
    87   TComVPS& vps = m_vps;   
    88 #endif
    8984#else
    9085  TComVPS vps;
     
    193188    m_cTEncTop.setDWeight                      ( isDepth ? m_iDWeight             : 0     );
    194189#endif // H_3D_VSO
    195 #if H_3D_ARP && !QC_IV_PRED_CONSTRAINT_H0137
    196     //====== Advanced Inter-view Residual Prediction =========
    197     m_cTEncTop.setUseAdvRP                     ( ( isDepth || 0==layerIdInVps ) ? 0 : m_uiUseAdvResPred );
    198     m_cTEncTop.setARPStepNum                   ( ( isDepth || 0==layerIdInVps ) ? 1 : H_3D_ARP_WFNR     );
    199 #endif
    200190#if H_3D_SPIVMP
    201191    m_cTEncTop.setSubPULog2Size                 (( isDepth || 0==layerIdInVps ) ? 0 : m_iSubPULog2Size   );
     
    204194#if H_3D_IC
    205195    m_cTEncTop.setUseIC                        ( vps.getViewIndex( layerId ) == 0 || isDepth ? false : m_abUseIC );
    206 #if MTK_LOW_LATENCY_IC_ENCODING_H0086
    207196    m_cTEncTop.setUseICLowLatencyEnc           ( m_bUseLowLatencyICEnc );
    208 #endif
    209197#endif
    210198  //========== Depth intra modes ==========
     
    708696{
    709697#if H_3D
    710 #if H_MV_HLS_8
    711698  for ( Int viewIndex = 0; viewIndex < m_vps->getNumViews(); viewIndex++ )
    712699  {
    713700    m_vps->initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(),
    714701      m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );
    715 #else
    716   for ( Int viewIndex = 0; viewIndex < m_vps.getNumViews(); viewIndex++ )
    717   {
    718   m_vps.initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(),
    719       m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );
    720 #endif
    721702  }
    722703#endif
     
    12991280
    13001281  Int  defaultDirectDependencyType = -1;
    1301 #if MV_FIX_DEP_TYPES
    13021282  Bool defaultDirectDependencyFlag = false;
    1303 #else
    1304   Bool defaultDirectDependencyFlag = true;
    1305 #endif
    13061283
    13071284  for( Int depLayer = 1; depLayer < m_numberOfLayers; depLayer++ )
     
    13221299      {
    13231300        defaultDirectDependencyType = curDirectDependencyType;
    1324 #if MV_FIX_DEP_TYPES
    13251301        defaultDirectDependencyFlag = true;
    1326 #endif
    13271302      }
    13281303     
     
    15141489Void TAppEncTop::xSetRepFormat( TComVPS& vps )
    15151490{
    1516 #if H_MV_HLS_8_PMS_Q0195_20
    15171491  vps.setRepFormatIdxPresentFlag( false );
    1518 #else
    1519   vps.setRepFormatIdxPresentFlag( true );
    1520 #endif
    15211492  vps.setVpsNumRepFormatsMinus1 ( 0    );
    15221493
     
    15341505  assert( vps.getRepFormat( 0 ) == NULL );
    15351506  vps.setRepFormat( 0 , repFormat );
    1536 
    1537 #if !H_MV_HLS_8_PMS_Q0195_20
    1538   for(Int i = 0; i <= vps.getMaxLayersMinus1(); i++ )
    1539   {
    1540     vps.setVpsRepFormatIdx( i , 0 );
    1541   }
    1542 #endif
    15431507}
    15441508
     
    15511515  assert ( dpbSize != 0 );
    15521516
    1553 #if H_MV_HLS_8_HRD_Q0102_08
    15541517  for( Int i = 0; i < vps.getNumOutputLayerSets(); i++ )
    1555 #else
    1556   for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ )
    1557 #endif
    15581518  { 
    1559 #if H_MV_HLS_8_MIS_Q0102_30
    15601519    Int currLsIdx = vps.olsIdxToLsIdx( i );
    1561 #endif
    15621520    std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i );
    15631521    Bool subLayerFlagInfoPresentFlag = false;
    15641522
    1565 #if H_MV_HLS_8_MIS_Q0102_30
    15661523    for( Int j = 0; j  <=  vps.getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ )
    1567 #else
    1568     for( Int j = 0; j  <=  vps.getMaxSubLayersInLayerSetMinus1( i ); j++ )
    1569 #endif
    15701524    {   
    15711525      Bool subLayerDpbInfoPresentFlag = false;
    1572 #if H_MV_HLS_8_MIS_Q0102_30 || H_MV_HLS_8_DBP_NODOC_42
    15731526      assert( vps.getNumLayersInIdList( currLsIdx ) == targetDecLayerIdList.size() );
    15741527      for( Int k = 0; k < vps.getNumLayersInIdList( currLsIdx ); k++ )   
    1575 #else
    1576       assert( vps.getNumSubDpbs( vps.olsIdxToLsIdx( i ) ) == targetDecLayerIdList.size() );
    1577       for( Int k = 0; k < vps.getNumSubDpbs( vps.olsIdxToLsIdx( i )); k++ )   
    1578 #endif
    15791528      {
    15801529        Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );           
    1581 #if H_MV_HLS7_GEN
    1582         // TBD. Some derivation based on output layer set might be added here.
    1583 #endif
    15841530        dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 );
    15851531        if ( j > 0 )
     
    16421588  // Additional output layer sets + profileLevelTierIdx
    16431589  vps.setDefaultOutputLayerIdc      ( m_defaultOutputLayerIdc );   
    1644 #if H_MV_HLS_8_SYN_39_19
    16451590  vps.setNumAddLayerSets            ( 0                             ); 
    16461591  vps.setNumAddOlss                 ( numAddOuputLayerSets          );
    1647 #else
    1648   vps.setNumAddLayerSets            ( numAddOuputLayerSets          );
    1649 #endif
    16501592  vps.initTargetLayerIdLists();
    16511593
     
    16961638      vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] );
    16971639    }
    1698 #if H_MV_HLS_7_VPS_P0300_27
     1640   
    16991641    if ( vps.getNumOutputLayersInOutputLayerSet( olsIdx ) == 1 &&
    17001642        vps.getNumDirectRefLayers( vps.getOlsHighestOutputLayerId( olsIdx ) ) )
     
    17101652      }
    17111653    }
    1712 #else
    1713     vps.setAltOutputLayerFlag( olsIdx , false);     
    1714 #endif
    17151654  }
    17161655}
     
    18691808
    18701809#if H_3D_ARP
    1871 #if QC_IV_PRED_CONSTRAINT_H0137
    18721810    vps.setUseAdvRP        ( layer, ( isDepth || isLayerZero || !vps.getNumDirectRefLayers(layer) ) ? 0 : m_uiUseAdvResPred );
    18731811    vps.setARPStepNum      ( layer, ( isDepth || isLayerZero || !vps.getNumDirectRefLayers(layer) ) ? 1 : H_3D_ARP_WFNR     );
    1874 #else
    1875     vps.setUseAdvRP        ( layer, ( isDepth || isLayerZero ) ? 0 : m_uiUseAdvResPred );
    1876     vps.setARPStepNum      ( layer, ( isDepth || isLayerZero ) ? 1 : H_3D_ARP_WFNR     );
    1877 #endif 
    18781812#endif 
    18791813#if H_3D_SPIVMP
     
    18931827
    18941828#if H_3D_IV_MERGE
    1895 #if QC_IV_PRED_CONSTRAINT_H0137
    18961829    if( !vps.getNumDirectRefLayers(layer) )
    18971830    {
     
    19001833    else
    19011834    {
    1902 #endif
    1903     if( isDepth )
    1904     {
    1905       vps.setIvMvPredFlag         ( layer, (layer != 1) && m_ivMvPredFlag[1] );
    1906     }
    1907     else
    1908     {
    1909       vps.setIvMvPredFlag         ( layer, !isLayerZero && m_ivMvPredFlag[0] );
    1910     }
    1911 #if QC_IV_PRED_CONSTRAINT_H0137
    1912     }
    1913 #endif
     1835      if( isDepth )
     1836      {
     1837        vps.setIvMvPredFlag         ( layer, (layer != 1) && m_ivMvPredFlag[1] );
     1838      }
     1839      else
     1840      {
     1841        vps.setIvMvPredFlag         ( layer, !isLayerZero && m_ivMvPredFlag[0] );
     1842      }
     1843    }
    19141844#endif
    19151845#if H_3D_NBDV_REF
     
    19171847#endif
    19181848#if H_3D_VSP
    1919 #if QC_IV_PRED_CONSTRAINT_H0137
    19201849    vps.setViewSynthesisPredFlag( layer, !isLayerZero && !isDepth && vps.getNumDirectRefLayers(layer) && m_viewSynthesisPredFlag );         
    1921 #else
    1922     vps.setViewSynthesisPredFlag( layer, !isLayerZero && !isDepth && m_viewSynthesisPredFlag );         
    1923 #endif
    19241850#endif
    19251851#if H_3D_DBBP
  • trunk/source/App/TAppEncoder/TAppEncTop.h

    r964 r976  
    7575
    7676  TComPicLists               m_ivPicLists;                  ///< picture buffers of encoder instances
    77 #if H_MV_HLS_8
     77#if H_MV
    7878  TComVPS*                   m_vps;                         ///< vps
    7979#else
Note: See TracChangeset for help on using the changeset viewer.