Changeset 1400 in SHVCSoftware for branches/SHM-dev/source/App


Ignore:
Timestamp:
4 Aug 2015, 03:50:01 (9 years ago)
Author:
seregin
Message:

port rev 4553

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

Legend:

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

    r1391 r1400  
    975975  Int tmpInputChromaFormat;
    976976  Int tmpConstraintChromaFormat;
     977  Int tmpWeightedPredictionMethod;
    977978  string inputColourSpaceConvert;
    978979#if SVC_EXTENSION
     
    13941395  ("WeightedPredP,-wpP",                              m_useWeightedPred,                                false, "Use weighted prediction in P slices")
    13951396  ("WeightedPredB,-wpB",                              m_useWeightedBiPred,                              false, "Use weighted (bidirectional) prediction in B slices")
     1397  ("WeightedPredMethod,-wpM",                         tmpWeightedPredictionMethod, Int(WP_PER_PICTURE_WITH_SIMPLE_DC_COMBINED_COMPONENT), "Weighted prediction method")
    13961398  ("Log2ParallelMergeLevel",                          m_log2ParallelMergeLevel,                            2u, "Parallel merge estimation region")
    13971399    //deprecated copies of renamed tile parameters
    1398   ("UniformSpacingIdc",                               m_tileUniformSpacingFlag,                         false, "deprecated alias of TileUniformSpacing")
     1400  ("UniformSpacingIdc",                               m_tileUniformSpacingFlag,                         false,      "deprecated alias of TileUniformSpacing")
    13991401  ("ColumnWidthArray",                                cfg_ColumnWidth,                        cfg_ColumnWidth, "deprecated alias of TileColumnWidthArray")
    14001402  ("RowHeightArray",                                  cfg_RowHeight,                            cfg_RowHeight, "deprecated alias of TileRowHeightArray")
    14011403
    1402   ("TileUniformSpacing",                              m_tileUniformSpacingFlag,                         false, "Indicates that tile columns and rows are distributed uniformly")
    1403   ("NumTileColumnsMinus1",                            m_numTileColumnsMinus1,                               0, "Number of tile columns in a picture minus 1")
    1404   ("NumTileRowsMinus1",                               m_numTileRowsMinus1,                                  0, "Number of rows in a picture minus 1")
     1404  ("TileUniformSpacing",                              m_tileUniformSpacingFlag,                         false,      "Indicates that tile columns and rows are distributed uniformly")
     1405  ("NumTileColumnsMinus1",                            m_numTileColumnsMinus1,                               0,          "Number of tile columns in a picture minus 1")
     1406  ("NumTileRowsMinus1",                               m_numTileRowsMinus1,                                  0,          "Number of rows in a picture minus 1")
    14051407  ("TileColumnWidthArray",                            cfg_ColumnWidth,                        cfg_ColumnWidth, "Array containing tile column width values in units of CTU")
    14061408  ("TileRowHeightArray",                              cfg_RowHeight,                            cfg_RowHeight, "Array containing tile row height values in units of CTU")
     
    15571559                                                                                                               "\t0: disable")
    15581560  ("SEIDecodingUnitInfo",                             m_decodingUnitInfoSEIEnabled,                         0, "Control generation of decoding unit information SEI message.")
    1559 #if LAYERS_NOT_PRESENT_SEI
    1560   ("SEILayersNotPresent",                             m_layersNotPresentSEIEnabled,             0, "Control generation of layers not present SEI message")
    1561 #endif
    15621561  ("SEISOPDescription",                               m_SOPDescriptionSEIEnabled,                           0, "Control generation of SOP description SEI messages")
    15631562  ("SEIScalableNesting",                              m_scalableNestingSEIEnabled,                          0, "Control generation of scalable nesting SEI messages")
     
    15961595  ("SEIMasteringDisplayPrimaries",                    cfg_DisplayPrimariesCode,       cfg_DisplayPrimariesCode, "Mastering display primaries for all three colour planes in CIE xy coordinates in increments of 1/50000 (results in the ranges 0 to 50000 inclusive)")
    15971596  ("SEIMasteringDisplayWhitePoint",                   cfg_DisplayWhitePointCode,     cfg_DisplayWhitePointCode, "Mastering display white point CIE xy coordinates in normalised increments of 1/50000 (e.g. 0.333 = 16667)")
    1598    
     1597 
     1598#if LAYERS_NOT_PRESENT_SEI
     1599  ("SEILayersNotPresent",                             m_layersNotPresentSEIEnabled,             0, "Control generation of layers not present SEI message")
     1600#endif   
    15991601#if P0123_ALPHA_CHANNEL_SEI
    16001602  ("SEIAlphaChannelInfo",                     m_alphaSEIEnabled,                        false, "Enables transmission of information associated with alpha channel (default : 0)")
     
    18641866    m_apcLayerCfg[layer]->m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] = m_apcLayerCfg[layer]->m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ];
    18651867
    1866     if (m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_LUMA  ] == 0) { m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_LUMA  ] = m_apcLayerCfg[layer]->m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ]; }
    1867     if (m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_CHROMA] == 0) { m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_CHROMA] = m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_LUMA  ]; }
    1868     if (m_apcLayerCfg[layer]->m_inputBitDepth      [CHANNEL_TYPE_CHROMA] == 0) { m_apcLayerCfg[layer]->m_inputBitDepth      [CHANNEL_TYPE_CHROMA] = m_apcLayerCfg[layer]->m_inputBitDepth      [CHANNEL_TYPE_LUMA  ]; }
    1869     if (m_apcLayerCfg[layer]->m_outputBitDepth     [CHANNEL_TYPE_LUMA  ] == 0) { m_apcLayerCfg[layer]->m_outputBitDepth     [CHANNEL_TYPE_LUMA  ] = m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_LUMA  ]; }
    1870     if (m_apcLayerCfg[layer]->m_outputBitDepth     [CHANNEL_TYPE_CHROMA] == 0) { m_apcLayerCfg[layer]->m_outputBitDepth     [CHANNEL_TYPE_CHROMA] = m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_CHROMA]; }
     1868    if (m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_LUMA  ] == 0)
     1869    {
     1870      m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_LUMA  ] = m_apcLayerCfg[layer]->m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ];
     1871    }
     1872    if (m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_CHROMA] == 0)
     1873    {
     1874      m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_CHROMA] = m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_LUMA  ];
     1875    }
     1876    if (m_apcLayerCfg[layer]->m_inputBitDepth      [CHANNEL_TYPE_CHROMA] == 0)
     1877    {
     1878      m_apcLayerCfg[layer]->m_inputBitDepth      [CHANNEL_TYPE_CHROMA] = m_apcLayerCfg[layer]->m_inputBitDepth      [CHANNEL_TYPE_LUMA  ];
     1879    }
     1880    if (m_apcLayerCfg[layer]->m_outputBitDepth     [CHANNEL_TYPE_LUMA  ] == 0)
     1881    {
     1882      m_apcLayerCfg[layer]->m_outputBitDepth     [CHANNEL_TYPE_LUMA  ] = m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_LUMA  ];
     1883    }
     1884    if (m_apcLayerCfg[layer]->m_outputBitDepth     [CHANNEL_TYPE_CHROMA] == 0)
     1885    {
     1886      m_apcLayerCfg[layer]->m_outputBitDepth     [CHANNEL_TYPE_CHROMA] = m_apcLayerCfg[layer]->m_internalBitDepth   [CHANNEL_TYPE_CHROMA];
     1887    }
    18711888
    18721889    m_apcLayerCfg[layer]->m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat);
     
    19781995  m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str());
    19791996
    1980  /* rules for input, output and internal bitdepths as per help text */
     1997  /* rules for input, output and internal bitdepths as per help text */
    19811998  if (m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA  ] == 0)
    19821999  {
     
    20102027  m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat);
    20112028  m_chromaFormatIDC      = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat)));
    2012 
     2029#endif
     2030  assert(tmpWeightedPredictionMethod>=0 && tmpWeightedPredictionMethod<=WP_PER_PICTURE_WITH_HISTOGRAM_AND_PER_COMPONENT_AND_CLIPPING_AND_EXTENSION);
     2031  if (!(tmpWeightedPredictionMethod>=0 && tmpWeightedPredictionMethod<=WP_PER_PICTURE_WITH_HISTOGRAM_AND_PER_COMPONENT_AND_CLIPPING_AND_EXTENSION))
     2032  {
     2033    exit(EXIT_FAILURE);
     2034  }
     2035  m_weightedPredictionMethod = WeightedPredictionMethod(tmpWeightedPredictionMethod);
     2036
     2037#if !SVC_EXTENSION
    20132038  if (extendedProfile >= 1000 && extendedProfile <= 12316)
    20142039  {
     
    34133438  memset( m_extraRPSs, 0, sizeof( m_extraRPSs ) );
    34143439#else
    3415   m_extraRPSs=0;                                   
     3440  m_extraRPSs=0;
    34163441#endif
    34173442
     
    44464471#if !RC_SHVC_HARMONIZATION
    44474472  printf("RateControl                            : %d\n", m_RCEnableRateControl );
    4448 
     4473#endif
     4474  printf("WPMethod                               : %d\n", Int(m_weightedPredictionMethod));
     4475
     4476#if !RC_SHVC_HARMONIZATION
    44494477  if(m_RCEnableRateControl)
    44504478  {
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1391 r1400  
    389389  Bool      m_useWeightedPred;                    ///< Use of weighted prediction in P slices
    390390  Bool      m_useWeightedBiPred;                  ///< Use of bi-directional weighted prediction in B slices
     391  WeightedPredictionMethod m_weightedPredictionMethod;
    391392
    392393  UInt      m_log2ParallelMergeLevel;                         ///< Parallel merge estimation region
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1391 r1400  
    585585  m_cTEncTop.setExtendedPrecisionProcessingFlag                   ( m_extendedPrecisionProcessingFlag );
    586586  m_cTEncTop.setHighPrecisionOffsetsEnabledFlag                   ( m_highPrecisionOffsetsEnabledFlag );
     587
     588  m_cTEncTop.setWeightedPredictionMethod( m_weightedPredictionMethod );
     589
    587590  //====== Tool list ========
    588591  m_cTEncTop.setDeltaQpRD                                         ( m_uiDeltaQpRD  );
Note: See TracChangeset for help on using the changeset viewer.