comparison h264.h @ 11160:1fa88821c2a8 libavcodec

Fix integer overflow warnings in h264.h Fixes: h264.h: In function 'fill_filter_caches': h264.h:1216:73: warning: integer overflow in expression h264.h:1307:81: warning: integer overflow in expression
author astrange
date Sat, 13 Feb 2010 20:57:13 +0000
parents 2d5a3c03c219
children 286497e7f7c5
comparison
equal deleted inserted replaced
11159:2d5a3c03c219 11160:1fa88821c2a8
1213 if(!USES_LIST(mb_type, list)){ 1213 if(!USES_LIST(mb_type, list)){
1214 fill_rectangle( h->mv_cache[list][scan8[0]], 4, 4, 8, pack16to32(0,0), 4); 1214 fill_rectangle( h->mv_cache[list][scan8[0]], 4, 4, 8, pack16to32(0,0), 4);
1215 *(uint32_t*)&h->ref_cache[list][scan8[ 0]] = 1215 *(uint32_t*)&h->ref_cache[list][scan8[ 0]] =
1216 *(uint32_t*)&h->ref_cache[list][scan8[ 2]] = 1216 *(uint32_t*)&h->ref_cache[list][scan8[ 2]] =
1217 *(uint32_t*)&h->ref_cache[list][scan8[ 8]] = 1217 *(uint32_t*)&h->ref_cache[list][scan8[ 8]] =
1218 *(uint32_t*)&h->ref_cache[list][scan8[10]] = ((LIST_NOT_USED)&0xFF)*0x01010101; 1218 *(uint32_t*)&h->ref_cache[list][scan8[10]] = ((LIST_NOT_USED)&0xFF)*0x01010101U;
1219 continue; 1219 continue;
1220 } 1220 }
1221 1221
1222 ref = &s->current_picture.ref_index[list][h->mb2b8_xy[mb_xy]]; 1222 ref = &s->current_picture.ref_index[list][h->mb2b8_xy[mb_xy]];
1223 { 1223 {
1304 h->ref_cache[list][scan8[0] + 1 - 1*8]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 0]]; 1304 h->ref_cache[list][scan8[0] + 1 - 1*8]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 0]];
1305 h->ref_cache[list][scan8[0] + 2 - 1*8]= 1305 h->ref_cache[list][scan8[0] + 2 - 1*8]=
1306 h->ref_cache[list][scan8[0] + 3 - 1*8]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 1]]; 1306 h->ref_cache[list][scan8[0] + 3 - 1*8]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 1]];
1307 }else{ 1307 }else{
1308 AV_ZERO128(h->mv_cache[list][scan8[0] + 0 - 1*8]); 1308 AV_ZERO128(h->mv_cache[list][scan8[0] + 0 - 1*8]);
1309 *(uint32_t*)&h->ref_cache[list][scan8[0] + 0 - 1*8]= ((LIST_NOT_USED)&0xFF)*0x01010101; 1309 *(uint32_t*)&h->ref_cache[list][scan8[0] + 0 - 1*8]= ((LIST_NOT_USED)&0xFF)*0x01010101U;
1310 } 1310 }
1311 1311
1312 if(!IS_INTERLACED(mb_type^left_type[0])){ 1312 if(!IS_INTERLACED(mb_type^left_type[0])){
1313 if(USES_LIST(left_type[0], list)){ 1313 if(USES_LIST(left_type[0], list)){
1314 const int b_xy= h->mb2b_xy[left_xy[0]] + 3; 1314 const int b_xy= h->mb2b_xy[left_xy[0]] + 3;