comparison h264.h @ 11496:1ce187c7a611 libavcodec

H264: fix signed overflow in constant multiplication This fixes libavcodec/h264.h:1100: warning: integer overflow in expression
author mru
date Mon, 15 Mar 2010 23:00:53 +0000
parents 98970e51365a
children 2a4dc3c0b012
comparison
equal deleted inserted replaced
11495:2029a714b794 11496:1ce187c7a611
1095 AV_ZERO16(h->mvd_cache [list][scan8[12]]); 1095 AV_ZERO16(h->mvd_cache [list][scan8[12]]);
1096 if(h->slice_type_nos == FF_B_TYPE){ 1096 if(h->slice_type_nos == FF_B_TYPE){
1097 fill_rectangle(&h->direct_cache[scan8[0]], 4, 4, 8, MB_TYPE_16x16>>1, 1); 1097 fill_rectangle(&h->direct_cache[scan8[0]], 4, 4, 8, MB_TYPE_16x16>>1, 1);
1098 1098
1099 if(IS_DIRECT(top_type)){ 1099 if(IS_DIRECT(top_type)){
1100 AV_WN32A(&h->direct_cache[scan8[0] - 1*8], 0x01010101*(MB_TYPE_DIRECT2>>1)); 1100 AV_WN32A(&h->direct_cache[scan8[0] - 1*8], 0x01010101u*(MB_TYPE_DIRECT2>>1));
1101 }else if(IS_8X8(top_type)){ 1101 }else if(IS_8X8(top_type)){
1102 int b8_xy = 4*top_xy; 1102 int b8_xy = 4*top_xy;
1103 h->direct_cache[scan8[0] + 0 - 1*8]= h->direct_table[b8_xy + 2]; 1103 h->direct_cache[scan8[0] + 0 - 1*8]= h->direct_table[b8_xy + 2];
1104 h->direct_cache[scan8[0] + 2 - 1*8]= h->direct_table[b8_xy + 3]; 1104 h->direct_cache[scan8[0] + 2 - 1*8]= h->direct_table[b8_xy + 3];
1105 }else{ 1105 }else{