tok_proto.h
2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
int tok_num_max_block = 6;
#define TOK_MAX_STREAMS (16)
short tok_num_streams = 0;
Tok_Context tok_contexts[TOK_MAX_STREAMS];
Tok_Context *tok_cur_context = NULL;
short tok_buf1[TOK_BUF_SIZE];
short tok_buf2[TOK_BUF_SIZE];
short *cur_tok_buf = tok_buf1;
short *prev_tok_buf = tok_buf2;
short tok_index[TOK_BUF_SIZE];
short tok_lev[TOK_BUF_SIZE];
int tok_n;
short tok_iqmat_default[64] = {
8, 16, 19, 22, 26, 27, 29, 34,
16, 16, 22, 24, 27, 29, 34, 37,
19, 22, 26, 27, 29, 34, 34, 38,
22, 22, 26, 27, 29, 34, 37, 40,
22, 26, 27, 29, 32, 35, 40, 48,
26, 27, 29, 32, 35, 40, 48, 58,
26, 27, 29, 34, 38, 46, 56, 69,
27, 29, 35, 38, 46, 56, 69, 83};
short tok_niqmat_default[64] = {
16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16};
short *tok_iqmat;
short *tok_niqmat;
PIC tok_cur_pic,
tok_cur_raster,
tok_ref_for_pic,
tok_ref_bak_pic,
tok_bidir_next_pic;
int tok_luma_size;
int tok_line_size;
#define XSIZE (352)
#define YSIZE (240)
#define LUMSIZE (XSIZE*YSIZE)
#define PICSIZE (XSIZE*YSIZE*3/2)
unsigned char pic1[PICSIZE],
pic2[PICSIZE],
pic3[PICSIZE],
pic4[PICSIZE],
pic5[PICSIZE];
int tok_tref_cur;
int tok_ptype_cur;
short tok_mbnum;
short mb_x, mb_y;
short *tok_stream_ptr;
short *tok_stream_end;
int backup_page = 0;
#define MB_DATA_SIZE (6*64)
short vzero[8] = {0,0,0,0,0,0,0,0};
/*
MacroBlock *mb_ptr = (MacroBlock *) (vmpegMainDataStart+MBOFFSET);
*/
MacroBlock mb;
int mvfx, mvfy;
int mvbx, mvby;
int mbtype;
int quant;
int tok_parse_seq_hdr( void );
void tok_alloc_pics( void );
void tok_save_context( void );
int tok_prepare_next_page( void );
void tok_get_context( void );
void tok_save_context( void );
int tok_process_page( void );
void tok_zero_mb( MacroBlock * );
void vand( short *, int , short *, int );
void vshift( short *, int , short *, int );
void vstore( short *, int , short *);
void tok_get_mb( MacroBlock * );
void tok_dec_mb( MacroBlock * );
int tok_get_mbh( MacroBlock * );