diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-07-04 17:06:43 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-07-04 17:06:43 +0000 |
commit | 784036e4044c971ecef0c14058f2770ca7d8bcd5 (patch) | |
tree | ed6a346eef93b498ce0f66b2f622ab0a8ce673d7 /libavcodec/h264.c | |
parent | 5ca0106879079d7f82bb9335638674292794f74c (diff) | |
download | ffmpeg-784036e4044c971ecef0c14058f2770ca7d8bcd5.tar.gz |
simplify intra prediction mode decoding
Originally committed as revision 5612 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 9470177d3b..8012ae1ead 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -5258,18 +5258,11 @@ decode_intra_mb: // fill_intra4x4_pred_table(h); for(i=0; i<16; i+=di){ - const int mode_coded= !get_bits1(&s->gb); - const int predicted_mode= pred_intra_mode(h, i); - int mode; + int mode= pred_intra_mode(h, i); - if(mode_coded){ + if(!get_bits1(&s->gb)){ const int rem_mode= get_bits(&s->gb, 3); - if(rem_mode<predicted_mode) - mode= rem_mode; - else - mode= rem_mode + 1; - }else{ - mode= predicted_mode; + mode = rem_mode + (rem_mode >= mode); } if(di==4) |