Changeset 633 in SHVCSoftware for branches/SHM-5.1-dev/source/Lib/TLibEncoder


Ignore:
Timestamp:
17 Mar 2014, 19:12:54 (12 years ago)
Author:
seregin
Message:

add scaled_ref_layer_id[ i ] into vert_phase_position_enable_flag, RefPicLayerId[ i ]] into vert_phase_position_flag, and encoder setting for vert_phase_position_in_use_flag

Location:
branches/SHM-5.1-dev/source/Lib/TLibEncoder
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r632 r633  
    661661      WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" );
    662662#if P0312_VERT_PHASE_ADJ
    663       WRITE_FLAG( scaledWindow.getVertPhasePositionEnableFlag(), "vert_phase_pos_enable_flag" );
     663      WRITE_FLAG( scaledWindow.getVertPhasePositionEnableFlag(), "vert_phase_position_enable_flag" );
    664664#endif
    665665    }
     
    14601460#endif
    14611461
    1462 #if P0312_VERT_PHASE_ADJ
    1463     WRITE_FLAG( vps->getVpsVuiVertPhaseInUseFlag(), "vps_vui_vert_phase_in_use_flag" );
    1464 #endif
    1465 
    14661462#if O0109_O0199_FLAGS_TO_VUI
    14671463#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     
    14711467  WRITE_FLAG(vps->getHigherLayerIrapSkipFlag(), "higher_layer_irap_skip_flag" );
    14721468#endif
     1469#endif
     1470#if P0312_VERT_PHASE_ADJ
     1471  WRITE_FLAG( vps->getVpsVuiVertPhaseInUseFlag(), "vps_vui_vert_phase_in_use_flag" );
    14731472#endif
    14741473#if N0160_VUI_EXT_ILP_REF
     
    18871886    for(Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )
    18881887    {
    1889       if (pcSlice->getSPS()->getVertPhasePositionEnableFlag(pcSlice->getInterLayerPredLayerIdc(i)))
    1890       {
    1891         WRITE_FLAG( pcSlice->getVertPhasePositionFlag(i), "phase_pos_flag" );
     1888      UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i);
     1889      if( pcSlice->getSPS()->getVertPhasePositionEnableFlag(refLayerIdc) )
     1890      {
     1891        WRITE_FLAG( pcSlice->getVertPhasePositionFlag(refLayerIdc), "vert_phase_position_flag" );
    18921892      }
    18931893    }
  • branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncCfg.h

    r627 r633  
    387387  Window   &getConformanceWindow()                           { return m_conformanceWindow; }
    388388#if P0312_VERT_PHASE_ADJ
    389   Void      setConformanceWindow (Int confLeft, Int confRight, Int confTop, Int confBottom ) { m_conformanceWindow.setWindow (confLeft, confRight, confTop, confBottom, false, false); }
     389  Void      setConformanceWindow (Int confLeft, Int confRight, Int confTop, Int confBottom ) { m_conformanceWindow.setWindow (confLeft, confRight, confTop, confBottom, false); }
    390390#else
    391391  Void      setConformanceWindow (Int confLeft, Int confRight, Int confTop, Int confBottom ) { m_conformanceWindow.setWindow (confLeft, confRight, confTop, confBottom); }
  • branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r631 r633  
    795795        }
    796796
    797 #if P0312_VERT_PHASE_ADJ
    798 #if O0098_SCALED_REF_LAYER_ID
    799         Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc));
    800 #else
    801         Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc);
    802 #endif
    803 #else
    804797#if O0098_SCALED_REF_LAYER_ID
    805798        const Window &scalEL = m_pcEncTop->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc));
    806799#else
    807800        const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow(refLayerIdc);
    808 #endif
    809801#endif
    810802
     
    831823#if P0312_VERT_PHASE_ADJ
    832824          //when PhasePositionEnableFlag is equal to 1, set vertPhasePositionFlag to 0 if BL is top field and 1 if bottom
    833           if (scalEL.getVertPhasePositionEnableFlag())
     825          if( scalEL.getVertPhasePositionEnableFlag() )
    834826          {
    835             pcSlice->setVertPhasePositionFlag(pcSlice->getPOC()%2, i);
    836             scalEL.setVertPhasePositionFlag (pcSlice->getVertPhasePositionFlag(i));
     827            pcSlice->setVertPhasePositionFlag( pcSlice->getPOC()%2, refLayerIdc );
    837828          }
    838829#endif
  • branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r627 r633  
    903903    m_cSPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i];
    904904#if P0312_VERT_PHASE_ADJ
    905     m_cSPS.setVertPhasePositionEnableFlag(i,m_scaledRefLayerWindow[i].getVertPhasePositionEnableFlag());
     905    m_cSPS.setVertPhasePositionEnableFlag( m_scaledRefLayerId[i], m_scaledRefLayerWindow[i].getVertPhasePositionEnableFlag() );
    906906#endif
    907907  }
  • branches/SHM-5.1-dev/source/Lib/TLibEncoder/TEncTop.h

    r627 r633  
    216216  /// encode several number of pictures until end-of-sequence
    217217#if SVC_EXTENSION
    218   Void                    setLayerEnc(TEncTop** p) {m_ppcTEncTop = p;}
    219   TEncTop**               getLayerEnc()            {return m_ppcTEncTop;}
    220   Int                     getPOCLast            () { return m_iPOCLast;               }
    221   Int                     getNumPicRcvd         () { return m_iNumPicRcvd;            }
    222   Void                    setNumPicRcvd         ( Int num ) { m_iNumPicRcvd = num;      }
    223   Void                    setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; }
    224   UInt                    getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; }
     218  Void      setLayerEnc(TEncTop** p)            { m_ppcTEncTop = p;                  }
     219  TEncTop** getLayerEnc()                       { return m_ppcTEncTop;               }
     220  Int       getPOCLast            ()            { return m_iPOCLast;                 }
     221  Int       getNumPicRcvd         ()            { return m_iNumPicRcvd;              }
     222  Void      setNumPicRcvd         ( Int num )   { m_iNumPicRcvd = num;               }
     223  Void      setNumScaledRefLayerOffsets(Int x)  { m_numScaledRefLayerOffsets = x;    }
     224  UInt      getNumScaledRefLayerOffsets()      { return m_numScaledRefLayerOffsets; }
    225225#if O0098_SCALED_REF_LAYER_ID
    226   Void                    setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id;   }
    227   UInt                    getScaledRefLayerId(Int x)          { return m_scaledRefLayerId[x]; }
    228   Window&  getScaledRefLayerWindowForLayer(Int layerId);
    229 #endif
    230   Window&  getScaledRefLayerWindow(Int x)            { return m_scaledRefLayerWindow[x]; }
     226  Void      setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id;   }
     227  UInt      getScaledRefLayerId(Int x)          { return m_scaledRefLayerId[x]; }
     228  Window&   getScaledRefLayerWindowForLayer(Int layerId);
     229#endif
     230  Window&   getScaledRefLayerWindow(Int x)                 { return m_scaledRefLayerWindow[x];        }
    231231#if P0312_VERT_PHASE_ADJ
    232   Void                    setVertPhasePositionEnableFlag(Int x, Bool b) { m_vertPhasePositionEnableFlag[x] = b;   }
    233   UInt                    getVertPhasePositionEnableFlag(Int x)          { return m_vertPhasePositionEnableFlag[x]; }
     232  Void      setVertPhasePositionEnableFlag(Int x, Bool b)  { m_vertPhasePositionEnableFlag[x] = b;    }
     233  UInt      getVertPhasePositionEnableFlag(Int x)          { return m_vertPhasePositionEnableFlag[x]; }
    234234#endif
    235235
    236236  TComPic** getIlpList() { return m_cIlpPic; }
    237237#if REF_IDX_MFM
    238   Void      setMFMEnabledFlag       (Bool flag)   {m_bMFMEnabledFlag = flag;}
    239   Bool      getMFMEnabledFlag()                   {return m_bMFMEnabledFlag;}   
     238  Void      setMFMEnabledFlag       (Bool flag)   { m_bMFMEnabledFlag = flag; }
     239  Bool      getMFMEnabledFlag()                   { return m_bMFMEnabledFlag; }   
    240240#endif
    241241#if O0194_WEIGHTED_PREDICTION_CGS
     
    255255#endif
    256256#if POC_RESET_FLAG
    257   Int  getPocAdjustmentValue()      { return m_pocAdjustmentValue;}
    258   Void setPocAdjustmentValue(Int x) { m_pocAdjustmentValue = x;   }
     257  Int       getPocAdjustmentValue()      { return m_pocAdjustmentValue;}
     258  Void      setPocAdjustmentValue(Int x) { m_pocAdjustmentValue = x;   }
    259259#endif
    260260#if NO_CLRAS_OUTPUT_FLAG
Note: See TracChangeset for help on using the changeset viewer.