# HG changeset patch # User michael # Date 1265649950 0 # Node ID 77c5116751b7b2bd63e89a36e6f3f317a4a05c42 # Parent bb877c9cb10274db417ff43f0c17eb2e6844c2e0 Set partitioning to 16x16 for spatial direct MBs with mixed interlacing. 11cylcles slower MV generation 98cycles faster MC diff -r bb877c9cb102 -r 77c5116751b7 h264_direct.c --- a/h264_direct.c Mon Feb 08 16:23:05 2010 +0000 +++ b/h264_direct.c Mon Feb 08 17:25:50 2010 +0000 @@ -270,6 +270,7 @@ } if(IS_INTERLACED(*mb_type) != IS_INTERLACED(mb_type_col[0])){ + int n=0; for(i8=0; i8<4; i8++){ int x8 = i8&1; int y8 = i8>>1; @@ -291,6 +292,7 @@ a= pack16to32(mv[0][0],mv[0][1]); if(ref[1] > 0) b= pack16to32(mv[1][0],mv[1][1]); + n++; }else{ a= pack16to32(mv[0][0],mv[0][1]); b= pack16to32(mv[1][0],mv[1][1]); @@ -298,6 +300,8 @@ fill_rectangle(&h->mv_cache[0][scan8[i8*4]], 2, 2, 8, a, 4); fill_rectangle(&h->mv_cache[1][scan8[i8*4]], 2, 2, 8, b, 4); } + if(!is_b8x8 && !(n&3)) + *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; }else if(IS_16X16(*mb_type)){ int a,b;