comparison h264.h @ 11144:0f7dcfca7b2e libavcodec

Dont calculate any surrounding MVs for temporal MBs
author michael
date Sat, 13 Feb 2010 15:30:27 +0000
parents 3b135f70c097
children 8805efb4c3fd
comparison
equal deleted inserted replaced
11143:8bfe0dae50b2 11144:0f7dcfca7b2e
945 h->left_cbp |= ((h->cbp_table[left_xy[1]]>>((left_block[2]&(~1))+1))&0x1) << 3; 945 h->left_cbp |= ((h->cbp_table[left_xy[1]]>>((left_block[2]&(~1))+1))&0x1) << 3;
946 } 946 }
947 } 947 }
948 948
949 #if 1 949 #if 1
950 if(IS_INTER(mb_type) || IS_DIRECT(mb_type)){ 950 if(IS_INTER(mb_type) || (IS_DIRECT(mb_type) && h->direct_spatial_mv_pred)){
951 int list; 951 int list;
952 for(list=0; list<h->list_count; list++){ 952 for(list=0; list<h->list_count; list++){
953 if(!USES_LIST(mb_type, list) && !IS_DIRECT(mb_type)){ 953 if(!USES_LIST(mb_type, list) && !IS_DIRECT(mb_type)){
954 /*if(!h->mv_cache_clean[list]){ 954 /*if(!h->mv_cache_clean[list]){
955 memset(h->mv_cache [list], 0, 8*5*2*sizeof(int16_t)); //FIXME clean only input? clean at all? 955 memset(h->mv_cache [list], 0, 8*5*2*sizeof(int16_t)); //FIXME clean only input? clean at all?
956 memset(h->ref_cache[list], PART_NOT_AVAILABLE, 8*5*sizeof(int8_t)); 956 memset(h->ref_cache[list], PART_NOT_AVAILABLE, 8*5*sizeof(int8_t));
957 h->mv_cache_clean[list]= 1; 957 h->mv_cache_clean[list]= 1;
958 }*/ 958 }*/
959 continue; 959 continue;
960 } 960 }
961 assert(!(IS_DIRECT(mb_type) && !h->direct_spatial_mv_pred));
962
961 h->mv_cache_clean[list]= 0; 963 h->mv_cache_clean[list]= 0;
962 964
963 if(USES_LIST(top_type, list)){ 965 if(USES_LIST(top_type, list)){
964 const int b_xy= h->mb2b_xy[top_xy] + 3*h->b_stride; 966 const int b_xy= h->mb2b_xy[top_xy] + 3*h->b_stride;
965 const int b8_xy= h->mb2b8_xy[top_xy] + h->b8_stride; 967 const int b8_xy= h->mb2b8_xy[top_xy] + h->b8_stride;
987 *(uint32_t*)h->mv_cache [list][cache_idx+8]= 0; 989 *(uint32_t*)h->mv_cache [list][cache_idx+8]= 0;
988 h->ref_cache[list][cache_idx ]= 990 h->ref_cache[list][cache_idx ]=
989 h->ref_cache[list][cache_idx+8]= (left_type[i]) ? LIST_NOT_USED : PART_NOT_AVAILABLE; 991 h->ref_cache[list][cache_idx+8]= (left_type[i]) ? LIST_NOT_USED : PART_NOT_AVAILABLE;
990 } 992 }
991 } 993 }
992
993 if((IS_DIRECT(mb_type) && !h->direct_spatial_mv_pred))
994 continue;
995 994
996 if(USES_LIST(topleft_type, list)){ 995 if(USES_LIST(topleft_type, list)){
997 const int b_xy = h->mb2b_xy[topleft_xy] + 3 + h->b_stride + (topleft_partition & 2*h->b_stride); 996 const int b_xy = h->mb2b_xy[topleft_xy] + 3 + h->b_stride + (topleft_partition & 2*h->b_stride);
998 const int b8_xy= h->mb2b8_xy[topleft_xy] + 1 + (topleft_partition & h->b8_stride); 997 const int b8_xy= h->mb2b8_xy[topleft_xy] + 1 + (topleft_partition & h->b8_stride);
999 *(uint32_t*)h->mv_cache[list][scan8[0] - 1 - 1*8]= *(uint32_t*)s->current_picture.motion_val[list][b_xy]; 998 *(uint32_t*)h->mv_cache[list][scan8[0] - 1 - 1*8]= *(uint32_t*)s->current_picture.motion_val[list][b_xy];