📄 umc_mpeg2_dec_defs.h
字号:
/*////////////////////////////////////////////////////////////////////////////////// INTEL CORPORATION PROPRIETARY INFORMATION// This software is supplied under the terms of a license agreement or// nondisclosure agreement with Intel Corporation and may not be copied// or disclosed except in accordance with the terms of that agreement.// Copyright(c) 2003-2005 Intel Corporation. All Rights Reserved.//*/#ifndef __UMC_MPEG2_DEC_DEFS_H__#define __UMC_MPEG2_DEC_DEFS_H__#ifdef __ICL#define DECLALIGN(x) __declspec(align(x))#else#define DECLALIGN(x)#endif#include <ippdefs.h>#include "umc_structures.h"#include "ippvc.h"#define KEEP_HISTORYnamespace UMC{#if defined (ARM) || defined (_ARM_) || defined (_WIN32_WCE)#define SMALL_MEMORY_USE#endif#define IPPVC_MC_FIELD 0x0#define IPPVC_MC_FRAME 0x1#define IPPVC_MC_16X8 0x3#define IPPVC_MC_DP 0x4#define IPPVC_DCT_FIELD 0x0#define IPPVC_DCT_FRAME 0x1#define IPPVC_MB_INTRA 0x1#define IPPVC_MB_PATTERN 0x2#define IPPVC_MB_BACKWARD 0x4#define IPPVC_MB_FORWARD 0x8#define IPPVC_MB_QUANT 0x16typedef enum _SYNCH_FLAG{ SYNCH_BITRATE = 0x0, SYNCH_PTS = 0x1} SYNCH_FLAG;//start/end codes#define ISO_11172_END_CODE 0x000001B9#define PACK_START_CODE 0x000001BA#define SYSTEM_HEADER_START_CODE 0x000001BB#define PACKET_VIDEO_START_CODE 0x000001E0#define PACKET_AUDIO_START_CODE 0x000001C0#define PICTURE_START_CODE 0x00000100#define USER_DATA_START_CODE 0x000001B2#define SEQUENCE_HEADER_CODE 0x000001B3#define SEQUENCE_ERROR_CODE 0x000001B4#define EXTENSION_START_CODE 0x000001B5#define SEQUENCE_END_CODE 0x000001B7#define GROUP_START_CODE 0x000001B8#define SEQUENCE_EXTENSION_ID 0x00000001#define SEQUENCE_DISPLAY_EXTENSION_ID 0x00000002#define QUANT_MATRIX_EXTENSION_ID 0x00000003#define COPYRIGHT_EXTENSION_ID 0x00000004#define SEQUENCE_SCALABLE_EXTENSION_ID 0x00000005#define PICTURE_DISPLAY_EXTENSION_ID 0x00000007#define PICTURE_CODING_EXTENSION_ID 0x00000008#define PICTURE_SPARTIAL_SCALABLE_EXTENSION_ID 0x00000009#define PICTURE_TEMPORAL_SCALABLE_EXTENSION_ID 0x0000000a#define DATA_PARTITIONING 0x00000000#define SPARTIAL_SCALABILITY 0x00000001#define SNR_SCALABILITY 0x00000002#define TEMPORAL_SCALABILITY 0x00000003#define CHROMA_420 2#define CHROMA_422 4#define CHROMA_444 8#define FRAME_PICTURE 3#define I_FRAME 1#define P_FRAME 2#define B_FRAME 3#define B_FRAME_SECOND 4#define D_FRAME 4#define TOP_FIELD 1#define BOTTOM_FIELD 2extern short q_scale[2][32];///////////////////////extern short reset_dc[4];extern short intra_dc_multi[4];typedef struct{ unsigned int frame_numb; Ipp8u* Y_comp_data; Ipp8u* U_comp_data; Ipp8u* V_comp_data; FrameType frame_type; // 1-I, 2-P, 3-B double frame_time;#ifdef KEEP_HISTORY unsigned char* frame_history;#endif}sVideoFrameBuffer;typedef struct{ int horizontal_size; int vertical_size; double aspect_ratio_w; double aspect_ratio_h; unsigned int frame_rate_code; int mb_width; //the number of macroblocks in the row of the picture int mb_height;//the number of macroblocks in the column of the picture//sequence extension VideoStreamType stream_type; // undef/mpeg1/mpeg2 unsigned int extension_start_code_ID; unsigned int scalable_mode; unsigned int progressive_sequence; unsigned int chroma_format; int frame_rate_extension_d; int frame_rate_extension_n; double delta_frame_time; double stream_time; int stream_time_temporal_reference; // for current stream_time int first_p_occure; int first_i_occure; int continues_pts; // count frames with PTS int num_of_skipped; int bdied; bool anlize_seq; int b_count_btw_ip; int b_curr_number; int is_skipped_b; // GOP info. int closed_gop; // no ref to previous GOP int broken_link; // ref to absent prev GOP int gop_second; // second of first picture int gop_picture; // starting picture in gop_second int frame_count; unsigned char* ptr_context_data;} sSequenceHeader;// for prediction (forward and backward) and current frame;typedef struct{ sVideoFrameBuffer frame_p_c_n[5];//previous, current and next frames array Ipp32u Y_comp_width; Ipp32u Y_comp_height; Ipp32u Y_comp_pitch; Ipp32u U_comp_pitch; Ipp32u V_comp_pitch; int prev_index; // 0 or 1; 0 initially int curr_index; // 0 or 1 or 2; 0 initially int next_index; // 0 or 1; 1 initially int retrieve; // index of retrieved frame; -1 initially int ind_his_p; int ind_his_b; int ind_his_free; int ind_his_ref; int ind_his_curr;}sFrameBuffer;typedef struct{ FrameType picture_coding_type; int full_pel_forward_vector; int forward_f_code; int full_pel_backward_vector; int backward_f_code; //extensions int f_code[4]; int r_size[4]; int low_in_range[4]; int high_in_range[4]; int range[4]; unsigned int picture_structure; unsigned int top_field_first; unsigned int frame_pred_frame_dct; unsigned int concealment_motion_vectors; unsigned int q_scale_type; unsigned int repeat_first_field; unsigned int progressive_frame; int temporal_reference; int curr_reset_dc; int intra_vlc_format; int curr_intra_dc_multi; int max_slice_vert_pos; int field_buffer_index;}sPictureHeader;typedef struct{ //quantization int slice_vertical_position; short dct_dc_y_past; short dct_dc_cb_past; short dct_dc_cr_past; int quantizer_scale; int cur_q_scale; //motion vectors unsigned int macroblock_motion_forward_prev; unsigned int macroblock_motion_backward_prev; int motion_vertical_field_select_prev[4]; int mb_row; int mb_col; int mb_row_prev; int mb_col_prev; int mb_address_increment; bool m_bNewSlice;} sSlice;typedef struct{ unsigned int macroblock_motion_forward; unsigned int macroblock_motion_backward; int prediction_type;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -