Mercurial > libavcodec.hg
comparison mpegvideo.h @ 1655:c92147a61d97 libavcodec
rv20 (h263) b frame decoding support
author | michael |
---|---|
date | Thu, 04 Dec 2003 18:34:47 +0000 |
parents | 834922115010 |
children | 34b0e799aeb6 |
comparison
equal
deleted
inserted
replaced
1654:1c123e036890 | 1655:c92147a61d97 |
---|---|
133 /** | 133 /** |
134 * halfpel luma planes. | 134 * halfpel luma planes. |
135 */ | 135 */ |
136 uint8_t *interpolated[3]; | 136 uint8_t *interpolated[3]; |
137 | 137 |
138 int16_t (*motion_val[2])[2]; | 138 int16_t (*motion_val_base[2])[2]; |
139 int16_t (*motion_val[2])[2]; ///< motion_val_base+1, so motion_val[][-1] doesnt segfault | |
139 int8_t *ref_index[2]; | 140 int8_t *ref_index[2]; |
140 uint32_t *mb_type_base; | 141 uint32_t *mb_type_base; |
141 uint32_t *mb_type; ///< mb_type_base + mb_width + 2, note: only used for decoding currently | 142 uint32_t *mb_type; ///< mb_type_base + mb_width + 2, note: only used for decoding currently |
142 #define MB_TYPE_INTRA4x4 0x0001 | 143 #define MB_TYPE_INTRA4x4 0x0001 |
143 #define MB_TYPE_INTRA16x16 0x0002 //FIXME h264 specific | 144 #define MB_TYPE_INTRA16x16 0x0002 //FIXME h264 specific |
147 #define MB_TYPE_8x16 0x0020 | 148 #define MB_TYPE_8x16 0x0020 |
148 #define MB_TYPE_8x8 0x0040 | 149 #define MB_TYPE_8x8 0x0040 |
149 #define MB_TYPE_INTERLACED 0x0080 | 150 #define MB_TYPE_INTERLACED 0x0080 |
150 #define MB_TYPE_DIRECT2 0x0100 //FIXME | 151 #define MB_TYPE_DIRECT2 0x0100 //FIXME |
151 #define MB_TYPE_ACPRED 0x0200 | 152 #define MB_TYPE_ACPRED 0x0200 |
152 #define MB_TYPE_GMC 0x0400 //FIXME mpeg4 specific | 153 #define MB_TYPE_GMC 0x0400 |
153 #define MB_TYPE_SKIP 0x0800 | 154 #define MB_TYPE_SKIP 0x0800 |
154 #define MB_TYPE_P0L0 0x1000 | 155 #define MB_TYPE_P0L0 0x1000 |
155 #define MB_TYPE_P1L0 0x2000 | 156 #define MB_TYPE_P1L0 0x2000 |
156 #define MB_TYPE_P0L1 0x4000 | 157 #define MB_TYPE_P0L1 0x4000 |
157 #define MB_TYPE_P1L1 0x8000 | 158 #define MB_TYPE_P1L1 0x8000 |
158 #define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0) | 159 #define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0) |
159 #define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1) | 160 #define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1) |
160 #define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1) | 161 #define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1) |
161 #define MB_TYPE_QUANT 0x00010000 | 162 #define MB_TYPE_QUANT 0x00010000 |
162 //Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 pat, ...) | 163 #define MB_TYPE_CBP 0x00020000 |
164 //Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...) | |
163 | 165 |
164 #define IS_INTRA4x4(a) ((a)&MB_TYPE_INTRA4x4) | 166 #define IS_INTRA4x4(a) ((a)&MB_TYPE_INTRA4x4) |
165 #define IS_INTRA16x16(a) ((a)&MB_TYPE_INTRA16x16) | 167 #define IS_INTRA16x16(a) ((a)&MB_TYPE_INTRA16x16) |
166 #define IS_PCM(a) ((a)&MB_TYPE_INTRA_PCM) | 168 #define IS_PCM(a) ((a)&MB_TYPE_INTRA_PCM) |
167 #define IS_INTRA(a) ((a)&7) | 169 #define IS_INTRA(a) ((a)&7) |
181 #define IS_SUB_4X4(a) ((a)&MB_TYPE_8x8) //note reused | 183 #define IS_SUB_4X4(a) ((a)&MB_TYPE_8x8) //note reused |
182 #define IS_ACPRED(a) ((a)&MB_TYPE_ACPRED) | 184 #define IS_ACPRED(a) ((a)&MB_TYPE_ACPRED) |
183 #define IS_QUANT(a) ((a)&MB_TYPE_QUANT) | 185 #define IS_QUANT(a) ((a)&MB_TYPE_QUANT) |
184 #define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list)))) | 186 #define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list)))) |
185 #define USES_LIST(a, list) ((a) & ((MB_TYPE_P0L0|MB_TYPE_P1L0)<<(2*(list)))) ///< does this mb use listX, note doesnt work if subMBs | 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 |
188 #define HAS_CBP(a) ((a)&MB_TYPE_CBP) | |
186 | 189 |
187 | 190 |
188 int field_poc[2]; ///< h264 top/bottom POC | 191 int field_poc[2]; ///< h264 top/bottom POC |
189 int poc; ///< h264 frame POC | 192 int poc; ///< h264 frame POC |
190 int frame_num; ///< h264 frame_num | 193 int frame_num; ///< h264 frame_num |
294 int picture_number; | 297 int picture_number; |
295 int picture_in_gop_number; ///< 0-> first pic in gop, ... | 298 int picture_in_gop_number; ///< 0-> first pic in gop, ... |
296 int b_frames_since_non_b; ///< used for encoding, relative to not yet reordered input | 299 int b_frames_since_non_b; ///< used for encoding, relative to not yet reordered input |
297 int mb_width, mb_height; ///< number of MBs horizontally & vertically | 300 int mb_width, mb_height; ///< number of MBs horizontally & vertically |
298 int mb_stride; ///< mb_width+1 used for some arrays to allow simple addressng of left & top MBs withoutt sig11 | 301 int mb_stride; ///< mb_width+1 used for some arrays to allow simple addressng of left & top MBs withoutt sig11 |
302 int b8_stride; ///< 2*mb_width+1 used for some 8x8 block arrays to allow simple addressng | |
303 int b4_stride; ///< 4*mb_width+1 used for some 4x4 block arrays to allow simple addressng | |
299 int h_edge_pos, v_edge_pos;///< horizontal / vertical position of the right/bottom edge (pixel replicateion) | 304 int h_edge_pos, v_edge_pos;///< horizontal / vertical position of the right/bottom edge (pixel replicateion) |
300 int mb_num; ///< number of MBs of a picture | 305 int mb_num; ///< number of MBs of a picture |
301 int linesize; ///< line size, in bytes, may be different from width | 306 int linesize; ///< line size, in bytes, may be different from width |
302 int uvlinesize; ///< line size, for chroma in bytes, may be different from width | 307 int uvlinesize; ///< line size, for chroma in bytes, may be different from width |
303 Picture *picture; ///< main picture buffer | 308 Picture *picture; ///< main picture buffer |