Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //! Slice
- typedef struct slice
- {
- struct video_par *p_Vid;
- struct inp_par *p_Inp;
- pic_parameter_set_rbsp_t *active_pps;
- seq_parameter_set_rbsp_t *active_sps;
- int svc_extension_flag;
- // dpb pointer
- struct decoded_picture_buffer *p_Dpb;
- //slice property;
- int idr_flag;
- int idr_pic_id;
- int nal_reference_idc; //!< nal_reference_idc from NAL unit
- int Transform8x8Mode;
- Boolean is_not_independent;
- int toppoc; //poc for this top field // POC200301
- int bottompoc; //poc of bottom field of frame
- int framepoc; //poc of this frame // POC200301
- //the following is for slice header syntax elements of poc
- // for poc mode 0.
- unsigned int pic_order_cnt_lsb;
- int delta_pic_order_cnt_bottom;
- // for poc mode 1.
- int delta_pic_order_cnt[2];
- // ////////////////////////
- // for POC mode 0:
- signed int PicOrderCntMsb;
- //signed int PrevPicOrderCntMsb;
- //unsigned int PrevPicOrderCntLsb;
- // for POC mode 1:
- unsigned int AbsFrameNum;
- int ThisPOC;
- //signed int ExpectedPicOrderCnt, PicOrderCntCycleCnt, FrameNumInPicOrderCntCycle;
- //unsigned int PreviousFrameNum, FrameNumOffset;
- //int ExpectedDeltaPerPicOrderCntCycle;
- //int PreviousFrameNumOffset;
- // /////////////////////////
- //information need to move to slice;
- unsigned int current_mb_nr; // bitstream order
- unsigned int num_dec_mb;
- short current_slice_nr;
- //int mb_x;
- //int mb_y;
- //int block_x;
- //int block_y;
- //int pix_c_x;
- //int pix_c_y;
- int cod_counter; //!< Current count of number of skipped macroblocks in a row
- int allrefzero;
- //end;
- int mb_aff_frame_flag;
- int direct_spatial_mv_pred_flag; //!< Indicator for direct mode type (1 for Spatial, 0 for Temporal)
- int num_ref_idx_active[2]; //!< number of available list references
- //int num_ref_idx_l0_active; //!< number of available list 0 references
- //int num_ref_idx_l1_active; //!< number of available list 1 references
- int ei_flag; //!< 0 if the partArr[0] contains valid information
- int qp;
- int slice_qp_delta;
- int qs;
- int slice_qs_delta;
- int slice_type; //!< slice type
- int model_number; //!< cabac model number
- unsigned int frame_num; //frame_num for this frame
- unsigned int field_pic_flag;
- byte bottom_field_flag;
- PictureStructure structure; //!< Identify picture structure type
- int start_mb_nr; //!< MUST be set by NAL even in case of ei_flag == 1
- int end_mb_nr_plus1;
- int max_part_nr;
- int dp_mode; //!< data partitioning mode
- int current_header;
- int next_header;
- int last_dquant;
- //slice header information;
- int colour_plane_id; //!< colour_plane_id of the current coded slice
- int redundant_pic_cnt;
- int sp_switch; //!< 1 for switching sp, 0 for normal sp
- int slice_group_change_cycle;
- int redundant_slice_ref_idx; //!< reference index of redundant slice
- int no_output_of_prior_pics_flag;
- int long_term_reference_flag;
- int adaptive_ref_pic_buffering_flag;
- DecRefPicMarking_t *dec_ref_pic_marking_buffer; //!< stores the memory management control operations
- char listXsize[6];
- struct storable_picture **listX[6];
- // int last_mb_nr; //!< only valid when entropy coding == CABAC
- DataPartition *partArr; //!< array of partitions
- MotionInfoContexts *mot_ctx; //!< pointer to struct of context models for use in CABAC
- TextureInfoContexts *tex_ctx; //!< pointer to struct of context models for use in CABAC
- int mvscale[6][MAX_REFERENCE_PICTURES];
- int ref_pic_list_reordering_flag[2];
- //dave modifying
- //int *reordering_of_pic_nums_idc[2];
- //int *abs_diff_pic_num_minus1[2];
- //int *long_term_pic_idx[2];
- int reordering_of_pic_nums_idc[2][10];
- int abs_diff_pic_num_minus1[2][10];
- int long_term_pic_idx[2][10];
- #if (MVC_EXTENSION_ENABLE) //dave add
- //int *abs_diff_view_idx_minus1[2];
- int abs_diff_view_idx_minus1[2][10];
- int view_id;
- int inter_view_flag;
- int anchor_pic_flag;
- NALUnitHeaderMVCExt_t NaluHeaderMVCExt;
- #endif
- short DFDisableIdc; //!< Disable deblocking filter on slice
- short DFAlphaC0Offset; //!< Alpha and C0 offset for filtering slice
- short DFBetaOffset; //!< Beta offset for filtering slice
- int pic_parameter_set_id; //!<the ID of the picture parameter set the slice is reffering to
- int dpB_NotPresent; //!< non-zero, if data partition B is lost
- int dpC_NotPresent; //!< non-zero, if data partition C is lost
- Boolean is_reset_coeff;
- //dave modifying the following
- //imgpel ***mb_pred;
- imgpel *mb_pred[MAX_PLANE][MB_BLOCK_SIZE]; //3, 16, 16;
- //imgpel ***mb_rec;
- imgpel *mb_rec[MAX_PLANE][MB_BLOCK_SIZE]; //3, 16, 6
- //int ***mb_rres;
- int *mb_rres[MAX_PLANE][MB_BLOCK_SIZE]; //3, 16, 6
- //int ***cof;
- int *cof[MAX_PLANE][MB_BLOCK_SIZE]; //3, 16, 16
- int ***fcf;
- int cofu[16];
- imgpel **tmp_block_l0;
- imgpel **tmp_block_l1;
- int **tmp_res;
- imgpel **tmp_block_l2;
- imgpel **tmp_block_l3;
- // Scaling matrix info
- int InvLevelScale4x4_Intra[3][6][4][4];
- int InvLevelScale4x4_Inter[3][6][4][4];
- int InvLevelScale8x8_Intra[3][6][8][8];
- int InvLevelScale8x8_Inter[3][6][8][8];
- int *qmatrix[12];
- // Cabac
- int coeff[64]; // one more for EOB
- int coeff_ctr;
- int pos;
- //weighted prediction
- unsigned short weighted_pred_flag;
- unsigned short weighted_bipred_idc;
- unsigned short luma_log2_weight_denom;
- unsigned short chroma_log2_weight_denom;
- //dave modify
- //int ***wp_weight; // weight in [list][index][component] order; // int wp_weight[2][64][3];//
- //int ***wp_offset; // offset in [list][index][component] order; //int wp_offset[2][64][3];//
- //int ****wbp_weight; //weight in [list][fw_index][bw_index][component] order
- int wp_weight[2][32][3]; // weight in [list][index][component] order; // int wp_weight[2][64][3];//
- int wp_offset[6][32][3]; // offset in [list][index][component] order; //int wp_offset[6][64][3];//
- int wbp_weight[6][32][32][3]; //weight in [list][fw_index][bw_index][component] order
- short wp_round_luma;
- short wp_round_chroma;
- #if (MVC_EXTENSION_ENABLE)
- int listinterviewidx0;
- int listinterviewidx1;
- struct frame_store **fs_listinterview0;
- struct frame_store **fs_listinterview1;
- #endif
- // for signalling to the neighbour logic that this is a deblocker call
- //byte mixedModeEdgeFlag;
- int max_mb_vmv_r; //!< maximum vertical motion vector range in luma quarter pixel units for the current level_idc
- int ref_flag[17]; //!< 0: i-th previous frame is incorrect
- void (*read_CBP_and_coeffs_from_NAL) (Macroblock *currMB);
- int (*decode_one_component ) (Macroblock *currMB, ColorPlane curr_plane, imgpel **currImg, struct storable_picture *dec_picture);
- int (*readSlice ) (struct video_par *, struct inp_par *);
- int (*nal_startcode_follows ) (struct slice*, int );
- void (*read_motion_info_from_NAL) (Macroblock *currMB);
- //void (*read_one_macroblock ) (Macroblock *currMB);
- int (*read_one_macroblock ) (Macroblock *currMB);
- void (*interpret_mb_mode ) (Macroblock *currMB);
- //void (*init_lists ) (struct slice *currSlice); //original
- int (*init_lists ) (struct slice *currSlice);
- void (*intrapred_chroma ) (Macroblock *currMB);
- void (*linfo_cbp_intra ) (int len, int info, int *cbp, int *dummy);
- void (*linfo_cbp_inter ) (int len, int info, int *cbp, int *dummy);
- void (*update_direct_mv_info ) (Macroblock *currMB);
- int erc_mvperMB;
- Macroblock *mb_data;
- struct storable_picture *dec_picture;
- //dave modifying
- int **siblock;
- //byte **ipredmode;
- //int *siblock[9];
- byte *ipredmode[36]; //[36][44];
- /////////////////
- char *intra_block;
- char chroma_vector_adjustment[6][16];
- } Slice;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement