Mercurial > libavcodec.hg
comparison h263.c @ 10664:f56b8a9be9e1 libavcodec
Improve time_increment_bits guessing code.
author | michael |
---|---|
date | Wed, 09 Dec 2009 14:05:39 +0000 |
parents | 703cfed31320 |
children | 07c893df0334 |
comparison
equal
deleted
inserted
replaced
10663:dc61c373810e | 10664:f56b8a9be9e1 |
---|---|
5901 | 5901 |
5902 if(s->time_increment_bits==0 || !(show_bits(gb, s->time_increment_bits+1)&1)){ | 5902 if(s->time_increment_bits==0 || !(show_bits(gb, s->time_increment_bits+1)&1)){ |
5903 av_log(s->avctx, AV_LOG_ERROR, "hmm, seems the headers are not complete, trying to guess time_increment_bits\n"); | 5903 av_log(s->avctx, AV_LOG_ERROR, "hmm, seems the headers are not complete, trying to guess time_increment_bits\n"); |
5904 | 5904 |
5905 for(s->time_increment_bits=1 ;s->time_increment_bits<16; s->time_increment_bits++){ | 5905 for(s->time_increment_bits=1 ;s->time_increment_bits<16; s->time_increment_bits++){ |
5906 if(show_bits(gb, s->time_increment_bits+1)&1) break; | 5906 if ( s->pict_type == FF_P_TYPE |
5907 || (s->pict_type == FF_S_TYPE && s->vol_sprite_usage==GMC_SPRITE)) { | |
5908 if((show_bits(gb, s->time_increment_bits+6)&0x37) == 0x30) break; | |
5909 }else | |
5910 if((show_bits(gb, s->time_increment_bits+5)&0x1F) == 0x18) break; | |
5907 } | 5911 } |
5908 | 5912 |
5909 av_log(s->avctx, AV_LOG_ERROR, "my guess is %d bits ;)\n",s->time_increment_bits); | 5913 av_log(s->avctx, AV_LOG_ERROR, "my guess is %d bits ;)\n",s->time_increment_bits); |
5910 } | 5914 } |
5911 | 5915 |