📄 vars.h
字号:
//******************************************
//File name: vars.h
//Author: Anna
//Date:
//******************************************
//#include "decore.h"
/*** *** ***/
#define NOT_CODED -1
#define INTER 0
#define INTER_Q 1
#define INTER4V 2
#define INTRA 3
#define INTRA_Q 4
#define STUFFING 7
/* this is necessary for the max resolution (juice resolution) */
#define DEC_MBC 45
#define DEC_MBR 36
/***/
//typedef struct {
int val;
int len;
//} tab_type;*/
/***/
//typedef struct {
int last;
int run;
int level;
//} event_t;/
/***/
//typedef struct _mp4_header {
// vol
int ident;
int random_accessible_vol;
int type_indication;
int is_object_layer_identifier;
int visual_object_layer_verid;
int visual_object_layer_priority;
int aspect_ratio_info;
int vol_control_parameters;
int chroma_format;
int low_delay;
int vbv_parameters;
int first_half_bit_rate;
int latter_half_bit_rate;
int first_half_vbv_buffer_size;
int latter_half_vbv_buffer_size;
int first_half_vbv_occupancy;
int latter_half_vbv_occupancy;
int shape;
int time_increment_resolution;
int fixed_vop_rate;
int fixed_vop_time_increment;
int width;
int height;
int interlaced;
int obmc_disable;
int sprite_usage;
int not_8_bit;
int quant_precision;
int bits_per_pixel;
int quant_type;
int load_intra_quant_matrix;
int load_nonintra_quant_matrix;
int quarter_pixel;
int complexity_estimation_disable;
int error_res_disable;
int data_partitioning;
int intra_acdc_pred_disable;
int scalability;
int bef_vol_value; //Anna+
int bef_vop_value; //Anna+
// gop
/* int time_code;
int closed_gov;
int broken_link;*/
// vop
int prediction_type;
int time_base;
int time_inc;
int vop_coded;
int rounding_type;
int hor_spat_ref;
int ver_spat_ref;
int change_CR_disable;
int constant_alpha;
int constant_alpha_value;
int intra_dc_vlc_thr;
int quantizer;
int fcode_for;
int shape_coding_type;
// macroblock
int not_coded;
int mcbpc;
int derived_mb_type;
int cbpc;
int ac_pred_flag;
int cbpy;
int dquant;
int cbp;
// extra/derived
int mba_size;
int mb_xsize;
int mb_ysize;
int picnum;
int mba;
int mb_xpos;
int mb_ypos;
int dc_scaler;
int voflag; //Anna+
int volflag; // Anna+
int volnum; // Anna+
int flushflag; // Anna+
int voflagnum; //Anna+
int vo_zero_flag; //Anna+
int double_vo; // Anna+
int vop_flag1; // Anna+
int vop_flag2;
int vop_if_flush;
int vop_notbeh_vol;
int intrablock_rescaled;
//} mp4_header;
/***/
//typedef struct _ac_dc
//{
int dc_store_lum[2*DEC_MBR+1][2*DEC_MBC+1];
int ac_left_lum[2*DEC_MBR+1][2*DEC_MBC+1][7];
int ac_top_lum[2*DEC_MBR+1][2*DEC_MBC+1][7];
int dc_store_chr[2][DEC_MBR+1][DEC_MBC+1];
int ac_left_chr[2][DEC_MBR+1][DEC_MBC+1][7];
int ac_top_chr[2][DEC_MBR+1][DEC_MBC+1][7];
int predict_dir;
//} ac_dc;
//typedef struct
//{
// bit input
//int infile;
FILE *infile;
unsigned char rdbfr[2051];
unsigned char *rdptr;
unsigned char inbfr[16];
int incnt;
int bitcnt;
int length;
// block data
short block[64];
//} MP4_STREAM;
//typedef struct _MP4_STATE_
//{
//mp4_header hdr;
int modemap[DEC_MBR+1][DEC_MBC+2];
int quant_store[DEC_MBR+1][DEC_MBC+1]; // [Review]
int MV[2][6][DEC_MBR+1][DEC_MBC+2];
// ac_dc coeff_pred;
// short iclp_data[1024];
// short *iclp;
// unsigned char clp_data[1024];
// unsigned char *clp;
int horizontal_size;
int vertical_size;
int mb_width;
int mb_height;
int juice_hor;
int juice_ver;
int coded_picture_width;
int coded_picture_height;
int chrom_width;
int chrom_height;
char *infilename;
char * outputname;
//} MP4_STATE;
//typedef struct _MP4_TABLES_
//{
/*unsigned int zig_zag_scan[64];
unsigned int alternate_vertical_scan[64];
unsigned int alternate_horizontal_scan[64];
unsigned int msk[33];
int roundtab[16];
int saiAcLeftIndex[8];
int DQtab[4];
// MCBPCtabIntra[32];
// MCBPCtabInter[256];
int MCBPCtabIntra_val[32];
int MCBPCtabIntra_len[32];*/
/* MCBPCtabInter[256];
tab_type CBPYtab[48];
tab_type MVtab0[14];
tab_type MVtab1[96];
tab_type MVtab2[124];
tab_type tableB16_1[112];
tab_type tableB16_2[96];
tab_type tableB16_3[120];
tab_type tableB17_1[112];
tab_type tableB17_2[96];
tab_type tableB17_3[120];*/
//} MP4_TABLES;
/**
* globals
**/
unsigned char *edged_ref[3],
*edged_for[3],
*frame_ref[3],
*frame_for[3],
*display_frame[3];
/* MP4_STATE *mp4_state;
MP4_TABLES *mp4_tables;
MP4_STREAM *ld;*/
void initbits (unsigned char * stream, int length);
// void save_tables (MP4_TABLES * tables);
void initdecoder (int n);
int decore_alloc(int n);
static int decore_init (int hor_size, int ver_size);
int decore_frame (unsigned char *bmp, unsigned int stride, int render_flag);
void _SetPrintCond(
int picnum_start, int picnum_end,
int mba_start, int mba_end);
void _Print(const char * format, ...);
int readbefvol(int n);
unsigned int showbits (int n);
int getvolhdr(int n);
int getvophdr(int n);
void get_mp4picture (unsigned char *bmp, unsigned int stride, int render_flag);
//int blockintra_num;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -