Changeset 1538 in SHVCSoftware


Ignore:
Timestamp:
22 Mar 2016, 23:02:15 (8 years ago)
Author:
seregin
Message:

port rev 4690

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

Legend:

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

    r1534 r1538  
    15961596  ("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)")
    15971597  ("SEIMasteringDisplayWhitePoint",                   cfg_DisplayWhitePointCode,     cfg_DisplayWhitePointCode, "Mastering display white point CIE xy coordinates in normalised increments of 1/50000 (e.g. 0.333 = 16667)")
     1598#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     1599  ("SEIPreferredTransferCharacterisics",              m_preferredTransferCharacteristics,                   -1, "Value for the preferred_transfer_characteristics field of the Alternative transfer characteristics SEI which will override the corresponding entry in the VUI. If negative, do not produce the respective SEI message")
     1600#endif
    15981601
    15991602#if LAYERS_NOT_PRESENT_SEI
     
    40504053  }
    40514054
     4055#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     4056  xConfirmPara(m_preferredTransferCharacteristics > 255, "transfer_characteristics_idc should not be greater than 255.");
     4057#endif
     4058
    40524059#if SVC_EXTENSION
    40534060  xConfirmPara( (m_apcLayerCfg[0]->m_numSamplePredRefLayers != 0) && (m_apcLayerCfg[0]->m_numSamplePredRefLayers != -1), "Layer 0 cannot have any reference layers" );
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1534 r1538  
    441441  Int*      m_kneeSEIInputKneePoint;
    442442  Int*      m_kneeSEIOutputKneePoint;
     443#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     444  Int       m_preferredTransferCharacteristics;
     445#endif
     446
    443447  // weighted prediction
    444448  Bool      m_useWeightedPred;                    ///< Use of weighted prediction in P slices
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1534 r1538  
    798798  m_cTEncTop.setColourRemapInfoSEIFileRoot                        ( m_colourRemapSEIFileRoot );
    799799  m_cTEncTop.setMasteringDisplaySEI                               ( m_masteringDisplay );
     800#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     801  m_cTEncTop.setSEIAlternativeTransferCharacteristicsSEIEnable    ( m_preferredTransferCharacteristics>=0     );
     802  m_cTEncTop.setSEIPreferredTransferCharacteristics               ( UChar(m_preferredTransferCharacteristics) );
     803#endif
    800804
    801805  m_cTEncTop.setTileUniformSpacingFlag                            ( m_tileUniformSpacingFlag );
  • branches/SHM-dev/source/Lib/TLibCommon/SEI.cpp

    r1475 r1538  
    150150    case SEI::CHROMA_RESAMPLING_FILTER_HINT:        return "Chroma sampling filter hint";
    151151    case SEI::COLOUR_REMAPPING_INFO:                return "Colour remapping info";
     152#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     153    case SEI::ALTERNATIVE_TRANSFER_CHARACTERISTICS: return "Alternative transfer characteristics";
     154#endif
    152155#if SVC_EXTENSION
    153156#if LAYERS_NOT_PRESENT_SEI
  • branches/SHM-dev/source/Lib/TLibCommon/SEI.h

    r1475 r1538  
    9292    KNEE_FUNCTION_INFO                   = 141,
    9393    COLOUR_REMAPPING_INFO                = 142,
     94#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     95    ALTERNATIVE_TRANSFER_CHARACTERISTICS = 182,
     96#endif
    9497#if LAYERS_NOT_PRESENT_SEI
    9598    LAYERS_NOT_PRESENT                   = 160,
     
    632635};
    633636
     637#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     638class SEIAlternativeTransferCharacteristics : public SEI
     639{
     640public:
     641  PayloadType payloadType() const { return ALTERNATIVE_TRANSFER_CHARACTERISTICS; }
     642
     643  SEIAlternativeTransferCharacteristics() : m_preferredTransferCharacteristics(18)
     644  { }
     645
     646  virtual ~SEIAlternativeTransferCharacteristics() {}
     647
     648  UInt m_preferredTransferCharacteristics;
     649};
     650#endif
     651
    634652#if P0123_ALPHA_CHANNEL_SEI
    635653class SEIAlphaChannelInfo : public SEI
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1537 r1538  
    170170#define T0196_SELECTIVE_RDOQ                              1 ///< selective RDOQ
    171171#define U0040_MODIFIED_WEIGHTEDPREDICTION_WITH_BIPRED_AND_CLIPPING 1
     172#define U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI    1 ///< Alternative transfer characteristics SEI message (JCTVC-U0033, with syntax naming from V1005)
    172173
    173174// ====================================================================================================================
  • branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp

    r1536 r1538  
    316316      xParseSEIMasteringDisplayColourVolume((SEIMasteringDisplayColourVolume&) *sei, payloadSize, pDecodedMessageOutputStream);
    317317      break;
     318#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     319    case SEI::ALTERNATIVE_TRANSFER_CHARACTERISTICS:
     320      sei = new SEIAlternativeTransferCharacteristics;
     321      xParseSEIAlternativeTransferCharacteristics((SEIAlternativeTransferCharacteristics&) *sei, payloadSize, pDecodedMessageOutputStream);
     322      break;
     323#endif
     324
    318325#if SVC_EXTENSION
    319326#if LAYERS_NOT_PRESENT_SEI
     
    14431450  sei_read_code( pDecodedMessageOutputStream, 32, code, "min_display_mastering_luminance" ); sei.values.minLuminance = code;
    14441451}
     1452
     1453#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     1454Void SEIReader::xParseSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics& sei, UInt payloadSize, ostream* pDecodedMessageOutputStream)
     1455{
     1456  UInt code;
     1457  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
     1458
     1459  sei_read_code(pDecodedMessageOutputStream, 8, code, "preferred_transfer_characteristics"); sei.m_preferredTransferCharacteristics = code;
     1460}
     1461#endif
    14451462
    14461463#if SVC_EXTENSION
  • branches/SHM-dev/source/Lib/TLibDecoder/SEIread.h

    r1475 r1538  
    109109  Void xParseSEIMasteringDisplayColourVolume  (SEIMasteringDisplayColourVolume& sei,  UInt payloadSize,                     std::ostream *pDecodedMessageOutputStream);
    110110  Void xParseSEIColourRemappingInfo           (SEIColourRemappingInfo& sei,           UInt payloadSize,                     std::ostream *pDecodedMessageOutputStream);
     111#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     112  Void xParseSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics& sei,              UInt payLoadSize,                     std::ostream *pDecodedMessageOutputStream);
     113#endif
    111114
    112115  Void sei_read_code(std::ostream *pOS, UInt uiLength, UInt& ruiCode, const TChar *pSymbolName);
  • branches/SHM-dev/source/Lib/TLibEncoder/SEIEncoder.cpp

    r1479 r1538  
    670670}
    671671
     672#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     673Void SEIEncoder::initSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics *seiAltTransCharacteristics)
     674{
     675  assert (m_isInitialized);
     676  assert (seiAltTransCharacteristics!=NULL);
     677  //  Set SEI message parameters read from command line options
     678  seiAltTransCharacteristics->m_preferredTransferCharacteristics = m_pcCfg->getSEIPreferredTransferCharacteristics();
     679}
     680#endif
     681
    672682#if LAYERS_NOT_PRESENT_SEI
    673683Void SEIEncoder::initSEILayersNotPresent(SEILayersNotPresent *seiLayersNotPresent)
  • branches/SHM-dev/source/Lib/TLibEncoder/SEIEncoder.h

    r1475 r1538  
    8282  Void initSEITimeCode(SEITimeCode *sei);
    8383  Bool initSEIColourRemappingInfo(SEIColourRemappingInfo *sei, Int currPOC); // returns true on success, false on failure.
     84#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     85  Void initSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics *sei);
     86#endif
    8487
    8588#if LAYERS_NOT_PRESENT_SEI
  • branches/SHM-dev/source/Lib/TLibEncoder/SEIwrite.cpp

    r1475 r1538  
    158158    xWriteSEIMasteringDisplayColourVolume(*static_cast<const SEIMasteringDisplayColourVolume*>(&sei));
    159159    break;
     160#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     161  case SEI::ALTERNATIVE_TRANSFER_CHARACTERISTICS:
     162    xWriteSEIAlternativeTransferCharacteristics(*static_cast<const SEIAlternativeTransferCharacteristics*>(&sei));
     163    break;
     164#endif
     165
    160166#if SVC_EXTENSION
    161167#if LAYERS_NOT_PRESENT_SEI
     
    10731079}
    10741080
     1081#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     1082Void SEIWriter::xWriteSEIAlternativeTransferCharacteristics(const SEIAlternativeTransferCharacteristics& sei)
     1083{
     1084  WRITE_CODE(sei.m_preferredTransferCharacteristics, 8, "preferred_transfer_characteristics");
     1085}
     1086#endif
     1087
    10751088#if SVC_EXTENSION
    10761089#if LAYERS_NOT_PRESENT_SEI
  • branches/SHM-dev/source/Lib/TLibEncoder/SEIwrite.h

    r1475 r1538  
    9191  Void xWriteSEIColourRemappingInfo(const SEIColourRemappingInfo& sei);
    9292  Void xWriteSEIMasteringDisplayColourVolume( const SEIMasteringDisplayColourVolume& sei);
     93#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     94  Void xWriteSEIAlternativeTransferCharacteristics(const SEIAlternativeTransferCharacteristics& sei);
     95#endif
    9396
    9497#if O0164_MULTI_LAYER_HRD
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h

    r1534 r1538  
    323323  std::string m_colourRemapSEIFileRoot;          ///< SEI Colour Remapping File (initialized from external file)
    324324  TComSEIMasteringDisplay m_masteringDisplay;
     325#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     326  Bool      m_alternativeTransferCharacteristicsSEIEnabled;
     327  UChar     m_preferredTransferCharacteristics;
     328#endif
    325329  //====== Weighted Prediction ========
    326330  Bool      m_useWeightedPred;       //< Use of Weighting Prediction (P_SLICE)
     
    909913  const std::string &getColourRemapInfoSEIFileRoot() const           { return m_colourRemapSEIFileRoot; }
    910914  Void  setMasteringDisplaySEI(const TComSEIMasteringDisplay &src)   { m_masteringDisplay = src; }
     915#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     916  Void  setSEIAlternativeTransferCharacteristicsSEIEnable( Bool b)   { m_alternativeTransferCharacteristicsSEIEnabled = b;    }
     917  Bool  getSEIAlternativeTransferCharacteristicsSEIEnable( ) const   { return m_alternativeTransferCharacteristicsSEIEnabled; }
     918  Void  setSEIPreferredTransferCharacteristics(UChar v)              { m_preferredTransferCharacteristics = v;    }
     919  UChar getSEIPreferredTransferCharacteristics() const               { return m_preferredTransferCharacteristics; }
     920#endif
    911921  const TComSEIMasteringDisplay &getMasteringDisplaySEI() const      { return m_masteringDisplay; }
    912922  Void         setUseWP               ( Bool b )                     { m_useWeightedPred   = b;    }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1537 r1538  
    631631    seiMessages.push_back(seiChromaResamplingFilterHint);
    632632  }
     633#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
     634  if(m_pcCfg->getSEIAlternativeTransferCharacteristicsSEIEnable())
     635  {
     636    SEIAlternativeTransferCharacteristics *seiAlternativeTransferCharacteristics = new SEIAlternativeTransferCharacteristics;
     637    m_seiEncoder.initSEIAlternativeTransferCharacteristics(seiAlternativeTransferCharacteristics);
     638    seiMessages.push_back(seiAlternativeTransferCharacteristics);
     639  }
     640#endif
    633641
    634642#if SVC_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.