Mercurial > libavcodec.hg
comparison snow.c @ 3193:66116775b315 libavcodec
obey vqscale in 2nd pass
author | lorenm |
---|---|
date | Mon, 13 Mar 2006 01:26:06 +0000 |
parents | e9fa3ac61966 |
children | c30e9bcbb716 |
comparison
equal
deleted
inserted
replaced
3192:01d00733caee | 3193:66116775b315 |
---|---|
4051 if(avctx->flags&CODEC_FLAG_PASS2){ | 4051 if(avctx->flags&CODEC_FLAG_PASS2){ |
4052 s->m.pict_type = | 4052 s->m.pict_type = |
4053 pict->pict_type= s->m.rc_context.entry[avctx->frame_number].new_pict_type; | 4053 pict->pict_type= s->m.rc_context.entry[avctx->frame_number].new_pict_type; |
4054 s->keyframe= pict->pict_type==FF_I_TYPE; | 4054 s->keyframe= pict->pict_type==FF_I_TYPE; |
4055 s->m.picture_number= avctx->frame_number; | 4055 s->m.picture_number= avctx->frame_number; |
4056 pict->quality= ff_rate_estimate_qscale(&s->m, 0); | 4056 if(!(avctx->flags&CODEC_FLAG_QSCALE)) |
4057 pict->quality= ff_rate_estimate_qscale(&s->m, 0); | |
4057 }else{ | 4058 }else{ |
4058 s->keyframe= avctx->gop_size==0 || avctx->frame_number % avctx->gop_size == 0; | 4059 s->keyframe= avctx->gop_size==0 || avctx->frame_number % avctx->gop_size == 0; |
4059 pict->pict_type= s->keyframe ? FF_I_TYPE : FF_P_TYPE; | 4060 pict->pict_type= s->keyframe ? FF_I_TYPE : FF_P_TYPE; |
4060 } | 4061 } |
4061 | 4062 |