Mercurial > libavcodec.hg
comparison h264_direct.c @ 11137:510950eafba5 libavcodec
Special case for spatial direct MV predictor being 0.
a little less than 200 cpu cycles faster with the cathedral sample.
author | michael |
---|---|
date | Sat, 13 Feb 2010 02:47:41 +0000 |
parents | a0c52e951a29 |
children | d988e0a6f391 |
comparison
equal
deleted
inserted
replaced
11136:a0c52e951a29 | 11137:510950eafba5 |
---|---|
263 if(!is_b8x8) | 263 if(!is_b8x8) |
264 *mb_type |= MB_TYPE_L0L1; | 264 *mb_type |= MB_TYPE_L0L1; |
265 sub_mb_type |= MB_TYPE_L0L1; | 265 sub_mb_type |= MB_TYPE_L0L1; |
266 } | 266 } |
267 | 267 |
268 if(IS_INTERLACED(*mb_type) != IS_INTERLACED(mb_type_col[0])){ | 268 if(!is_b8x8 && (mv[0]|mv[1]) == 0){ |
269 fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, (uint8_t)ref[0], 1); | |
270 fill_rectangle(&h->ref_cache[1][scan8[0]], 4, 4, 8, (uint8_t)ref[1], 1); | |
271 fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, 0, 4); | |
272 fill_rectangle(&h->mv_cache[1][scan8[0]], 4, 4, 8, 0, 4); | |
273 *mb_type= (*mb_type & ~(MB_TYPE_8x8|MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_P1L0|MB_TYPE_P1L1))|MB_TYPE_16x16|MB_TYPE_DIRECT2; | |
274 }else if(IS_INTERLACED(*mb_type) != IS_INTERLACED(mb_type_col[0])){ | |
269 int n=0; | 275 int n=0; |
270 for(i8=0; i8<4; i8++){ | 276 for(i8=0; i8<4; i8++){ |
271 int x8 = i8&1; | 277 int x8 = i8&1; |
272 int y8 = i8>>1; | 278 int y8 = i8>>1; |
273 int xy8 = x8+y8*b8_stride; | 279 int xy8 = x8+y8*b8_stride; |