comparison h264_mvpred.h @ 10933:3a7fa91fa168 libavcodec

Remove 2 checks from fetch_diagonal_mv() that apparently serve no purpose.
author michael
date Tue, 19 Jan 2010 02:28:26 +0000
parents 5f0ef177bbac
children 10c06a9bd3d9
comparison
equal deleted inserted replaced
10932:5f0ef177bbac 10933:3a7fa91fa168
52 h->mv_cache[list][scan8[0]-2][0] = mv[0];\ 52 h->mv_cache[list][scan8[0]-2][0] = mv[0];\
53 h->mv_cache[list][scan8[0]-2][1] = mv[1] MV_OP;\ 53 h->mv_cache[list][scan8[0]-2][1] = mv[1] MV_OP;\
54 return s->current_picture_ptr->ref_index[list][(x4>>1) + (y4>>1)*h->b8_stride] REF_OP; 54 return s->current_picture_ptr->ref_index[list][(x4>>1) + (y4>>1)*h->b8_stride] REF_OP;
55 55
56 if(topright_ref == PART_NOT_AVAILABLE 56 if(topright_ref == PART_NOT_AVAILABLE
57 && ((s->mb_y&1) || i >= scan8[0]+8) && (i&7)==4 57 && i >= scan8[0]+8 && (i&7)==4
58 && h->ref_cache[list][scan8[0]-1] != PART_NOT_AVAILABLE){ 58 && h->ref_cache[list][scan8[0]-1] != PART_NOT_AVAILABLE){
59 const uint32_t *mb_types = s->current_picture_ptr->mb_type; 59 const uint32_t *mb_types = s->current_picture_ptr->mb_type;
60 const int16_t *mv; 60 const int16_t *mv;
61 *(uint32_t*)h->mv_cache[list][scan8[0]-2] = 0; 61 *(uint32_t*)h->mv_cache[list][scan8[0]-2] = 0;
62 *C = h->mv_cache[list][scan8[0]-2]; 62 *C = h->mv_cache[list][scan8[0]-2];
64 if(!MB_FIELD 64 if(!MB_FIELD
65 && IS_INTERLACED(mb_types[h->left_mb_xy[0]])){ 65 && IS_INTERLACED(mb_types[h->left_mb_xy[0]])){
66 SET_DIAG_MV(*2, >>1, s->mb_x*4-1, (s->mb_y|1)*4+(s->mb_y&1)*2+(i>>4)-1); 66 SET_DIAG_MV(*2, >>1, s->mb_x*4-1, (s->mb_y|1)*4+(s->mb_y&1)*2+(i>>4)-1);
67 } 67 }
68 if(MB_FIELD 68 if(MB_FIELD
69 && !IS_INTERLACED(mb_types[h->left_mb_xy[0]]) 69 && !IS_INTERLACED(mb_types[h->left_mb_xy[0]])){
70 && i >= scan8[0]+8){
71 // left shift will turn LIST_NOT_USED into PART_NOT_AVAILABLE, but that's OK. 70 // left shift will turn LIST_NOT_USED into PART_NOT_AVAILABLE, but that's OK.
72 SET_DIAG_MV(/2, <<1, s->mb_x*4-1, (s->mb_y&~1)*4 - 1 + ((i-scan8[0])>>3)*2); 71 SET_DIAG_MV(/2, <<1, s->mb_x*4-1, (s->mb_y&~1)*4 - 1 + ((i-scan8[0])>>3)*2);
73 } 72 }
74 } 73 }
75 #undef SET_DIAG_MV 74 #undef SET_DIAG_MV