Mercurial > libavcodec.hg
comparison mpegvideo.h @ 1668:30746f429df6 libavcodec
move motion_val & mb_type to AVFrame patch by (Wolfgang Hesseler <qv at multimediaware dot com>)
cleanups & fixes by me
author | michael |
---|---|
date | Tue, 09 Dec 2003 01:49:56 +0000 |
parents | 4c9fd29f1606 |
children | 043b6d933fc6 |
comparison
equal
deleted
inserted
replaced
1667:720c073661a1 | 1668:30746f429df6 |
---|---|
132 | 132 |
133 /** | 133 /** |
134 * halfpel luma planes. | 134 * halfpel luma planes. |
135 */ | 135 */ |
136 uint8_t *interpolated[3]; | 136 uint8_t *interpolated[3]; |
137 | |
138 int16_t (*motion_val_base[2])[2]; | 137 int16_t (*motion_val_base[2])[2]; |
139 int16_t (*motion_val[2])[2]; ///< motion_val_base+1, so motion_val[][-1] doesnt segfault | |
140 int8_t *ref_index[2]; | 138 int8_t *ref_index[2]; |
141 uint32_t *mb_type_base; | 139 uint32_t *mb_type_base; |
142 uint32_t *mb_type; ///< mb_type_base + mb_width + 2, note: only used for decoding currently | |
143 #define MB_TYPE_INTRA4x4 0x0001 | |
144 #define MB_TYPE_INTRA16x16 0x0002 //FIXME h264 specific | |
145 #define MB_TYPE_INTRA_PCM 0x0004 //FIXME h264 specific | |
146 #define MB_TYPE_16x16 0x0008 | |
147 #define MB_TYPE_16x8 0x0010 | |
148 #define MB_TYPE_8x16 0x0020 | |
149 #define MB_TYPE_8x8 0x0040 | |
150 #define MB_TYPE_INTERLACED 0x0080 | |
151 #define MB_TYPE_DIRECT2 0x0100 //FIXME | |
152 #define MB_TYPE_ACPRED 0x0200 | |
153 #define MB_TYPE_GMC 0x0400 | |
154 #define MB_TYPE_SKIP 0x0800 | |
155 #define MB_TYPE_P0L0 0x1000 | |
156 #define MB_TYPE_P1L0 0x2000 | |
157 #define MB_TYPE_P0L1 0x4000 | |
158 #define MB_TYPE_P1L1 0x8000 | |
159 #define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0) | |
160 #define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1) | |
161 #define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1) | |
162 #define MB_TYPE_QUANT 0x00010000 | |
163 #define MB_TYPE_CBP 0x00020000 | |
164 //Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...) | |
165 | |
166 #define IS_INTRA4x4(a) ((a)&MB_TYPE_INTRA4x4) | 140 #define IS_INTRA4x4(a) ((a)&MB_TYPE_INTRA4x4) |
167 #define IS_INTRA16x16(a) ((a)&MB_TYPE_INTRA16x16) | 141 #define IS_INTRA16x16(a) ((a)&MB_TYPE_INTRA16x16) |
168 #define IS_PCM(a) ((a)&MB_TYPE_INTRA_PCM) | 142 #define IS_PCM(a) ((a)&MB_TYPE_INTRA_PCM) |
169 #define IS_INTRA(a) ((a)&7) | 143 #define IS_INTRA(a) ((a)&7) |
170 #define IS_INTER(a) ((a)&(MB_TYPE_16x16|MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8)) | 144 #define IS_INTER(a) ((a)&(MB_TYPE_16x16|MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8)) |
184 #define IS_ACPRED(a) ((a)&MB_TYPE_ACPRED) | 158 #define IS_ACPRED(a) ((a)&MB_TYPE_ACPRED) |
185 #define IS_QUANT(a) ((a)&MB_TYPE_QUANT) | 159 #define IS_QUANT(a) ((a)&MB_TYPE_QUANT) |
186 #define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list)))) | 160 #define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list)))) |
187 #define USES_LIST(a, list) ((a) & ((MB_TYPE_P0L0|MB_TYPE_P1L0)<<(2*(list)))) ///< does this mb use listX, note doesnt work if subMBs | 161 #define USES_LIST(a, list) ((a) & ((MB_TYPE_P0L0|MB_TYPE_P1L0)<<(2*(list)))) ///< does this mb use listX, note doesnt work if subMBs |
188 #define HAS_CBP(a) ((a)&MB_TYPE_CBP) | 162 #define HAS_CBP(a) ((a)&MB_TYPE_CBP) |
189 | |
190 | 163 |
191 int field_poc[2]; ///< h264 top/bottom POC | 164 int field_poc[2]; ///< h264 top/bottom POC |
192 int poc; ///< h264 frame POC | 165 int poc; ///< h264 frame POC |
193 int frame_num; ///< h264 frame_num | 166 int frame_num; ///< h264 frame_num |
194 int pic_id; ///< h264 pic_num or long_term_pic_idx | 167 int pic_id; ///< h264 pic_num or long_term_pic_idx |
374 int decode; ///< if 0 then decoding will be skiped (for encoding b frames for example) | 347 int decode; ///< if 0 then decoding will be skiped (for encoding b frames for example) |
375 | 348 |
376 DSPContext dsp; ///< pointers for accelerated dsp fucntions | 349 DSPContext dsp; ///< pointers for accelerated dsp fucntions |
377 int f_code; ///< forward MV resolution | 350 int f_code; ///< forward MV resolution |
378 int b_code; ///< backward MV resolution for B Frames (mpeg4) | 351 int b_code; ///< backward MV resolution for B Frames (mpeg4) |
379 int16_t (*motion_val)[2]; | |
380 int16_t (*p_mv_table_base)[2]; | 352 int16_t (*p_mv_table_base)[2]; |
381 int16_t (*b_forw_mv_table_base)[2]; | 353 int16_t (*b_forw_mv_table_base)[2]; |
382 int16_t (*b_back_mv_table_base)[2]; | 354 int16_t (*b_back_mv_table_base)[2]; |
383 int16_t (*b_bidir_forw_mv_table_base)[2]; | 355 int16_t (*b_bidir_forw_mv_table_base)[2]; |
384 int16_t (*b_bidir_back_mv_table_base)[2]; | 356 int16_t (*b_bidir_back_mv_table_base)[2]; |