Changeset 532 in SHVCSoftware for branches/SHM-4.1-dev/source/App


Ignore:
Timestamp:
2 Jan 2014, 07:21:30 (11 years ago)
Author:
seregin
Message:

update to HM-12.1 base

Location:
branches/SHM-4.1-dev/source/App
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-4.1-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r531 r532  
    145145  // main decoder loop
    146146  Bool openedReconFile[MAX_LAYERS]; // reconstruction file not yet opened. (must be performed after SPS is seen)
     147  Bool loopFiltered[MAX_LAYERS];
     148  memset( loopFiltered, false, sizeof( loopFiltered ) );
     149
    147150  for(UInt layer=0; layer<=m_tgtLayerId; layer++)
    148151  {
     
    223226      }
    224227    }
    225     if (bNewPicture || !bitstreamFile)
     228
     229    if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS)
    226230    {
    227231#if O0194_DIFFERENT_BITDEPTH_EL_BL
     
    230234      g_bitDepthC = g_bitDepthCLayer[curLayerId];
    231235#endif
    232       m_acTDecTop[curLayerId].executeLoopFilters(poc, pcListPic);
     236      if (!loopFiltered[curLayerId] || bitstreamFile)
     237      {
     238        m_acTDecTop[curLayerId].executeLoopFilters(poc, pcListPic);
     239      }
     240      loopFiltered[curLayerId] = (nalu.m_nalUnitType == NAL_UNIT_EOS);
    233241#if EARLY_REF_PIC_MARKING
    234242      m_acTDecTop[curLayerId].earlyPicMarking(m_iMaxTemporalLayer, m_targetDecLayerIdSet);
     
    256264        xFlushOutput( pcListPic, curLayerId );
    257265      }
     266      if (nalu.m_nalUnitType == NAL_UNIT_EOS)
     267      {
     268        xFlushOutput( pcListPic, curLayerId );       
     269      }
    258270      // write reconstruction to file
    259271      if(bNewPicture)
     
    316328  // main decoder loop
    317329  Bool openedReconFile = false; // reconstruction file not yet opened. (must be performed after SPS is seen)
     330  Bool loopFiltered = false;
    318331
    319332#if SYNTAX_OUTPUT
     
    384397      }
    385398    }
    386     if (bNewPicture || !bitstreamFile)
    387     {
    388       m_cTDecTop.executeLoopFilters(poc, pcListPic);
     399    if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS)
     400    {
     401      if (!loopFiltered || bitstreamFile)
     402      {
     403        m_cTDecTop.executeLoopFilters(poc, pcListPic);
     404      }
     405      loopFiltered = (nalu.m_nalUnitType == NAL_UNIT_EOS);
    389406    }
    390407
     
    408425        xFlushOutput( pcListPic );
    409426      }
     427      if (nalu.m_nalUnitType == NAL_UNIT_EOS)
     428      {
     429        xFlushOutput( pcListPic );       
     430      }
    410431      // write reconstruction to file
    411432      if(bNewPicture)
     
    506527
    507528/** \param pcListPic list of pictures to be written to file
    508 \todo            DYN_REF_FREE should be revised
    509 */
     529    \todo            DYN_REF_FREE should be revised
     530 */
    510531#if SVC_EXTENSION
    511532Void TAppDecTop::xWriteOutput( TComList<TComPic*>* pcListPic, UInt layerId, UInt tId )
  • branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r531 r532  
    791791  ("MaxNumOffsetsPerPic",      m_maxNumOffsetsPerPic,       2048,  "Max number of SAO offset per picture (Default: 2048)")   
    792792  ("SAOLcuBoundary",           m_saoLcuBoundary,            false, "0: right/bottom LCU boundary areas skipped from SAO parameter estimation, 1: non-deblocked pixels are used for those areas")
     793#if !HM_CLEANUP_SAO
    793794  ("SAOLcuBasedOptimization",  m_saoLcuBasedOptimization,   true,  "0: SAO picture-based optimization, 1: SAO LCU-based optimization ")
     795#endif 
    794796  ("SliceMode",                m_sliceMode,                0,     "0: Disable all Recon slice limits, 1: Enforce max # of LCUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice")
    795797  ("SliceArgument",            m_sliceArgument,            0,     "Depending on SliceMode being:"
     
    845847  ("FIS", m_useFastIntraScalable, false, "Fast Intra Decision for Scalable HEVC")
    846848#endif
    847 #if RATE_CONTROL_LAMBDA_DOMAIN
    848849#if RC_SHVC_HARMONIZATION
    849850  ("RateControl%d", cfg_RCEnableRateControl, false, MAX_LAYERS, "Rate control: enable rate control for layer %d")
     
    857858  ( "RateControl",         m_RCEnableRateControl,   false, "Rate control: enable rate control" )
    858859  ( "TargetBitrate",       m_RCTargetBitrate,           0, "Rate control: target bitrate" )
    859 #if M0036_RC_IMPROVEMENT
    860860  ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit,     0, "Rate control: 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation" )
    861 #else
    862   ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, false, "Rate control: keep hierarchical bit allocation in rate control algorithm" )
    863 #endif
    864861  ( "LCULevelRateControl", m_RCLCULevelRC,           true, "Rate control: true: LCU level RC; false: picture level RC" )
    865862  ( "RCLCUSeparateModel",  m_RCUseLCUSeparateModel,  true, "Rate control: use LCU level separate R-lambda model" )
    866863  ( "InitialQP",           m_RCInitialQP,               0, "Rate control: initial QP" )
    867864  ( "RCForceIntraQP",      m_RCForceIntraQP,        false, "Rate control: force intra QP to be equal to initial QP" )
    868 #endif
    869 #else
    870   ("RateCtrl,-rc", m_enableRateCtrl, false, "Rate control on/off")
    871   ("TargetBitrate,-tbr", m_targetBitrate, 0, "Input target bitrate")
    872   ("NumLCUInUnit,-nu", m_numLCUInUnit, 0, "Number of LCUs in an Unit")
    873865#endif
    874866
     
    22002192  }
    22012193
    2202 #if RATE_CONTROL_LAMBDA_DOMAIN
    22032194#if RC_SHVC_HARMONIZATION
    22042195  for ( Int layer=0; layer<m_numLayers; layer++ )
     
    22292220    }
    22302221    xConfirmPara( m_uiDeltaQpRD > 0, "Rate control cannot be used together with slice level multiple-QP optimization!\n" );
    2231   }
    2232 #endif
    2233 #else
    2234   if(m_enableRateCtrl)
    2235   {
    2236     Int numLCUInWidth  = (m_iSourceWidth  / m_uiMaxCUWidth) + (( m_iSourceWidth  %  m_uiMaxCUWidth ) ? 1 : 0);
    2237     Int numLCUInHeight = (m_iSourceHeight / m_uiMaxCUHeight)+ (( m_iSourceHeight %  m_uiMaxCUHeight) ? 1 : 0);
    2238     Int numLCUInPic    =  numLCUInWidth * numLCUInHeight;
    2239 
    2240     xConfirmPara( (numLCUInPic % m_numLCUInUnit) != 0, "total number of LCUs in a frame should be completely divided by NumLCUInUnit" );
    2241 
    2242     m_iMaxDeltaQP       = MAX_DELTA_QP;
    2243     m_iMaxCuDQPDepth    = MAX_CUDQP_DEPTH;
    22442222  }
    22452223#endif
     
    25212499  printf("Cross-layer sample alignment : %d\n", m_phaseAlignFlag);
    25222500#endif
    2523 #if RATE_CONTROL_LAMBDA_DOMAIN
    25242501#if !RC_SHVC_HARMONIZATION
    25252502  printf("RateControl                  : %d\n", m_RCEnableRateControl );
     
    25342511  }
    25352512#endif
    2536 #else
    2537   printf("RateControl                  : %d\n", m_enableRateCtrl);
    2538   if(m_enableRateCtrl)
    2539   {
    2540     printf("TargetBitrate                : %d\n", m_targetBitrate);
    2541     printf("NumLCUInUnit                 : %d\n", m_numLCUInUnit);
    2542   }
    2543 #endif
     2513
    25442514  printf("Max Num Merge Candidates     : %d\n", m_maxNumMergeCand);
    25452515  printf("\n");
     
    25822552  printf("PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0);
    25832553#endif
     2554#if !HM_CLEANUP_SAO
    25842555  printf("SAOLcuBasedOptimization:%d ", (m_saoLcuBasedOptimization)?(1):(0));
    2585 
     2556#endif
    25862557  printf("LosslessCuEnabled:%d ", (m_useLossless)? 1:0 );
    25872558  printf("WPP:%d ", (Int)m_useWeightedPred);
  • branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.h

    r531 r532  
    187187  Int       m_maxNumOffsetsPerPic;                            ///< SAO maximun number of offset per picture
    188188  Bool      m_saoLcuBoundary;                                 ///< SAO parameter estimation using non-deblocked pixels for LCU bottom and right boundary areas
     189#if !HM_CLEANUP_SAO
    189190  Bool      m_saoLcuBasedOptimization;                        ///< SAO LCU-based optimization
     191#endif
    190192  // coding tools (loop filter)
    191193  Bool      m_bLoopFilterDisable;                             ///< flag for using deblocking filter
     
    295297  Int       m_TMVPModeId;
    296298  Int       m_signHideFlag;
    297 #if RATE_CONTROL_LAMBDA_DOMAIN
    298299#if !RC_SHVC_HARMONIZATION
    299300  Bool      m_RCEnableRateControl;                ///< enable rate control or not
    300301  Int       m_RCTargetBitrate;                    ///< target bitrate when rate control is enabled
    301 #if M0036_RC_IMPROVEMENT
    302302  Int       m_RCKeepHierarchicalBit;              ///< 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation
    303 #else
    304   Bool      m_RCKeepHierarchicalBit;              ///< whether keeping hierarchical bit allocation structure or not
    305 #endif
    306303  Bool      m_RCLCULevelRC;                       ///< true: LCU level rate control; false: picture level rate control
    307304  Bool      m_RCUseLCUSeparateModel;              ///< use separate R-lambda model at LCU level
    308305  Int       m_RCInitialQP;                        ///< inital QP for rate control
    309306  Bool      m_RCForceIntraQP;                     ///< force all intra picture to use initial QP or not
    310 #endif
    311 #else
    312   Bool      m_enableRateCtrl;                                   ///< Flag for using rate control algorithm
    313   Int       m_targetBitrate;                                 ///< target bitrate
    314   Int       m_numLCUInUnit;                                  ///< Total number of LCUs in a frame should be completely divided by the NumLCUInUnit
    315307#endif
    316308  Int       m_useScalingListId;                               ///< using quantization matrix
  • branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r531 r532  
    470470
    471471    m_acTEncTop[layer].setSaoLcuBoundary (m_saoLcuBoundary);
     472#if !HM_CLEANUP_SAO
    472473    m_acTEncTop[layer].setSaoLcuBasedOptimization (m_saoLcuBasedOptimization);
     474#endif
    473475    m_acTEncTop[layer].setPCMInputBitDepthFlag  ( m_bPCMInputBitDepthFlag);
    474476    m_acTEncTop[layer].setPCMFilterDisableFlag  ( m_bPCMFilterDisableFlag);
     
    546548    m_acTEncTop[layer].setScalingListFile            ( m_scalingListFile   );
    547549    m_acTEncTop[layer].setSignHideFlag(m_signHideFlag);
    548 #if RATE_CONTROL_LAMBDA_DOMAIN
    549550#if RC_SHVC_HARMONIZATION
    550551    m_acTEncTop[layer].setUseRateCtrl     (m_acLayerCfg[layer].getRCEnableRateControl());
     
    563564    m_acTEncTop[layer].setInitialQP           ( m_RCInitialQP );
    564565    m_acTEncTop[layer].setForceIntraQP        ( m_RCForceIntraQP );
    565 #endif
    566 #else
    567     m_acTEncTop[layer].setUseRateCtrl     ( m_enableRateCtrl);
    568     m_acTEncTop[layer].setTargetBitrate   ( m_targetBitrate);
    569     m_acTEncTop[layer].setNumLCUInUnit    ( m_numLCUInUnit);
    570566#endif
    571567    m_acTEncTop[layer].setTransquantBypassEnableFlag(m_TransquantBypassEnableFlag);
     
    788784
    789785  m_cTEncTop.setSaoLcuBoundary (m_saoLcuBoundary);
     786#if !HM_CLEANUP_SAO
    790787  m_cTEncTop.setSaoLcuBasedOptimization (m_saoLcuBasedOptimization);
     788#endif
    791789  m_cTEncTop.setPCMInputBitDepthFlag  ( m_bPCMInputBitDepthFlag);
    792790  m_cTEncTop.setPCMFilterDisableFlag  ( m_bPCMFilterDisableFlag);
     
    856854  m_cTEncTop.setScalingListFile            ( m_scalingListFile   );
    857855  m_cTEncTop.setSignHideFlag(m_signHideFlag);
    858 #if RATE_CONTROL_LAMBDA_DOMAIN
    859856  m_cTEncTop.setUseRateCtrl         ( m_RCEnableRateControl );
    860857  m_cTEncTop.setTargetBitrate       ( m_RCTargetBitrate );
     
    864861  m_cTEncTop.setInitialQP           ( m_RCInitialQP );
    865862  m_cTEncTop.setForceIntraQP        ( m_RCForceIntraQP );
    866 #else
    867   m_cTEncTop.setUseRateCtrl     ( m_enableRateCtrl);
    868   m_cTEncTop.setTargetBitrate   ( m_targetBitrate);
    869   m_cTEncTop.setNumLCUInUnit    ( m_numLCUInUnit);
    870 #endif
    871863  m_cTEncTop.setTransquantBypassEnableFlag(m_TransquantBypassEnableFlag);
    872864  m_cTEncTop.setCUTransquantBypassFlagValue(m_CUTransquantBypassFlagValue);
     
    21312123    case NAL_UNIT_CODED_SLICE_TRAIL_R:
    21322124    case NAL_UNIT_CODED_SLICE_TRAIL_N:
    2133     case NAL_UNIT_CODED_SLICE_TLA_R:
     2125    case NAL_UNIT_CODED_SLICE_TSA_R:
    21342126    case NAL_UNIT_CODED_SLICE_TSA_N:
    21352127    case NAL_UNIT_CODED_SLICE_STSA_R:
Note: See TracChangeset for help on using the changeset viewer.