# HG changeset patch # User michael # Date 1265634324 0 # Node ID 3bc0125e19fe661fdb810fc9cda9d0709e058c01 # Parent 3b135f70c097f3ea17094d046e613d64fdbcf15a Detect equal 4x4 blocks in spatial direct MBs. 19 cycles slower MV generation 575 cycles faster MC diff -r 3b135f70c097 -r 3bc0125e19fe h264_direct.c --- a/h264_direct.c Mon Feb 08 04:24:50 2010 +0000 +++ b/h264_direct.c Mon Feb 08 13:05:24 2010 +0000 @@ -345,7 +345,8 @@ if(ref[1] == 0) fill_rectangle(&h->mv_cache[1][scan8[i8*4]], 2, 2, 8, 0, 4); } - }else + }else{ + int m=0; for(i4=0; i4<4; i4++){ const int16_t *mv_col = l1mv[x8*2 + (i4&1) + (y8*2 + (i4>>1))*b4_stride]; if(FFABS(mv_col[0]) <= 1 && FFABS(mv_col[1]) <= 1){ @@ -353,8 +354,12 @@ *(uint32_t*)h->mv_cache[0][scan8[i8*4+i4]] = 0; if(ref[1] == 0) *(uint32_t*)h->mv_cache[1][scan8[i8*4+i4]] = 0; + m++; } } + if(!(m&3)) + h->sub_mb_type[i8]+= MB_TYPE_16x16 - MB_TYPE_8x8; + } } } }