1
0

sei.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*!
  2. *************************************************************************************
  3. * \file sei.h
  4. *
  5. * \brief
  6. * Prototypes for sei.c
  7. *************************************************************************************
  8. */
  9. #ifndef SEI_H
  10. #define SEI_H
  11. typedef enum {
  12. SEI_BUFFERING_PERIOD = 0,
  13. SEI_PIC_TIMING,
  14. SEI_PAN_SCAN_RECT,
  15. SEI_FILLER_PAYLOAD,
  16. SEI_USER_DATA_REGISTERED_ITU_T_T35,
  17. SEI_USER_DATA_UNREGISTERED,
  18. SEI_RECOVERY_POINT,
  19. SEI_DEC_REF_PIC_MARKING_REPETITION,
  20. SEI_SPARE_PIC,
  21. SEI_SCENE_INFO,
  22. SEI_SUB_SEQ_INFO,
  23. SEI_SUB_SEQ_LAYER_CHARACTERISTICS,
  24. SEI_SUB_SEQ_CHARACTERISTICS,
  25. SEI_FULL_FRAME_FREEZE,
  26. SEI_FULL_FRAME_FREEZE_RELEASE,
  27. SEI_FULL_FRAME_SNAPSHOT,
  28. SEI_PROGRESSIVE_REFINEMENT_SEGMENT_START,
  29. SEI_PROGRESSIVE_REFINEMENT_SEGMENT_END,
  30. SEI_MOTION_CONSTRAINED_SLICE_GROUP_SET,
  31. SEI_FILM_GRAIN_CHARACTERISTICS,
  32. SEI_DEBLOCKING_FILTER_DISPLAY_PREFERENCE,
  33. SEI_STEREO_VIDEO_INFO,
  34. SEI_POST_FILTER_HINTS,
  35. SEI_TONE_MAPPING,
  36. SEI_MAX_ELEMENTS //!< number of maximum syntax elements
  37. } SEI_type;
  38. #define MAX_FN 256
  39. // tone mapping information
  40. #define MAX_CODED_BIT_DEPTH 12
  41. #define MAX_SEI_BIT_DEPTH 12
  42. #define MAX_NUM_PIVOTS (1<<MAX_CODED_BIT_DEPTH)
  43. #if (ENABLE_OUTPUT_TONEMAPPING)
  44. typedef struct tone_mapping_struct_s
  45. {
  46. Boolean seiHasTone_mapping;
  47. unsigned int tone_map_repetition_period;
  48. unsigned char coded_data_bit_depth;
  49. unsigned char sei_bit_depth;
  50. unsigned int model_id;
  51. unsigned int count;
  52. imgpel lut[1<<MAX_CODED_BIT_DEPTH]; //<! look up table for mapping the coded data value to output data value
  53. Bitstream *data;
  54. int payloadSize;
  55. } ToneMappingSEI;
  56. #endif
  57. void InterpretSEIMessage(byte* msg, int size, VideoParameters *p_Vid);
  58. void interpret_spare_pic( byte* payload, int size, VideoParameters *p_Vid );
  59. void interpret_subsequence_info( byte* payload, int size, VideoParameters *p_Vid );
  60. void interpret_subsequence_layer_characteristics_info( byte* payload, int size, VideoParameters *p_Vid );
  61. void interpret_subsequence_characteristics_info( byte* payload, int size, VideoParameters *p_Vid );
  62. void interpret_scene_information( byte* payload, int size, VideoParameters *p_Vid ); // JVT-D099
  63. void interpret_user_data_registered_itu_t_t35_info( byte* payload, int size, VideoParameters *p_Vid );
  64. void interpret_user_data_unregistered_info( byte* payload, int size, VideoParameters *p_Vid );
  65. void interpret_pan_scan_rect_info( byte* payload, int size, VideoParameters *p_Vid );
  66. void interpret_recovery_point_info( byte* payload, int size, VideoParameters *p_Vid );
  67. void interpret_filler_payload_info( byte* payload, int size, VideoParameters *p_Vid );
  68. void interpret_dec_ref_pic_marking_repetition_info( byte* payload, int size, VideoParameters *p_Vid );
  69. void interpret_full_frame_freeze_info( byte* payload, int size, VideoParameters *p_Vid );
  70. void interpret_full_frame_freeze_release_info( byte* payload, int size, VideoParameters *p_Vid );
  71. void interpret_full_frame_snapshot_info( byte* payload, int size, VideoParameters *p_Vid );
  72. void interpret_progressive_refinement_start_info( byte* payload, int size, VideoParameters *p_Vid );
  73. void interpret_progressive_refinement_end_info( byte* payload, int size, VideoParameters *p_Vid );
  74. void interpret_motion_constrained_slice_group_set_info( byte* payload, int size, VideoParameters *p_Vid );
  75. void interpret_reserved_info( byte* payload, int size, VideoParameters *p_Vid );
  76. void interpret_buffering_period_info( byte* payload, int size, VideoParameters *p_Vid );
  77. void interpret_picture_timing_info( byte* payload, int size, VideoParameters *p_Vid );
  78. void interpret_film_grain_characteristics_info( byte* payload, int size, VideoParameters *p_Vid );
  79. void interpret_deblocking_filter_display_preference_info( byte* payload, int size, VideoParameters *p_Vid );
  80. void interpret_stereo_video_info_info( byte* payload, int size, VideoParameters *p_Vid );
  81. void interpret_post_filter_hints_info( byte* payload, int size, VideoParameters *p_Vid );
  82. // functions for tone mapping SEI message
  83. void interpret_tone_mapping( byte* payload, int size, VideoParameters *p_Vid );
  84. #if (ENABLE_OUTPUT_TONEMAPPING)
  85. void tone_map(imgpel** imgX, imgpel* lut, int size_x, int size_y);
  86. void init_tone_mapping_sei(ToneMappingSEI *seiToneMapping);
  87. void update_tone_mapping_sei(ToneMappingSEI *seiToneMapping);
  88. #endif
  89. #endif