📄 umc_h264_dec_defs_dec.h
字号:
Ipp8u fixed_frame_rate_flag;
Ipp8u nal_hrd_parameters_present_flag;
Ipp8u vcl_hrd_parameters_present_flag;
Ipp8u low_delay_hrd_flag;
Ipp8u pic_struct_present_flag;
Ipp8u bitstream_restriction_flag;
Ipp8u motion_vectors_over_pic_boundaries_flag;
Ipp8u max_bytes_per_pic_denom;
Ipp8u max_bits_per_mb_denom;
Ipp8u log2_max_mv_length_horizontal;
Ipp8u log2_max_mv_length_vertical;
Ipp8u num_reorder_frames;
Ipp8u max_dec_frame_buffering;
//hrd_parameters
Ipp8u cpb_cnt;
Ipp8u bit_rate_scale;
Ipp8u cpb_size_scale;
Ipp32u bit_rate_value[32];
Ipp8u cpb_size_value[32];
Ipp8u cbr_flag[32];
Ipp8u initial_cpb_removal_delay_length;
Ipp8u cpb_removal_delay_length;
Ipp8u dpb_output_delay_length;
Ipp8u time_offset_length;
Ipp32s *poffset_for_ref_frame; // pointer to array of stored frame offsets,
// length num_stored_frames_in_pic_order_cnt_cycle,
// for pic order cnt type 1
}; // H264SeqParamSet
// Sequence parameter set extension structure, corresponding to the H.264 bitstream definition.
struct H264SeqParamSetExtension
{
Ipp8u seq_parameter_set_id;
Ipp8u aux_format_idc;
Ipp8u bit_depth_aux;
Ipp8u alpha_incr_flag;
Ipp8u alpha_opaque_value;
Ipp8u alpha_transparent_value;
Ipp8u additional_extension_flag;
bool operator == (const H264SeqParamSetExtension& sps) const
{
if (memcmp(&(this->seq_parameter_set_id), &sps.seq_parameter_set_id, sizeof(H264SeqParamSetExtension)))
return false;
return true;
}
bool operator != (const H264SeqParamSetExtension & sps) const
{
return !(*this == sps);
}
H264SeqParamSetExtension()
{
aux_format_idc = 0;
seq_parameter_set_id = MAX_NUM_SEQ_PARAM_SETS; // illegal id
}
}; // H264SeqParamSetExtension
// Picture parameter set structure, corresponding to the H.264 bitstream definition.
struct H264PicParamSet
{
// Flexible macroblock order structure, defining the FMO map for a picture
// paramter set.
struct SliceGroupInfoStruct
{
Ipp8u slice_group_map_type; // 0..6
// The additional slice group data depends upon map type
union
{
// type 0
Ipp32u run_length[MAX_NUM_SLICE_GROUPS];
// type 2
struct
{
Ipp32u top_left[MAX_NUM_SLICE_GROUPS-1];
Ipp32u bottom_right[MAX_NUM_SLICE_GROUPS-1];
}t1;
// types 3-5
struct
{
Ipp8u slice_group_change_direction_flag;
Ipp32u slice_group_change_rate;
}t2;
// type 6
struct
{
Ipp32u pic_size_in_map_units; // number of macroblocks if no field coding
Ipp8u *pSliceGroupIDMap; // Id for each slice group map unit
}t3;
};
}; // SliceGroupInfoStruct
Ipp16u pic_parameter_set_id; // of this picture parameter set
Ipp8u seq_parameter_set_id; // of seq param set used for this pic param set
Ipp8u entropy_coding_mode; // zero: CAVLC, else CABAC
Ipp8u pic_order_present_flag; // Zero indicates only delta_pic_order_cnt[0] is
// present in slice header; nonzero indicates
// delta_pic_order_cnt[1] is also present.
Ipp8u weighted_pred_flag; // Nonzero indicates weighted prediction applied to
// P and SP slices
Ipp8u weighted_bipred_idc; // 0: no weighted prediction in B slices
// 1: explicit weighted prediction
// 2: implicit weighted prediction
Ipp8s pic_init_qp; // default QP for I,P,B slices
Ipp8s pic_init_qs; // default QP for SP, SI slices
Ipp8s chroma_qp_index_offset[2]; // offset to add to QP for chroma
Ipp8u deblocking_filter_variables_present_flag; // If nonzero, deblock filter params are
// present in the slice header.
Ipp8u constrained_intra_pred_flag; // Nonzero indicates constrained intra mode
Ipp8u redundant_pic_cnt_present_flag; // Nonzero indicates presence of redundant_pic_cnt
// in slice header
Ipp32u num_slice_groups; // One: no FMO
Ipp32u num_ref_idx_l0_active; // num of ref pics in list 0 used to decode the picture
Ipp32u num_ref_idx_l1_active; // num of ref pics in list 1 used to decode the picture
Ipp8u transform_8x8_mode_flag;
Ipp8u type_of_scaling_list_used[8];
H264ScalingList4x4 ScalingLists4x4[6];
H264ScalingList8x8 ScalingLists8x8[2];
// Level Scale addition
H264WholeQPLevelScale4x4 m_LevelScale4x4[6];
H264WholeQPLevelScale8x8 m_LevelScale8x8[2];
SliceGroupInfoStruct SliceGroupInfo; // Used only when num_slice_groups > 1
H264PicParamSet()
{
Reset();
}
void Reset()
{
pic_parameter_set_id = MAX_NUM_PIC_PARAM_SETS;
seq_parameter_set_id = MAX_NUM_SEQ_PARAM_SETS;
num_slice_groups = 0;
}
~H264PicParamSet()
{
if (1 < num_slice_groups &&
(6 == SliceGroupInfo.slice_group_map_type) &&
SliceGroupInfo.t3.pSliceGroupIDMap)
{
ippsFree(SliceGroupInfo.t3.pSliceGroupIDMap);
}
}
bool operator == (const H264PicParamSet & pps) const
{
if (memcmp(&pic_parameter_set_id, &pps.pic_parameter_set_id,
((Ipp8s*)&SliceGroupInfo - (Ipp8s*)&pic_parameter_set_id)))
return false;
if (memcmp(&SliceGroupInfo, &pps.SliceGroupInfo, sizeof(SliceGroupInfoStruct)))
return false;
return true;
}
bool operator != (const H264PicParamSet & pps) const
{
return !(*this == pps);
}
}; // H264PicParamSet
struct RefPicListReorderInfo
{
Ipp32u num_entries; // number of currently valid idc,value pairs
Ipp8u reordering_of_pic_nums_idc[MAX_NUM_REF_FRAMES];
Ipp32u reorder_value[MAX_NUM_REF_FRAMES]; // abs_diff_pic_num or long_term_pic_num
};
struct AdaptiveMarkingInfo
{
Ipp32u num_entries; // number of currently valid mmco,value pairs
Ipp8u mmco[MAX_NUM_REF_FRAMES]; // memory management control operation id
Ipp32u value[MAX_NUM_REF_FRAMES*2]; // operation-dependent data, max 2 per operation
};
struct PredWeightTable
{
Ipp8u luma_weight_flag; // nonzero: luma weight and offset in bitstream
Ipp8u chroma_weight_flag; // nonzero: chroma weight and offset in bitstream
Ipp8s luma_weight; // luma weighting factor
Ipp8s luma_offset; // luma weighting offset
Ipp8s chroma_weight[2]; // chroma weighting factor (Cb,Cr)
Ipp8s chroma_offset[2]; // chroma weighting offset (Cb,Cr)
}; // PredWeightTable
typedef Ipp32s H264DecoderMBAddr;
// Slice header structure, corresponding to the H.264 bitstream definition.
struct H264SliceHeader
{
NAL_Unit_Type nal_unit_type; // (NAL_Unit_Type) specifies the type of RBSP data structure contained in the NAL unit as specified in Table 7-1 of h264 standart
Ipp16u pic_parameter_set_id; // of pic param set used for this slice
Ipp8u field_pic_flag; // zero: frame picture, else field picture
Ipp8u MbaffFrameFlag;
Ipp8u bottom_field_flag; // zero: top field, else bottom field
Ipp8u direct_spatial_mv_pred_flag; // zero: temporal direct, else spatial direct
Ipp8u num_ref_idx_active_override_flag; // nonzero: use ref_idx_active from slice header
// instead of those from pic param set
Ipp8u no_output_of_prior_pics_flag; // nonzero: remove previously decoded pictures
// from decoded picture buffer
Ipp8u long_term_reference_flag; // How to set MaxLongTermFrameIdx
Ipp8u cabac_init_idc; // CABAC initialization table index (0..2)
Ipp8u adaptive_ref_pic_marking_mode_flag; // Ref pic marking mode of current picture
Ipp8s slice_qp_delta; // to calculate default slice QP
Ipp8u sp_for_switch_flag; // SP slice decoding control
Ipp8s slice_qs_delta; // to calculate default SP,SI slice QS
Ipp8u disable_deblocking_filter_idc; // deblock filter control, 0=filter all edges
Ipp8s slice_alpha_c0_offset; // deblock filter c0, alpha table offset
Ipp8s slice_beta_offset; // deblock filter beta table offset
H264DecoderMBAddr first_mb_in_slice;
Ipp32s frame_num;
EnumSliceCodType slice_type;
Ipp8u idr_flag;
Ipp8u nal_ref_idc;
Ipp32u idr_pic_id; // ID of an IDR picture
Ipp32s pic_order_cnt_lsb; // picture order count (mod MaxPicOrderCntLsb)
Ipp32s delta_pic_order_cnt_bottom; // Pic order count difference, top & bottom fields
Ipp32u difference_of_pic_nums; // Ref pic memory mgmt
Ipp32u long_term_pic_num; // Ref pic memory mgmt
Ipp32u long_term_frame_idx; // Ref pic memory mgmt
Ipp32u max_long_term_frame_idx; // Ref pic memory mgmt
Ipp32s delta_pic_order_cnt[2]; // picture order count differences
Ipp32u redundant_pic_cnt; // for redundant slices
Ipp32s num_ref_idx_l0_active; // num of ref pics in list 0 used to decode the slice,
// see num_ref_idx_active_override_flag
Ipp32s num_ref_idx_l1_active; // num of ref pics in list 1 used to decode the slice
// see num_ref_idx_active_override_flag
Ipp32u slice_group_change_cycle; // for FMO
Ipp8u luma_log2_weight_denom; // luma weighting denominator
Ipp8u chroma_log2_weight_denom; // chroma weighting denominator
bool is_auxiliary;
}; // H264SliceHeader
struct H264LimitedSliceHeader
{
EnumSliceCodType slice_type; // (EnumSliceCodType) slice type
Ipp8u disable_deblocking_filter_idc; // (Ipp8u) deblock filter control, 0 = filter all edges
Ipp8s slice_alpha_c0_offset; // (Ipp8s) deblock filter c0, alpha table offset
Ipp8s slice_beta_offset; // (Ipp8s) deblock filter beta table offset
}; // H264LimitedSliceHeader
struct H264SEIPayLoad
{
SEI_TYPE payLoadType;
Ipp32u payLoadSize;
Ipp8u * user_data; // for UserDataRegistered or UserDataUnRegistered
H264SEIPayLoad()
: user_data(0)
, payLoadType(SEI_RESERVED)
, payLoadSize(0)
{
}
void Reset()
{
delete [] user_data;
user_data = 0;
payLoadType = SEI_RESERVED;
payLoadSize = 0;
}
~H264SEIPayLoad()
{
delete [] user_data;
}
bool operator == (const H264SEIPayLoad & sei) const
{
if (memcmp(&payLoadType, &sei.payLoadType, sizeof(H264SEIPayLoad)))
return false;
return true;
}
bool operator != (const H264SEIPayLoad & sei) const
{
return !(*this == sei);
}
union SEIMessages
{
struct BufferingPeriod
{
Ipp32u initial_cbp_removal_delay[2][16];
Ipp32u initial_cbp_removal_delay_offset[2][16];
}buffering_period;
struct PicTiming
{
Ipp32u cbp_removal_delay;
Ipp32u dpb_ouput_delay;
Ipp8u pic_struct;
Ipp8u clock_timestamp_flag[16];
struct ClockTimestamps
{
Ipp8u ct_type;
Ipp8u nunit_field_based_flag;
Ipp8u counting_type;
Ipp8u full_timestamp_flag;
Ipp8u discontinuity_flag;
Ipp8u cnt_dropped_flag;
Ipp8u n_frames;
Ipp8u seconds_value;
Ipp8u minutes_value;
Ipp8u hours_value;
Ipp8u time_offset;
}clock_timestamps[16];
}pic_timing;
struct PanScanRect
{
Ipp8u pan_scan_rect_id;
Ipp8u pan_scan_rect_cancel_flag;
Ipp8u pan_scan_cnt;
Ipp32u pan_scan_rect_left_offset[32];
Ipp32u pan_scan_rect_right_offset[32];
Ipp32u pan_scan_rect_top_offset[32];
Ipp32u pan_scan_rect_bottom_offset[32];
Ipp8u pan_scan_rect_repetition_period;
}pan_scan_rect;
struct UserDataRegistered
{
Ipp8u itu_t_t35_country_code;
Ipp8u itu_t_t35_country_code_extension_byte;
} user_data_registered;
struct RecoveryPoint
{
Ipp8u recovery_frame_cnt;
Ipp8u exact_match_flag;
Ipp8u broken_link_flag;
Ipp8u changing_slice_group_idc;
}recovery_point;
struct DecRefPicMarkingRepetition
{
Ipp8u original_idr_flag;
Ipp8u original_frame_num;
Ipp8u original_field_pic_flag;
Ipp8u original_bottom_field_flag;
}dec_ref_pic_marking_repetition;
struct SparePic
{
Ipp32u target_frame_num;
Ipp8u spare_field_flag;
Ipp8u target_bottom_field_flag;
Ipp8u num_spare_pics;
Ipp8u delta_spare_frame_num[16];
Ipp8u spare_bottom_field_flag[16];
Ipp8u spare_area_idc[16];
Ipp8u *spare_unit_flag[16];
Ipp8u *zero_run_length[16];
}spare_pic;
struct SceneInfo
{
Ipp8u scene_info_present_flag;
Ipp8u scene_id;
Ipp8u scene_transition_type;
Ipp8u second_scene_id;
}scene_info;
struct SubSeqInfo
{
Ipp8u sub_seq_layer_num;
Ipp8u sub_seq_id;
Ipp8u first_ref_pic_flag;
Ipp8u leading_non_ref_pic_flag;
Ipp8u last_pic_flag;
Ipp8u sub_seq_frame_num_flag;
Ipp8u sub_seq_frame_num;
}sub_seq_info;
struct SubSeqLayerCharacteristics
{
Ipp8u num_sub_seq_layers;
Ipp8u accurate_statistics_flag[16];
Ipp16u average_bit_rate[16];
Ipp16u average_frame_rate[16];
}sub_seq_layer_characteristics;
struct SubSeqCharacteristics
{
Ipp8u sub_seq_layer_num;
Ipp8u sub_seq_id;
Ipp8u duration_flag;
Ipp8u sub_seq_duration;
Ipp8u average_rate_flag;
Ipp8u accurate_statistics_flag;
Ipp16u average_bit_rate;
Ipp16u average_frame_rate;
Ipp8u num_referenced_subseqs;
Ipp8u ref_sub_seq_layer_num[16];
Ipp8u ref_sub_seq_id[16];
Ipp8u ref_sub_seq_direction[16];
}sub_seq_characteristics;
struct FullFrameFreeze
{
Ipp32u full_frame_freeze_repetition_period;
}full_frame_freeze;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -