all.h
1.13 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
/*
C-code sketch of how RSP microcode will process a macroblock.
Different versions will make different I/O and computational
assumptions.
Version #1 assumptions:
Macroblocks are un-tokenized into a mbdata[NBLKS][64] area of 16-bit
words in DMEM. Which blocks are non-zero is in CBP in header.
iquant and idct routines work on single blocks per call.
No longer true:
motion-compensation and reference combining (F+B) occur
all at once in a separate routine. DMAs are assummed to
already be complete (results are inputs).
*/
typedef struct mb_hdr_struct
{
short mbtype,
cbp,
quant,
mvfx, mvfy,
mvbx, mvby,
block_num; /* sMMMMMMMMMMMbbbb s=sign (<0 implies new MB)
M=Macroblock number (0-2047)
b=block number within MB */
} MB_header;
#define NBLKS (6)
#define MC_YTILE_SIZE (2*16*17)
#define MC_UVTILE_SIZE (2*16*9)
typedef struct mb_struct
{
MB_header header;
short mbdata[NBLKS][64];
unsigned char fyref[MC_YTILE_SIZE];
unsigned char fuvref[MC_UVTILE_SIZE];
unsigned char byref[MC_YTILE_SIZE];
unsigned char buvref[MC_UVTILE_SIZE];
} MacroBlock;