Commit 09d1bee8 authored by Michael Niedermayer's avatar Michael Niedermayer

reorder if() so that the condition can be simplified

saves another 4 cpu cycles

Originally committed as revision 9857 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 0ac6b5a3
...@@ -502,14 +502,14 @@ static int mpeg_decode_mb(MpegEncContext *s, ...@@ -502,14 +502,14 @@ static int mpeg_decode_mb(MpegEncContext *s,
} }
cbp = get_vlc2(&s->gb, mb_pat_vlc.table, MB_PAT_VLC_BITS, 1); cbp = get_vlc2(&s->gb, mb_pat_vlc.table, MB_PAT_VLC_BITS, 1);
if (cbp < 0 || ((cbp == 0) && (s->chroma_format < 2)) ){
av_log(s->avctx, AV_LOG_ERROR, "invalid cbp at %d %d\n", s->mb_x, s->mb_y);
return -1;
}
if(mb_block_count > 6){ if(mb_block_count > 6){
cbp<<= mb_block_count-6; cbp<<= mb_block_count-6;
cbp |= get_bits(&s->gb, mb_block_count-6); cbp |= get_bits(&s->gb, mb_block_count-6);
} }
if (cbp <= 0){
av_log(s->avctx, AV_LOG_ERROR, "invalid cbp at %d %d\n", s->mb_x, s->mb_y);
return -1;
}
#ifdef HAVE_XVMC #ifdef HAVE_XVMC
//on 1 we memcpy blocks in xvmcvideo //on 1 we memcpy blocks in xvmcvideo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment