Changeset 1526 in SHVCSoftware for branches


Ignore:
Timestamp:
17 Feb 2016, 23:26:22 (9 years ago)
Author:
seregin
Message:

enable layer-wise lossless setting, patched-by Guillaume Barroux <guillaume.b@…>

Location:
branches/SHM-dev/source
Files:
5 edited

Legend:

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

    r1524 r1526  
    790790  Bool*   cfg_bUseSAO[MAX_LAYERS];
    791791
     792#if PER_LAYER_LOSSLESS
     793  Bool*     cfg_TransquantBypassEnableFlag[MAX_LAYERS];
     794  Bool*     cfg_CUTransquantBypassFlagForce[MAX_LAYERS];
     795  CostMode* cfg_costMode[MAX_LAYERS]; 
     796#endif
     797
    792798  for( UInt layer = 0; layer < m_numLayers; layer++ )
    793799  {
     
    890896
    891897    cfg_bUseSAO[layer]              = &m_apcLayerCfg[layer]->m_bUseSAO;
     898
     899#if PER_LAYER_LOSSLESS
     900    cfg_TransquantBypassEnableFlag[layer]   = &m_apcLayerCfg[layer]->m_TransquantBypassEnableFlag;
     901    cfg_CUTransquantBypassFlagForce[layer]  = &m_apcLayerCfg[layer]->m_CUTransquantBypassFlagForce;
     902    cfg_costMode[layer]                     = &m_apcLayerCfg[layer]->m_costMode; 
     903#endif
    892904  }
    893905
     
    14201432#endif
    14211433
     1434#if PER_LAYER_LOSSLESS
     1435  ("TransquantBypassEnableFlag%d",                    cfg_TransquantBypassEnableFlag,        false, m_numLayers, "transquant_bypass_enable_flag indicator in PPS")
     1436  ("CUTransquantBypassFlagForce%d",                   cfg_CUTransquantBypassFlagForce,       false, m_numLayers, "Force transquant bypass mode, when transquant_bypass_enable_flag is enabled")
     1437  ("CostMode%d",                                      cfg_costMode,            COST_STANDARD_LOSSY, m_numLayers, "Use alternative cost functions: choose between 'lossy', 'sequence_level_lossless', 'lossless' (which forces QP to " MACRO_TO_STRING(LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP) ") and 'mixed_lossless_lossy' (which used QP'=" MACRO_TO_STRING(LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP_PRIME) " for pre-estimates of transquant-bypass blocks).")
     1438#else
    14221439  ("TransquantBypassEnableFlag",                      m_TransquantBypassEnableFlag,                     false, "transquant_bypass_enable_flag indicator in PPS")
    14231440  ("CUTransquantBypassFlagForce",                     m_CUTransquantBypassFlagForce,                    false, "Force transquant bypass mode, when transquant_bypass_enable_flag is enabled")
    14241441  ("CostMode",                                        m_costMode,                         COST_STANDARD_LOSSY, "Use alternative cost functions: choose between 'lossy', 'sequence_level_lossless', 'lossless' (which forces QP to " MACRO_TO_STRING(LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP) ") and 'mixed_lossless_lossy' (which used QP'=" MACRO_TO_STRING(LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP_PRIME) " for pre-estimates of transquant-bypass blocks).")
     1442#endif
    14251443  ("RecalculateQPAccordingToLambda",                  m_recalculateQPAccordingToLambda,                 false, "Recalculate QP values according to lambda values. Do not suggest to be enabled in all intra case")
    14261444  ("StrongIntraSmoothing,-sis",                       m_useStrongIntraSmoothing,                         true, "Enable strong intra smoothing for 32x32 blocks")
     
    30993117  Int& m_extraRPSs                            = m_apcLayerCfg[layerIdx]->m_extraRPSs;
    31003118  GOPEntry* m_GOPList                         = m_apcLayerCfg[layerIdx]->m_GOPList;
     3119
     3120#if PER_LAYER_LOSSLESS
     3121  Bool& m_CUTransquantBypassFlagForce         = m_apcLayerCfg[layerIdx]->m_CUTransquantBypassFlagForce;
     3122#endif
    31013123#else
    31023124Void TAppEncCfg::xCheckParameter()
     
    39473969  }
    39483970#endif
    3949 
     3971 
     3972#if PER_LAYER_LOSSLESS
     3973  xConfirmPara(!m_apcLayerCfg[layerIdx]->m_TransquantBypassEnableFlag && m_apcLayerCfg[layerIdx]->m_CUTransquantBypassFlagForce, "CUTransquantBypassFlagForce cannot be 1 when TransquantBypassEnableFlag is 0");
     3974#else
    39503975  xConfirmPara(!m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagForce, "CUTransquantBypassFlagForce cannot be 1 when TransquantBypassEnableFlag is 0");
     3976#endif
    39513977
    39523978  xConfirmPara(m_log2ParallelMergeLevel < 2, "Log2ParallelMergeLevel should be larger than or equal to 2");
     
    41634189    UInt& m_RCCpbSize                       = m_apcLayerCfg[layerIdx]->m_RCCpbSize;
    41644190    Double& m_RCInitialCpbFullness          = m_apcLayerCfg[layerIdx]->m_RCInitialCpbFullness;
     4191#endif
     4192
     4193#if PER_LAYER_LOSSLESS
     4194    CostMode& m_costMode                    = m_apcLayerCfg[layerIdx]->m_costMode;
    41654195#endif
    41664196
     
    44494479  printf("PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0);
    44504480
     4481#if PER_LAYER_LOSSLESS
     4482  if (m_apcLayerCfg[layer]->m_TransquantBypassEnableFlag && m_apcLayerCfg[layer]->m_CUTransquantBypassFlagForce)
     4483  {
     4484    printf("TransQuantBypassEnabled: =1");
     4485  }
     4486  else
     4487  {
     4488    printf("TransQuantBypassEnabled:%d ", (m_apcLayerCfg[layer]->m_TransquantBypassEnableFlag)? 1:0 );
     4489  }
     4490#else
    44514491  if (m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagForce)
    44524492  {
     
    44574497    printf("TransQuantBypassEnabled:%d ", (m_TransquantBypassEnableFlag)? 1:0 );
    44584498  }
     4499#endif
    44594500
    44604501  printf("WPP:%d ", (Int)m_useWeightedPred);
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1524 r1526  
    466466#endif
    467467
     468#if !PER_LAYER_LOSSLESS
    468469  Bool      m_TransquantBypassEnableFlag;                     ///< transquant_bypass_enable_flag setting in PPS.
    469470  Bool      m_CUTransquantBypassFlagForce;                    ///< if transquant_bypass_enable_flag, then, if true, all CU transquant bypass flags will be set to true.
    470471  CostMode  m_costMode;                                       ///< Cost mode to use
     472#endif
    471473
    472474  Bool      m_recalculateQPAccordingToLambda;                 ///< recalculate QP value according to the lambda value
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h

    r1475 r1526  
    100100  Bool      m_bUseSAO;
    101101
     102#if PER_LAYER_LOSSLESS
     103  Bool      m_TransquantBypassEnableFlag;
     104  Bool      m_CUTransquantBypassFlagForce;
     105  CostMode  m_costMode;
     106#endif
     107
    102108  ScalingListMode m_useScalingListId;                         ///< using quantization matrix
    103109  std::string m_scalingListFileName;                          ///< quantization matrix file name
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1524 r1526  
    534534
    535535    string&        m_colourRemapSEIFileRoot                     = m_apcLayerCfg[layer]->m_colourRemapSEIFileRoot;
     536#if PER_LAYER_LOSSLESS
     537    Bool&          m_TransquantBypassEnableFlag                 = m_apcLayerCfg[layer]->m_TransquantBypassEnableFlag;
     538    Bool&          m_CUTransquantBypassFlagForce                = m_apcLayerCfg[layer]->m_CUTransquantBypassFlagForce;
     539    CostMode&      m_costMode                                   = m_apcLayerCfg[layer]->m_costMode;
     540#endif
    536541#endif
    537542
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1517 r1526  
    4848
    4949#if SVC_EXTENSION
     50#define PER_LAYER_LOSSLESS               1
    5051#define SCALABLE_REXT                    1      ///< enabling scalable RExt profiles, for bit-depth greater than 10 consider to enable RExt__HIGH_BIT_DEPTH_SUPPORT
    5152
Note: See TracChangeset for help on using the changeset viewer.