diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-25 14:54:31 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-25 14:54:31 +0000 |
commit | 013202d7202b6697ee235b408358a59f1ea38644 (patch) | |
tree | c2282b39785c8021b2fa81bff5928ddef5104f28 | |
parent | 662a5b23707a6c56cd37ad710b1595f7d9f6539b (diff) | |
download | ffmpeg-013202d7202b6697ee235b408358a59f1ea38644.tar.gz |
Simplify intra4x4_pred_mode_cache init.
Originally committed as revision 22054 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/h264.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 557814905e..071b23c31a 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -888,16 +888,10 @@ static void fill_decode_caches(H264Context *h, int mb_type){ 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 @@ static void fill_decode_caches(H264Context *h, int mb_type){ 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); } } } |