Mercurial > libavcodec.hg
comparison h264_mvpred.h @ 11293:fd2f27fcb749 libavcodec
Simplify code in mv_pred.
Not benchmarked as this is petty much just code removial.
author | michael |
---|---|
date | Fri, 26 Feb 2010 00:08:27 +0000 |
parents | 411ab09ada91 |
children | 7dd2a45249a9 |
comparison
equal
deleted
inserted
replaced
11292:411ab09ada91 | 11293:fd2f27fcb749 |
---|---|
60 const int16_t *mv; | 60 const int16_t *mv; |
61 AV_ZERO32(h->mv_cache[list][scan8[0]-2]); | 61 AV_ZERO32(h->mv_cache[list][scan8[0]-2]); |
62 *C = h->mv_cache[list][scan8[0]-2]; | 62 *C = h->mv_cache[list][scan8[0]-2]; |
63 | 63 |
64 if(!MB_FIELD | 64 if(!MB_FIELD |
65 && IS_INTERLACED(mb_types[h->left_mb_xy[0]])){ | 65 && IS_INTERLACED(h->left_type[0])){ |
66 SET_DIAG_MV(*2, >>1, h->left_mb_xy[0]+s->mb_stride, (s->mb_y&1)*2+(i>>4)-1); | 66 SET_DIAG_MV(*2, >>1, h->left_mb_xy[0]+s->mb_stride, (s->mb_y&1)*2+(i>>5)); |
67 assert(h->left_mb_xy[0] == h->left_mb_xy[1]); | 67 assert(h->left_mb_xy[0] == h->left_mb_xy[1]); |
68 } | 68 } |
69 if(MB_FIELD | 69 if(MB_FIELD |
70 && !IS_INTERLACED(mb_types[h->left_mb_xy[0]])){ | 70 && !IS_INTERLACED(h->left_type[0])){ |
71 // left shift will turn LIST_NOT_USED into PART_NOT_AVAILABLE, but that's OK. | 71 // left shift will turn LIST_NOT_USED into PART_NOT_AVAILABLE, but that's OK. |
72 SET_DIAG_MV(/2, <<1, h->left_mb_xy[i>=36], (- 1 + ((i-scan8[0])>>3)*2)&3); | 72 SET_DIAG_MV(/2, <<1, h->left_mb_xy[i>=36], ((i>>2))&3); |
73 } | 73 } |
74 } | 74 } |
75 #undef SET_DIAG_MV | 75 #undef SET_DIAG_MV |
76 } | 76 } |
77 | 77 |