📄 umc_h264_dec_defs_dec.h
字号:
}full_frame_snapshot; struct ProgressiveRefinementSegmentStart { Ipp8u progressive_refinement_id; Ipp8u num_refinement_steps; }progressive_refinement_segment_start; struct MotionConstrainedSliceGroupSet { Ipp8u num_slice_groups_in_set; Ipp8u slice_group_id[8]; Ipp8u exact_sample_value_match_flag; Ipp8u pan_scan_rect_flag; Ipp8u pan_scan_rect_id; }motion_constrained_slice_group_set; struct FilmGrainCharacteristics { Ipp8u film_grain_characteristics_cancel_flag; Ipp8u model_id; Ipp8u separate_colour_description_present_flag; Ipp8u film_grain_bit_depth_luma; Ipp8u film_grain_bit_depth_chroma; Ipp8u film_grain_full_range_flag; Ipp8u film_grain_colour_primaries; Ipp8u film_grain_transfer_characteristics; Ipp8u film_grain_matrix_coefficients; Ipp8u blending_mode_id; Ipp8u log2_scale_factor; Ipp8u comp_model_present_flag[3]; Ipp8u num_intensity_intervals[3]; Ipp8u num_model_values[3]; Ipp8u intensity_interval_lower_bound[3][256]; Ipp8u intensity_interval_upper_bound[3][256]; Ipp8u comp_model_value[3][3][256]; Ipp8u film_grain_characteristics_repetition_period; }film_grain_characteristics; struct DeblockingFilterDisplayPreference { Ipp8u deblocking_display_preference_cancel_flag; Ipp8u display_prior_to_deblocking_preferred_flag; Ipp8u dec_frame_buffering_constraint_flag; Ipp8u deblocking_display_preference_repetition_period; }deblocking_filter_display_preference; struct StereoVideoInfo { Ipp8u field_views_flag; Ipp8u top_field_is_left_view_flag; Ipp8u current_frame_is_left_view_flag; Ipp8u next_frame_is_second_view_flag; Ipp8u left_view_self_contained_flag; Ipp8u right_view_self_contained_flag; }stereo_video_info; }SEI_messages;};// This file defines some data structures and constants used by the decoder,// that are also needed by other classes, such as post filters and// error concealment.//--- block types for CABAC ----#define LUMA_16DC_CTX 0#define LUMA_16AC_CTX 1#define LUMA_8x8_CTX 2#define LUMA_8x4_CTX 3#define LUMA_4x8_CTX 4#define LUMA_4x4_CTX 5#define CHROMA_DC_CTX 6#define CHROMA_AC_CTX 7#define NUM_BLOCK_TYPES 8#define INTERP_FACTOR 4#define INTERP_SHIFT 2// at picture edge, clip motion vectors to only this far beyond the edge,// in pixel units.#define D_MV_CLIP_LIMIT 19// Direct motion vector scaling#define TR_SHIFT 8#define TR_RND (1 << (TR_SHIFT - 1))// Provide a way to get at the motion vectors for subblock 0 of a// macroblock, given the macroblock's pel position in the luma plane.#define getMBMotionVectors(pMVOrigin, mbXOffset, mbYOffset, MVPitch) \ ((pMVOrigin) + ((mbXOffset) >> 2) + (MVPitch) * ((mbYOffset) >> 2))#define D_DIR_FWD 0#define D_DIR_BWD 1#define D_DIR_BIDIR 2#define D_DIR_DIRECT 3#define D_DIR_DIRECT_SPATIAL_FWD 4#define D_DIR_DIRECT_SPATIAL_BWD 5#define D_DIR_DIRECT_SPATIAL_BIDIR 6// Warning: If these bit defines change, also need to change same// defines and related code in sresidual.s.#define D_CBP_LUMA_DC 1#define D_CBP_1ST_LUMA_AC_BITPOS 1#define D_CBP_1ST_CHROMA_DC_BITPOS 17#define D_CBP_1ST_CHROMA_AC_BITPOS 19#define D_CBP_LUMA_AC (0xffff<<D_CBP_1ST_LUMA_AC_BITPOS)#define D_CBP_GET_LUMA_AC_BITS(cbp) (((cbp) & 0x1fffe)>>D_CBP_1ST_LUMA_AC_BITPOS)#define D_CBP_CHROMA_DC (0x3<<D_CBP_1ST_CHROMA_DC_BITPOS)#define D_CBP_CHROMA_AC (0xff<<D_CBP_1ST_CHROMA_AC_BITPOS)#define D_CBP_LUMA_TO_RASTERSCAN_ORDER(x) \ ((D_CBP_GET_LUMA_AC_BITS(x)) & 0xc3c3) | \ (((x) << 1) & 0x3030) | \ (((x) >> 3) & 0x0c0c)#define BLOCK_IS_ON_LEFT_EDGE(x) (!((x)&3))#define BLOCK_IS_ON_TOP_EDGE(x) ((x)<4)#define CHROMA_BLOCK_IS_ON_LEFT_EDGE(x) (!((x)&1))#define CHROMA_BLOCK_IS_ON_TOP_EDGE(x) ((x)<18 || (x)==20 || (x)==21)#define CHROMA_BLOCK_IS_ON_TOP_EDGE_C(x) (!((x)&2))#define FIRST_DC_CHROMA 17#define FIRST_AC_CHROMA 19#define GetMBFieldDecodingFlag(x) ((x.mb_aux_fields)&1)#define GetMBBottomFlag(x) ((x.mb_aux_fields&2)>>1)#define GetMB8x8TSFlag(x) ((x.mb_aux_fields&4)>>2)#define pGetMBFieldDecodingFlag(x) (((x)->mb_aux_fields)&1)#define pGetMBBottomFlag(x) (((x)->mb_aux_fields&2)>>1)#define pGetMB8x8TSFlag(x) (((x)->mb_aux_fields&4)>>2)#define pSetMBFieldDecodingFlag(x,y) \ ((x->mb_aux_fields) &= 6); \ ((x->mb_aux_fields) |= (y))#define SetMBFieldDecodingFlag(x,y) \ ((x.mb_aux_fields) &= 6); \ ((x.mb_aux_fields) |= (y))#define pSetMB8x8TSFlag(x,y) \ ((x->mb_aux_fields) &= 3); \ ((x->mb_aux_fields) |= (y<<2))#define SetMB8x8TSFlag(x,y) \ ((x.mb_aux_fields) &= 2); \ ((x.mb_aux_fields) |= (y<<2))#define pSetPairMBFieldDecodingFlag(x1,x2,y) \ ((x1->mb_aux_fields) &= 6); \ ((x2->mb_aux_fields) &= 6); \ ((x1->mb_aux_fields) |= (y)); \ ((x2->mb_aux_fields) |= (y))#define SetPairMBFieldDecodingFlag(x1,x2,y) \ ((x1.mb_aux_fields) &= 6); \ ((x2.mb_aux_fields) &= 6); \ ((x1.mb_aux_fields) |= (y)); \ ((x2.mb_aux_fields) |= (y))///////////////// New structuresstruct H264DecoderMotionVector{ Ipp16s mvx; Ipp16s mvy;};//4bytesstruct H264DecoderMacroblockRefIdxs{ Ipp8s RefIdxs[16]; // 16 bytes};//16bytesstruct H264DecoderMacroblockMVFlags{ Ipp8s MVFlags[16]; // 16 bytes};//16bytesstruct H264DecoderMacroblockMVs{ H264DecoderMotionVector MotionVectors[16]; //64 bytes};//64bytesstruct H264DecoderMacroblockCoeffsInfo{ Ipp8u numCoeff [24]; //24 bytes};struct H264DecoderMacroblockGlobalInfo{ Ipp8u sbtype[4]; Ipp16s slice_id; Ipp8u mbtype; Ipp8u mb_aux_fields;};//8 bytesstruct H264DecoderMacroblockLocalInfo{ Ipp32u cbp4x4; Ipp32u cbp_bits; Ipp8u sbdir[4]; Ipp8u cbp; Ipp8u mbtypeBS; Ipp8u intra_chroma_mode; Ipp8s QP;};//16 btytesstruct H264DecoderBlockLocation{ Ipp32s mb_num; Ipp32s block_num;};//8 bytesstruct H264DecoderMacroblockNeighboursInfo{ Ipp32s mb_A; Ipp32s mb_B; Ipp32s mb_C; Ipp32s mb_D;};//32 bytesstruct H264DecoderBlockNeighboursInfo{ H264DecoderBlockLocation mbs_left[4]; H264DecoderBlockLocation mb_above; H264DecoderBlockLocation mb_above_right; H264DecoderBlockLocation mb_above_left; H264DecoderBlockLocation mbs_left_chroma[2][2]; H264DecoderBlockLocation mb_above_chroma[2]; H264DecoderBlockLocation dummy[2];};//128bytes//this structure is present in each decoder framestruct H264DecoderGlobalMacroblocksDescriptor{ H264DecoderMacroblockMVs *MV[2];//MotionVectors L0 L1 H264DecoderMacroblockRefIdxs *RefIdxs[2];//Reference Indices L0 l1 H264DecoderMacroblockGlobalInfo *mbs;//macroblocks};//this structure is one for all decoderstruct H264DecoderLocalMacroblockDescriptor{ H264DecoderMacroblockMVs *MVDeltas[2];//MotionVectors Deltas L0 and L1 H264DecoderMacroblockMVFlags *MVFlags[2];//MotionVectors Flags L0 and L1 H264DecoderMacroblockCoeffsInfo *MacroblockCoeffsInfo; //info about num_coeffs in each block in the current picture#ifdef USE_PRECALCULATEDNEIGHBOURS H264DecoderMacroblockNeighboursInfo *MacroblockNeighbours;//mb neighbouring info H264DecoderMacroblockNeighboursInfo *MBAFFModeMacroblockNeighbours;//mb neighbouring info H264DecoderBlockNeighboursInfo *BlockNeighbours;//block neighbouring info (if mbaff turned off remained static) H264DecoderBlockNeighboursInfo *MBAFFBlockNeighbours;//block neighbouring info (dynamic anyway)#endif H264DecoderMacroblockLocalInfo *mbs;//reconstuction info H264DecoderMBAddr *active_next_mb_table;};struct H264DecoderCurrentMacroblockDescriptor{ H264DecoderMacroblockMVs *MVs[4];//MV L0,L1, MVDeltas 0,1 H264DecoderMacroblockMVFlags *MVFlags[2];//MVFlags L0, L1 H264DecoderMacroblockRefIdxs *RefIdxs[2];//RefIdx L0, L1 H264DecoderMacroblockCoeffsInfo *MacroblockCoeffsInfo; H264DecoderMacroblockNeighboursInfo CurrentMacroblockNeighbours;//mb neighbouring info H264DecoderBlockNeighboursInfo CurrentBlockNeighbours;//block neighbouring info (if mbaff turned off remained static) H264DecoderMacroblockGlobalInfo *GlobalMacroblockInfo; H264DecoderMacroblockGlobalInfo *GlobalMacroblockPairInfo; H264DecoderMacroblockLocalInfo *LocalMacroblockInfo; H264DecoderMacroblockLocalInfo *LocalMacroblockPairInfo;}; // The main decode loop over macroblocks is broken // into two loops in the interest of cache localization, // significantly improving performance on some systems. // This define indicates how many macroblocks to process per loop // iteration.#if defined(ARM) || defined(_ARM_)#define DEC_NUM_ALLOC_REF_FRAMES 2#else#define DEC_NUM_ALLOC_REF_FRAMES 2#endif // Number of reference frames initially allocated by the decoder. // Normally 2, significantly increased for ARM for PVP player. Decrease // back to 2 for ARM when building xsavcdec player to free up memory // for files for performance and regression testing.} // end namespace UMC#endif // __UMC_H264_DEC_DEFS_DEC_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -