Mercurial > libavcodec.hg
comparison h264_direct.c @ 11103:3bc0125e19fe libavcodec
Detect equal 4x4 blocks in spatial direct MBs.
19 cycles slower MV generation
575 cycles faster MC
author | michael |
---|---|
date | Mon, 08 Feb 2010 13:05:24 +0000 |
parents | a82b9c88682f |
children | bb877c9cb102 |
comparison
equal
deleted
inserted
replaced
11102:3b135f70c097 | 11103:3bc0125e19fe |
---|---|
343 if(ref[0] == 0) | 343 if(ref[0] == 0) |
344 fill_rectangle(&h->mv_cache[0][scan8[i8*4]], 2, 2, 8, 0, 4); | 344 fill_rectangle(&h->mv_cache[0][scan8[i8*4]], 2, 2, 8, 0, 4); |
345 if(ref[1] == 0) | 345 if(ref[1] == 0) |
346 fill_rectangle(&h->mv_cache[1][scan8[i8*4]], 2, 2, 8, 0, 4); | 346 fill_rectangle(&h->mv_cache[1][scan8[i8*4]], 2, 2, 8, 0, 4); |
347 } | 347 } |
348 }else | 348 }else{ |
349 int m=0; | |
349 for(i4=0; i4<4; i4++){ | 350 for(i4=0; i4<4; i4++){ |
350 const int16_t *mv_col = l1mv[x8*2 + (i4&1) + (y8*2 + (i4>>1))*b4_stride]; | 351 const int16_t *mv_col = l1mv[x8*2 + (i4&1) + (y8*2 + (i4>>1))*b4_stride]; |
351 if(FFABS(mv_col[0]) <= 1 && FFABS(mv_col[1]) <= 1){ | 352 if(FFABS(mv_col[0]) <= 1 && FFABS(mv_col[1]) <= 1){ |
352 if(ref[0] == 0) | 353 if(ref[0] == 0) |
353 *(uint32_t*)h->mv_cache[0][scan8[i8*4+i4]] = 0; | 354 *(uint32_t*)h->mv_cache[0][scan8[i8*4+i4]] = 0; |
354 if(ref[1] == 0) | 355 if(ref[1] == 0) |
355 *(uint32_t*)h->mv_cache[1][scan8[i8*4+i4]] = 0; | 356 *(uint32_t*)h->mv_cache[1][scan8[i8*4+i4]] = 0; |
357 m++; | |
356 } | 358 } |
359 } | |
360 if(!(m&3)) | |
361 h->sub_mb_type[i8]+= MB_TYPE_16x16 - MB_TYPE_8x8; | |
357 } | 362 } |
358 } | 363 } |
359 } | 364 } |
360 } | 365 } |
361 }else{ /* direct temporal mv pred */ | 366 }else{ /* direct temporal mv pred */ |