📄 mp4.h
字号:
#define MP4_DC_MARKER 0x6B001 // 110 1011 0000 0000 0001#define MP4_MV_MARKER 0x1F001 // 1 1111 0000 0000 0001// ISO/IEC 14496-2:2004 table G.1enum { MP4_SIMPLE_PROFILE_LEVEL_1 = 0x01, MP4_SIMPLE_PROFILE_LEVEL_2 = 0x02, MP4_SIMPLE_PROFILE_LEVEL_3 = 0x03, MP4_SIMPLE_PROFILE_LEVEL_0 = 0x08, MP4_CORE_PROFILE_LEVEL_1 = 0x21, MP4_CORE_PROFILE_LEVEL_2 = 0x22, MP4_MAIN_PROFILE_LEVEL_2 = 0x32, MP4_MAIN_PROFILE_LEVEL_3 = 0x33, MP4_MAIN_PROFILE_LEVEL_4 = 0x34, MP4_ADVANCED_REAL_TIME_SIMPLE_PROFILE_LEVEL_1 = 0x91, MP4_ADVANCED_REAL_TIME_SIMPLE_PROFILE_LEVEL_2 = 0x92, MP4_ADVANCED_REAL_TIME_SIMPLE_PROFILE_LEVEL_3 = 0x93, MP4_ADVANCED_REAL_TIME_SIMPLE_PROFILE_LEVEL_4 = 0x94, MP4_ADVANCED_CODING_EFFICIENCY_PROFILE_LEVEL_1 = 0xB1, MP4_ADVANCED_CODING_EFFICIENCY_PROFILE_LEVEL_2 = 0xB2, MP4_ADVANCED_CODING_EFFICIENCY_PROFILE_LEVEL_3 = 0xB3, MP4_ADVANCED_CODING_EFFICIENCY_PROFILE_LEVEL_4 = 0xB4, MP4_ADVANCED_CORE_PROFILE_LEVEL_1 = 0xC1, MP4_ADVANCED_CORE_PROFILE_LEVEL_2 = 0xC2, MP4_ADVANCED_SIMPLE_PROFILE_LEVEL_0 = 0xF0, MP4_ADVANCED_SIMPLE_PROFILE_LEVEL_1 = 0xF1, MP4_ADVANCED_SIMPLE_PROFILE_LEVEL_2 = 0xF2, MP4_ADVANCED_SIMPLE_PROFILE_LEVEL_3 = 0xF3, MP4_ADVANCED_SIMPLE_PROFILE_LEVEL_4 = 0xF4, MP4_ADVANCED_SIMPLE_PROFILE_LEVEL_5 = 0xF5, MP4_ADVANCED_SIMPLE_PROFILE_LEVEL_3B = 0xF7};/* Frame Info */typedef struct _mp4_Frame { Ipp8u* apY; // allocated with border Ipp8u* apCb; // allocated with border Ipp8u* apCr; // allocated with border int stepY; int stepCr; int stepCb; Ipp8u* pY; // real pointer Ipp8u* pCb; // real pointer Ipp8u* pCr; // real pointer int type; Ipp64s time; int mbPerRow; // info for realloc VOP with Shape int mbPerCol; Ipp8u* apB; // for binary mask Ipp8u* pB; Ipp8u* apA[3]; // for aux components Ipp8u* pA[3];} mp4_Frame;/* Block Info for Intra Prediction */typedef struct _mp4_IntraPredBlock { struct _mp4_IntraPredBlock *predA; struct _mp4_IntraPredBlock *predB; struct _mp4_IntraPredBlock *predC; Ipp16s dct_acA[8]; Ipp16s dct_acC[8]; Ipp16s dct_dc;} mp4_IntraPredBlock;/* Buffer for Intra Prediction */typedef struct _mp4_IntraPredBuff { Ipp8u *quant; // quant buffer; mp4_IntraPredBlock dcB[6]; // blocks for Left-Top DC only mp4_IntraPredBlock *block;} mp4_IntraPredBuff;/* MacroBlock Info Data Partitioned mode */typedef struct _mp4_DataPartMacroBlock { Ipp16s dct_dc[6]; Ipp8u type; Ipp8u not_coded; Ipp8u mcsel; Ipp8u ac_pred_flag; Ipp8u pat; Ipp8u quant;} mp4_DataPartMacroBlock;/* MacroBlock Info for Motion */typedef struct _mp4_MacroBlock { IppMotionVector mv[4]; Ipp8u validPred; // for MV pred, OBMC Ipp8u type; // for OBMC, BVOP Ipp8u not_coded; // for OBMC, BVOP Ipp8u field_info; // for Interlaced BVOP Direct mode} mp4_MacroBlock;/* ShapeInfo Info */typedef struct _mp4_ShapeInfo { Ipp8u bab_type; Ipp8u opaque; IppMotionVector mvs; // int coda_i; // int ac_pred_flag_alpha; // int cbpa; // int coda_pb;} mp4_ShapeInfo;/* Group Of Video Object Plane Info */typedef struct _mp4_GroupOfVideoObjectPlane { Ipp64s time_code; int closed_gov; int broken_link;} mp4_GroupOfVideoObjectPlane;/* Video Object Plane Info */typedef struct _mp4_VideoObjectPlane { int coding_type; int modulo_time_base; int time_increment; int coded; int id; // verid != 1 (newpred) int id_for_prediction_indication; // verid != 1 (newpred) int id_for_prediction; // verid != 1 (newpred) int rounding_type; int reduced_resolution; // verid != 1 int vop_width; int vop_height; int vop_horizontal_mc_spatial_ref; int vop_vertical_mc_spatial_ref; int background_composition; int change_conv_ratio_disable; int vop_constant_alpha; int vop_constant_alpha_value; int intra_dc_vlc_thr; int top_field_first; int alternate_vertical_scan_flag; int sprite_transmit_mode; int warping_mv_code_du[4]; int warping_mv_code_dv[4]; int brightness_change_factor; int quant; int alpha_quant[3]; int fcode_forward; int fcode_backward; int shape_coding_type; int load_backward_shape; int ref_select_code; int dx; int dy;} mp4_VideoObjectPlane;/* mp4_ComplexityEstimation Info */typedef struct _mp4_ComplexityEstimation { int estimation_method; int shape_complexity_estimation_disable; int opaque; int transparent; int intra_cae; int inter_cae; int no_update; int upsampling; int texture_complexity_estimation_set_1_disable; int intra_blocks; int inter_blocks; int inter4v_blocks; int not_coded_blocks; int texture_complexity_estimation_set_2_disable; int dct_coefs; int dct_lines; int vlc_symbols; int vlc_bits; int motion_compensation_complexity_disable; int apm; int npm; int interpolate_mc_q; int forw_back_mc_q; int halfpel2; int halfpel4; int version2_complexity_estimation_disable; // verid != 1 int sadct; // verid != 1 int quarterpel; // verid != 1 int dcecs_opaque; int dcecs_transparent; int dcecs_intra_cae; int dcecs_inter_cae; int dcecs_no_update; int dcecs_upsampling; int dcecs_intra_blocks; int dcecs_inter_blocks; int dcecs_inter4v_blocks; int dcecs_not_coded_blocks; int dcecs_dct_coefs; int dcecs_dct_lines; int dcecs_vlc_symbols; int dcecs_vlc_bits; int dcecs_apm; int dcecs_npm; int dcecs_interpolate_mc_q; int dcecs_forw_back_mc_q; int dcecs_halfpel2; int dcecs_halfpel4; int dcecs_sadct; // verid != 1 int dcecs_quarterpel; // verid != 1} mp4_ComplexityEstimation;/* mp4_Scalability Info */typedef struct _mp4_ScalabilityParameters { int dummy;} mp4_ScalabilityParameters;/* VOLControlParameters Info */typedef struct _mp4_VOLControlParameters { int chroma_format; int low_delay; int vbv_parameters; int bit_rate; int vbv_buffer_size; int vbv_occupancy;} mp4_VOLControlParameters;/* Video Object Plane with short header Info */typedef struct _mp4_VideoObjectPlaneH263 { int temporal_reference; int split_screen_indicator; int document_camera_indicator; int full_picture_freeze_release; int source_format; int picture_coding_type; int vop_quant; int gob_number; int num_gobs_in_vop; int num_macroblocks_in_gob; int gob_header_empty; int gob_frame_id; int quant_scale;#ifdef _OMP_KARABAS int nmb; int frGOB;#endif // _OMP_KARABAS} mp4_VideoObjectPlaneH263;/* Video Object Info */typedef struct _mp4_VideoObject {// iso part int id; int short_video_header; int random_accessible_vol; int type_indication; int is_identifier; int verid; int priority; int aspect_ratio_info; int aspect_ratio_info_par_width; int aspect_ratio_info_par_height; int is_vol_control_parameters; mp4_VOLControlParameters VOLControlParameters; int shape; int shape_extension; // verid != 1 int vop_time_increment_resolution; int vop_time_increment_resolution_bits; int fixed_vop_rate; int fixed_vop_time_increment; int width; int height; int interlaced; int obmc_disable; int sprite_enable; // if verid != 1 (2 bit GMC is added) int sprite_width; int sprite_height; int sprite_left_coordinate; int sprite_top_coordinate; int sprite_warping_points; int sprite_warping_accuracy; int sprite_brightness_change; int low_latency_sprite_enable; int sadct_disable; // verid != 1 int not_8_bit; int quant_precision; int bits_per_pixel; int no_gray_quant_update; int composition_method; int linear_composition; int quant_type; int load_intra_quant_mat; Ipp8u intra_quant_mat[64]; int load_nonintra_quant_mat; Ipp8u nonintra_quant_mat[64]; int load_intra_quant_mat_grayscale[3]; Ipp8u intra_quant_mat_grayscale[3][64]; int load_nonintra_quant_mat_grayscale[3]; Ipp8u nonintra_quant_mat_grayscale[3][64]; int quarter_sample; // verid != 1 int complexity_estimation_disable; mp4_ComplexityEstimation ComplexityEstimation; int resync_marker_disable; int data_partitioned; int reversible_vlc; int newpred_enable; // verid != 1 int requested_upstream_message_type;// verid != 1 int newpred_segment_type; // verid != 1 int reduced_resolution_vop_enable; // verid != 1 int scalability; mp4_ScalabilityParameters ScalabilityParameters; mp4_GroupOfVideoObjectPlane GroupOfVideoObjectPlane; mp4_VideoObjectPlane VideoObjectPlane; mp4_VideoObjectPlaneH263 VideoObjectPlaneH263;// app part int VOPindex; int MacroBlockPerRow; int MacroBlockPerCol; int MacroBlockPerVOP; int mbns; // num bits for MacroBlockPerVOP mp4_MacroBlock* MBinfo; mp4_IntraPredBuff IntraPredBuff; mp4_DataPartMacroBlock* DataPartBuff; IppiQuantInvIntraSpec_MPEG4* QuantInvIntraSpec; IppiQuantInvInterSpec_MPEG4* QuantInvInterSpec; IppiWarpSpec_MPEG4* WarpSpec; // for B-VOP int prevPlaneIsB;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -