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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
#ifndef _VDEC_INFO_VP6_H_
#define _VDEC_INFO_VP6_H_
//#include "drv_config.h"
#if 1 //(!CONFIG_DRV_VERIFY_SUPPORT)
#include "vdec_usage.h"
#include "vdec_info_common.h"
#else
#include "x_stl_lib.h"
//#include "x_assert.h"
//#include "u_pbinf.h"
#endif
//#define VP6_I_FRM 0
//#define VP6_P_FRM 1
typedef enum
{
VP6_PROFILE_SIMPLE = 0,
VP6_PROFILE_UNDEF_1,
VP6_PROFILE_UNDEF_2,
VP6_PROFILE_ADVANCED
} VP6_PROFILE_T;
typedef struct _VDEC_INFO_VP6_VFIFO_PRM_T_
{
UINT32 u4VFifoSa; ///< Video Fifo memory start address
UINT32 u4VFifoEa; ///< Video Fifo memory end address
} VDEC_INFO_VP6_VFIFO_PRM_T;
typedef struct _VDEC_INFO_VP6_BS_INIT_PRM_T_
{
UINT32 u4ReadPointer;
UINT32 u4WritePointer;
UINT32 u4VFifoSa; ///< Video Fifo memory start address
UINT32 u4VFifoEa; ///< Video Fifo memory end address
} VDEC_INFO_VP6_BS_INIT_PRM_T;
//MULTI-STREAM PANDA
/* HUFF_NODE for decoder */
typedef struct _HUFF_NODE
{
UINT16 left; // 1 bit tells whether its a pointer or value
UINT16 right;// 1 bit tells whether its a pointer or value
} HUFF_NODE;
typedef struct _HUFF_CODE
{
UINT16 hcode;
UINT16 len;
} HUFF_CODE;
typedef struct _SORTNODE
{
INT32 next;
INT32 freq;
UINT16 value;
} SORTNODE;
//~MULTI-STREAM PANDA
typedef struct _VDEC_INFO_VP6_FRM_HDR_T_
{
BOOL fgFrmHdrValid;
// frame coding type: I_TYPE, P_TYPE
UCHAR ucFrameType;
// Quantizer setting
UCHAR ucDctQMask;
// 0: for one partition, 1 for two partitions
BOOL fgMultiStream;
//0 for BoolCoder, 1 for HuffmanCoder for 2nd data patition.
BOOL fgUseHuffman;
//Version of encoder used to encode frame.
UCHAR ucVp3VerNo;
// 0 for Simple, 3 for Advanced. (1 and 2 undefined)
VP6_PROFILE_T ucVpProfile;
// Reserved.
UCHAR ucReserved;
//Offset to 2nd partion
UINT16 u2Buff2Offset;
// Number of rows of 8x8 blocks in unscaled frame.
UINT16 u2VFragments;
// Number of cols of 8x8 blocks in unscaled frame.
UINT16 u2HFragments;
// Number of rows of 8x8 blocks in scaled frame.
UINT16 u2OutVFragments;
// Number of cols of 8x8 blocks in scaled frame.
UINT16 u2OutHFragments;
// Mode to use for scaling frame.
UCHAR ucScalingMode;
// Advanced Profile Only:
// 0 Prediction filter type is fixed and specified.
// 1 Auto-select bi-cubic or bi-linear prediction filter.
BOOL fgAutoSelectPMFlag;
//If Auto-SelectPMFlag == 1 only, threshold on prediction filter variance size.
UINT32 u4PredictionFilterVarThresh;
//If Auto-SelectPMFlag == 1 only, threshold on MV size.
UINT32 u4PredictionFilterMvSizeThresh;
// If Auto-SelectPMFlag == 0 only, threshold on MV size.
// 0 use Bi-linear filter.
// 1 use Bi-cubic filter.
BOOL fgBiCubicOrBiLinearFlag;
// Vp3VerNo == 8 Only, Selector to choose bi-cubic filter coefficients
UCHAR ucPreditionFilterAlpha;
// Inter Frame Header
// 0: Do not update the Golden Frame with this frame, 1: Decoded frame should become new Golden Frame.
BOOL fgRefreshGoldenFrame;
// Advanced Profile Only:
//0: Disable the loop filter, 1: Enable.
UINT16 u2LoopFilter;
// Advanced Profile Only:
// 0: Basic loop filter, 1: De-ringing loop filter.
BOOL fgLoopFilterSelector;
BOOL fgParse_Filter_Info;
UCHAR ucVrt_Shift;
UCHAR ucFilter_Mode;
UINT32 u4Sample_Variance_Threshold;
UINT32 u4Max_Vector_Length;
UINT32 u4Filter_Selection;
//HW related
UINT16 u2Vp56_Filter_Threshold;
UINT32 u4DQuant_Dc;
UINT32 u4DQuant_Ac;
UINT16 u2WidthDec;
UINT16 u2HeightDec;
UINT32 u4Mv_Thr_En;
UINT32 u4Var_Thr_En;
UINT32 u4BilinearFilter;
UINT32 u4FrameSize;
//~HW related
//Driver Flow Control
UCHAR ucPicStruct;
UCHAR ucColorPrimaries;
UINT16 u2FrmRatCod;
UCHAR ucAspectRatio;
//~Driver Flow
} VDEC_INFO_VP6_FRM_HDR_T;
typedef struct _VDEC_INFO_VP6_WORK_BUF_SA_T_
{
//UINT32 u4Pic0YSa;
//UINT32 u4Pic0CSa;
//UINT32 u4Pic1YSa;
//UINT32 u4Pic1CSa;
//UINT32 u4Pic2YSa;
//UINT32 u4Pic2CSa;
} VDEC_INFO_VP6_WORK_BUF_SA_T;
typedef struct _VDEC_INFO_VP6_FRAME_BUF_SA_T_
{
UINT32 u4Pic0YSa;
UINT32 u4Pic0CSa;
UINT32 u4Pic1YSa;
UINT32 u4Pic1CSa;
UINT32 u4Pic2YSa;
UINT32 u4Pic2CSa;
UINT32 u4PpYBufSa;
UINT32 u4PpCBufSa;
} VDEC_INFO_VP6_FRAME_BUF_SA_T;
typedef struct _VDEC_INFO_VP6_PP_INFO_T_
{
BOOL fgPpEnable;
UINT8 u1PpLevel;
UINT8 au1MBqp[4];
UINT32 u4PpYBufSa;
UINT32 u4PpCBufSa;
} VDEC_INFO_VP6_PP_INFO_T;
#define VP6_ALPHA_ENABLE (1 << 0)
#define VP6_ALPHA_FRAME (1 << 1)
typedef struct _VDEC_INFO_VP6_DEC_PRM_T_
{
//UCHAR ucVopCdTp; // in VP6
//UCHAR ucVopQuant; // in VP6
//#if CONFIG_DRV_VERIFY_SUPPORT
UINT32 u4FRefBufIdx;
//#endif
INT32 i4MemBase;
BOOL fgAdobeMode;
//UINT32 u4VLDWrapperWorkspace;
//UINT32 u4PPWrapperWorkspace;
VDEC_INFO_VP6_FRM_HDR_T *prFrmHdr;
//VDEC_INFO_VP6_WORK_BUF_SA_T rVp6WorkBufSa;
VDEC_INFO_VP6_FRAME_BUF_SA_T rVp6FrameBufSa;
VDEC_INFO_VP6_PP_INFO_T rVp6PpInfo;
// Alpha Channel
UINT8 u1AlphaFlag;
UINT32 au4VldWrapper[196];
UINT32 au4Reorder[16];
//~Alpha Channel
} VDEC_INFO_VP6_DEC_PRM_T;
typedef struct _VDEC_HAL_DEC_VP6_ERR_INFO_T_
{
UINT32 u4Vp6ErrCnt; ///< Video decode error count
UINT32 u4Vp6ErrRow; ///< Video decode error mb row
UINT32 u4Vp6ErrType; ///< Video decode error type
UINT16 u2Vp6MBErrCnt;
} VDEC_INFO_VP6_ERR_INFO_T;
#endif //#ifndef _VDEC_INFO_VP6H_
|