comparison h264_cabac.c @ 11325:c4c8c8c426eb libavcodec

Remove some unneeded fill_rectangle() for 16x16 blocks.
author michael
date Sun, 28 Feb 2010 23:54:24 +0000
parents 1a349d669184
children a3790cd1c9ca
comparison
equal deleted inserted replaced
11324:5cc6cb5167d8 11325:c4c8c8c426eb
1501 return -1; 1501 return -1;
1502 } 1502 }
1503 }else 1503 }else
1504 ref=0; 1504 ref=0;
1505 fill_rectangle(&h->ref_cache[list][ scan8[0] ], 4, 4, 8, ref, 1); 1505 fill_rectangle(&h->ref_cache[list][ scan8[0] ], 4, 4, 8, ref, 1);
1506 }else 1506 }
1507 fill_rectangle(&h->ref_cache[list][ scan8[0] ], 4, 4, 8, (uint8_t)LIST_NOT_USED, 1); //FIXME factorize and the other fill_rect below too
1508 } 1507 }
1509 for(list=0; list<h->list_count; list++){ 1508 for(list=0; list<h->list_count; list++){
1510 if(IS_DIR(mb_type, 0, list)){ 1509 if(IS_DIR(mb_type, 0, list)){
1511 int mx,my,mpx,mpy; 1510 int mx,my,mpx,mpy;
1512 pred_motion(h, 0, 4, list, h->ref_cache[list][ scan8[0] ], &mx, &my); 1511 pred_motion(h, 0, 4, list, h->ref_cache[list][ scan8[0] ], &mx, &my);
1513 DECODE_CABAC_MB_MVD( h, list, 0) 1512 DECODE_CABAC_MB_MVD( h, list, 0)
1514 tprintf(s->avctx, "final mv:%d %d\n", mx, my); 1513 tprintf(s->avctx, "final mv:%d %d\n", mx, my);
1515 1514
1516 fill_rectangle(h->mvd_cache[list][ scan8[0] ], 4, 4, 8, pack8to16(mpx,mpy), 2); 1515 fill_rectangle(h->mvd_cache[list][ scan8[0] ], 4, 4, 8, pack8to16(mpx,mpy), 2);
1517 fill_rectangle(h->mv_cache[list][ scan8[0] ], 4, 4, 8, pack16to32(mx,my), 4); 1516 fill_rectangle(h->mv_cache[list][ scan8[0] ], 4, 4, 8, pack16to32(mx,my), 4);
1518 }else 1517 }
1519 fill_rectangle(h->mv_cache[list][ scan8[0] ], 4, 4, 8, 0, 4);
1520 } 1518 }
1521 } 1519 }
1522 else if(IS_16X8(mb_type)){ 1520 else if(IS_16X8(mb_type)){
1523 for(list=0; list<h->list_count; list++){ 1521 for(list=0; list<h->list_count; list++){
1524 for(i=0; i<2; i++){ 1522 for(i=0; i<2; i++){