Changeset 297 in SHVCSoftware for branches


Ignore:
Timestamp:
20 Jun 2013, 22:40:50 (12 years ago)
Author:
vidyo
Message:

Implementation of inter_layer_sample_pred_only_flag part of M0457. The code is disabled by default. Enable by setting M0457_IL_SAMPLE_PRED_ONLY_FLAG to 1.

Location:
branches/SHM-2.1-dev/source
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r296 r297  
    7979  {
    8080    m_acLayerCfg[layer].setAppEncCfg(this);
     81#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     82    m_ilSampleOnlyPred[layer] = 0;
     83#endif
    8184  }
    8285  memset( m_scalabilityMask, 0, sizeof(m_scalabilityMask) );
     
    520523  ("EnableElRapB,-use-rap-b",  m_elRapSliceBEnabled, 0, "Set ILP over base-layer I picture to B picture (default is P picture)")
    521524#endif 
     525#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     526  ("IlSampleOnlyPred%d",       m_ilSampleOnlyPred, 0, MAX_LAYERS, "Set inter_layer_sample_pred_only_flag for all slices")
     527#endif
    522528#else 
    523529  ("InputFile,i",           cfg_InputFile,     string(""), "Original YUV input file name")
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.h

    r296 r297  
    7272#if AVC_SYNTAX
    7373  Char*     m_BLSyntaxFile;                                   ///< input syntax file
     74#endif
     75#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     76  Int       m_ilSampleOnlyPred[ MAX_LAYERS ];
    7477#endif
    7578#else
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r296 r297  
    116116#else
    117117    m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : true);
     118#endif
     119#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     120    m_acTEncTop[layer].setIlSampleOnlyPred( layer == 0 ? 0 : m_ilSampleOnlyPred[layer] );
    118121#endif
    119122#endif
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.cpp

    r296 r297  
    139139  m_colRefLayerIdx       = 0;
    140140#endif
     141#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     142  m_numSamplePredRefLayers       = 0;
     143  m_interLayerSamplePredOnlyFlag = false;
     144#endif
    141145#endif
    142146#endif
     
    197201  m_numILRRefIdx              = 0;
    198202#endif 
    199 
     203#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     204  m_numSamplePredRefLayers       = 0;
     205  m_interLayerSamplePredOnlyFlag = false;
     206#endif
    200207#endif
    201208  m_colFromL0Flag = 1;
     
    488495      pcRefPic->getPicYuvRec()->extendPicBorder();
    489496      RefPicSetStCurr0[NumPocStCurr0] = pcRefPic;
     497#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     498      if( !m_interLayerSamplePredOnlyFlag || pcRefPic->getLayerId() < getLayerId())
     499#endif
    490500      NumPocStCurr0++;
    491501      pcRefPic->setCheckLTMSBPresent(false); 
     
    501511      pcRefPic->getPicYuvRec()->extendPicBorder();
    502512      RefPicSetStCurr1[NumPocStCurr1] = pcRefPic;
     513#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     514      if( !m_interLayerSamplePredOnlyFlag || pcRefPic->getLayerId() < getLayerId())
     515#endif
    503516      NumPocStCurr1++;
    504517      pcRefPic->setCheckLTMSBPresent(false); 
     
    514527      pcRefPic->getPicYuvRec()->extendPicBorder();
    515528      RefPicSetLtCurr[NumPocLtCurr] = pcRefPic;
     529#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     530      if( !m_interLayerSamplePredOnlyFlag || pcRefPic->getLayerId() < getLayerId())
     531#endif
    516532      NumPocLtCurr++;
    517533    }
     
    662678  }
    663679#endif
    664  
     680
     681#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     682    if( m_interLayerSamplePredOnlyFlag && getLayerId() )
     683    {
     684      m_aiNumRefIdx[0] = m_aiNumRefIdx[0] > m_activeNumILRRefIdx ? m_activeNumILRRefIdx : m_aiNumRefIdx[0];
     685      m_aiNumRefIdx[1] = m_aiNumRefIdx[1] > m_activeNumILRRefIdx ? m_activeNumILRRefIdx : m_aiNumRefIdx[1];
     686    }
     687#endif
     688 
    665689    Int cIdx = 0;
    666690    for ( i=0; i<NumPocStCurr0; i++, cIdx++)
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.h

    r296 r297  
    14641464#endif
    14651465#endif
     1466#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     1467  Int         m_numSamplePredRefLayers;
     1468  Bool        m_interLayerSamplePredOnlyFlag;
     1469#endif
    14661470#if L0034_COMBINED_LIST_CLEANUP
    14671471  Int         m_list1IdxToList0Idx[MAX_NUM_REF];
     
    18551859#endif
    18561860
     1861#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     1862  Int       getNumSamplePredRefLayers      ( )          { return  m_numSamplePredRefLayers;       }
     1863  Void      setNumSamplePredRefLayers      ( Int i )    { m_numSamplePredRefLayers = i;           }
     1864  Bool      getInterLayerSamplePredOnlyFlag( )          { return  m_interLayerSamplePredOnlyFlag; }
     1865  Void      setInterLayerSamplePredOnlyFlag( Bool val ) { m_interLayerSamplePredOnlyFlag = val;   }
     1866#endif
     1867
    18571868#if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING
    18581869  Void      setNumMotionPredRefLayers(int i)            { m_numMotionPredRefLayers = i; }
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h

    r296 r297  
    103103#endif
    104104#define M0457_COL_PICTURE_SIGNALING      1
     105
     106#if !VPS_EXTN_DIRECT_REF_LAYERS || !M0457_PREDICTION_INDICATIONS || !JCTVC_M0458_INTERLAYER_RPS_SIG
     107#define M0457_IL_SAMPLE_PRED_ONLY_FLAG   0
     108#else
     109#define M0457_IL_SAMPLE_PRED_ONLY_FLAG   0
     110#endif
    105111
    106112#else
  • branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r296 r297  
    14701470      }
    14711471    }
     1472#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     1473    rpcSlice->setInterLayerSamplePredOnlyFlag( false );
     1474    if( rpcSlice->getNumSamplePredRefLayers() > 0 && rpcSlice->getActiveNumILRRefIdx() > 0 )
     1475    {
     1476      READ_FLAG( uiCode, "inter_layer_sample_pred_only_flag" );
     1477      rpcSlice->setInterLayerSamplePredOnlyFlag( uiCode > 0 );
     1478    }
     1479#endif
    14721480#else
    14731481    if( rpcSlice->getLayerId() > 0 )
  • branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r296 r297  
    546546
    547547#if SVC_EXTENSION
     548#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     549  m_apcSlicePilot->setNumSamplePredRefLayers( getNumSamplePredRefLayers() );
     550#endif
    548551  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder[m_layerId]);
    549552#else
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r296 r297  
    11191119      }
    11201120    }     
     1121#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     1122    if( pcSlice->getNumSamplePredRefLayers() > 0 && pcSlice->getActiveNumILRRefIdx() > 0 )
     1123    {
     1124      WRITE_FLAG( pcSlice->getInterLayerSamplePredOnlyFlag(), "inter_layer_sample_pred_only_flag" );
     1125    }
     1126#endif
    11211127#endif
    11221128
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCu.cpp

    r282 r297  
    463463        if(pcSlice->getSliceType() == B_SLICE && pcSlice->getNumRefIdx(REF_PIC_LIST_0) == pcSlice->getActiveNumILRRefIdx() && pcSlice->getNumRefIdx(REF_PIC_LIST_1) == pcSlice->getActiveNumILRRefIdx())
    464464            testInter = false;
     465#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     466        if( pcSlice->getInterLayerSamplePredOnlyFlag() )
     467            testInter = false;
     468#endif
    465469    }
    466470#endif
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r296 r297  
    539539#endif
    540540
     541#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     542    pcSlice->setNumSamplePredRefLayers( m_pcEncTop->getNumSamplePredRefLayers() );
     543    pcSlice->setInterLayerSamplePredOnlyFlag( 0 );
     544    if( pcSlice->getNumSamplePredRefLayers() > 0 && pcSlice->getActiveNumILRRefIdx() > 0 )
     545    {
     546      if( m_pcEncTop->getIlSampleOnlyPred() > 0 )
     547      {
     548        pcSlice->setInterLayerSamplePredOnlyFlag( true );
     549      }
     550    }
     551#endif
     552
    541553    pcSlice->setLastIDR(m_iLastIDR);
    542554    pcSlice->setSliceIdx(0);
     
    923935#endif
    924936
     937#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     938    if (pcSlice->getSliceType() == B_SLICE && m_pcEncTop->getIlSampleOnlyPred() == 0)
     939#else
    925940    if (pcSlice->getSliceType() == B_SLICE)
     941#endif
    926942    {
    927943#if !REF_IDX_FRAMEWORK
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncTop.h

    r288 r297  
    139139  Bool                    m_bMFMEnabledFlag;
    140140#endif
     141#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     142  Int                     m_ilSampleOnlyPred;
     143#endif
    141144#if SCALED_REF_LAYER_OFFSETS
    142145  UInt                    m_numScaledRefLayerOffsets;
     
    227230  Bool      getMFMEnabledFlag()                   {return m_bMFMEnabledFlag;}   
    228231#endif
     232#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     233  Void      setIlSampleOnlyPred( Int i )          { m_ilSampleOnlyPred = i;    }
     234  Int       getIlSampleOnlyPred()                 { return m_ilSampleOnlyPred; }
     235#endif
    229236#if AVC_SYNTAX
    230237  Void      setBLSyntaxFile( fstream* pFile ) { m_pBLSyntaxFile = pFile; }
Note: See TracChangeset for help on using the changeset viewer.