comparison cavs.h @ 5236:1e80bd238744 libavcodec

move context structure definition from cavs.c to cavs.h
author stefang
date Sat, 07 Jul 2007 04:58:54 +0000
parents 2b72f9bc4f06
children 6aa42985b8e9
comparison
equal deleted inserted replaced
5235:5e6c54a13769 5236:1e80bd238744
21 21
22 #ifndef CAVS_H 22 #ifndef CAVS_H
23 #define CAVS_H 23 #define CAVS_H
24 24
25 #include "dsputil.h" 25 #include "dsputil.h"
26 #include "mpegvideo.h"
26 27
27 #define SLICE_MIN_START_CODE 0x00000101 28 #define SLICE_MIN_START_CODE 0x00000101
28 #define SLICE_MAX_START_CODE 0x000001af 29 #define SLICE_MAX_START_CODE 0x000001af
29 #define EXT_START_CODE 0x000001b5 30 #define EXT_START_CODE 0x000001b5
30 #define USER_START_CODE 0x000001b2 31 #define USER_START_CODE 0x000001b2
149 int8_t golomb_order; 150 int8_t golomb_order;
150 int inc_limit; 151 int inc_limit;
151 int8_t max_run; 152 int8_t max_run;
152 } residual_vlc_t; 153 } residual_vlc_t;
153 154
155 typedef struct {
156 MpegEncContext s;
157 Picture picture; ///< currently decoded frame
158 Picture DPB[2]; ///< reference frames
159 int dist[2]; ///< temporal distances from current frame to ref frames
160 int profile, level;
161 int aspect_ratio;
162 int mb_width, mb_height;
163 int pic_type;
164 int progressive;
165 int pic_structure;
166 int skip_mode_flag; ///< select between skip_count or one skip_flag per MB
167 int loop_filter_disable;
168 int alpha_offset, beta_offset;
169 int ref_flag;
170 int mbx, mby; ///< macroblock coordinates
171 int flags; ///< availability flags of neighbouring macroblocks
172 int stc; ///< last start code
173 uint8_t *cy, *cu, *cv; ///< current MB sample pointers
174 int left_qp;
175 uint8_t *top_qp;
176
177 /** mv motion vector cache
178 0: D3 B2 B3 C2
179 4: A1 X0 X1 -
180 8: A3 X2 X3 -
181
182 X are the vectors in the current macroblock (5,6,9,10)
183 A is the macroblock to the left (4,8)
184 B is the macroblock to the top (1,2)
185 C is the macroblock to the top-right (3)
186 D is the macroblock to the top-left (0)
187
188 the same is repeated for backward motion vectors */
189 vector_t mv[2*4*3];
190 vector_t *top_mv[2];
191 vector_t *col_mv;
192
193 /** luma pred mode cache
194 0: -- B2 B3
195 3: A1 X0 X1
196 6: A3 X2 X3 */
197 int pred_mode_Y[3*3];
198 int *top_pred_Y;
199 int l_stride, c_stride;
200 int luma_scan[4];
201 int qp;
202 int qp_fixed;
203 int cbp;
204 ScanTable scantable;
205
206 /** intra prediction is done with un-deblocked samples
207 they are saved here before deblocking the MB */
208 uint8_t *top_border_y, *top_border_u, *top_border_v;
209 uint8_t left_border_y[26], left_border_u[10], left_border_v[10];
210 uint8_t intern_border_y[26];
211 uint8_t topleft_border_y, topleft_border_u, topleft_border_v;
212
213 void (*intra_pred_l[8])(uint8_t *d,uint8_t *top,uint8_t *left,int stride);
214 void (*intra_pred_c[7])(uint8_t *d,uint8_t *top,uint8_t *left,int stride);
215 uint8_t *col_type_base;
216 uint8_t *col_type;
217
218 /* scaling factors for MV prediction */
219 int sym_factor; ///< for scaling in symmetrical B block
220 int direct_den[2]; ///< for scaling in direct B block
221 int scale_den[2]; ///< for scaling neighbouring MVs
222
223 int got_keyframe;
224 DCTELEM *block;
225 } AVSContext;
226
154 #endif /* CAVS_H */ 227 #endif /* CAVS_H */