Changeset 1545 in SHVCSoftware for branches/SHM-dev/source/App/TAppEncoder


Ignore:
Timestamp:
22 Mar 2016, 23:52:56 (9 years ago)
Author:
seregin
Message:

port rev 4721

Location:
branches/SHM-dev/source/App/TAppEncoder
Files:
3 edited

Legend:

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

    r1544 r1545  
    196196  in>>entry.m_POC;
    197197  in>>entry.m_QPOffset;
     198#if W0038_CQP_ADJ
     199  in>>entry.m_CbQPoffset;
     200  in>>entry.m_CrQPoffset;
     201#endif
    198202  in>>entry.m_QPFactor;
    199203  in>>entry.m_tcOffsetDiv2;
     
    13031307  ("CbQpOffset,-cbqpofs",                             m_cbQpOffset,                                         0, "Chroma Cb QP Offset")
    13041308  ("CrQpOffset,-crqpofs",                             m_crQpOffset,                                         0, "Chroma Cr QP Offset")
    1305 
     1309#if W0038_CQP_ADJ
     1310  ("SliceChromaQPOffsetPeriodicity",                  m_sliceChromaQpOffsetPeriodicity,                    0u, "Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.")
     1311  ("SliceCbQpOffsetIntraOrPeriodic",                  m_sliceChromaQpOffsetIntraOrPeriodic[0],              0, "Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.")
     1312  ("SliceCrQpOffsetIntraOrPeriodic",                  m_sliceChromaQpOffsetIntraOrPeriodic[1],              0, "Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.")
     1313#endif
    13061314#if ADAPTIVE_QP_SELECTION
    13071315  ("AdaptiveQpSelection,-aqps",                       m_bUseAdaptQpSelect,                              false, "AdaptiveQpSelection")
     
    13271335  ("LoopFilterBetaOffset_div2",                       m_loopFilterBetaOffsetDiv2,                           0)
    13281336  ("LoopFilterTcOffset_div2",                         m_loopFilterTcOffsetDiv2,                             0)
     1337#if W0038_DB_OPT
     1338  ("DeblockingFilterMetric",                          m_deblockingFilterMetric,                             0)
     1339#else
    13291340  ("DeblockingFilterMetric",                          m_DeblockingFilterMetric,                         false)
    1330 
     1341#endif
    13311342  // Coding tools
    13321343  ("AMP",                                             m_enableAMP,                                       true, "Enable asymmetric motion partitions")
     
    34303441
    34313442  xConfirmPara( m_iQP <  -6 * (m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8) || m_iQP > 51,    "QP exceeds supported range (-QpBDOffsety to 51)" );
     3443#if W0038_DB_OPT
     3444  xConfirmPara( m_deblockingFilterMetric!=0 && (m_bLoopFilterDisable || m_loopFilterOffsetInPPS), "If DeblockingFilterMetric is non-zero then both LoopFilterDisable and LoopFilterOffsetInPPS must be 0");
     3445#else
    34323446  xConfirmPara( m_DeblockingFilterMetric && (m_bLoopFilterDisable || m_loopFilterOffsetInPPS), "If DeblockingFilterMetric is true then both LoopFilterDisable and LoopFilterOffsetInPPS must be 0");
     3447#endif
    34333448  xConfirmPara( m_loopFilterBetaOffsetDiv2 < -6 || m_loopFilterBetaOffsetDiv2 > 6,        "Loop Filter Beta Offset div. 2 exceeds supported range (-6 to 6)");
    34343449  xConfirmPara( m_loopFilterTcOffsetDiv2 < -6 || m_loopFilterTcOffsetDiv2 > 6,            "Loop Filter Tc Offset div. 2 exceeds supported range (-6 to 6)");
     
    36113626    }
    36123627  }
     3628
     3629#if W0038_CQP_ADJ
     3630  for(Int i=0; i<m_iGOPSize; i++)
     3631  {
     3632    xConfirmPara( abs(m_GOPList[i].m_CbQPoffset               ) > 12, "Cb QP Offset for one of the GOP entries exceeds supported range (-12 to 12)" );
     3633    xConfirmPara( abs(m_GOPList[i].m_CbQPoffset + m_cbQpOffset) > 12, "Cb QP Offset for one of the GOP entries, when combined with the PPS Cb offset, exceeds supported range (-12 to 12)" );
     3634    xConfirmPara( abs(m_GOPList[i].m_CrQPoffset               ) > 12, "Cr QP Offset for one of the GOP entries exceeds supported range (-12 to 12)" );
     3635    xConfirmPara( abs(m_GOPList[i].m_CrQPoffset + m_crQpOffset) > 12, "Cr QP Offset for one of the GOP entries, when combined with the PPS Cr offset, exceeds supported range (-12 to 12)" );
     3636  }
     3637  xConfirmPara( abs(m_sliceChromaQpOffsetIntraOrPeriodic[0]                 > 12), "Intra/periodic Cb QP Offset exceeds supported range (-12 to 12)" );
     3638  xConfirmPara( abs(m_sliceChromaQpOffsetIntraOrPeriodic[0]  + m_cbQpOffset > 12), "Intra/periodic Cb QP Offset, when combined with the PPS Cb offset, exceeds supported range (-12 to 12)" );
     3639  xConfirmPara( abs(m_sliceChromaQpOffsetIntraOrPeriodic[1]                 > 12), "Intra/periodic Cr QP Offset exceeds supported range (-12 to 12)" );
     3640  xConfirmPara( abs(m_sliceChromaQpOffsetIntraOrPeriodic[1]  + m_crQpOffset > 12), "Intra/periodic Cr QP Offset, when combined with the PPS Cr offset, exceeds supported range (-12 to 12)" );
     3641#endif
    36133642
    36143643  m_extraRPSs=0;
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1544 r1545  
    262262  Int       m_cbQpOffset;                                     ///< Chroma Cb QP Offset (0:default)
    263263  Int       m_crQpOffset;                                     ///< Chroma Cr QP Offset (0:default)
    264 
     264#if W0038_CQP_ADJ
     265  UInt      m_sliceChromaQpOffsetPeriodicity;                 ///< Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.
     266  Int       m_sliceChromaQpOffsetIntraOrPeriodic[2/*Cb,Cr*/]; ///< Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.
     267#endif
    265268#if ADAPTIVE_QP_SELECTION
    266269  Bool      m_bUseAdaptQpSelect;
     
    324327  Int       m_loopFilterBetaOffsetDiv2;                     ///< beta offset for deblocking filter
    325328  Int       m_loopFilterTcOffsetDiv2;                       ///< tc offset for deblocking filter
     329#if W0038_DB_OPT
     330  Int       m_deblockingFilterMetric;                         ///< blockiness metric in encoder
     331#else
    326332  Bool      m_DeblockingFilterMetric;                         ///< blockiness metric in encoder
    327 
     333#endif
    328334  // coding tools (PCM)
    329335  Bool      m_usePCM;                                         ///< flag for using IPCM
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1544 r1545  
    603603  m_cTEncTop.setLoopFilterBetaOffset                              ( m_loopFilterBetaOffsetDiv2  );
    604604  m_cTEncTop.setLoopFilterTcOffset                                ( m_loopFilterTcOffsetDiv2    );
     605#if W0038_DB_OPT
     606  m_cTEncTop.setDeblockingFilterMetric                            ( m_deblockingFilterMetric );
     607#else
    605608  m_cTEncTop.setDeblockingFilterMetric                            ( m_DeblockingFilterMetric );
     609#endif
    606610
    607611  //====== Motion search ========
     
    621625  m_cTEncTop.setChromaCbQpOffset                                  ( m_cbQpOffset     );
    622626  m_cTEncTop.setChromaCrQpOffset                                  ( m_crQpOffset  );
    623 
     627#if W0038_CQP_ADJ
     628  m_cTEncTop.setSliceChromaOffsetQpIntraOrPeriodic                ( m_sliceChromaQpOffsetPeriodicity, m_sliceChromaQpOffsetIntraOrPeriodic );
     629#endif
    624630  m_cTEncTop.setChromaFormatIdc                                   ( m_chromaFormatIDC  );
    625631
Note: See TracChangeset for help on using the changeset viewer.