Mercurial > libavcodec.hg
comparison h264data.h @ 1177:fea03d2c4946 libavcodec
simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
more direct use of the new mb_type stuff instead of codec specific stuff
runtime mb_type debug output h264/h263 variants/mpeg1/2/4
error concealment /resilience for mpeg1/2
various minor optimizations
author | michaelni |
---|---|
date | Thu, 10 Apr 2003 13:18:38 +0000 |
parents | 5af9aeadbdc3 |
children | 09f1c2f62388 |
comparison
equal
deleted
inserted
replaced
1176:a39d55237445 | 1177:fea03d2c4946 |
---|---|
303 | 303 |
304 static const uint8_t chroma_dc_scan[4]={ | 304 static const uint8_t chroma_dc_scan[4]={ |
305 (0+0*2)*16, (1+0*2)*16, | 305 (0+0*2)*16, (1+0*2)*16, |
306 (0+1*2)*16, (1+1*2)*16, //FIXME | 306 (0+1*2)*16, (1+1*2)*16, //FIXME |
307 }; | 307 }; |
308 | |
309 #define MB_TYPE_REF0 0x40000000 | |
310 #define IS_REF0(a) ((a)&MB_TYPE_REF0) | |
308 | 311 |
309 typedef struct IMbInfo{ | 312 typedef struct IMbInfo{ |
310 uint16_t type; | 313 uint16_t type; |
311 uint8_t pred_mode; | 314 uint8_t pred_mode; |
312 uint8_t cbp; | 315 uint8_t cbp; |
360 {MB_TYPE_8x16 |MB_TYPE_P0L0 , 2}, | 363 {MB_TYPE_8x16 |MB_TYPE_P0L0 , 2}, |
361 {MB_TYPE_8x8 |MB_TYPE_P0L0 , 4}, | 364 {MB_TYPE_8x8 |MB_TYPE_P0L0 , 4}, |
362 }; | 365 }; |
363 | 366 |
364 static const PMbInfo b_mb_type_info[23]={ | 367 static const PMbInfo b_mb_type_info[23]={ |
365 {MB_TYPE_DIRECT , 1, }, | 368 {MB_TYPE_DIRECT2 , 1, }, |
366 {MB_TYPE_16x16|MB_TYPE_P0L0 , 1, }, | 369 {MB_TYPE_16x16|MB_TYPE_P0L0 , 1, }, |
367 {MB_TYPE_16x16 |MB_TYPE_P0L1 , 1, }, | 370 {MB_TYPE_16x16 |MB_TYPE_P0L1 , 1, }, |
368 {MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1 , 1, }, | 371 {MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1 , 1, }, |
369 {MB_TYPE_16x8 |MB_TYPE_P0L0 |MB_TYPE_P1L0 , 2, }, | 372 {MB_TYPE_16x8 |MB_TYPE_P0L0 |MB_TYPE_P1L0 , 2, }, |
370 {MB_TYPE_8x16 |MB_TYPE_P0L0 |MB_TYPE_P1L0 , 2, }, | 373 {MB_TYPE_8x16 |MB_TYPE_P0L0 |MB_TYPE_P1L0 , 2, }, |
386 {MB_TYPE_8x16 |MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_P1L0|MB_TYPE_P1L1, 2, }, | 389 {MB_TYPE_8x16 |MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_P1L0|MB_TYPE_P1L1, 2, }, |
387 {MB_TYPE_8x8 , 4, }, | 390 {MB_TYPE_8x8 , 4, }, |
388 }; | 391 }; |
389 | 392 |
390 static const PMbInfo b_sub_mb_type_info[13]={ | 393 static const PMbInfo b_sub_mb_type_info[13]={ |
391 {MB_TYPE_DIRECT , 1, }, | 394 {MB_TYPE_DIRECT2 , 1, }, |
392 {MB_TYPE_16x16|MB_TYPE_P0L0 , 1, }, | 395 {MB_TYPE_16x16|MB_TYPE_P0L0 , 1, }, |
393 {MB_TYPE_16x16 |MB_TYPE_P0L1 , 1, }, | 396 {MB_TYPE_16x16 |MB_TYPE_P0L1 , 1, }, |
394 {MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1 , 1, }, | 397 {MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1 , 1, }, |
395 {MB_TYPE_16x8 |MB_TYPE_P0L0 |MB_TYPE_P1L0 , 2, }, | 398 {MB_TYPE_16x8 |MB_TYPE_P0L0 |MB_TYPE_P1L0 , 2, }, |
396 {MB_TYPE_8x16 |MB_TYPE_P0L0 |MB_TYPE_P1L0 , 2, }, | 399 {MB_TYPE_8x16 |MB_TYPE_P0L0 |MB_TYPE_P1L0 , 2, }, |