Mercurial > libavcodec.hg
comparison mpegvideo.c @ 298:e20de99b6295 libavcodec
using Juanjo's way to pass forced type - especially as I_TYPE/P_TYPE defines aren't exported in the public interface, and the flagged method matches the way as qscale forcing work
author | arpi_esp |
---|---|
date | Thu, 28 Mar 2002 23:07:54 +0000 |
parents | a1234c032636 |
children | 826b179dad50 |
comparison
equal
deleted
inserted
replaced
297:a1234c032636 | 298:e20de99b6295 |
---|---|
512 if (s->fixed_qscale) | 512 if (s->fixed_qscale) |
513 s->qscale = avctx->quality; | 513 s->qscale = avctx->quality; |
514 | 514 |
515 init_put_bits(&s->pb, buf, buf_size, NULL, NULL); | 515 init_put_bits(&s->pb, buf, buf_size, NULL, NULL); |
516 | 516 |
517 s->force_type= avctx->force_type; | 517 s->force_type= (avctx->flags&CODEC_FLAG_TYPE) ? |
518 (avctx->key_frame ? I_TYPE : P_TYPE) : 0; | |
518 if (!s->intra_only) { | 519 if (!s->intra_only) { |
519 /* first picture of GOP is intra */ | 520 /* first picture of GOP is intra */ |
520 if (s->picture_in_gop_number % s->gop_size==0 || s->force_type==I_TYPE){ | 521 if (s->picture_in_gop_number % s->gop_size==0 || s->force_type==I_TYPE){ |
521 s->picture_in_gop_number=0; | 522 s->picture_in_gop_number=0; |
522 s->pict_type = I_TYPE; | 523 s->pict_type = I_TYPE; |