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@…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-6-dev/source/Lib/TLibEncoder/SEIwrite.cpp

    r774 r776  
    8787    fprintf( g_hTrace, "=========== Tone Mapping Info SEI message ===========\n");
    8888    break;
     89#if P0050_KNEE_FUNCTION_SEI
     90  case SEI::KNEE_FUNCTION_INFO:
     91    fprintf( g_hTrace, "=========== Knee Function Information SEI message ===========\n");
     92    break;
     93#endif
    8994#if Q0074_SEI_COLOR_MAPPING
    9095  case SEI::COLOR_MAPPING_INFO:
     
    177182    xWriteSEIToneMappingInfo(*static_cast<const SEIToneMappingInfo*>(&sei));
    178183    break;
     184#if P0050_KNEE_FUNCTION_SEI
     185  case SEI::KNEE_FUNCTION_INFO:
     186    xWriteSEIKneeFunctionInfo(*static_cast<const SEIKneeFunctionInfo*>(&sei));
     187    break;
     188#endif
    179189#if Q0074_SEI_COLOR_MAPPING
    180190  case SEI::COLOR_MAPPING_INFO:
     
    575585  xWriteByteAlign();
    576586}
    577 
     587#if P0050_KNEE_FUNCTION_SEI
     588Void SEIWriter::xWriteSEIKneeFunctionInfo(const SEIKneeFunctionInfo &sei)
     589{
     590  WRITE_UVLC( sei.m_kneeId, "knee_function_id" );
     591  WRITE_FLAG( sei.m_kneeCancelFlag, "knee_function_cancel_flag" );
     592  if ( !sei.m_kneeCancelFlag )
     593  {
     594    WRITE_FLAG( sei.m_kneePersistenceFlag, "knee_function_persistence_flag" );
     595    WRITE_FLAG( sei.m_kneeMappingFlag, "mapping_flag" );
     596    WRITE_CODE( (UInt)sei.m_kneeInputDrange , 32,  "input_d_range" );
     597    WRITE_CODE( (UInt)sei.m_kneeInputDispLuminance, 32,  "input_disp_luminance" );
     598    WRITE_CODE( (UInt)sei.m_kneeOutputDrange, 32,  "output_d_range" );
     599    WRITE_CODE( (UInt)sei.m_kneeOutputDispLuminance, 32,  "output_disp_luminance" );
     600    WRITE_UVLC( sei.m_kneeNumKneePointsMinus1, "num_knee_points_minus1" );
     601    for(Int i = 0; i <= sei.m_kneeNumKneePointsMinus1; i++ )
     602    {
     603      WRITE_CODE( (UInt)sei.m_kneeInputKneePoint[i], 10,"input_knee_point" );
     604      WRITE_CODE( (UInt)sei.m_kneeOutputKneePoint[i], 10, "output_knee_point" );
     605    }
     606  }
     607  xWriteByteAlign();
     608}
     609#endif
    578610#if Q0074_SEI_COLOR_MAPPING
    579611Void SEIWriter::xWriteSEIColorMappingInfo(const SEIColorMappingInfo& sei)
Note: See TracChangeset for help on using the changeset viewer.