comparison h264.c @ 11097:7e5d7873fad9 libavcodec

Set x264_build so that checks are simpler.
author michael
date Mon, 08 Feb 2010 00:08:05 +0000
parents 4a95670ed5f1
children 1f13ac0e696b
comparison
equal deleted inserted replaced
11096:4aa724a692f5 11097:7e5d7873fad9
871 } 871 }
872 872
873 h->thread_context[0] = h; 873 h->thread_context[0] = h;
874 h->outputed_poc = INT_MIN; 874 h->outputed_poc = INT_MIN;
875 h->prev_poc_msb= 1<<16; 875 h->prev_poc_msb= 1<<16;
876 h->x264_build = -1;
876 ff_h264_reset_sei(h); 877 ff_h264_reset_sei(h);
877 if(avctx->codec_id == CODEC_ID_H264){ 878 if(avctx->codec_id == CODEC_ID_H264){
878 if(avctx->ticks_per_frame == 1){ 879 if(avctx->ticks_per_frame == 1){
879 s->avctx->time_base.den *=2; 880 s->avctx->time_base.den *=2;
880 } 881 }
1780 } 1781 }
1781 } 1782 }
1782 1783
1783 if(h->sps.timing_info_present_flag){ 1784 if(h->sps.timing_info_present_flag){
1784 int64_t den= h->sps.time_scale; 1785 int64_t den= h->sps.time_scale;
1785 if(h->x264_build > 0 && h->x264_build < 44) 1786 if(h->x264_build < 44U)
1786 den *= 2; 1787 den *= 2;
1787 av_reduce(&s->avctx->time_base.num, &s->avctx->time_base.den, 1788 av_reduce(&s->avctx->time_base.num, &s->avctx->time_base.den,
1788 h->sps.num_units_in_tick, den, 1<<30); 1789 h->sps.num_units_in_tick, den, 1<<30);
1789 } 1790 }
1790 s->avctx->pix_fmt = s->avctx->get_format(s->avctx, s->avctx->codec->pix_fmts); 1791 s->avctx->pix_fmt = s->avctx->get_format(s->avctx, s->avctx->codec->pix_fmts);