# HG changeset patch # User michael # Date 1267109671 0 # Node ID c8fea332d5d99a0c1548038a7837e238e26087f6 # Parent db94c9bc5694f7fda480c376d29d99c928cd2e51 Simplify intra4x4_pred_mode_cache init. diff -r db94c9bc5694 -r c8fea332d5d9 h264.h --- a/h264.h Thu Feb 25 14:26:12 2010 +0000 +++ b/h264.h Thu Feb 25 14:54:31 2010 +0000 @@ -888,16 +888,10 @@ if(IS_INTRA4x4(top_type)){ AV_COPY32(h->intra4x4_pred_mode_cache+4+8*0, h->intra4x4_pred_mode + h->mb2br_xy[top_xy]); }else{ - int pred; - if(!(top_type & type_mask)) - pred= -1; - else{ - pred= 2; - } h->intra4x4_pred_mode_cache[4+8*0]= h->intra4x4_pred_mode_cache[5+8*0]= h->intra4x4_pred_mode_cache[6+8*0]= - h->intra4x4_pred_mode_cache[7+8*0]= pred; + h->intra4x4_pred_mode_cache[7+8*0]= 2 - 3*!(top_type & type_mask); } for(i=0; i<2; i++){ if(IS_INTRA4x4(left_type[i])){ @@ -905,14 +899,8 @@ h->intra4x4_pred_mode_cache[3+8*1 + 2*8*i]= mode[6-left_block[0+2*i]]; h->intra4x4_pred_mode_cache[3+8*2 + 2*8*i]= mode[6-left_block[1+2*i]]; }else{ - int pred; - if(!(left_type[i] & type_mask)) - pred= -1; - else{ - pred= 2; - } h->intra4x4_pred_mode_cache[3+8*1 + 2*8*i]= - h->intra4x4_pred_mode_cache[3+8*2 + 2*8*i]= pred; + h->intra4x4_pred_mode_cache[3+8*2 + 2*8*i]= 2 - 3*!(left_type[i] & type_mask); } } }