00001
00011 #ifndef SEI_H
00012 #define SEI_H
00013
00014 typedef enum {
00015 SEI_BUFFERING_PERIOD = 0,
00016 SEI_PIC_TIMING,
00017 SEI_PAN_SCAN_RECT,
00018 SEI_FILLER_PAYLOAD,
00019 SEI_USER_DATA_REGISTERED_ITU_T_T35,
00020 SEI_USER_DATA_UNREGISTERED,
00021 SEI_RECOVERY_POINT,
00022 SEI_DEC_REF_PIC_MARKING_REPETITION,
00023 SEI_SPARE_PIC,
00024 SEI_SCENE_INFO,
00025 SEI_SUB_SEQ_INFO,
00026 SEI_SUB_SEQ_LAYER_CHARACTERISTICS,
00027 SEI_SUB_SEQ_CHARACTERISTICS,
00028 SEI_FULL_FRAME_FREEZE,
00029 SEI_FULL_FRAME_FREEZE_RELEASE,
00030 SEI_FULL_FRAME_SNAPSHOT,
00031 SEI_PROGRESSIVE_REFINEMENT_SEGMENT_START,
00032 SEI_PROGRESSIVE_REFINEMENT_SEGMENT_END,
00033 SEI_MOTION_CONSTRAINED_SLICE_GROUP_SET,
00034 SEI_FILM_GRAIN_CHARACTERISTICS,
00035 SEI_DEBLOCKING_FILTER_DISPLAY_PREFERENCE,
00036 SEI_STEREO_VIDEO_INFO,
00037 SEI_POST_FILTER_HINTS,
00038 SEI_TONE_MAPPING,
00039
00040 SEI_MAX_ELEMENTS
00041 } SEI_type;
00042
00043 #define MAX_FN 256
00044
00045 #define MAX_CODED_BIT_DEPTH 12
00046 #define MAX_SEI_BIT_DEPTH 12
00047 #define MAX_NUM_PIVOTS (1<<MAX_CODED_BIT_DEPTH)
00048
00049 #if (ENABLE_OUTPUT_TONEMAPPING)
00050 typedef struct tone_mapping_struct_s
00051 {
00052 Boolean seiHasTone_mapping;
00053 unsigned int tone_map_repetition_period;
00054 unsigned char coded_data_bit_depth;
00055 unsigned char sei_bit_depth;
00056 unsigned int model_id;
00057 unsigned int count;
00058
00059 imgpel lut[1<<MAX_CODED_BIT_DEPTH];
00060
00061 Bitstream *data;
00062 int payloadSize;
00063 } ToneMappingSEI;
00064
00065 #endif
00066
00067 void InterpretSEIMessage(byte* msg, int size, ImageParameters *p_Img);
00068 void interpret_spare_pic( byte* payload, int size, ImageParameters *p_Img );
00069 void interpret_subsequence_info( byte* payload, int size, ImageParameters *p_Img );
00070 void interpret_subsequence_layer_characteristics_info( byte* payload, int size, ImageParameters *p_Img );
00071 void interpret_subsequence_characteristics_info( byte* payload, int size, ImageParameters *p_Img );
00072 void interpret_scene_information( byte* payload, int size, ImageParameters *p_Img );
00073 void interpret_user_data_registered_itu_t_t35_info( byte* payload, int size, ImageParameters *p_Img );
00074 void interpret_user_data_unregistered_info( byte* payload, int size, ImageParameters *p_Img );
00075 void interpret_pan_scan_rect_info( byte* payload, int size, ImageParameters *p_Img );
00076 void interpret_recovery_point_info( byte* payload, int size, ImageParameters *p_Img );
00077 void interpret_filler_payload_info( byte* payload, int size, ImageParameters *p_Img );
00078 void interpret_dec_ref_pic_marking_repetition_info( byte* payload, int size, ImageParameters *p_Img );
00079 void interpret_full_frame_freeze_info( byte* payload, int size, ImageParameters *p_Img );
00080 void interpret_full_frame_freeze_release_info( byte* payload, int size, ImageParameters *p_Img );
00081 void interpret_full_frame_snapshot_info( byte* payload, int size, ImageParameters *p_Img );
00082 void interpret_progressive_refinement_start_info( byte* payload, int size, ImageParameters *p_Img );
00083 void interpret_progressive_refinement_end_info( byte* payload, int size, ImageParameters *p_Img );
00084 void interpret_motion_constrained_slice_group_set_info( byte* payload, int size, ImageParameters *p_Img );
00085 void interpret_reserved_info( byte* payload, int size, ImageParameters *p_Img );
00086 void interpret_buffering_period_info( byte* payload, int size, ImageParameters *p_Img );
00087 void interpret_picture_timing_info( byte* payload, int size, ImageParameters *p_Img );
00088 void interpret_film_grain_characteristics_info( byte* payload, int size, ImageParameters *p_Img );
00089 void interpret_deblocking_filter_display_preference_info( byte* payload, int size, ImageParameters *p_Img );
00090 void interpret_stereo_video_info_info( byte* payload, int size, ImageParameters *p_Img );
00091 void interpret_post_filter_hints_info( byte* payload, int size, ImageParameters *p_Img );
00092
00093 void interpret_tone_mapping( byte* payload, int size, ImageParameters *p_Img );
00094
00095 #if (ENABLE_OUTPUT_TONEMAPPING)
00096 void tone_map(imgpel** imgX, imgpel* lut, int size_x, int size_y);
00097 void init_tone_mapping_sei(ToneMappingSEI *seiToneMapping);
00098 void update_tone_mapping_sei(ToneMappingSEI *seiToneMapping);
00099 #endif
00100 #endif