# HG changeset patch # User michael # Date 1267142907 0 # Node ID fd2f27fcb74975ac0d7652a0104bfdbf9b3b4a71 # Parent 411ab09ada91e6b2a58a3a51b0fe0809e1aea859 Simplify code in mv_pred. Not benchmarked as this is petty much just code removial. diff -r 411ab09ada91 -r fd2f27fcb749 h264_mvpred.h --- a/h264_mvpred.h Thu Feb 25 23:44:42 2010 +0000 +++ b/h264_mvpred.h Fri Feb 26 00:08:27 2010 +0000 @@ -62,14 +62,14 @@ *C = h->mv_cache[list][scan8[0]-2]; if(!MB_FIELD - && IS_INTERLACED(mb_types[h->left_mb_xy[0]])){ - SET_DIAG_MV(*2, >>1, h->left_mb_xy[0]+s->mb_stride, (s->mb_y&1)*2+(i>>4)-1); + && IS_INTERLACED(h->left_type[0])){ + SET_DIAG_MV(*2, >>1, h->left_mb_xy[0]+s->mb_stride, (s->mb_y&1)*2+(i>>5)); assert(h->left_mb_xy[0] == h->left_mb_xy[1]); } if(MB_FIELD - && !IS_INTERLACED(mb_types[h->left_mb_xy[0]])){ + && !IS_INTERLACED(h->left_type[0])){ // left shift will turn LIST_NOT_USED into PART_NOT_AVAILABLE, but that's OK. - SET_DIAG_MV(/2, <<1, h->left_mb_xy[i>=36], (- 1 + ((i-scan8[0])>>3)*2)&3); + SET_DIAG_MV(/2, <<1, h->left_mb_xy[i>=36], ((i>>2))&3); } } #undef SET_DIAG_MV