video_dmem.h
3.01 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#
# video_dmem.h
#
# This file lays out the overall DMEM usage for the RSP MPEG video decoding
# task.
#ifdef _LANGUAGE_C
# ifndef eval
# define eval(s) (s)
# endif
#endif
#include <rsp.h>
#include <rcp.h>
#include <sptask.h>
/*
* Memory layout of DMEM:
*
* ----------------------------------------------
* | Cosine matrices and constants for IDCT |
* | (80 bytes) |
* | |
* |--------------------------------------------|
* | Q matrices and constants for IQ |
* | (272 bytes) |
* | |
* |--------------------------------------------|
* | Switch table and constants for MC |
* | (32 bytes) |
* | |
* |--------------------------------------------|
* | Constants for Recon |
* | (16 bytes) |
* | |
* |--------------------------------------------|
* | Macroblock data |
* | (2560 bytes) |
* | |
* |--------------------------------------------|
* | Temporary workspace |
* | (? bytes) |
* | |
* ----------------------------------------------
*/
.data RSP_DMEM_BASE
#define IDCT_CONST_BASE RSP_DMEM_BASE
#################################
# IDCT Constants #
# (80 bytes) #
#################################
#include "idct_dmem.h"
#define IQ_CONST_BASE eval(IDCT_CONST_BASE+80)
#################################
# IQ Constants and QMAT #
# (272 bytes) #
#################################
#include "iq_dmem.h"
#define MC_CONST_BASE eval(IQ_CONST_BASE+272)
#################################
# MC Constants #
# (32 bytes) #
#################################
#include "mc_dmem.h"
#define REC_CONST_BASE eval(MC_CONST_BASE+32)
#################################
# Recon Constants #
# (16 bytes) #
#################################
#include "recon_dmem.h"
#define MB_BASE eval(REC_CONST_BASE+16)
#################################
# MacroBlock Data #
# (2560 bytes) #
#################################
.space 0x0a00
/* all addresses are offsets to MB_BASE */
#define MBH_MBTYPE 0
#define MBH_CBP 2
#define MBH_QUANT 4
#define MBH_MVFX 6
#define MBH_MVFY 8
#define MBH_MVBX 10
#define MBH_MVBY 12
#define MBH_BNUM 14
#define MB_DATA 16
#define MB_DATA_SIZE 6*64*2
#define MB_YREF_SIZE 16*17*2
#define MB_UVREF_SIZE 16*9*2
#define MB_DATA_FREF eval(MB_DATA+MB_DATA_SIZE)
#define MB_DATA_BREF eval(MB_DATA_FREF+MB_YREF_SIZE+MB_UVREF_SIZE)
#define TEMP_BASE eval(MB_BASE+2560)
#################################
# Temp Workspace #
# #
#################################
.space 0x0100