Changeset 776 in SHVCSoftware for branches/SHM-6-dev/source/App


Ignore:
Timestamp:
21 May 2014, 02:18:44 (11 years ago)
Author:
sony
Message:

JCTVC-P0050: Knee Function Information (MACRO: P0050_KNEE_FUNCTION_SEI)
ohji.nakagami@…

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

Legend:

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

    r758 r776  
    513513  string cfg_codedPivotValue;
    514514  string cfg_targetPivotValue;
     515#if P0050_KNEE_FUNCTION_SEI
     516  string cfg_kneeSEIInputKneePointValue;
     517  string cfg_kneeSEIOutputKneePointValue;
     518#endif
    515519  po::Options opts;
    516520  opts.addOptions()
     
    943947  ("SEISOPDescription",              m_SOPDescriptionSEIEnabled,              0, "Control generation of SOP description SEI messages")
    944948  ("SEIScalableNesting",             m_scalableNestingSEIEnabled,              0, "Control generation of scalable nesting SEI messages")
     949#if P0050_KNEE_FUNCTION_SEI
     950  ("SEIKneeFunctionInfo",                 m_kneeSEIEnabled,               false, "Control generation of Knee function SEI messages")
     951  ("SEIKneeFunctionId",                   m_kneeSEIId,                        0, "Specifies Id of Knee function SEI message for a given session")
     952  ("SEIKneeFunctionCancelFlag",           m_kneeSEICancelFlag,            false, "Indicates that Knee function SEI message cancels the persistance or follows")
     953  ("SEIKneeFunctionPersistenceFlag",      m_kneeSEIPersistenceFlag,        true, "Specifies the persistence of the Knee function SEI message")
     954  ("SEIKneeFunctionMappingFlag",          m_kneeSEIMappingFlag,           false, "Specifies the mapping mode of the Knee function SEI message")
     955  ("SEIKneeFunctionInputDrange",          m_kneeSEIInputDrange,            1000, "Specifies the peak luminance level for the input picture of Knee function SEI messages")
     956  ("SEIKneeFunctionInputDispLuminance",   m_kneeSEIInputDispLuminance,      100, "Specifies the expected display brightness for the input picture of Knee function SEI messages")
     957  ("SEIKneeFunctionOutputDrange",         m_kneeSEIOutputDrange,           4000, "Specifies the peak luminance level for the output picture of Knee function SEI messages")
     958  ("SEIKneeFunctionOutputDispLuminance",  m_kneeSEIOutputDispLuminance,     800, "Specifies the expected display brightness for the output picture of Knee function SEI messages")
     959  ("SEIKneeFunctionNumKneePointsMinus1",  m_kneeSEINumKneePointsMinus1,       2, "Specifies the number of knee points - 1")
     960  ("SEIKneeFunctionInputKneePointValue",  cfg_kneeSEIInputKneePointValue,     string("600 800 900"), "Array of input knee point")
     961  ("SEIKneeFunctionOutputKneePointValue", cfg_kneeSEIOutputKneePointValue,    string("100 250 450"), "Array of output knee point")
     962#endif
     963
    945964#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    946965  ("AdaptiveResolutionChange",     m_adaptiveResolutionChange, 0, "Adaptive resolution change frame number. Should coincide with EL RAP picture. (0: disable)")
     
    14851504    }
    14861505  }
     1506#if P0050_KNEE_FUNCTION_SEI
     1507  if( m_kneeSEIEnabled && !m_kneeSEICancelFlag )
     1508  {
     1509    Char* pcInputKneePointValue  = cfg_kneeSEIInputKneePointValue.empty()  ? NULL : strdup(cfg_kneeSEIInputKneePointValue.c_str());
     1510    Char* pcOutputKneePointValue = cfg_kneeSEIOutputKneePointValue.empty() ? NULL : strdup(cfg_kneeSEIOutputKneePointValue.c_str());
     1511    assert ( m_kneeSEINumKneePointsMinus1 >= 0 && m_kneeSEINumKneePointsMinus1 < 999 );
     1512    m_kneeSEIInputKneePoint = new Int[m_kneeSEINumKneePointsMinus1+1];
     1513    m_kneeSEIOutputKneePoint = new Int[m_kneeSEINumKneePointsMinus1+1];
     1514    char *InputVal = strtok(pcInputKneePointValue, " .,");
     1515    Int i=0;
     1516    while( InputVal && i<(m_kneeSEINumKneePointsMinus1+1) )
     1517    {
     1518      m_kneeSEIInputKneePoint[i] = (UInt) atoi( InputVal );
     1519      InputVal = strtok(NULL, " .,");
     1520      i++;
     1521    }
     1522    char *OutputVal = strtok(pcOutputKneePointValue, " .,");
     1523    i=0;
     1524    while( OutputVal && i<(m_kneeSEINumKneePointsMinus1+1) )
     1525    {
     1526      m_kneeSEIOutputKneePoint[i] = (UInt) atoi( OutputVal );
     1527      OutputVal = strtok(NULL, " .,");
     1528      i++;
     1529    }
     1530  }
     1531#endif
    14871532
    14881533#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
     
    21852230    xConfirmPara( m_extendedWhiteLevelLumaCodeValue < m_nominalWhiteLevelLumaCodeValue, "SEIToneMapExtendedWhiteLevelLumaCodeValue shall be greater than or equal to SEIToneMapNominalWhiteLevelLumaCodeValue");
    21862231  }
     2232#if P0050_KNEE_FUNCTION_SEI
     2233  if (m_kneeSEIEnabled && !m_kneeSEICancelFlag)
     2234  {
     2235    xConfirmPara( m_kneeSEINumKneePointsMinus1 < 0 || m_kneeSEINumKneePointsMinus1 > 998, "SEIKneeFunctionNumKneePointsMinus1 must be in the range of 0 to 998");
     2236    for ( UInt i=0; i<=m_kneeSEINumKneePointsMinus1; i++ ){
     2237      xConfirmPara( m_kneeSEIInputKneePoint[i] < 1 || m_kneeSEIInputKneePoint[i] > 999, "SEIKneeFunctionInputKneePointValue must be in the range of 1 to 999");
     2238      xConfirmPara( m_kneeSEIOutputKneePoint[i] < 0 || m_kneeSEIOutputKneePoint[i] > 1000, "SEIKneeFunctionInputKneePointValue must be in the range of 0 to 1000");
     2239      if ( i > 0 )
     2240      {
     2241        xConfirmPara( m_kneeSEIInputKneePoint[i-1] >= m_kneeSEIInputKneePoint[i],  "The i-th SEIKneeFunctionInputKneePointValue must be greather than the (i-1)-th value");
     2242      }
     2243    }
     2244  }
     2245#endif
    21872246
    21882247#if RC_SHVC_HARMONIZATION
  • branches/SHM-6-dev/source/App/TAppEncoder/TAppEncCfg.h

    r758 r776  
    386386#endif
    387387  Bool      m_crossLayerIrapAlignFlag;
     388#if P0050_KNEE_FUNCTION_SEI
     389  Bool      m_kneeSEIEnabled;
     390  Int       m_kneeSEIId;
     391  Bool      m_kneeSEICancelFlag;
     392  Bool      m_kneeSEIPersistenceFlag;
     393  Bool      m_kneeSEIMappingFlag;
     394  Int       m_kneeSEIInputDrange;
     395  Int       m_kneeSEIInputDispLuminance;
     396  Int       m_kneeSEIOutputDrange;
     397  Int       m_kneeSEIOutputDispLuminance;
     398  Int       m_kneeSEINumKneePointsMinus1;
     399  Int*      m_kneeSEIInputKneePoint;
     400  Int*      m_kneeSEIOutputKneePoint;
     401#endif
    388402#if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG
    389403  Bool      m_crossLayerAlignedIdrOnlyFlag;
  • branches/SHM-6-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r766 r776  
    485485    m_acTEncTop[layer].setTMISEINominalWhiteLevelLumaCodeValue      ( m_nominalWhiteLevelLumaCodeValue );
    486486    m_acTEncTop[layer].setTMISEIExtendedWhiteLevelLumaCodeValue     ( m_extendedWhiteLevelLumaCodeValue );
     487#if P0050_KNEE_FUNCTION_SEI
     488    m_acTEncTop[layer].setKneeSEIEnabled                            ( m_kneeSEIEnabled );
     489    m_acTEncTop[layer].setKneeSEIId                                 ( m_kneeSEIId );
     490    m_acTEncTop[layer].setKneeSEICancelFlag                         ( m_kneeSEICancelFlag );
     491    m_acTEncTop[layer].setKneeSEIPersistenceFlag                    ( m_kneeSEIPersistenceFlag );
     492    m_acTEncTop[layer].setKneeSEIMappingFlag                        ( m_kneeSEIMappingFlag );
     493    m_acTEncTop[layer].setKneeSEIInputDrange                        ( m_kneeSEIInputDrange );
     494    m_acTEncTop[layer].setKneeSEIInputDispLuminance                 ( m_kneeSEIInputDispLuminance );
     495    m_acTEncTop[layer].setKneeSEIOutputDrange                       ( m_kneeSEIOutputDrange );
     496    m_acTEncTop[layer].setKneeSEIOutputDispLuminance                ( m_kneeSEIOutputDispLuminance );
     497    m_acTEncTop[layer].setKneeSEINumKneePointsMinus1                ( m_kneeSEINumKneePointsMinus1 );
     498    m_acTEncTop[layer].setKneeSEIInputKneePoint                     ( m_kneeSEIInputKneePoint );
     499    m_acTEncTop[layer].setKneeSEIOutputKneePoint                    ( m_kneeSEIOutputKneePoint );
     500#endif
    487501#if Q0074_SEI_COLOR_MAPPING
    488502    m_acTEncTop[layer].setColorMappingInfoSEIFile                   ( m_acLayerCfg[layer].m_cSeiColorMappingFile.empty() ? NULL : const_cast<Char *>(m_acLayerCfg[layer].m_cSeiColorMappingFile.c_str()) );
     
    804818  m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue      ( m_nominalWhiteLevelLumaCodeValue );
    805819  m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue     ( m_extendedWhiteLevelLumaCodeValue );
     820#if P0050_KNEE_FUNCTION_SEI
     821  m_cTEncTop.setKneeSEIEnabled              ( m_kneeSEIEnabled );
     822  m_cTEncTop.setKneeSEIId                   ( m_kneeSEIId );
     823  m_cTEncTop.setKneeSEICancelFlag           ( m_kneeSEICancelFlag );
     824  m_cTEncTop.setKneeSEIPersistenceFlag      ( m_kneeSEIPersistenceFlag );
     825  m_cTEncTop.setKneeSEIMappingFlag          ( m_kneeSEIMappingFlag );
     826  m_cTEncTop.setKneeSEIInputDrange          ( m_kneeSEIInputDrange );
     827  m_cTEncTop.setKneeSEIInputDispLuminance   ( m_kneeSEIInputDispLuminance );
     828  m_cTEncTop.setKneeSEIOutputDrange         ( m_kneeSEIOutputDrange );
     829  m_cTEncTop.setKneeSEIOutputDispLuminance  ( m_kneeSEIOutputDispLuminance );
     830  m_cTEncTop.setKneeSEINumKneePointsMinus1  ( m_kneeSEINumKneePointsMinus1 );
     831  m_cTEncTop.setKneeSEIInputKneePoint       ( m_kneeSEIInputKneePoint );
     832  m_cTEncTop.setKneeSEIOutputKneePoint      ( m_kneeSEIOutputKneePoint );
     833#endif
    806834#if Q0074_SEI_COLOR_MAPPING
    807835  m_cTEncTop.setColorMappingInfoSEIFile                   ( m_pchSEIColorMappingFile );
Note: See TracChangeset for help on using the changeset viewer.