Mercurial > libavcodec.hg
comparison mpeg12.c @ 5439:f1db308c277b libavcodec
reorder if() so that the condition can be simplified
saves another 4 cpu cycles
author | michael |
---|---|
date | Wed, 01 Aug 2007 19:37:28 +0000 |
parents | 8ea581ae9fa2 |
children | cfbb6ab18f89 |
comparison
equal
deleted
inserted
replaced
5438:8ea581ae9fa2 | 5439:f1db308c277b |
---|---|
500 if(!s->chroma_y_shift){ | 500 if(!s->chroma_y_shift){ |
501 s->dsp.clear_blocks(s->block[6]); | 501 s->dsp.clear_blocks(s->block[6]); |
502 } | 502 } |
503 | 503 |
504 cbp = get_vlc2(&s->gb, mb_pat_vlc.table, MB_PAT_VLC_BITS, 1); | 504 cbp = get_vlc2(&s->gb, mb_pat_vlc.table, MB_PAT_VLC_BITS, 1); |
505 if (cbp < 0 || ((cbp == 0) && (s->chroma_format < 2)) ){ | |
506 av_log(s->avctx, AV_LOG_ERROR, "invalid cbp at %d %d\n", s->mb_x, s->mb_y); | |
507 return -1; | |
508 } | |
509 if(mb_block_count > 6){ | 505 if(mb_block_count > 6){ |
510 cbp<<= mb_block_count-6; | 506 cbp<<= mb_block_count-6; |
511 cbp |= get_bits(&s->gb, mb_block_count-6); | 507 cbp |= get_bits(&s->gb, mb_block_count-6); |
508 } | |
509 if (cbp <= 0){ | |
510 av_log(s->avctx, AV_LOG_ERROR, "invalid cbp at %d %d\n", s->mb_x, s->mb_y); | |
511 return -1; | |
512 } | 512 } |
513 | 513 |
514 #ifdef HAVE_XVMC | 514 #ifdef HAVE_XVMC |
515 //on 1 we memcpy blocks in xvmcvideo | 515 //on 1 we memcpy blocks in xvmcvideo |
516 if(s->avctx->xvmc_acceleration > 1){ | 516 if(s->avctx->xvmc_acceleration > 1){ |